Location: PHPKode > projects > Simple SMS Site Software > simple-sms-site-software/validate.inc.php
<?
/******************************************************************************
************** Simple SMS Site Software *********************************
************** SSSSv1.0*****************************************************
************** by (aq) limited http://aql.com *******************************
************** All Rights Reserved ******************************************
************** Please read COPYRIGHT file prior to modification********
********************************************************************************/

include("options.inc.php");
 
if (!$user || !$pass) {
        include("restricted.inc.php");
        exit;
}

if (md5($_SERVER['HTTP_USER_AGENT']) != $_SESSION['HTTP_USER_AGENT']) {
        include("restricted.inc.php");
        exit;
}
else {
        $query = "SELECT admin,pword_lock,password,locked FROM users WHERE username = '$user' AND password = '$pass'";
        $result = mysql_query($query);
 
        if (mysql_num_rows($result) != '1') {
	   $access = 'forbidden';
        }
        $query_row = mysql_fetch_array($result);
 
  if ($query_row['locked'] == 'yes') {
   $access = 'locked';
     } elseif ($query_row['admin'] == 'yes') {
   $access = 'admin';
  } elseif ($query_row['pword_lock'] == 'yes') {
                                if ($guest_active == 'yes') {
                                        $access = 'guest'; // guests allowed
                                }
                                else {
                                        $access = 'forbidden'; // guest account is locked
                                }
  } elseif ($query_row['password'] == $pass) {
   $access = 'standard';
  } else {
   $access = 'forbidden';
  }
}
?>
Return current item: Simple SMS Site Software