// agreed to registration conditions/coppa
//
function show_coppa()
{
    global $userdata, $template, $lang, $phpbb_root_path, $phpEx;
    $template->set_filenames(array('body' => 'agreement.tpl'));
    $template->assign_vars(array('REGISTRATION' => $lang['Registration'], 'AGREEMENT' => $lang['Reg_agreement'], "AGREE_OVER_13" => $lang['Agree_over_13'], "AGREE_UNDER_13" => $lang['Agree_under_13'], 'DO_NOT_AGREE' => $lang['Agree_not'], "U_AGREE_OVER13" => append_sid("profile.{$phpEx}?mode=register&agreed=true"), "U_AGREE_UNDER13" => append_sid("profile.{$phpEx}?mode=register&agreed=true&coppa=true")));
    $template->pparse('body');
}
//
// ---------------------------------------
$error = FALSE;
$page_title = $mode == 'editprofile' ? $lang['Edit_profile'] : $lang['Register'];
if ($mode == 'register' && !isset($HTTP_POST_VARS['agreed']) && !isset($HTTP_GET_VARS['agreed'])) {
    include "includes/page_header.php";
    show_coppa();
    include "includes/page_tail.php";
}
$coppa = empty($HTTP_POST_VARS['coppa']) && empty($HTTP_GET_VARS['coppa']) ? 0 : TRUE;
//
// Check and initialize some variables if needed
//
if (isset($HTTP_POST_VARS['submit']) || isset($HTTP_POST_VARS['avatargallery']) || isset($HTTP_POST_VARS['submitavatar']) || isset($HTTP_POST_VARS['cancelavatar']) || $mode == 'register') {
    include 'includes/functions_validate.' . $phpEx;
    include 'includes/bbcode.' . $phpEx;
    include 'includes/functions_post.' . $phpEx;
    if ($mode == 'editprofile') {
        $user_id = intval($HTTP_POST_VARS['user_id']);
        $current_email = trim(htmlspecialchars($HTTP_POST_VARS['current_email']));
    }
    $strip_var_list = array('username' => 'username', 'email' => 'email', 'icq' => 'icq', 'aim' => 'aim', 'msn' => 'msn', 'yim' => 'yim', 'website' => 'website', 'location' => 'location', 'occupation' => 'occupation', 'interests' => 'interests');
Example #2
0
//
function show_coppa(&$coppa)
{
    global $template, $lang, $phpbb_root_path, $phpEx;
    $template->set_filenames(array('body' => 'agreement.tpl'));
    $template->assign_vars(array('COPPA' => $coppa, 'REGISTRATION' => $lang['Registration'], 'AGREEMENT' => $lang['Reg_agreement'], "AGREE_OVER_13" => $lang['Agree_over_13'], "AGREE_UNDER_13" => $lang['Agree_under_13'], 'DO_NOT_AGREE' => $lang['Agree_not'], "U_AGREE_OVER13" => append_sid("profile.{$phpEx}?mode=register&agreed=true"), "U_AGREE_UNDER13" => append_sid("profile.{$phpEx}?mode=register&agreed=true&coppa=true")));
    $template->pparse('body');
}
//
//
//
$error = FALSE;
$page_title = $mode == 'editprofile' ? $lang['Edit_profile'] : $lang['Register'];
if ($mode == 'register' && !isset($HTTP_POST_VARS['agreed']) && !isset($HTTP_GET_VARS['agreed'])) {
    include $phpbb_root_path . 'includes/page_header.' . $phpEx;
    show_coppa($coppa);
    include $phpbb_root_path . 'includes/page_tail.' . $phpEx;
}
$coppa = !$HTTP_POST_VARS['coppa'] && !$HTTP_GET_VARS['coppa'] || $mode == 'register' ? 0 : TRUE;
//
// Check and initialize some variables if needed
//
if (isset($HTTP_POST_VARS['submit']) || isset($HTTP_POST_VARS['avatargallery']) || isset($HTTP_POST_VARS['submitavatar']) || isset($HTTP_POST_VARS['cancelavatar']) || $mode == 'register') {
    include $phpbb_root_path . 'includes/functions_validate.' . $phpEx;
    include $phpbb_root_path . 'includes/bbcode.' . $phpEx;
    include $phpbb_root_path . 'includes/functions_post.' . $phpEx;
    if ($mode == 'editprofile') {
        $user_id = intval($HTTP_POST_VARS['user_id']);
        $current_email = trim(strip_tags(htmlspecialchars($HTTP_POST_VARS['current_email'])));
    }
    $strip_var_list = array('username' => 'username', 'email' => 'email', 'icq' => 'icq', 'aim' => 'aim', 'msn' => 'msn', 'yim' => 'yim', 'website' => 'website', 'location' => 'location', 'occupation' => 'occupation', 'interests' => 'interests');