Your IP : 216.73.216.40


Current Path : /var/www/html/mmishra/indem/mailscript/mcell/public_html/
Upload File :
Current File : /var/www/html/mmishra/indem/mailscript/mcell/public_html/login.php

<?php
session_start();
if ($_SESSION['s_login_status'] == '' && !isset($_SERVER['PHP_AUTH_USER'])) {
//if ($_SERVER['PHP_AUTH_USER'] == '') {
//if (!isset($_SESSION['s_login_status'])) {
  $s_login_status = '';
  session_unset();
  session_destroy();
  header('WWW-Authenticate: Basic realm="pcStore Ver. 1.0 Admin"');
  //header('WWW-Authenticate: Digest realm="pcStore Ver. 1.0 Admin"');
  header('HTTP/1.0 401 Unauthorized');
  echo 'Thanks, Please do visit again";// Text to send if user hits Cancel button';
  exit;
}else{
  // echo "<p>Hello {$_SERVER['PHP_AUTH_USER']}.</p>";
  // echo "<p>You entered {$_SERVER['PHP_AUTH_PW']} as your password.</p>";
  $loginid = $_SERVER['PHP_AUTH_USER'];
  $loginpw = $_SERVER['PHP_AUTH_PW'];
 
  if ($loginid == 'mcell' && $loginpw == 'xyz'){
    $s_login_status = 'online';
    session_register("s_login_status");
    header("location: entry/index.php");
  }else{
    $s_login_status = '';
    session_unset();
    session_destroy();
    header("location: index.php");
  }
  exit;
}
?>