📄 dept_new.php
字号:
<?
include_once 'inc/reg_check.php';
if ($OA_REG_ON != 2)
{
exit ();
}
include_once 'inc/auth.php';
echo '
<html>
<head>
<title>部门/成员单位管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script Language="JavaScript">
function CheckForm()
{
if(document.form1.DEPT_NO.value=="")
{ alert("部门排序号不能为空!");
return (false);
}
if(document.form1.DEPT_NAME.value=="")
{ alert("部门名称不能为空!");
return (false);
}
}
</script>
</head>
<body class="bodycolor" topmargin="5" onload="document.form1.DEPT_NO.focus();">
';
$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'];
}
if ($DEPT_ID != '')
{
if ($DEPT_ID != 0)
{
$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
{
if ($POST_PRIV != 1)
{
$LOCATION_NAME = '未指定';
}
else
{
$query = 'SELECT * from UNIT';
$cursor = exequery ($connection, $query);
if ($ROW = mysql_fetch_array ($cursor))
{
$LOCATION_NAME = $ROW['UNIT_NAME'];
}
}
}
echo '
<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
<tr>
<td class="Big"><img src="/images/notify_new.gif" height="22" WIDTH="22"><span class="big3"> 新建部门/成员单位 - 当前节点:[';
echo $LOCATION_NAME;
echo ']</span>
</td>
</tr>
</table>
<table border="0" cellspacing="1" width="450" class="small" bgcolor="#000000" cellpadding="3" align="center" >
<form action="add.php" method="post" name="form1" onsubmit="return CheckForm();">
<tr>
<td nowrap class="TableData">部门排序号:</td>
<td nowrap class="TableData">
<input type="text" name="DEPT_NO" class="BigInput" size="10" maxlength="200"> 用于处于同一层次部门的排序,以及用户列表的排序
</td>
</tr>
<tr>
<td nowrap class="TableData">部门名称:</td>
<td nowrap class="TableData">
<input type="text" name="DEPT_NAME" class="BigInput" size="25" maxlength="25">
</td>
</tr>
<tr>
<td nowrap class="TableData">电话:</td>
<td nowrap class="TableData">
<input type="text" name="TEL_NO" class="BigInput" size="25" maxlength="25">
</td>
</tr>
<tr>
<td nowrap class="TableData">传真:</td>
<td nowrap class="TableData">
<input type="text" name="FAX_NO" class="BigInput" size="25" maxlength="25">
</td>
</tr>
<tr>
<td nowrap class="TableData">上级部门:</td>
<td class="TableData">
<select name="DEPT_PARENT" class="BigSelect">
';
if ($POST_PRIV == 1)
{
echo ' <option value="0">无</option>
';
}
echo my_dept_tree (0, $DEPT_ID, 1);
echo ' </select>
</td>
</tr>
<tr>
<td nowrap class="TableData">部门职能:</td>
<td nowrap class="TableData">
<textarea name="DEPT_FUNC" class="BigInput" cols="40" rows="3"></textarea>
</td>
</tr>
<tr>
<td nowrap class="TableControl" colspan="2" align="center">
<input type="submit" value="新 建" class="BigButton" title="新建" name="button">
</td>
</form>
</table>
</body>
</html>';
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -