Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- function curPageURL2() {
- $pageURL = 'http';
- if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
- $pageURL .= "://";
- if ($_SERVER["SERVER_PORT"] != "80") {
- $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
- } else {
- $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
- }
- return $pageURL;
- }
- if(!($_SESSION["email"]&&$_SESSION["password"])){
- $_SESSION['back-url'] = curPageURL2();
- /*
- echo '<script type="text/javascript">
- <!--
- window.location = "'.$root_url.'/member/login.php"
- //-->
- </script>';
- */
- header("Location: ". $root_url . "/member/login.php");
- exit;
- }
- else{
- $rs=mysql_query("SELECT * FROM `{$_x(USERS_TABLE)}` WHERE `email`='{$_SESSION['email']}' AND `password`='{$_SESSION['password']}'");
- if($userdata=mysql_fetch_assoc($rs));else{header("Location: ". $root_url . "/member/logout.php");exit;}
- $isLoggedIn = TRUE;
- }
- if($_SESSION["errortext"]){$error=$_SESSION["errortext"];$_SESSION["errortext"]="";}
- if($_SESSION["successtext"]){$success=$_SESSION["successtext"];$_SESSION["successtext"]="";}
- ?>
Add Comment
Please, Sign In to add comment