Esempio n. 1
0
        if (isset($_POST['userid']) && $_POST['userid'] > 0) {
            $USERID = $_POST['userid'];
        } else {
            header("Location: usermanager.php");
        }
    }
} else {
    header("Location: usermanager.php");
}
$smarty->assign('userID', $USERID);
if (isset($_POST['action']) && $_POST['action'] == 'Assign Access Level') {
    process_accesslevel_form();
    header("Location: usermanager.php");
}
$smarty->assign('page_name', 'Edit Site Access Level');
set_user_info();
setup_select_level_candidates();
// Build the page
require 'global_begin.php';
$smarty->display('admin/editaccesslevel.tpl');
require 'global_end.php';
/*
* ********************************************************************************
* ********************************************************************************
* **************************L O C A L  F U N C T I O N S**************************
* ********************************************************************************
* ********************************************************************************
*/
function set_user_info()
{
    global $smarty;
Esempio n. 2
0
/**
 * Show html
 *
 * @access public
 * @return void
 */
function show_html()
{
    global $debug, $show_vars;
    global $task, $err, $loggedin, $admin;
    global $nav_items, $image_list, $fields, $title_codes, $country_codes;
    global $mycookie_name;
    if (is_donate()) {
        $this_nav = 6;
        $mymenuleft = 'menu_left_donate.php';
        $mymenuright = 'menu_right_donate.php';
        $page_title = 'Donate Online';
    } else {
        $this_nav = 8;
        $mymenuleft = 'menu_left_register.php';
        $mymenuright = 'menu_right_register.php';
        $page_title = 'Log in or register';
    }
    switch ($task) {
        case 'start':
            $instructions_text = 'Please enter your email below:';
            $mypage = 'register_email.php';
            break;
        case 'email_new':
            $instructions_text = 'Please enter your details below';
            $instructions_text .= is_donate() ? ' (for your receipt):' : ':';
            $mypage = 'register_form.php';
            break;
        case 'edit':
            set_user_info();
            set_cookie();
            $page_title = 'Your details';
            $instructions_text = 'Please edit your details below:';
            $mypage = 'register_form.php';
            if (!is_donate() && ($task = 'edit')) {
                $mymenuright = "menu_right_blank.php";
            }
            break;
        case 'reg_new':
            set_cookie();
            $page_title = 'Your details';
            $instructions_text = 'Thank you for registering with us ' . get_full_name() . '.';
            $mypage = is_donate() ? 'register_donate.php' : 'register_thankyou.php';
            break;
        case 'reg_updated':
            set_user_info();
            set_cookie();
            $page_title = is_donate() ? 'Donate online' : 'Members area';
            if ($_POST['page_flag'] == 'check_registration') {
                $instructions_text = 'Thank you for updating your profile.';
            } else {
                $instructions_text = 'Welcome back ' . get_full_name() . '.';
            }
            $mypage = is_donate() ? 'register_donate.php' : 'register_thankyou.php';
            if (!is_donate()) {
                $mymenuright = "menu_right_links.php";
            }
            break;
            // donate
        // donate
        case 'donate_now':
            set_user_info();
            set_cookie();
            $instructions_text = 'Welcome back ' . get_full_name() . '.';
            $mypage = 'register_donate.php';
            break;
            // get password
        // get password
        case 'password_reminder':
            set_user_info();
            $page_title = 'Get password reminder';
            $instructions_text = 'Please enter your email address below.';
            $mypage = 'register_password_reminder.php';
            break;
        case 'password_sender':
            set_user_info();
            $page_title = 'Get password reminder';
            $instructions_text = 'Please enter your email address below.';
            $mypage = 'register_password_reminder.php';
            break;
    }
    //--------------------------------------------------------------
    require_once 'views/head.php';
    require_once 'views/' . $mymenuleft;
    require_once 'views/' . $mypage;
    require_once 'views/' . $mymenuright;
    require_once 'views/tail.php';
    if ($debug && $show_vars) {
        echo '<div id="debug_info">';
        echo 'sys=' . $_POST['sys_flag'];
        echo '<br />page=' . $_POST['page_flag'];
        echo '<br />task=' . $task;
        echo '<br />loggedin=' . $loggedin;
        echo '<br />admin=' . $admin;
        echo '<br />[id]=' . (isset($_POST['id']) ? $_POST['id'] : '');
        echo '<br />[name]=' . (isset($_POST['name']) ? $_POST['name'] : '');
        echo '<br />[admin]=' . (isset($_POST['admin']) ? $_POST['admin'] : '');
        echo '<br />';
        echo '<br />';
        var_dump($_COOKIE);
        echo '<br />';
        echo '<br />';
        /* 		var_dump($_REQUEST); */
        echo '</div>';
        echo "\n";
    }
}