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

📄 index.php

📁 通达OA官方提供的30源代码,感觉很实在
💻 PHP
字号:
<?
include_once("inc/auth.php");
?>

<html>
<head>
<title>工作计划类型设置</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">

<script Language="JavaScript">
function CheckForm()
{
   if(document.form1.TYPE_NO.value=="")
   { alert("排序号不能为空!");
     return (false);
   }

   if(document.form1.TYPE_NAME.value=="")
   { alert("类型名称不能为空!");
     return (false);
   }
}

function delete_type(TYPE_ID)
{
 msg='确认要删除该计划类型?';
 if(window.confirm(msg))
 {
  URL="delete.php?TYPE_ID=" + TYPE_ID;
  window.location=URL;
 }
}


function delete_all()
{
 msg='确认要删除所有计划类型么?';
 if(window.confirm(msg))
 {
  URL="delete_all.php";
  window.location=URL;
 }
}
</script>
</head>

<body class="bodycolor" topmargin="5" onload="document.form1.TYPE_NO.focus();">

<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>

<table class="TableBlock"  width="450"  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="TYPE_NO" class="BigInput" size="2" maxlength="10">&nbsp;
    </td>
   </tr>
   <tr>
    <td nowrap class="TableData">计划类型名称:</td>
    <td nowrap class="TableData">
        <input type="text" name="TYPE_NAME" class="BigInput" size="25" maxlength="25">&nbsp;
    </td>
   </tr>
   <tr>
    <td nowrap  class="TableControl" colspan="2" align="center">
        <input type="submit" value="添加" class="BigButton" title="添加计划类型" name="button">
    </td>
  </form>
</table>

<br>

<table width="95%" border="0" cellspacing="0" cellpadding="0" height="3">
 <tr>
   <td background="/images/dian1.gif" width="100%"></td>
 </tr>
</table>

<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
  <tr>
    <td class="Big"><img src="/images/notify_open.gif" align="absmiddle"><span class="big3"> 管理计划类型</span>
    </td>
  </tr>
</table>

<br>
<div align="center">

<?
 //============================ 显示已定义规则 =======================================
 $query = "SELECT * from PLAN_TYPE order by TYPE_NO";
 $cursor= exequery($connection,$query);

 $TYPE_COUNT=0;
 while($ROW=mysql_fetch_array($cursor))
 {
    $TYPE_COUNT++;
    $TYPE_ID=$ROW["TYPE_ID"];
    $TYPE_NO=$ROW["TYPE_NO"];
    $TYPE_NAME=$ROW["TYPE_NAME"];

    if($TYPE_COUNT==1)
    {
?>

    <table class="TableList" width="450">

<?
    }
?>
    <tr class="TableData">
      <td nowrap align="center"><?=$TYPE_NO?></td>
      <td nowrap align="center"><?=$TYPE_NAME?></td>
      <td nowrap align="center" width="80">
      <a href="edit.php?TYPE_ID=<?=$TYPE_ID?>"> 编辑</a>
      <a href="javascript:delete_type('<?=$TYPE_ID?>');"> 删除</a>
      </td>
    </tr>
<?
 }

 if($TYPE_COUNT>0)
 {
?>
    <thead class="TableHeader">
      <td nowrap align="center">排序号</td>
      <td nowrap align="center">类型名称</td>
      <td nowrap align="center">操作</td>
    </thead>
    <thead class="TableControl">
      <td nowrap align="center" colspan="4">
      <input type="button" class="BigButton" OnClick="javascript:delete_all();" value="全部删除">
      </td>
    </thead>
    </table>
<?
 }
 else
    Message("","尚未定义计划类型");
?>

</div>

</body>
</html>

⌨️ 快捷键说明

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