0) { $items = file($database, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); foreach($items as $line) { list($username, $password, $email, $name, $active) = explode('|', trim($line)); if ($username == $_POST['username'] && $active != "0" && $password == $crypt_pass) { $found = true; $fullname = $name; } } } if($found == false) { header('Location: '.$error_page); exit; } else { session_start(); $_SESSION['username'] = $_POST['username']; $_SESSION['fullname'] = $fullname; $rememberme = isset($_POST['rememberme']) ? true : false; if ($rememberme) { setcookie('username', $_POST['username'], time() + 3600*24*30); setcookie('password', $_POST['password'], time() + 3600*24*30); } header('Location: '.$success_page); exit; } } $username = isset($_COOKIE['username']) ? $_COOKIE['username'] : ''; $password = isset($_COOKIE['password']) ? $_COOKIE['password'] : ''; ?> '.mysql_error()); } mysql_select_db($mysql_database, $db) or die('Failed to select database
'.mysql_error()); $sql = "SELECT * FROM ".$mysql_table." WHERE email = '".mysql_real_escape_string($email)."'"; $result = mysql_query($sql, $db); if ($data = mysql_fetch_array($result)) { $alphanum = array('a','b','c','d','e','f','g','h','i','j','k','m','n','o','p','q','r','s','t','u','v','x','y','z','A','B','C','D','E','F','G','H','I','J','K','M','N','P','Q','R','S','T','U','V','W','X','Y','Z','2','3','4','5','6','7','8','9'); $chars = sizeof($alphanum); $a = time(); mt_srand($a); for ($i=0; $i < 6; $i++) { $randnum = intval(mt_rand(0,55)); $newpassword .= $alphanum[$randnum]; } $crypt_pass = md5($newpassword); $sql = "UPDATE `".$mysql_table."` SET `password` = '$crypt_pass' WHERE `email` = '$email'"; mysql_query($sql, $db); $mailto = $_POST['email']; $subject = 'New password'; $message = 'Your new password for http://www.yourwebsite.com/ is:'; $message .= $newpassword; $header = "From: webmaster@yourwebsite.com"."\r\n"; $header .= "Reply-To: webmaster@yourwebsite.com"."\r\n"; $header .= "MIME-Version: 1.0"."\r\n"; $header .= "Content-Type: text/plain; charset=utf-8"."\r\n"; $header .= "Content-Transfer-Encoding: 8bit"."\r\n"; $header .= "X-Mailer: PHP v".phpversion(); mail($mailto, $subject, $message, $header); header('Location: '.$success_page); } else { header('Location: '.$error_page); } mysql_close($db); exit; } ?> edspc
Log In
User Name:
Password:
 Remember me
 
Never been here before please signup
Full Name:
User Name:
Password:
Confirm Password:
E-mail:
 
Forgot your password?
Email:
 
Please allow 24 hours for password to arrive !!
 
Welcome to Eds_pc Please login in below for special deals and  tutorials