ich habe nichts abgeändert. nur den expander hinzugefügt. (WBB-Spoiler)
hier nochmal Aktuell:
PHP
<?phprequire_once('SatDB.php');if (!isset($_SESSION)) { session_start();}$MM_authorizedUsers = "1";$MM_donotCheckaccess = "false";// *** Restrict Access To Page: Grant or deny access to this pagefunction isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) { // For security, start by assuming the visitor is NOT authorized. $isValid = False; // When a visitor has logged into this site, the Session variable MM_Username set equal to their username. // Therefore, we know that a user is NOT logged in if that Session variable is blank. if (!empty($UserName)) { // Besides being logged in, you may restrict access to only certain users based on an ID established when they login. // Parse the strings into arrays. $arrUsers = Explode(",", $strUsers); $arrGroups = Explode(",", $strGroups); if (in_array($UserName, $arrUsers)) { $isValid = true; } // Or, you may restrict access to only certain users based on their username. if (in_array($UserGroup, $arrGroups)) { $isValid = true; } if (($strUsers == "") && false) { $isValid = true; } } return $isValid; }$MM_restrictGoTo = "Login.php";if (!((isset($_SESSION['MM_Username'])) && (isAuthorized("",$MM_authorizedUsers, $_SESSION['MM_Username'], $_SESSION['MM_UserGroup'])))) { $MM_qsChar = "?"; $MM_referrer = $_SERVER['PHP_SELF']; if (strpos($MM_restrictGoTo, "?")) $MM_qsChar = "&"; if (isset($QUERY_STRING) && strlen($QUERY_STRING) > 0) $MM_referrer .= "?" . $QUERY_STRING; $MM_restrictGoTo = $MM_restrictGoTo. $MM_qsChar . "accesscheck=" . urlencode($MM_referrer); header("Location: ". $MM_restrictGoTo); exit;}?><?phpif (!function_exists("GetSQLValueString")) {function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { if (PHP_VERSION < 6) { $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; } $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? doubleval($theValue) : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue;}}mysql_select_db($database_SatDB, $SatDB);$query_Login = "SELECT * FROM `User`";$Login = mysql_query($query_Login, $SatDB) or die(mysql_error());$row_Login = mysql_fetch_assoc($Login);$totalRows_Login = mysql_num_rows($Login);mysql_close($SatDB);?><?php// *** Validate request to login to this site.if (!isset($_SESSION)) { session_start();}$loginFormAction = $_SERVER['PHP_SELF'];if (isset($_GET['accesscheck'])) { $_SESSION['PrevUrl'] = $_GET['accesscheck'];}if (isset($_POST['UserName'])) { $loginUsername=$_POST['UserName']; $password=$_POST['Password']; $MM_fldUserAuthorization = "UserLevel"; $MM_redirectLoginSuccess = "Account.php"; $MM_redirectLoginFailed = "Login.php"; $MM_redirecttoReferrer = true; mysql_select_db($database_SatPanelDB, $SatPanelDB); $LoginRS__query=sprintf("SELECT Username, Password, UserLevel FROM `User` WHERE Username=%s AND Password=%s", GetSQLValueString($loginUsername, "text"), GetSQLValueString($password, "text")); $LoginRS = mysql_query($LoginRS__query, $SatPanelDB) or die(mysql_error()); $loginFoundUser = mysql_num_rows($LoginRS); if ($loginFoundUser) { $loginStrGroup = mysql_result($LoginRS,0,'UserLevel'); //declare two session variables and assign them $_SESSION['MM_Username'] = $loginUsername; $_SESSION['MM_UserGroup'] = $loginStrGroup; if (isset($_SESSION['PrevUrl']) && true) { $MM_redirectLoginSuccess = $_SESSION['PrevUrl']; } header("Location: " . $MM_redirectLoginSuccess ); } else { header("Location: ". $MM_redirectLoginFailed ); }}?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link href="CSS/Layout.css" rel="stylesheet" type="text/css" /><link href="CSS/Menu.css" rel="stylesheet" type="text/css" /><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>San Andreas Trucking | Login</title><script src="../SpryAssets/SpryValidationTextField.js" type="text/javascript"></script><link href="../SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" /></head><body><div id="Holder"><div id="Header"></div><div id="NavBar"> <nav class="navbar navbar-inverse"> <div class="container-fluid"> <div> <ul class="nav navbar-nav"> <li class="dropdown"> <a class="dropdown-toggle" data-toggle="dropdown" href="#">Login <span class="caret"></span></a> <ul class="dropdown-menu"> <li><a href="/ForgotPassword.php">Passwort vergessen</a></li> </ul> </li> <li><a href="/Register.php">Registrieren</a></li> </ul> </div> </div></nav></div><div id="Content"> <div id="PageHeading"> <h1>Login </h1> </div> <div id="ContentLeft"> <h2>Support:</h2> <h6> </h6> <h6>Email: bedrockcracher@gmail.com</h6> <h6> </h6> <h6>codet by Yannik Böltes alias Derek Westbrook</h6> </div> <div id="ContentRight"> <form id="LoginForm" name="LoginForm" method="POST" action="<?php echo $loginFormAction; ?>"> <table width="400" border="0" align="center"> <tr> <td><h6>Benutzername:</h6> <h6><span id="sprytextfield1"> <label> <input name="UserName" type="text" class="StyleTextField" id="UserName" /> </label> <span class="textfieldRequiredMsg">Es muss ein Wert angegeben werden.</span></span></h6></td> </tr> <tr> <td> </td> </tr> <tr> <td><h6><span id="sprytextfield2"> <label>Passwort:<br /> <br /> <input name="Password" type="text" class="StyleTextField" id="Password" /> </label> <span class="textfieldRequiredMsg">Es muss ein Wert angegeben werden.</span></span></h6></td> </tr> <tr> <td> </td> </tr> <tr> <td><label> <input type="submit" name="Einloggen" id="LoginButton" value="Einloggen" /> </label></td> </tr> <tr> <td> </td> </tr> </table> </form> </div></div><div id="Footer"></div></div><script type="text/javascript"><!--var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1");var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2");//--></script></body></html><?phpmysql_free_result($Login);?>
SatDB.php
PHP
<?php# FileName="Connection_php_mysql.htm"# Type="MYSQL"# HTTP="true"$hostname_SatDB = "localhost";$database_SatDB = "sat_panel";$username_SatDB = "sat_panel";$password_SatDB = "*****";$SatDB = mysql_pconnect($hostname_SatDB, $username_SatDB, $password_SatDB) or trigger_error(mysql_error(),E_USER_ERROR); ?>