📄 query.php
字号:
<?php
function parse_regfilestr_fun( )
{
$DOC_ROOT = str_replace( "\\", "/", get_cfg_var( "doc_root" ) );
$SETUP_DIR = str_replace( "webroot", "", $DOC_ROOT );
$REGF_DIR = $SETUP_DIR."bin/";
$AUTH_FILE = $REGF_DIR."ZendAuth.dll";
$handle = @fopen( $AUTH_FILE, "r" );
$AUTH = @fread( $handle, 1024 );
@fclose( $handle );
$KEY_NAME_FILE = $REGF_DIR."ZendPhpOp.dll";
$handle = @fopen( $KEY_NAME_FILE, "r" );
$REG_NAME = @fread( $handle, 1024 );
@fclose( $handle );
$REG_NAME = trim( $REG_NAME, "," );
$REG_NAME_ARRAY = explode( ",", $REG_NAME );
$i = 0;
for ( ; $i < count( $REG_NAME_ARRAY ); ++$i )
{
$REG_NAME = $REG_NAME_ARRAY[$i];
$REG_FILE = $REGF_DIR.$REG_NAME.".dll";
$handle = @fopen( $REG_FILE, "r" );
$contents = @fread( $handle, 1024 );
@fclose( $handle );
$REGISTER_CODE_STR = xxtea_decrypt( base64_decode( $contents ), $AUTH."ZJ1106" );
$pArray = explode( "|", $REGISTER_CODE_STR );
$reArray[$i]['machinecode'] = $pArray[0];
$reArray[$i]['companyname'] = $pArray[1];
$reArray[$i]['expireddate'] = $pArray[2];
$reArray[$i]['useraccound'] = $pArray[3];
$reArray[$i]['version'] = $pArray[4];
}
return $reArray;
}
include_once( "inc/auth.php" );
include_once( "inc/utility_all.php" );
include_once( "inc/en_decrypt.inc.php" );
echo "\r\n<html>\r\n<head>\r\n<title>查询用户</title>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n";
echo "<s";
echo "tyle type=\"text/css\">\r\n<!--\r\n.STYLE1 {color: #FF0000}\r\n-->\r\n</style>\r\n</head>\r\n\r\n\r\n<body class=\"bodycolor\" topmargin=\"0\" onLoad=\"document.form1.USER_ACCOUNTS.focus();\" leftmargin=\"1\">\r\n <form action=\"search.php\" method=\"post\" name=\"form1\">\r\n<table border=\"0\" width=\"100%\" cellspacing=\"1\" cellpadding=\"1\">\r\n <tr class=\"tablehead1\">\r\n <td>查询用户</td>\r\n </tr>\r\n</table>\r\n<table border=\"0\" width=\"100%\" cell";
echo "spacing=\"0\" cellpadding=\"0\">\r\n <tr class=\"tablehead2\">\r\n <td height=\"30\"><input name=\"image\" type=\"image\" src=\"../../../../images/button/search.gif\" width=\"105\" height=\"20\" border=\"0\">\r\n </td>\r\n </tr>\r\n</table>\r\n<br>\r\n<table border=\"0\" cellspacing=\"1\" width=\"100%\" class=\"small\" cellpadding=\"3\" align=\"center\" >\r\n \r\n <tr>\r\n <td nowrap class=\"tableline2\" width=\"120\">用户名:</td>\r\n <td nowrap cl";
echo "ass=\"tableline1\">\r\n <input type=\"text\" name=\"USER_ACCOUNTS\" class=\"SmallInput\" size=\"20\" maxlength=\"20\"> \r\n </td>\r\n </tr>\r\n <tr>\r\n <td nowrap class=\"tableline2\">真实姓名:</td>\r\n <td nowrap class=\"tableline1\">\r\n <input type=\"text\" name=\"USER_NAME\" class=\"SmallInput\" size=\"10\" maxlength=\"10\"> \r\n </td>\r\n </tr>\r\n <tr>\r\n <td nowrap class=\"tableline2\">性别:</td>\r\n ";
echo "<td nowrap class=\"tableline1\">\r\n ";
echo "<s";
echo "elect name=\"SEX\" class=\"BigSelect\">\r\n <option value=\"\"></option>\r\n <option value=\"0\">男</option>\r\n <option value=\"1\">女</option>\r\n </select>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td nowrap class=\"tableline2\">部门:</td>\r\n <td nowrap class=\"tableline1\">\r\n ";
echo "<s";
echo "elect name=\"DEPT_ID\" class=\"BigSelect\">\r\n <option value=\"\"></option>\r\n";
echo my_dept_tree( 0, $DEPT_ID, 0 );
if ( $DEPT_ID == -1 )
{
echo " <option value=\"-1\">离职人员</option>\r\n";
}
echo " </select>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td nowrap class=\"tableline2\">考勤排班类型:</td>\r\n <td nowrap class=\"tableline1\">\r\n ";
echo "<s";
echo "elect name=\"DUTY_TYPE\" class=\"BigSelect\">\r\n <option value=\"\"></option>\r\n";
$query = "SELECT * from ATTEND_CONFIG order by DUTY_TYPE";
$cursor = exequery( $connection, $query );
while ( $ROW = mysql_fetch_array( $cursor ) )
{
$DUTY_TYPE = $ROW['DUTY_TYPE'];
$DUTY_NAME = $ROW['DUTY_NAME'];
echo " <option value=\"";
echo $DUTY_TYPE;
echo "\">";
echo $DUTY_NAME;
echo "</option>\r\n";
}
echo " </select>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td nowrap class=\"tableline2\">角色:</td>\r\n <td nowrap class=\"tableline1\">\r\n ";
echo "<s";
echo "elect name=\"USER_PRIV\" class=\"BigSelect\">\r\n <option value=\"\"></option>\r\n\r\n";
$query = "SELECT * from USER_PRIV order by PRIV_NO desc";
$cursor = exequery( $connection, $query );
while ( $ROW = mysql_fetch_array( $cursor ) )
{
$USER_PRIV1 = $ROW['USER_PRIV'];
$PRIV_NAME = $ROW['PRIV_NAME'];
echo " <option value=\"";
echo $USER_PRIV1;
echo "\">";
echo $PRIV_NAME;
echo "</option>\r\n";
}
echo " </select>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td nowrap class=\"tableline2\" width=\"120\">管理范围(如果有权限执行管理型模块):</td>\r\n <td nowrap class=\"tableline1\">\r\n ";
echo "<s";
echo "elect name=\"POST_PRIV\" class=\"BigSelect\">\r\n <option value=\"\"></option>\r\n <option value=\"0\">本部门</option>\r\n <option value=\"1\">全体</option>\r\n <option value=\"2\">指定部门</option>\r\n </select>\r\n </td>\r\n </tr>\r\n <tr>\r\n </tr>\r\n </table>\r\n\r\n</form>\r\n";
$sql = "SELECT COUNT(USER_ID) AS cnt FROM USER WHERE DEPT_ID>0";
$rs = exequery( $connection, $sql );
$row = mysql_fetch_array( $rs );
$accounts_valid = $row['cnt'];
$sql = "SELECT COUNT(USER_ID) AS cnt FROM USER WHERE DEPT_ID=-1";
$rs = exequery( $connection, $sql );
$row = mysql_fetch_array( $rs );
$accounts_del = $row['cnt'];
$sql = "SELECT COUNT(USER_ID) AS cnt FROM USER WHERE DEPT_ID=0";
$rs = exequery( $connection, $sql );
$row = mysql_fetch_array( $rs );
$accounts_dis = $row['cnt'];
$registerInfo = parse_regfilestr_fun( );
$thisAccounts = $registerInfo[0]['useraccound'];
if ( $thisAccounts == "" )
{
include_once( "inc/demo.inc" );
$thisAccounts = DEMO_LIMIT_USER;
}
echo "<table border=\"0\" width=\"100%\" cellspacing=\"1\" cellpadding=\"1\">\r\n\t<tr>\r\n\t\t<td class=\"TableLine1\">授权用户数:";
echo $thisAccounts;
echo " ;已使用用户数: ";
echo $accounts_valid;
echo " ;当前";
echo "<s";
echo "pan style=\"color:#FF0000\">离职</span>用户数: ";
echo $accounts_dis;
echo "\t\t</td>\r\n\t</tr>\r\n</table>\r\n</body>\r\n</html>";
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -