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

📄 new.php

📁 通达OA官方提供的30源代码,感觉很实在
💻 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"><script src="/inc/js/module.js"></script>

<script Language="JavaScript">
function CheckForm()
{
   if(document.form1.COPY_TO_ID.value=="")
   { alert("管理员不能为空!");
     return (false);
   }

   if(document.form1.TO_ID.value=="")
   { alert("所管部门不能为空!");
     return (false);
   }
}
</script>
</head>
<body class="bodycolor" topmargin="5">
<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
  <tr>
    <td class="Big"><img src="/images/notify_new.gif" align="absmiddle"><span class="big3"> 设置管理员</span>
    </td>
  </tr>
</table>
<?
if($AUTO_ID!="")
{
   $query = "SELECT * from BOOK_MANAGER where AUTO_ID='$AUTO_ID'";
   $cursor= exequery($connection,$query);
   if($ROW=mysql_fetch_array($cursor))
   {
     $MANAGER_ID=$ROW["MANAGER_ID"];
     $MANAGE_DEPT_ID=$ROW["MANAGE_DEPT_ID"]; 
       
     $query1="select USER_ID,USER_NAME from USER";
     $cursor1= exequery($connection,$query1);
     $USER_NAME_STR="";
     while($ROW=mysql_fetch_array($cursor1))
     {
       $USER_ID=$ROW["USER_ID"];
       $USER_NAME=$ROW["USER_NAME"];
       if(find_id($MANAGER_ID,$USER_ID))
          $USER_NAME_STR.=$USER_NAME.",";
     }
   
   	$query1="select DEPT_ID,DEPT_NAME from DEPARTMENT";
     $cursor1= exequery($connection,$query1);
     $TO_NAME="";
     while($ROW=mysql_fetch_array($cursor1))
     {
       $DEPT_ID=$ROW["DEPT_ID"];
       $DEPT_NAME=$ROW["DEPT_NAME"];
       if(find_id($MANAGE_DEPT_ID,$DEPT_ID))
          $TO_NAME.=$DEPT_NAME.",";
     }
     if($MANAGE_DEPT_ID=="ALL_DEPT")
        $TO_NAME="全体部门";	
   }
}
?>
<table class="TableBlock"  width="500" align="center" >
  <form action="add.php"  method="post" name="form1" onsubmit="return CheckForm();">
   <tr>
      <td nowrap class="TableData">管理员:</td>
      <td class="TableData">
        <input type="hidden" name="COPY_TO_ID" value="<?=$MANAGER_ID?>">
        <textarea cols=30 name="COPY_TO_NAME" rows=3 class="BigStatic" wrap="yes" readonly><?=$USER_NAME_STR?></textarea>
        <a href="javascript:;" class="orgAdd" onClick="SelectUser('','COPY_TO_ID', 'COPY_TO_NAME')">选择</a>
        <a href="javascript:;" class="orgClear" onClick="ClearUser('COPY_TO_ID', 'COPY_TO_NAME')">清空</a>
      </td>
   </tr>
   <tr>
     <td nowrap class="TableData">所管部门:</td>
     <td class="TableData">
       <input type="hidden" name="TO_ID" value="<?=$MANAGE_DEPT_ID?>">
       <textarea cols=30 name=TO_NAME rows=4 class="BigStatic" wrap="yes" readonly><?=$TO_NAME?></textarea>
       <a href="javascript:;" class="orgAdd" onClick="SelectDept()">添加</a>
       <a href="javascript:;" class="orgClear" onClick="ClearUser()">清空</a>
     </td>
   </tr>
   <tr>
    <td nowrap  class="TableControl" colspan="2" align="center">
    	  <input type="hidden" name="AUTO_ID" value="<?=$AUTO_ID?>">
        <input type="submit" value="确定" class="BigButton" name="button">&nbsp;
        <input type="button" value="返回" class="BigButton" onclick="location='index.php'">
    </td>
   </tr>
  </form>
</table>

</body>
</html>

⌨️ 快捷键说明

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