Autore: DavidIQ
Apri: includes/ucp/ucp_register.php
Trova:
Codice: Seleziona tutto
// Check and initialize some variables if needed
if ($submit)
Codice: Seleziona tutto
if ($config['allow_birthdays'])
{
$data['bday_day'] = $data['bday_month'] = $data['bday_year'] = 0;
$data['bday_day'] = request_var('bday_day', $data['bday_day']);
$data['bday_month'] = request_var('bday_month', $data['bday_month']);
$data['bday_year'] = request_var('bday_year', $data['bday_year']);
$data['user_birthday'] = sprintf('%2d-%2d-%4d', $data['bday_day'], $data['bday_month'], $data['bday_year']);
}
Codice: Seleziona tutto
'lang' => array('language_iso_name'),
Codice: Seleziona tutto
'user_birthday' => array('date', !$config['allow_birthdays']),
Codice: Seleziona tutto
// Register user...
$user_id = user_add($user_row, $cp_data);
Codice: Seleziona tutto
if ($config['allow_birthdays'])
{
$user_row['user_birthday'] = $data['user_birthday'];
}
Codice: Seleziona tutto
//
$user->profile_fields = array();
Codice: Seleziona tutto
if ($config['allow_birthdays'])
{
$s_birthday_day_options = '<option value="0"' . ((!$data['bday_day']) ? ' selected="selected"' : '') . '>--</option>';
for ($i = 1; $i < 32; $i++)
{
$selected = ($i == $data['bday_day']) ? ' selected="selected"' : '';
$s_birthday_day_options .= "<option value=\"$i\"$selected>$i</option>";
}
$s_birthday_month_options = '<option value="0"' . ((!$data['bday_month']) ? ' selected="selected"' : '') . '>--</option>';
for ($i = 1; $i < 13; $i++)
{
$selected = ($i == $data['bday_month']) ? ' selected="selected"' : '';
$s_birthday_month_options .= "<option value=\"$i\"$selected>$i</option>";
}
$s_birthday_year_options = '';
$now = getdate();
$s_birthday_year_options = '<option value="0"' . ((!$data['bday_year']) ? ' selected="selected"' : '') . '>--</option>';
for ($i = $now['year'] - 100; $i < $now['year']; $i++)
{
$selected = ($i == $data['bday_year']) ? ' selected="selected"' : '';
$s_birthday_year_options .= "<option value=\"$i\"$selected>$i</option>";
}
unset($now);
$template->assign_vars(array(
'S_BIRTHDAY_DAY_OPTIONS' => $s_birthday_day_options,
'S_BIRTHDAY_MONTH_OPTIONS' => $s_birthday_month_options,
'S_BIRTHDAY_YEAR_OPTIONS' => $s_birthday_year_options,
'S_BIRTHDAYS_ENABLED' => true,
));
}
Trova:
Codice: Seleziona tutto
// These are the additional vars able to be specified
$additional_vars = array(
Codice: Seleziona tutto
if ($config['allow_birthdays'] && !empty($user_row['user_birthday']))
{
$sql_ary['user_birthday'] = $user_row['user_birthday'];
}
Trova:
Codice: Seleziona tutto
<dd><input type="password" tabindex="5" name="password_confirm" id="password_confirm" size="25" value="{PASSWORD_CONFIRM}" class="inputbox autowidth" title="{L_CONFIRM_PASSWORD}" /></dd>
</dl>
Codice: Seleziona tutto
<!-- IF S_BIRTHDAYS_ENABLED -->
<dl>
<dt><label for="bday_day">{L_BIRTHDAY}:</label><br /><span>{L_BIRTHDAY_EXPLAIN}</span></dt>
<dd>
<label for="bday_day">{L_DAY}: <select name="bday_day" id="bday_day" style="width: 4em;">{S_BIRTHDAY_DAY_OPTIONS}</select></label>
<label for="bday_month">{L_MONTH}: <select name="bday_month" id="bday_month" style="width: 4em;">{S_BIRTHDAY_MONTH_OPTIONS}</select></label>
<label for="bday_year">{L_YEAR}: <select name="bday_year" id="bday_year" style="width: 6em;">{S_BIRTHDAY_YEAR_OPTIONS}</select></label>
</dd>
</dl>
<!-- ENDIF -->