function light_draw_logon_form($error_msg_array = array()) { $webtag = get_webtag(); forum_check_webtag_available($webtag); if (isset($_GET['logout_success']) && $_GET['logout_success'] == 'true') { light_html_display_success_msg(gettext("You have successfully logged out.")); } else { if (isset($error_msg_array) && sizeof($error_msg_array) > 0) { light_html_display_error_array($error_msg_array); } } // Get the original requested page url. $request_uri = get_request_uri(); echo "<div class=\"logon\">\n"; echo "<h3>", gettext("Logon"), "</h3>\n"; echo "<div class=\"logon_inner\">\n"; echo "<form accept-charset=\"utf-8\" name=\"logonform\" action=\"{$request_uri}\" method=\"post\">\n"; echo " ", form_csrf_token_field(), "\n"; // Check for any post data that we need to include in the form. unset($_POST['user_logon'], $_POST['user_password'], $_POST['logon'], $_POST['webtag'], $_POST['register']); // Add any post data into the form. if (isset($_POST) && is_array($_POST) && sizeof($_POST) > 0) { echo form_input_hidden_array($_POST); } echo " ", form_input_hidden("webtag", htmlentities_array($webtag)), "\n"; echo " <div class=\"logon_username\"><span>", gettext("Username"), ":</span>", light_form_input_text("user_logon", null, 20, 15) . "</div>\n"; echo " <div class=\"logon_password\"><span>", gettext("Password"), ":</span>", light_form_input_password("user_password", null, 20, 32), "</div>\n"; echo " <div class=\"logon_remember\">", light_form_checkbox("user_remember", "Y", gettext("Remember me")), "</div>\n"; echo " <div class=\"logon_buttons\">", light_form_submit('logon', gettext("Logon")), "</div>\n"; echo "</form>\n"; echo "</div>\n"; echo "</div>\n"; echo "<p class=\"register_link\">", sprintf(gettext("Don't have an account? %s"), "<a href=\"lregister.php?webtag={$webtag}\">" . gettext("Register now") . "</a>"), "</p>\n"; }
light_html_draw_top(array('title' => gettext('User Registration'), 'js' => array('js/register.js'))); light_navigation_bar(); if (isset($error_msg_array) && sizeof($error_msg_array) > 0) { light_html_display_error_array($error_msg_array); } echo "<form accept-charset=\"utf-8\" name=\"form_register\" action=\"", get_request_uri(), "\" method=\"post\" target=\"_self\">\n"; echo " ", form_csrf_token_field(), "\n"; echo "<div class=\"register\">\n"; echo "<h3>", gettext("Register"), "</h3>\n"; echo "<div class=\"register_inner\">\n"; if (isset($user_agree_rules) && $user_agree_rules == 'Y') { echo " ", form_input_hidden('webtag', htmlentities_array($webtag)), "\n"; echo " ", form_input_hidden('user_agree_rules', htmlentities_array($user_agree_rules)), "\n"; echo " <div class=\"register_username\"><span>", gettext("Username"), ":</span>", light_form_input_text("user_logon", null, 20, 15) . "</div>\n"; echo " <div class=\"register_password\"><span>", gettext("Password"), ":</span>", light_form_input_password("user_password", null, 20, 32), "</div>\n"; echo " <div class=\"register_password\"><span>", gettext("Confirm Password"), ":</span>", light_form_input_password("user_password", null, 20, 32), "</div>\n"; echo " <div class=\"register_nickname\"><span>", gettext("Nickname"), ":</span>", light_form_input_text("nickname", null, 20, 32), "</div>\n"; echo " <div class=\"register_email\"><span>", gettext("Email"), ":</span>", light_form_input_text("email", null, 20, 32), "</div>\n"; echo " <div class=\"register_dob\"><span>", gettext("Date of Birth"), ":</span>\n"; echo " ", light_form_dob_dropdowns(isset($new_user_prefs['DOB_YEAR']) ? htmlentities_array($new_user_prefs['DOB_YEAR']) : 0, isset($new_user_prefs['DOB_MONTH']) ? htmlentities_array($new_user_prefs['DOB_MONTH']) : 0, isset($new_user_prefs['DOB_DAY']) ? htmlentities_array($new_user_prefs['DOB_DAY']) : 0, true), "</div>\n"; if (forum_get_setting('text_captcha_enabled', 'Y') && $text_captcha->generate_keys()) { if (strlen(trim($text_captcha_private_key)) > 0) { echo form_input_hidden("private_key", htmlentities_array($text_captcha_private_key)); echo form_input_hidden("public_key", htmlentities_array($text_captcha->get_public_key())); } else { if (($text_captcha_image = $text_captcha->make_image()) !== false) { $forum_owner_email = forum_get_setting('forum_email', 'strlen', '*****@*****.**'); $forum_owner_link = sprintf("<a href=\"mailto:%s\">%s</a>", $forum_owner_email, gettext("forum owner")); echo "</div>\n"; echo "</div>\n"; echo "<div class=\"register\">\n";
function light_draw_logon_form($error_msg_array = array()) { $webtag = get_webtag(); if (isset($_GET['logout_success']) && $_GET['logout_success'] == 'true') { light_html_display_success_msg(gettext("You have successfully logged out.")); } else { if (isset($error_msg_array) && sizeof($error_msg_array) > 0) { light_html_display_error_array($error_msg_array); } } $username_array = array(); $password_array = array(); $passhash_array = array(); echo "<div class=\"logon\">\n"; echo "<h3>", gettext("Logon"), "</h3>\n"; echo "<div class=\"logon_inner\">\n"; echo "<form accept-charset=\"utf-8\" name=\"logonform\" action=\"llogon.php\" method=\"post\">\n"; echo " ", form_input_hidden("webtag", htmlentities_array($webtag)), "\n"; echo " <div class=\"logon_username\"><span>", gettext("Username"), ":</span>", light_form_input_text("user_logon", isset($username_array[0]) ? htmlentities_array($username_array[0]) : "", 20, 15, '') . "</div>\n"; if (isset($password_array[0]) && strlen($password_array[0]) > 0) { if (isset($passhash_array[0]) && is_md5($passhash_array[0])) { echo " <div class=\"logon_password\"><span>", gettext("Password"), ":</span>", light_form_input_password("user_password", htmlentities_array($password_array[0]), 20, 32, ''), form_input_hidden("user_passhash", htmlentities_array($passhash_array[0])), "</div>\n"; } else { echo " <div class=\"logon_password\"><span>", gettext("Password"), ":</span>", light_form_input_password("user_password", "", 20, 32, ''), form_input_hidden("user_passhash", ""), "</div>\n"; } } else { echo " <div class=\"logon_password\"><span>", gettext("Password"), ":</span>", light_form_input_password("user_password", "", 20, 32, ''), form_input_hidden("user_passhash", ""), "</div>\n"; } echo " <div class=\"logon_remember\">", light_form_checkbox("user_remember", "Y", gettext("Remember me"), false, ''), "</div>\n"; echo " <div class=\"logon_buttons\">", light_form_submit('logon', gettext("Logon")), "</div>\n"; echo "</form>\n"; echo "</div>\n"; echo "</div>\n"; }