⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 user_new1.php

📁 泛微协同办公系统标准版E-office V5.5的源代码内含泛微办公系统V5.5自动注册文件。
💻 PHP
字号:
<?php

include_once( "inc/auth.php" );
include_once( "inc/utility_all.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 "cript Language=\"JavaScript\">\r\nfunction CheckForm()\r\n{\r\n   if(document.form1.USER_ACCOUNTS.value==\"\")\r\n   { alert(\"用户名不能为空!\");\r\n     return (false);\r\n   }\r\n\r\n   if(document.form1.USER_NAME.value==\"\")\r\n   { alert(\"真实姓名不能为空!\");\r\n     return (false);\r\n   }\r\n}\r\n\r\n\r\n\r\nfunction clear_dept()\r\n{\r\n  document.form1.TO_NAME.value=\"\";\r\n  document.form1.TO_ID.value=\"\";\r\n}\r\n\r\nfunction LoadWindow";
echo "()\r\n{\r\n  URL=\"/module/dept_select?PRIV_OP=1\";\r\n  loc_x=document.body.scrollLeft+event.clientX-event.offsetX-100;\r\n  loc_y=document.body.scrollTop+event.clientY-event.offsetY+170;\r\n  window.showModalDialog(URL,self,\"edge:raised;scroll:1;status:0;help:0;resizable:1;dialogWidth:400px;dialogHeight:245px;dialogTop:\"+loc_y+\"px;dialogLeft:\"+loc_x+\"px\");\r\n}\r\nfunction select_dept()\r\n{\r\n   if (form1.POST_PR";
echo "IV.value==\"2\")\r\n       dept.style.display='';\r\n   else\r\n       dept.style.display=\"none\";\r\n}\r\n</script>\r\n</head>\r\n\r\n<body class=\"bodycolor\" topmargin=\"5\" leftmargin=\"1\" onLoad=\"document.form1.USER_ACCOUNTS.focus();\">\r\n <form action=\"add.php\"  method=\"post\" name=\"form1\" onSubmit=\"return CheckForm();\">\r\n";
$connection = openconnection( );
$query = "SELECT * from USER where USER_ID='{$LOGIN_USER_ID}'";
$cursor = exequery( $connection, $query );
if ( $ROW = mysql_fetch_array( $cursor ) )
{
	$POST_PRIV = $ROW['POST_PRIV'];
	$POST_DEPT = $ROW['POST_DEPT'];
}
$query = "SELECT * from USER_PRIV where USER_PRIV={$LOGIN_USER_PRIV}";
$cursor = exequery( $connection, $query );
if ( $ROW = mysql_fetch_array( $cursor ) )
{
	$PRIV_NO = $ROW['PRIV_NO'];
}
if ( $DEPT_ID != "" )
{
	$query = "SELECT * from DEPARTMENT where DEPT_ID={$DEPT_ID}";
	$cursor = exequery( $connection, $query );
	if ( $ROW = mysql_fetch_array( $cursor ) )
	{
		$DEPT_NAME = $ROW['DEPT_NAME'];
	}
	if ( $DEPT_ID == 0 )
	{
		$DEPT_NAME = "离职人员";
	}
}
echo "\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%\" cellspacing=\"0\"  cellpadding=\"0\">\r\n  <tr class=\"tablehead2\">\r\n    <td height=\"30\"><input name=\"image\" type=\"image\" src=\"../../../../images/button/add.gif\" width=\"105\" height=\"20\" border=\"0\">\r\n    </td>\r\n  </tr>\r\n</table>\r\n<br>\r\n<table border=\"0\" c";
echo "ellspacing=\"1\" width=\"100%\" class=\"small\" cellpadding=\"3\"  >\r\n \r\n   <tr>\r\n    <td nowrap class=\"tableline2\" width=\"120\">用户名:</td>\r\n    <td nowrap class=\"tableline1\">\r\n        <input type=\"text\" name=\"USER_ACCOUNTS\" class=\"SmallInput\" size=\"20\" maxlength=\"20\">&nbsp;\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=\"tex";
echo "t\" name=\"USER_NAME\" class=\"SmallInput\" size=\"10\" maxlength=\"10\">&nbsp;\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=\"SEX\" class=\"BigSelect\">\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";
echo my_dept_tree( 0, $DEPT_ID, 1 );
if ( $DEPT_ID == 0 )
{
	echo "          <option value=\"0\">离职人员</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        <input type=\"password\" name=\"PASSWORD\" class=\"SmallInput\" size=\"10\" maxlength=\"10\">&nbsp;\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";
$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<!--\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=\"SMS_LOGIN\" class=\"BigSelect\">\r\n          <option value=\"0\">不使用</option>]\r\n\t\t  <option value=\"1\">使用</option>\r\n        </select> (登录时发送手机短信验证)\r\n    </td>\r\n   </tr>\r\n-->\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\r\n";
if ( $LOGIN_USER_PRIV != "1" )
{
	$query = "SELECT * from USER_PRIV where PRIV_NO>{$PRIV_NO} and USER_PRIV!=1 order by PRIV_NO desc";
}
else
{
	$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\" OnChange=\"select_dept()\">\r\n          <option value=\"0\">本部门</option>\r\n";
if ( $POST_PRIV == "1" )
{
	echo "          <option value=\"1\">全体</option>\r\n          <option value=\"2\">指定部门</option>\r\n";
}
else if ( $POST_PRIV == "2" )
{
	echo "          <option value=\"2\">指定部门</option>\r\n";
}
echo "        </select> (如果有权限执行管理型模块)\r\n    </td>\r\n   </tr>\r\n";
if ( $POST_PRIV != "0" )
{
	echo "   <tr id=\"dept\" style=\"display:none;\">\r\n      <td nowrap class=\"TableData\">管理范围(部门):</td>\r\n\r\n      <td class=\"TableData\">\r\n        <input type=\"hidden\" name=\"TO_ID\" value=\"";
	echo $TO_ID;
	echo "\">\r\n        <textarea cols=30 name=TO_NAME rows=2 class=\"BigStatic\" wrap=\"yes\" readonly>";
	echo $TO_NAME;
	echo "</textarea>\r\n        &nbsp;<input type=\"button\" value=\"添 加\" class=\"SmallButton\" onClick=\"LoadWindow()\" title=\"添加部门\" name=\"button\">\r\n        &nbsp;<input type=\"button\" value=\"清 空\" class=\"SmallButton\" onClick=\"clear_dept()\" title=\"清空部门\" name=\"button\">\r\n      </td>\r\n    </tr>\r\n";
}
echo "   \r\n   </table>\r\n</form>\r\n</body>\r\n</html>";
?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -