📄 dept_new.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\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</script>\r\n</head>\r\n\r\n<body class=\"bodycolor\" topmargin=\"1\" onload=\"document.form1.DEPT_NO.focus();\" leftmargin=\"1\">\r\n<form action=\"";
echo "add.php\" method=\"post\" name=\"form1\" onsubmit=\"return CheckForm();\">\r\n";
if ( $DEPT_ID != "" )
{
$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'];
}
}
else
{
$query = "SELECT * from UNIT";
$cursor = exequery( $connection, $query );
if ( $ROW = mysql_fetch_array( $cursor ) )
{
$LOCATION_NAME = $ROW['UNIT_NAME'];
}
}
echo "\r\n<table border=\"0\" width=\"100%\" cellspacing=\"1\" cellpadding=\"0\">\r\n <tr class=\"tablehead1\">\r\n <td>新建部门/成员单位 - 当前节点:[\r\n ";
echo $LOCATION_NAME;
echo " ]</td>\r\n </tr>\r\n <tr class=\"tablehead2\">\r\n <td><input name=\"image\" type=\"image\" src=\"../../../../images/button/save.gif\" width=\"105\" height=\"20\" border=\"0\">\r\n <a href=\"#\" onClick=\"history.back();\"><img src=\"../../../images/button/return.gif\" width=\"105\" height=\"20\" border=\"0\"></a></td>\r\n </tr>\r\n</table>\r\n<br>\r\n<table border=\"0\" cellspacing=\"1\" width=\"100%\" class=\"small\" cellpadding=\"3\" >\r\n \r\n ";
echo " <tr>\r\n <td nowrap class=\"tableline2\">部门排序号:</td>\r\n <td nowrap class=\"tableline1\">\r\n <input type=\"text\" name=\"DEPT_NO\" class=\"BigInput\" size=\"10\" maxlength=\"200\"> 用于处于同一层次部门的排序,以及用户列表的排序\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=\"DEPT_NAME\" class=\"BigInput\"";
echo " size=\"25\" maxlength=\"25\"> \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=\"TEL_NO\" class=\"BigInput\" size=\"25\" maxlength=\"25\"> \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=\"FAX_NO\" class=\"BigInput\" size=";
echo "\"25\" maxlength=\"25\"> \r\n </td>\r\n </tr>\r\n <tr>\r\n <td nowrap class=\"tableline2\">上级部门:</td>\r\n <td class=\"tableline1\">\r\n ";
echo "<s";
echo "elect name=\"DEPT_PARENT\" class=\"BigSelect\">\r\n <option value=\"0\">无</option>\r\n";
echo my_dept_tree( 0, $DEPT_ID, 0 );
echo " </select>\r\n </td>\r\n </tr>\r\n </table>\r\n</form>\r\n</body>\r\n</html>";
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -