7e47ce238b
添加了管理后台所需的图片资源、Excel文件、安装程序以及设计相关的图片文件
85 lines
2.8 KiB
PHP
85 lines
2.8 KiB
PHP
<?php
|
|
//------------------------------------------门禁执行页面,条码扫描
|
|
//定义条码对应内容
|
|
$tm_zd="username";//一般是username,rfid
|
|
//
|
|
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));
|
|
}
|
|
$db=_mysql_connect();
|
|
if($rfid){
|
|
$m1=get_db_msg("select id,username,title,available from ".$table_pre."client where ".$tm_zd."='".$rfid."' order by id limit 0,1");
|
|
if($m1["id"]>0){
|
|
if($m1["available"]=="y"){
|
|
//
|
|
$db->query("update ".$table_pre."client set available='n' where id='".$m1["id"]."'");
|
|
$msg="<span class=\"right\">".$m1["title"]."(".$m1["username"]."),禁用成功!</span>";
|
|
}else{
|
|
$db->query("update ".$table_pre."client set available='y' where id='".$m1["id"]."'");
|
|
$msg="<span class=\"right\">".$m1["title"]."(".$m1["username"]."),启用成功!</span>";
|
|
}
|
|
}else{
|
|
$msg="<span class=\"wrong\">对不起,改用户不存在!</span>";
|
|
}
|
|
}
|
|
?>
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<title>e订通-门禁</title>
|
|
<style>
|
|
BODY{
|
|
font-family:宋体;FONT-SIZE:16px;margin:0px;padding:0px;
|
|
}
|
|
a,a:link,a:visited,a:active {
|
|
text-decoration:none;COLOR: #0000ff;FONT-SIZE:16px;
|
|
}
|
|
a:hover {
|
|
TEXT-DECORATION: underline;COLOR: #aaaa9f;FONT-SIZE:16px;
|
|
}
|
|
body,input,td,select,div,li,ul,textarea,form {
|
|
font-family:宋体;
|
|
FONT-SIZE:16px;
|
|
}
|
|
.wrong{
|
|
color:#ff0000;font-weight:bold;
|
|
}
|
|
.right{
|
|
color:#0000ff;font-weight:bold;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body onload="document.getElementById('rfid').focus();">
|
|
<br />
|
|
<form name="form1" action="mjtm.php" method="post">
|
|
<table width="50%" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#cccccc">
|
|
<input type="hidden" name="is_submit" value="y">
|
|
<tr>
|
|
<td align="center" bgcolor="#f0f0f0" style="font-size:18px" height="40"><b>e订通-门禁系统</b></td>
|
|
</tr>
|
|
<tr>
|
|
<td align="left" bgcolor="#ffffff" height="40"><input type="text" name="rfid" id="rfid" value="" style="width:200px;height:25px;"></td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" bgcolor="#f0f0f0" height="40"><input type="submit" value=" 提 交 "></td>
|
|
</tr>
|
|
<?php
|
|
if($msg){
|
|
echo "<tr><td align=\"left\" bgcolor=\"#ffffff\" valign=\"top\" style=\"line-height:150%;\">".$msg."</td></tr>";
|
|
}
|
|
?>
|
|
</table>
|
|
</form>
|
|
</body>
|
|
</html>
|