Changeset 1620
- Timestamp:
- 12/13/2006 12:06:11 AM (2 years ago)
- Location:
- trunk
- Files:
-
- 2 modified
-
admin/login.php (modified) (3 diffs)
-
lang/lang-admin.inc.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/login.php
r1598 r1620 10 10 define("JLOG_LOGIN", true); 11 11 require_once('..'.DIRECTORY_SEPARATOR.'personal'.DIRECTORY_SEPARATOR.'settings.inc.php'); 12 $false_password = ""; 13 $get = strip($_GET); 14 $post = strip($_POST); 12 15 13 if ($_SERVER['REQUEST_METHOD'] == 'POST') { 14 session_start(); 15 16 $passwort = $_POST['password']; 17 $url = !empty($_POST['url']) ? $_POST['url'] : ""; 18 19 $hostname = $_SERVER['HTTP_HOST']; 20 $path = dirname($_SERVER['PHP_SELF']) . "/"; 21 22 // password verification 23 if ( md5( $passwort ) == JLOG_ADMIN_PASSWORD) { 24 $_SESSION['logged_in'] = true; 25 26 // go to admin index page 27 if ($_SERVER['SERVER_PROTOCOL'] == 'HTTP/1.1') { 28 if (php_sapi_name() == 'cgi') { 29 header('Status: 303 See Other'); 30 } 31 else { 32 header('HTTP/1.1 303 See Other'); 33 } 34 } 35 if(!empty($url)) $path = $url; 36 header('Location: http://'.$hostname.$path); 37 exit; 38 } 16 if ($_SERVER['REQUEST_METHOD'] == 'POST') { 17 session_start(); 18 $passwort = $post['password']; 19 $url = !empty($post['url']) ? $post['url'] : ""; 20 $hostname = $_SERVER['HTTP_HOST']; 21 $path = dirname($_SERVER['PHP_SELF']) . "/"; 22 23 if ( md5( $passwort ) == JLOG_ADMIN_PASSWORD) { 24 $_SESSION['logged_in'] = true; 25 if ($_SERVER['SERVER_PROTOCOL'] == 'HTTP/1.1') { 26 if (php_sapi_name() == 'cgi') header('Status: 303 See Other'); 27 else header('HTTP/1.1 303 See Other'); 28 } 29 if(!empty($url)) $path = $url; 30 header('Location: http://'.$hostname.$path); 31 exit; 32 } 33 else { 34 $false_password = " <p class='error'>".$l['admin']['login_false_pw']."</p>\n"; 35 } 39 36 } 40 37 … … 42 39 $c['main'] = ' 43 40 <h2>'.$l['admin']['login_headline'].'</h2> 41 '.$false_password.' 44 42 <form action="login.php" method="post"> 45 43 <p><label for="password">'.$l['admin']['login_password'].'</label> … … 47 45 <input style="display: none;" name="username" type="text" value="do-not-change" /></p> 48 46 <p>'.$l['admin']['login_cookies'].'</p> 49 <p><input type="hidden" name="url" value="'. $_GET['url'].'" />47 <p><input type="hidden" name="url" value="'.(!empty($get['url']) ? $get['url'] : $post['url']).'" /> 50 48 <input type="submit" value="'.$l['admin']['login_send'].'" /></p> 51 49 </form> -
trunk/lang/lang-admin.inc.php
r1613 r1620 216 216 "login_send" => "Einloggen", 217 217 "login_cookies" => "Hinweis! Cookies müssen aktiv sein.", 218 "login_false_pw" => "Es wurde ein falsches Passwort eingegeben.", 218 219 219 220 "cat_name" => "Name der Kategorie",
