📄 dept_edit.php
字号:
<?php
include_once( "inc/reg_check.php" );
if ( $OA_REG_ON != 2 )
{
exit( );
}
include_once( "inc/auth.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\r\n";
echo "<s";
echo "cript Language=\"JavaScript\">\r\nfunction CheckForm()\r\n{\r\n if(document.form1.DEPT_NO.value==\"\")\r\n { alert(\"部门排序号不能为空!\");\r\n return (false);\r\n }\r\n\r\n if(document.form1.DEPT_NAME.value==\"\")\r\n { alert(\"部门名称不能为空!\");\r\n return (false);\r\n }\r\n}\r\n\r\nfunction delete_dept(DEPT_ID)\r\n{\r\n msg='确认要删除该部门/成员单位么?这将同时删除所有下级部门和部门中的用户!';\r\n if(window.";
echo "confirm(msg))\r\n {\r\n url=\"delete.php?DEPT_ID=\"+DEPT_ID;\r\n location=url;\r\n }\r\n}\r\n</script>\r\n</head>\r\n\r\n<body class=\"bodycolor\" topmargin=\"5\" onload=\"document.form1.DEPT_NO.focus();\">\r\n\r\n";
$query = "SELECT * from DEPARTMENT where DEPT_ID={$DEPT_ID}";
$cursor = exequery( $connection, $query );
if ( $ROW = mysql_fetch_array( $cursor ) )
{
$DEPT_NAME = $ROW['DEPT_NAME'];
$TEL_NO = $ROW['TEL_NO'];
$FAX_NO = $ROW['FAX_NO'];
$DEPT_NO = $ROW['DEPT_NO'];
$DEPT_PARENT = $ROW['DEPT_PARENT'];
}
$query = "SELECT * from DEPARTMENT where DEPT_ID={$DEPT_ID} order by DEPT_NO";
$cursor = exequery( $connection, $query );
if ( $ROW = mysql_fetch_array( $cursor ) )
{
$LOCATION_NAME = $ROW['DEPT_NAME'];
}
echo "\r\n<table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"3\" class=\"small\">\r\n <tr>\r\n <td class=\"Big\"><img src=\"/images/edit.gif\" width=\"20\" HEIGHT=\"22\">";
echo "<s";
echo "pan class=\"big3\"> 编辑部门/成员单位 - [";
echo $LOCATION_NAME;
echo "]</span>\r\n </td>\r\n </tr>\r\n</table>\r\n\r\n<table border=\"0\" cellspacing=\"1\" width=\"450\" class=\"small\" bgcolor=\"#000000\" cellpadding=\"3\" align=\"center\" >\r\n <form action=\"update.php\" method=\"post\" name=\"form1\" onsubmit=\"return CheckForm();\">\r\n <tr>\r\n <td nowrap class=\"TableData\">部门排序号:</td>\r\n <td nowrap class=\"TableData\">\r\n <input type=\"text\" name=\"DEPT_NO\" class=\"BigInput\" size=\"10\" max";
echo "length=\"200\" value=\"";
echo $DEPT_NO;
echo "\"> 用于处于同一层次部门的排序,以及用户列表的排序\r\n </td>\r\n </tr>\r\n <tr>\r\n <td nowrap class=\"TableData\">部门名称:</td>\r\n <td nowrap class=\"TableData\">\r\n <input type=\"text\" name=\"DEPT_NAME\" class=\"BigInput\" size=\"25\" maxlength=\"25\" value=\"";
echo $DEPT_NAME;
echo "\"> \r\n </td>\r\n </tr>\r\n <tr>\r\n <td nowrap class=\"TableData\">电话:</td>\r\n <td nowrap class=\"TableData\">\r\n <input type=\"text\" name=\"TEL_NO\" class=\"BigInput\" size=\"25\" maxlength=\"25\" value=\"";
echo $TEL_NO;
echo "\"> \r\n </td>\r\n </tr>\r\n <tr>\r\n <td nowrap class=\"TableData\">传真:</td>\r\n <td nowrap class=\"TableData\">\r\n <input type=\"text\" name=\"FAX_NO\" class=\"BigInput\" size=\"25\" maxlength=\"25\" value=\"";
echo $FAX_NO;
echo "\"> \r\n </td>\r\n </tr>\r\n <tr>\r\n <td nowrap class=\"TableData\">上级部门:</td>\r\n <td class=\"TableData\">\r\n ";
echo "<s";
echo "elect name=\"DEPT_PARENT\" class=\"BigSelect\">\r\n <option value=\"0\">无</option>\r\n";
$DEPT_STR = my_dept_tree( 0, $DEPT_PARENT, 0 );
$POS1 = strpos( $DEPT_STR, "<option value={$DEPT_ID}>" );
$POS2 = strpos( $DEPT_STR, "</option>", $POS1 );
$DEPT_STR1 = substr( $DEPT_STR, $POS1, $POS2 - $POS1 + 9 );
$DEPT_STR = str_replace( $DEPT_STR1, "", $DEPT_STR );
echo $DEPT_STR;
echo " </select>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td nowrap class=\"TableControl\" colspan=\"2\" align=\"center\">\r\n <input type=\"hidden\" name=\"DEPT_ID\" value=\"";
echo $DEPT_ID;
echo "\">\r\n <input type=\"submit\" value=\"保存修改\" class=\"BigButton\" title=\"保存修改\" name=\"button\">\r\n </td>\r\n </form>\r\n</table>\r\n<br>\r\n\r\n<table width=\"95%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" height=\"3\">\r\n <tr>\r\n <td background=\"/images/dian1.gif\" width=\"100%\"></td>\r\n </tr>\r\n</table>\r\n\r\n<table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"3\" class=\"small\">\r\n <tr>\r\n <td class=\"Big\"><img sr";
echo "c=\"/images/menu/system.gif\" WIDTH=\"22\" HEIGHT=\"20\" align=\"absmiddle\">";
echo "<s";
echo "pan class=\"big3\"> 当前部门/成员单位 - 相关操作</span>\r\n </td>\r\n </tr>\r\n</table>\r\n<br>\r\n<div align=\"center\">\r\n <input type=\"button\" value=\"新建下级部门/成员单位\" class=\"BigButton\" onClick=\"location='dept_new.php?DEPT_ID=";
echo $DEPT_ID;
echo "';\" title=\"新建下级部门/成员单位\"><br><br>\r\n <input type=\"button\" value=\"删除当前部门/成员单位\" class=\"BigButton\" onClick=\"delete_dept('";
echo $DEPT_ID;
echo "')\" title=\"删除当前部门/成员单位\">\r\n</div>\r\n</body>\r\n</html>";
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -