connect($dbmj_host,$dbmj_user,$dbmj_pw,$dbmj_name); return $db_mj; } //------------------------------------------门禁执行页面,RFID方式 ////////////////////////////////////定义门禁数据库 $dbmj_host='localhost'; $dbmj_user='hehe'; $dbmj_pw='hehe'; $dbmj_name='edt'; $dbmj_table_name='MW_EntryList'; //////////////////////////////////// include "../tmpl/config.php"; require "../ipad/include/function.php"; require "../ipad/include/db_mysql.php"; define("THIS_FILE_ROOT",dir_cutb(dirname(__FILE__),1)."/ipad"); error_reporting(E_ERROR | E_WARNING | E_PARSE); date_default_timezone_set('Asia/Shanghai'); //-------------------------------register global $magic_quotes_gpc = get_magic_quotes_gpc(); $register_globals = @ini_get('register_globals'); if(!$register_globals || !$magic_quotes_gpc) { @extract(daddslashes($_POST)); @extract(daddslashes($_GET)); } if(!@mysql_connect($dbmj_host,$dbmj_user,$dbmj_pw)) { echo "Can not connect to MJ MySQL server"; exit; } if($_a=="tb"){ header("Content-type: text/html;charset=GB2312"); $db=_mysql_connect_mj(); $q="select * from ".$dbmj_table_name." where status<>'y' order by ReadTime"; $r=$db->query($q); $arr_mj=array(); while($m=$db->fetch_array($r)){ $arr_mj[]=$m["DevCode"]; $db->query("update ".$dbmj_table_name." set status='y' where PKID='".$m["PKID"]."'"); } if(count($arr_mj)>0){ $db=_mysql_connect(); $tip=""; for($i=0;$i0){ $tip.="".$m1["title"]."(".$m1["username"].")"; if($m1["available"]=="y"){ $tip.="禁用"; $db->query("update ".$table_pre."client set available='n' where id='".$m1["id"]."'"); }else{ $tip.="启用"; $db->query("update ".$table_pre."client set available='y' where id='".$m1["id"]."'"); } $tip.="成功!
"; }else{ $tip.="".$arr_mj[$i].",操作失败!
"; } } echo "y|".$tip; }else{ echo "n|"; } exit; } ?> e订通-门禁
e订通-门禁系统
系统等待中......