<?php

class CheckFun 
{ 
    function checkStatus($ac)
		{
		   if($ac != "admin")
		   {
			   $db = new DBOperation();			 
				 $db->connect_db($_DB['host'], $_DB['username'], $_DB['password'], $_DB['dbname']);
				 $db->query("SELECT SValue FROM SysConfig where SName = 'WEBFLAG'");
				 $row = $db->fetch_row();
				 $db->close_db();
				 if($row != null)
				 {
				 	  return $row[0];
				 }
				 else
				 {
				 	  return "0";
				 }
			 }
			 else
			 {
			 		return "1";
			 }
		}
		
		function getISENABLELOCK()
		{
		   if($ac != "admin")
		   {
			   $db = new DBOperation();
				 $db->connect_db($_DB['host'], $_DB['username'], $_DB['password'], $_DB['dbname']);
				 $db->query("SELECT SValue FROM SysConfig where SName = 'ISENABLELOCK'");
				 $row = $db->fetch_row();
				 $db->close_db();
				 if($row != null)
				 {
				 	  return $row[0];
				 }
				 else
				 {
				 	  return "0";
				 }
			}
			else
			{
				return "0";
			}
		}
		
		function getPASSERRTIME()
		{
		   
			   $db = new DBOperation();
				 $db->connect_db($_DB['host'], $_DB['username'], $_DB['password'], $_DB['dbname']);
				 $db->query("SELECT SValue FROM SysConfig where SName = 'PASSERRTIME'");
				 $row = $db->fetch_row();
				 $db->close_db();
				 if($row != null)
				 {
				 	  return $row[0];
				 }
				 else
				 {
				 	  return "0";
				 }
		}
}
?>