function display_account_setup($auth_user) { //add new account display_account_form($auth_user); $list = get_accounts($auth_user); // $accounts = sizeof($list); //display all accounts foreach ($list as $key => $account) { display_account_form($auth_user, $account['accountid'], $account['server'], $account['remoteuser'], $account['remotepassword'], $account['type'], $account['port']); } }
} } if ($page != 'admin_creation') { require_once 'common/event/EventManager.class.php'; $em =& EventManager::instance(); $em->processEvent('before_register', array()); } $body_class = array('register-page'); if ($page == 'admin_creation') { $body_class[] = 'admin_register'; } // // not valid registration, or first time to page // $HTML->includeJavascriptFile('/scripts/check_pw.js.php'); $HTML->includeFooterJavascriptFile('/scripts/mailcheck/mailcheck.min.js'); $HTML->includeFooterJavascriptFile('/scripts/tuleap/mailchecker.js'); $HTML->header(array('title' => $Language->getText('account_register', 'title'), 'body_class' => $body_class)); ?> <div id="register-background"> <?php $reg_err = isset($GLOBALS['register_error']) ? $GLOBALS['register_error'] : ''; display_account_form($reg_err); ?> </div> <?php $HTML->footer(array());
} $presenter = new Account_ConfirmationPresenter($title, $content, $thanks, $is_thanks, $redirect_url, $redirect_content, $displayed_image, $image_url, $email_presenter); $template = 'confirmation'; } } if ($page != 'admin_creation') { require_once 'common/event/EventManager.class.php'; $em =& EventManager::instance(); $em->processEvent('before_register', array()); } $body_class = array('register-page'); if ($page == 'admin_creation') { $body_class[] = 'admin_register'; } // // not valid registration, or first time to page // $HTML->includeJavascriptFile('/scripts/check_pw.js'); $HTML->includeFooterJavascriptFile('/scripts/mailcheck/mailcheck.min.js'); $HTML->includeFooterJavascriptFile('/scripts/tuleap/mailchecker.js'); $HTML->includeFooterJavascriptFile('/scripts/jstimezonedetect/jstz.min.js'); $HTML->includeFooterJavascriptFile('/scripts/tuleap/timezone.js'); $HTML->header(array('title' => $Language->getText('account_register', 'title'), 'body_class' => $body_class)); if (!$confirmation_register) { $reg_err = isset($GLOBALS['register_error']) ? $GLOBALS['register_error'] : ''; display_account_form($reg_err, $errors); } else { $renderer = TemplateRendererFactory::build()->getRenderer(ForgeConfig::get('codendi_dir') . '/src/templates/account/'); $renderer->renderToPage($template, $presenter); } $HTML->footer(array());
} else { $row = mysql_fetch_assoc($result); # don't need to check if they have permissions, this is a # normal user editing themselves. # print __("Use this form to update your account."); print "<br />"; print __("Leave the password fields blank to keep your same password."); display_account_form($atype, "UpdateAccount", $row["Username"], $row["AccountType"], $row["Suspended"], $row["Email"], "", "", $row["RealName"], $row["LangPreference"], $row["IRCNick"], $row["NewPkgNotify"], $row["ID"]); } } } } else { # visitor is not logged in # if ($_REQUEST["Action"] == "AccountInfo") { print __("You must log in to view user information."); } elseif ($_REQUEST["Action"] == "NewAccount") { # process the form input for creating a new account # process_account_form("", "new", "NewAccount", $_REQUEST["U"], 1, 0, $_REQUEST["E"], $_REQUEST["P"], $_REQUEST["C"], $_REQUEST["R"], $_REQUEST["L"], $_REQUEST["I"], $_REQUEST["N"]); } else { # display the account request form # print __("Use this form to create an account."); display_account_form("", "NewAccount"); } } echo " </div>"; echo "</div>"; html_footer(AUR_VERSION);
function display_account_setup($auth_user) { //display empty 'new account' form display_account_form($auth_user); $list = get_accounts($auth_user); $accounts = sizeof($list); // display each stored account foreach ($list as $key => $account) { // display form for each accounts details. // note that we are going to send the password for all accounts in the HTML // this is not really a very good idea display_account_form($auth_user, $account['accountid'], $account['server'], $account['remoteuser'], $account['remotepassword'], $account['type'], $account['port']); } }
display_items('Archive For ' . get_list_name($_GET['id']), get_archive($_GET['id']), 'view-html', 'view-text', ''); break; case 'information': display_information($_GET['id']); break; default: if (!check_logged_in()) { display_login_form($action); } break; } //all other actions require user to be logged in if (check_logged_in()) { switch ($action) { case 'account-settings': display_account_form(get_email(), get_real_name(get_email()), get_mimetype(get_email())); break; case 'show-other-lists': display_items('Unsubscribed Lists', get_unsubscribed_lists(get_email()), 'information', 'show-archive', 'subscribe'); break; case 'subscribe': subscribe(get_email(), $_GET['id']); display_items('Subscribed Lists', get_subscribed_lists(get_email()), 'information', 'show-archive', 'unsubscribe'); break; case 'unsubscribe': unsubscribe(get_email(), $_GET['id']); display_items('Subscribed Lists', get_subscribed_lists(get_email()), 'information', 'show-archive', 'unsubscribe'); break; case '': case 'show-my-lists': display_items('Subscribed Lists', get_subscribed_lists(get_email()), 'information', 'show-archive', 'unsubscribe');
<?php set_include_path(get_include_path() . PATH_SEPARATOR . '../lib'); include_once 'aur.inc.php'; # access AUR common functions include_once 'acctfuncs.inc.php'; # access Account specific functions set_lang(); # this sets up the visitor's language check_sid(); # see if they're still logged in if (isset($_COOKIE["AURSID"])) { header('Location: /'); exit; } html_header(__('Register')); echo '<div class="box">'; echo '<h2>' . __('Register') . '</h2>'; if (in_request("Action") == "NewAccount") { list($success, $message) = process_account_form("new", "NewAccount", in_request("U"), 1, 0, in_request("E"), in_request("H"), '', '', in_request("R"), in_request("L"), in_request("I"), in_request("K"), in_request("PK")); print $message; if (!$success) { display_account_form("NewAccount", in_request("U"), 1, 0, in_request("E"), in_request("H"), '', '', in_request("R"), in_request("L"), in_request("I"), in_request("K"), in_request("PK")); } } else { print '<p>' . __("Use this form to create an account.") . '</p>'; display_account_form("NewAccount", "", "", "", "", "", "", "", "", $LANG); } echo '</div>'; html_footer(AURWEB_VERSION);
break; case 'show-all-lists': display_items('All Lists', get_all_lists(), 'information', 'show-archive', 'modify'); break; case 'show-archive': display_items('Archive For ' . get_list_name($_GET['id']), get_archive($_GET['id']), 'view-html', 'view-text', ''); break; case 'information': display_information($_GET['id']); break; } //all other actions require user to be logged in if (check_logged_in()) { switch ($action) { case 'account-settings': display_account_form(get_user(), get_real_name(get_user()), get_mimetype(get_user())); break; case 'show-other-lists': display_items('Unsubscribed Lists', get_unsubscribed_lists(get_user()), 'information', 'show-archive', 'subscribe'); break; case 'subscribe': subscribe(get_user(), $_GET['id']); display_items('Subscribed Lists', get_subscribed_lists(get_user()), 'information', 'show-archive', 'subscribe'); break; case 'unsubscribe': unsubscribe(get_user(), $_GET['id']); display_items('Subscribed Lists', get_subscribed_lists(get_user()), 'information', 'show-archive', 'unsubscribe'); break; //case '': //case '': case 'show-my-lists':
} } else { print __("You do not have permission to edit this account."); } } elseif ($action == "AccountInfo") { # no editing, just looking up user info # if (empty($row)) { print __("Could not retrieve information for the specified user."); } else { include "account_details.php"; } } elseif ($action == "UpdateAccount") { print $update_account_message; if (!$success) { display_account_form("UpdateAccount", in_request("U"), in_request("T"), in_request("S"), in_request("E"), in_request("H"), in_request("P"), in_request("C"), in_request("R"), in_request("L"), in_request("I"), in_request("K"), in_request("PK"), in_request("J"), in_request("ID"), $row["Username"]); } } else { if (has_credential(CRED_ACCOUNT_SEARCH)) { # display the search page if they're a TU/dev # print __("Use this form to search existing accounts.") . "<br />\n"; include 'search_accounts_form.php'; } else { print __("You are not allowed to access this area."); } } } else { # visitor is not logged in # print __("You must log in to view user information.");