Пример #1
0
                  <br /><br />';
    }
}
if (isset($action) && $action == 'log-out') {
    session_destroy();
    unset($action);
    $_SESSION = array();
}
//need to process choose, delete or store account before drawing header
if (isset($action)) {
    switch ($action) {
        case 'delete-account':
            delete_account($_SESSION['auth_user'], $account);
            break;
        case 'store-settings':
            store_account_settings($_SESSION['auth_user'], $_POST);
            break;
        case 'select-account':
            // if have chosen a valid account, store it as a session variable
            if ($account && account_exists($_SESSION['auth_user'], $account)) {
                $_SESSION['selected_account'] = $account;
            }
    }
}
// set the buttons that will be on the tool bar
$buttons[0] = 'view-mailbox';
$buttons[1] = 'new-message';
$buttons[2] = 'account-setup';
//only offer a log out button if logged in
if (check_auth_user()) {
    $buttons[4] = 'log-out';
                  username and password.</p><br /><br /><br /><br />
                  <br /><br />';
    }
}
if ($action == 'log-out') {
    session_destroy();
    unset($action);
    unset($HTTP_SESSION_VARS);
}
//need to process choose, delete or store account before drawing header
switch ($action) {
    case 'delete-account':
        delete_account($HTTP_SESSION_VARS['auth_user'], $account);
        break;
    case 'store-settings':
        store_account_settings($HTTP_SESSION_VARS['auth_user'], $HTTP_POST_VARS);
        break;
    case 'select-account':
        // if have chosen a valid account, store it as a session variable
        if ($account && account_exists($HTTP_SESSION_VARS['auth_user'], $account)) {
            $HTTP_SESSION_VARS['selected_account'] = $account;
        }
}
// set the buttons that will be on the tool bar
$buttons[0] = 'view-mailbox';
$buttons[1] = 'new-message';
$buttons[2] = 'account-setup';
//only offer a log out button if logged in
if (check_auth_user()) {
    $buttons[4] = 'log-out';
}