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

📄 index.php

📁 极限网络智能办公系统 Office Automation V3.0官方100%源代码.
💻 PHP
字号:
<?
include_once("inc/auth.php");
include_once("inc/utility_all.php");
?>

<html>
<head>
<title>部门/成员单位信息</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>

<body class="bodycolor" topmargin="5">

<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
  <tr>
    <td class="Big"><img src="/images/menu/infofind.gif" WIDTH="22" HEIGHT="20" align="absmiddle"><span class="big3"> 部门/成员单位信息</span>
    </td>
  </tr>
</table>

<br>

<?
//------ 递归显示部门列表,支持按管理范围显示 --------
function dept_tree_list($DEPT_ID,$PRIV_OP)
{
  global $DEEP_COUNT;

  $connection=OpenConnection();
  $query = "SELECT * from DEPARTMENT where DEPT_PARENT=$DEPT_ID order by DEPT_NO";
  $cursor= exequery($connection,$query);
  $OPTION_TEXT="";
  $DEEP_COUNT1=$DEEP_COUNT;
  $DEEP_COUNT.=" ";
  while($ROW=mysql_fetch_array($cursor))
  {
      $COUNT++;
      $DEPT_ID=$ROW["DEPT_ID"];
      $DEPT_NAME=$ROW["DEPT_NAME"];
      $DEPT_PARENT=$ROW["DEPT_PARENT"];
      $TEL_NO=$ROW["TEL_NO"];
      $FAX_NO=$ROW["FAX_NO"];
      $DEPT_FUNC=$ROW["DEPT_FUNC"];

      $DEPT_NAME=str_replace("<","&lt",$DEPT_NAME);
      $DEPT_NAME=str_replace(">","&gt",$DEPT_NAME);
      $DEPT_NAME=stripslashes($DEPT_NAME);
      
      $DEPT_FUNC=str_replace("<","&lt",$DEPT_FUNC);
      $DEPT_FUNC=str_replace(">","&gt",$DEPT_FUNC);
      $DEPT_FUNC=stripslashes($DEPT_FUNC);

      if($PRIV_OP==1)
         $DEPT_PRIV=is_dept_priv($DEPT_ID);
      else
         $DEPT_PRIV=1;

      $OPTION_TEXT_CHILD=dept_tree_list($DEPT_ID,$PRIV_OP);

      if($DEPT_PRIV==1)
      {
      	 $OPTION_TEXT.="
  <tr class=TableData>
    <td>".$DEEP_COUNT1."├".$DEPT_NAME."</td>
    <td>".$TEL_NO."</td>
    <td>".$FAX_NO."</td>
    <td style=\"cursor:hand\" title=\"$DEPT_FUNC\">".csubstr(strip_tags($DEPT_FUNC),0,30).(strlen($DEPT_FUNC)>30?"...":"")."</td>
  </tr>";
      }

      if($OPTION_TEXT_CHILD!="")
         $OPTION_TEXT.=$OPTION_TEXT_CHILD;

  }//while

  $DEEP_COUNT=$DEEP_COUNT1;
  return $OPTION_TEXT;
}

$OPTION_TEXT=dept_tree_list(0,0);

if($OPTION_TEXT=="")
   Message("提示","尚未定义部门");
else
 {
?>
  <table border="0" align="center" cellspacing="1" width="90%" class="small" bgcolor="#000000" cellpadding="3">
    <tr class="TableHeader">
      <td nowrap align="center">部门/成员单位</td>
      <td nowrap align="center">电话</td>
      <td nowrap align="center">传真</td>
      <td align="center">职能</td>
    </tr>
    <?=$OPTION_TEXT?>
  </table>
<?
 }
?>

</body>
</html>

⌨️ 快捷键说明

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