Codice PHP:
($s_hidden_fields, array(
'cognome' => utf8_normalize_nfc(request_var('cognome', '', true)),
'nome' => utf8_normalize_nfc(request_var('nome', '', true)),
'indirizzo' => utf8_normalize_nfc(request_var('indirizzo', '', true)),
'città' => utf8_normalize_nfc(request_var('città', '', true)),
'provincia' => utf8_normalize_nfc(request_var('provincia', '', true)),
'cap' => utf8_normalize_nfc(request_var('cap', '', true)),
'telefono fisso' => utf8_normalize_nfc(request_var('telefono fisso', '', true)),
'telefono cell' => utf8_normalize_nfc(request_var('telefono cell', '', true)),
'id ebay' => utf8_normalize_nfc(request_var('id ebay', '', true)),
'username forum' => utf8_normalize_nfc(request_var('username forum', '', true)),
'data di nascita' => utf8_normalize_nfc(request_var('data di nascita', '', true)),
'documento' => utf8_normalize_nfc(request_var('documento', '', true)),
'numero' => utf8_normalize_nfc(request_var('numero', '', true)),
'email' => strtolower(request_var('email', '')),
'email_confirm' => strtolower(request_var('email_confirm', '')),
'confirm_code' => request_var('confirm_code', ''),
'lang' => $user->lang_name,
'tz' => request_var('tz', (float) $config['board_timezone']),
));
}
if ($coppa === false && $config['coppa_enable'])
{
$now = getdate();
$coppa_birthday = $user->format_date(mktime($now['hours'] + $user->data['user_dst'], $now['minutes'], $now['seconds'], $now['mon'], $now['mday'] - 1, $now['year'] - 13), $user->lang['DATE_FORMAT']);
unset($now);
$template->assign_vars(array(
'L_COPPA_NO' => sprintf($user->lang['UCP_COPPA_BEFORE'], $coppa_birthday),
'L_COPPA_YES' => sprintf($user->lang['UCP_COPPA_ON_AFTER'], $coppa_birthday),
'U_COPPA_NO' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=register&coppa=0' . $add_lang),
'U_COPPA_YES' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=register&coppa=1' . $add_lang),
'S_SHOW_COPPA' => true,
'S_HIDDEN_FIELDS' => build_hidden_fields($s_hidden_fields),
'S_ucp_register_ACTION' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=register' . $add_lang),
));
}
else
{
$template->assign_vars(array(
'L_TERMS_OF_USE' => sprintf($user->lang['TERMS_OF_USE_CONTENT'], $config['sitename'], generate_board_url()),
'S_SHOW_COPPA' => false,
'S_REGISTRATION' => true,
'S_HIDDEN_FIELDS' => build_hidden_fields($s_hidden_fields),
'S_ucp_register_ACTION' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=register' . $add_lang . $add_coppa),
'S_TIME' => 1000 * ((int) $config['min_time_terms']),
)
);
}
$this->tpl_name = 'ucp_agreement';
return;
}
// Try to manually determine the timezone and adjust the dst if the server date/time complies with the default setting +/- 1
$timezone = date('Z') / 3600;
$is_dst = date('I');
Codice PHP:
if ($config['board_timezone'] == $timezone || $config['board_timezone'] == ($timezone - 1))
{
$timezone = ($is_dst) ? $timezone - 1 : $timezone;
if (!isset($user->lang['tz_zones'][(string) $timezone]))
{
$timezone = $config['board_timezone'];
}
}
else
{
$is_dst = $config['board_dst'];
$timezone = $config['board_timezone'];
}
$data = array(
'cognome' => utf8_normalize_nfc(request_var('cognome', '', true)),
'nome' => utf8_normalize_nfc(request_var('nome', '', true)),
'indirizzo' => utf8_normalize_nfc(request_var('indirizzo', '', true)),
'città' => utf8_normalize_nfc(request_var('città', '', true)),
'provincia' => utf8_normalize_nfc(request_var('provincia', '', true)),
'cap' => utf8_normalize_nfc(request_var('cap', '', true)),
'telefono fisso' => utf8_normalize_nfc(request_var('telefono fisso', '', true)),
'telefono cell' => utf8_normalize_nfc(request_var('telefono cell', '', true)),
'id ebay' => utf8_normalize_nfc(request_var('id ebay', '', true)),
'username forum' => utf8_normalize_nfc(request_var('username forum', '', true)),
'data di nascita' => utf8_normalize_nfc(request_var('data di nascita', '', true)),
'documento' => utf8_normalize_nfc(request_var('documento', '', true)),
'numero' => utf8_normalize_nfc(request_var('numero', '', true)),
'new_password' => request_var('new_password', '', true),
'password_confirm' => request_var('password_confirm', '', true),
'email' => strtolower(request_var('email', '')),
'email_confirm' => strtolower(request_var('email_confirm', '')),
'confirm_code' => request_var('confirm_code', ''),
'lang' => basename(request_var('lang', $user->lang_name)),
'tz' => request_var('tz', (float) $timezone),
);
// Check and initialize some variables if needed
if ($submit)
{
$error = validate_data($data, array(
'cognome' => array(
array('string', false, $config['min_name_chars'], $config['max_name_chars']),
array('cognome', '')),
'nome' => array(
array('string', false, $config['min_name_chars'], $config['max_name_chars']),
array('nome', '')),
'indirizzo' => array(
array('string', false, $config['min_name_chars'], $config['max_name_chars']),
array('indirizzo', '')),
'città' => array(
array('string', false, $config['min_name_chars'], $config['max_name_chars']),
array('città', '')),
'provincia' => array(
array('string', false, $config['min_name_chars'], $config['max_name_chars']),
array('provincia', '')),
'cap' => array(
array('string', false, $config['min_name_chars'], $config['max_name_chars']),
array('cap', '')),
'telefono fisso' => array(
array('string', false, $config['min_name_chars'], $config['max_name_chars']),
array('telefono fisso', '')),
'telefono cell' => array(
array('string', false, $config['min_name_chars'], $config['max_name_chars']),
array('telefono cell', '')),
'id ebay' => array(
array('string', false, $config['min_name_chars'], $config['max_name_chars']),
array('id ebay', '')),
'username forum' => array(
array('string', false, $config['min_name_chars'], $config['max_name_chars']),
array('username forum', '')),
'data di nascita' => array(
array('string', false, $config['min_name_chars'], $config['max_name_chars']),
array('data di nascita', '')),
'documento' => array(
array('string', false, $config['min_name_chars'], $config['max_name_chars']),
array('documento', '')),
'numero' => array(
array('string', false, $config['min_name_chars'], $config['max_name_chars']),
array('numero', '')),
'new_password' => array(
array('string', false, $config['min_pass_chars'], $config['max_pass_chars']),
array('password')),
'password_confirm' => array('string', false, $config['min_pass_chars'], $config['max_pass_chars']),
'email' => array(
array('string', false, 6, 60),
array('email')),
'email_confirm' => array('string', false, 6, 60),
'confirm_code' => array('string', !$config['enable_confirm'], 5, 8),
Vi ringrazio sin d'ora per l'aiuto