示例#1
0
    pageheader($lang_register_php['page_title']);
    $email = $row['user_email'];
    $user_name = $row['user_name'];
    $password = $row['user_password'];
    $sql = "UPDATE {$CONFIG['TABLE_USERS']} " . "SET user_active = 'YES' " . "WHERE user_actkey = '{$act_key}' " . "LIMIT 1";
    $result = cpg_db_query($sql);
    if ($CONFIG['admin_activation'] == 1) {
        //after admin approves, user receives email notification
        msg_box($lang_register_php['information'], $lang_register_php['acct_active_admin_activation'], $lang_continue, 'index.php');
        $site_link = $CONFIG['site_url'];
        $template_vars = array('{SITE_LINK}' => $site_link, '{USER_NAME}' => $user_name, '{PASSWORD}' => $password, '{SITE_NAME}' => $CONFIG['gallery_name']);
        cpg_mail($email, sprintf($lang_register_php['notify_user_email_subject'], $CONFIG['gallery_name']), nl2br(strtr($lang_register_activated_email, $template_vars)));
    } else {
        //user self-activated, gets message box that account was activated
        msg_box($lang_register_php['information'], $lang_register_php['acct_active'], $lang_continue, 'index.php');
    }
} else {
    pageheader($lang_register_php['page_title']);
    if (isset($_POST['agree'])) {
        input_user_info();
    } elseif (isset($_POST['submit'])) {
        $errors = '';
        if (!check_user_info($errors)) {
            input_user_info($errors);
        }
    } else {
        display_disclaimer();
    }
}
pagefooter();
ob_end_flush();
示例#2
0
    pageheader($lang_register_php['page_title']);
    $email = $row['user_email'];
    $user_name = $row['user_name'];
    $password = $row['user_password'];
    $sql = "UPDATE {$CONFIG['TABLE_USERS']} " . "SET user_active = 'YES' " . "WHERE user_actkey = '{$act_key}' " . "LIMIT 1";
    $result = cpg_db_query($sql);
    if ($CONFIG['admin_activation'] == 1) {
        //after admin approves, user receives email notification
        msg_box($lang_register_php['information'], $lang_register_php['acct_active_admin_activation'], $lang_continue, 'index.php?file=photo_shop/photo_shop_checkout');
        $site_link = $CONFIG['site_url'];
        $template_vars = array('{SITE_LINK}' => $site_link, '{USER_NAME}' => $user_name, '{PASSWORD}' => $password, '{SITE_NAME}' => $CONFIG['gallery_name']);
        cpg_mail($email, sprintf($lang_register_php['notify_user_email_subject'], $CONFIG['gallery_name']), nl2br(strtr($lang_register_activated_email, $template_vars)));
    } else {
        //user self-activated, gets message box that account was activated
        msg_box($lang_register_php['information'], $lang_register_php['acct_active'], $lang_continue, 'index.php?file=photo_shop/photo_shop_checkout');
    }
} else {
    pageheader($lang_register_php['page_title']);
    if (isset($_POST['submit'])) {
        $errors = '';
        if (!check_user_info($errors)) {
            input_user_info($errors);
        }
    } elseif (USER_ID) {
        photoshop_refresh($_SERVER['PHP_SELF'] . '?file=photo_shop/photo_shop_checkout');
    } else {
        input_user_info();
    }
}
pagefooter();
ob_end_flush();