Changeset 1441
- Timestamp:
- 04/16/06 19:02:08 (2 years ago)
- Location:
- trunk/rss
- Files:
-
- 4 modified
-
admin/index.php (modified) (1 diff)
-
admin/users.php (modified) (3 diffs)
-
ajax.php (modified) (1 diff)
-
cls/wrappers/header.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/rss/admin/index.php
r1424 r1441 81 81 $admin_uname = null; 82 82 $admin_pass = null; 83 if (isset($_POST[' admin_uname']) && isset($_POST['admin_pass'])) {84 $admin_uname = $_POST[' admin_uname'];85 $admin_pass = $_POST[' admin_pass'];83 if (isset($_POST['username']) && isset($_POST['password'])) { 84 $admin_uname = $_POST['username']; 85 $admin_pass = $_POST['password']; 86 86 } 87 87 set_admin_pass($admin_uname,$admin_pass); -
trunk/rss/admin/users.php
r1421 r1441 48 48 <!-- 49 49 function on_submit_password_match() { 50 pass=document.getElementById(' admin_pass').value;51 pass2=document.getElementById(' admin_pass2').value;50 pass=document.getElementById('password').value; 51 pass2=document.getElementById('password2').value; 52 52 if(pass !== pass2){ 53 53 msg = '<?php echo LBL_ADMIN_PASS_NO_MATCH ?>'; 54 54 document.getElementById('admin_match_result').innerHTML = msg; 55 document.getElementById(' admin_pass').value = '';56 document.getElementById(' admin_pass2').value = '';55 document.getElementById('password').value = ''; 56 document.getElementById('password2').value = ''; 57 57 return false; 58 58 }else{ 59 return true; 59 document.getElementById('password2').value = ''; 60 return loginHandler(); 60 61 } 61 62 } … … 70 71 echo "<form action=\"".$_SERVER['PHP_SELF'] . "\" onsubmit=\"return on_submit_password_match();\" method=\"post\">\n" 71 72 ."<fieldset style=\"width:400px;\">" 72 ."<p><label style=\"display:block\" for=\" admin_uname\">".LBL_USERNAME.":</label>\n"73 ."<input type=\"text\" id=\" admin_uname\" name=\"admin_uname\" /></p>\n"74 ."<p><label style=\"display:block\" for=\" admin_pass\">".LBL_PASSWORD.":</label>\n"75 ."<input type=\"password\" id=\" admin_pass\" name=\"admin_pass\" /></p>\n"76 ."<p><label style=\"display:block\" for=\" admin_pass2\">".LBL_PASSWORD2.":</label>\n"77 ."<input type=\"password\" id=\" admin_pass2\" name=\"admin_pass2\" /></p>\n"73 ."<p><label style=\"display:block\" for=\"username\">".LBL_USERNAME.":</label>\n" 74 ."<input type=\"text\" id=\"username\" name=\"username\" /></p>\n" 75 ."<p><label style=\"display:block\" for=\"password\">".LBL_PASSWORD.":</label>\n" 76 ."<input type=\"password\" id=\"password\" name=\"password\" /></p>\n" 77 ."<p><label style=\"display:block\" for=\"password2\">".LBL_PASSWORD2.":</label>\n" 78 ."<input type=\"password\" id=\"password2\" name=\"password2\" /></p>\n" 78 79 ."<p><input type=\"submit\" value=\"".LBL_ADMIN_OK."\" /></p>\n" 79 80 ."<div style=\"display:inline;\" id=\"admin_match_result\"></div>\n" … … 91 92 echo "\n<div id=\"channel_admin\" class=\"frame\">"; 92 93 93 echo "<form id=\"admin_login\" style=\"text-align:center\" action=\"".$_SERVER['PHP_SELF'] ."\" method=\"post\">\n" 94 echo "<form id=\"admin_login\" onsubmit=\"return loginHandler();\" 95 style=\"text-align:center\" action=\"".$_SERVER['PHP_SELF'] ."\" method=\"post\">\n" 94 96 ."<fieldset>" 95 97 ."<legend>" . LBL_ADMIN_LOGIN . "</legend>\n" -
trunk/rss/ajax.php
r1440 r1441 171 171 function loginHandler() { 172 172 pw = document.getElementById('password'); 173 var re = new RegExp('/[0-9a-f]{32}/'); 173 username = document.getElementById('username'); 174 var re = /[0-9a-f]{32}/ ; 174 175 if (! re.test(pw.value)) { 175 alert('hashing'); 176 pw.value = hex_md5(pw.value); 177 } else { 178 alert('not hashing'); 179 } 176 pw.value = hex_md5(pw.value + username.value); 177 } 180 178 return true; 181 179 } -
trunk/rss/cls/wrappers/header.php
r1440 r1441 146 146 ." | <a href=\"#\" onclick=\"miniloginform(); return false;\">".LBL_LOG_IN."</a>"; 147 147 $ret .= "<span style=\"display:none\" id=\"loginformcontainer\">" 148 . '<form ' /*onsubmit="return loginHandler();" */ .'method="post" action="'.getPath().'">'148 . '<form ' . 'onsubmit="return loginHandler();" ' . 'method="post" action="'.getPath().'">' 149 149 . '<input style=" width:50px;" name="username" id="username" type="text" />' 150 150 . '<input style=" width:50px;" name="password" id="password" type="password" />'
