dept_new.php

来自「通达OA2007SE源代码 非常好的」· PHP 代码 · 共 149 行

PHP
149
字号
<?
  include_once 'inc/reg_check.php';
  if (($OA_REG_ON != 2008))
  {
    exit ();
  }
  include_once 'inc/auth.php';
  include_once 'inc/utility_all.php';
  echo '
<html>
<head>
<title>部门/成员单位管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
';
  echo '<s';
  echo 'cript Language="JavaScript">
function CheckForm()
{
   if(document.form1.DEPT_NO.value=="")
   { alert("部门排序号不能为空!");
     return (false);
   }
   if(document.form1.DEPT_NAME.value=="")
   { alert("部门名称不能为空!");
     return (false);
   }
}
function why_view()
{
  if(why_dept.style.display==\'\')
     why_dept.style.display=\'none\';
  else
  	 why_dept.style.disp';
  echo 'lay=\'\';
}
</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 != '') AND ($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">';
  echo '<s';
  echo 'pan 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" maxlen';
  echo 'gth="200">&nbsp;用于处于同一层次部门的排序,以及用户列表的排序
    </td>
   </tr>
   <tr>
    <td nowrap class="TableData">部门名称:</td>
    <td nowrap class="TableData">
        <input type="text" name="DEPT_NAME" class="BigInput" size="25" maxlength="25">&nbsp;
    </td>
   </tr>
   <tr>
    <td nowrap class="TableData">电话:</td>
    <td nowrap class="TableData">
        <input type="text" nam';
  echo 'e="TEL_NO" class="BigInput" size="25" maxlength="25">&nbsp;
    </td>
   </tr>
   <tr>
    <td nowrap class="TableData">传真:</td>
    <td nowrap class="TableData">
        <input type="text" name="FAX_NO" class="BigInput" size="25" maxlength="25">&nbsp;
    </td>
   </tr>
   <tr>
    <td nowrap class="TableData">上级部门:</td>
      <td class="TableData">
        ';
  echo '<s';
  echo 'elect 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>';
  echo '
  </form>
</table>
<br>
<div class="small" align=center style="font-color:white">
<a href="javascript:why_view()">为什么无法新建部门?</a>
<div>
<br>
<div id="why_dept" class="small1" style="display:none">
您可能使用了遨游浏览器,遨游浏览器有一个广告猎手功能,其网址屏蔽规则设置的过于严格,某些字母组合开头的网址(如ad开头的页面网址)会被屏蔽,建议合理进行相关设置,或关闭其广告猎手功能,或使用IE浏览器!<div>
</body>
</html>';
?>

⌨️ 快捷键说明

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