Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- include_once($path . 'settings.php');
- $dbcon = mysql_connect($db_server, $db_user, $db_passwd); mysql_select_db($db_name);
- $result = mysql_query('SELECT variable,value FROM ' . $db_prefix . 'settings');
- $Settings = array();
- while ($row = mysql_fetch_array($result)) {
- $Settings[$row['0']] = $row['1'];
- }
- session_start(); $dbQueries = 0;
- include_once('settings.php'); error_reporting(0);
- $dbcon = mysql_connect($db_server, $db_user, $db_passwd); checkCon($dbcon);
- $dbcon = mysql_select_db($db_name); checkCon($dbcon);
- $dbcon = mysql_query('SELECT variable,value FROM ' . $db_prefix . 'settings'); $dbQueries++; checkCon($dbcon);
- function checkCon ($con) { if (!$con) { echo mysql_error(); exit(); } }
- error_reporting(0);
- $Settings = array(); while ($row = mysql_fetch_array($dbcon)) { $Settings[$row[0]] = $row[1]; }
- $auth = false; $in_user = ''; $in_password = '';
- if((isset($_POST['user']) && isset($_POST['password'])) || (isset($_SESSION['user']) && isset($_SESSION['password']))) {
- if(isset($_SESSION['user']) && isset($_SESSION['password'])) { $in_user = $_SESSION['user']; $in_password = $_SESSION['password']; } else if(isset($_POST['user']) && isset($_POST['password'])) { if (!get_magic_quotes_gpc()) { $in_user = addslashes($_POST['user']); $in_password = addslashes($_POST['password']); } else { $in_user = $_POST['user']; $in_password = $_POST['password']; } }
- $result = mysql_query('SELECT * FROM ' . $db_prefix . 'posters WHERE username = '' . $in_user . '' AND password = password('' . $in_password . '')'); $dbQueries++;
- if(mysql_numrows($result) != 0) { $auth = true; $_SESSION['user'] = $in_user; $_SESSION['password'] = $in_password; } else { $bad_details = true; }
- $userDetails = array(); while($row = mysql_fetch_assoc($result))
- { $userDetails = $row; }
Add Comment
Please, Sign In to add comment