index.php

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

PHP
149
字号
<?
  include_once 'inc/auth.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.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';
  echo '_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 s';
  echo 'rc="/images/notify_new.gif" align="absmiddle">';
  echo '<s';
  echo 'pan class="big3"> 添加计划类型</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="TYPE_NO" class="B';
  echo 'igInput" 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" ti';
  echo 'tle="添加计划类型" 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">';
  echo '<s';
  echo 'pan 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))
    {
      echo '
    <table border="0" cellspacing="1" width="450" class="small" bgcolor="#000000" cellpadding="3">
';
    }
    echo '    <tr class="TableData">
      <td nowrap align="center">';
    echo $TYPE_NO;
    echo '</td>
      <td nowrap align="center">';
    echo $TYPE_NAME;
    echo '</td>
      <td nowrap align="center" width="80">
      <a href="edit.php?TYPE_ID=';
    echo $TYPE_ID;
    echo '"> 编辑</a>
      <a href="javascript:delete_type(\'';
    echo $TYPE_ID;
    echo '\');"> 删除</a>
      </td>
    </tr>
';
  }
  if ((0 < $TYPE_COUNT))
  {
    echo '    <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 ('', '尚未定义计划类型');
  }
  echo '
</div>
</body>
</html>';
?>

⌨️ 快捷键说明

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