index.php

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

PHP
173
字号
<?
  include_once 'inc/auth.php';
  include_once 'inc/reg_func.php';
  echo '
<html>
<head>
<title>Windows快捷组管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
';
  echo '<s';
  echo 'cript Language="JavaScript">
function CheckForm()
{
   if(document.form1.WIN_DESC.value=="")
   { alert("快捷方式名称不能为空!");
     return (false);
   }
   if(document.form1.WIN_PATH.value=="")
   { alert("程序路径不能为空!");
     return (false);
   }
}
function set_path()
{
  document.form1.WIN_PATH.value=document.form1.WIN_PATH_FILE.value;
}
function delete_WIN(WIN_ID)
';
  echo '
{
 msg=\'确认要删除该项快捷方式么?\';
 if(window.confirm(msg))
 {
  WIN="delete.php?WIN_ID=" + WIN_ID;
  window.location=WIN;
 }
}
function delete_all()
{
 msg=\'确认要删除所有快捷方式么?\';
 if(window.confirm(msg))
 {
  WIN="delete_all.php";
  window.location=WIN;
 }
}
</script>
</head>
<body class="bodycolor" topmargin="5" onload="document.form1.WIN_NO.focus();">
<table bo';
  echo 'rder="0" width="100%" cellspacing="0" cellpadding="3" class="small">
  <tr>
    <td class="Big"><img src="/images/notify_new.gif" align="absmiddle">';
  echo '<s';
  echo 'pan class="big3"> 添加Windows快捷方式</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="WIN_NO" clas';
  echo 's="BigInput" size="10" maxlength="25">
    </td>
   <tr>
    <td nowrap class="TableData">快捷方式名称:</td>
    <td nowrap class="TableData">
        <input type="text" name="WIN_DESC" class="BigInput" size="25">
    </td>
   </tr>
   <tr>
    <td nowrap class="TableData">程序路径:</td>
    <td nowrap class="TableData">
    	  <input type="text" name="WIN_PATH" class="BigInput" size="30">
      ';
  echo '  <input type="file" name="WIN_PATH_FILE" class="BigInput" size="1" onchange="set_path()"><br>
        本机Windows程序路径,如<br>
        C:\\Program Files\\Windows Media Player\\wmplayer.exe<br><br>
        也可以定义使用IE访问网址,如<br>
        iexplore http://';
  echo $TD_MYOA_WEB_SITE;
  echo '    </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" wid';
  echo 'th="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"> 管理Windows快捷组</span>
    </td>
  </tr>
</table>
<br>
<div align="center">
';
  $query = (((''.'SELECT * from WINEXE where USER_ID=\'').$LOGIN_USER_ID).'\' order by WIN_NO');
  $cursor = exequery ($connection, $query);
  $WIN_COUNT = 0;
  while ($ROW = mysql_fetch_array ($cursor))
  {
    ++$WIN_COUNT;
    $WIN_ID = $ROW['WIN_ID'];
    $WIN_NO = $ROW['WIN_NO'];
    $WIN_DESC = $ROW['WIN_DESC'];
    $WIN_PATH = $ROW['WIN_PATH'];
    if (($WIN_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 $WIN_NO;
    echo '</td>
      <td nowrap align="center">';
    echo $WIN_DESC;
    echo '</td>
      <td>';
    echo $WIN_PATH;
    echo '</td>
      <td nowrap align="center" width="80">
      <a href="edit.php?WIN_ID=';
    echo $WIN_ID;
    echo '"> 编辑</a>
      <a href="javascript:delete_WIN(\'';
    echo $WIN_ID;
    echo '\');"> 删除</a>
      </td>
    </tr>
';
  }
  if ((0 < $WIN_COUNT))
  {
    echo '    <thead class="TableHeader">
      <td nowrap align="center">序号</td>
      <td nowrap align="center">快捷方式名称</td>
      <td nowrap align="center">程序路径</td>
      <td nowrap align="center">操作</td>
    </thead>
    <thead class="TableControl">
      <td nowrap align="center" colspan="5">
      <input type="button" class="BigButton" OnClick="javascript:delete_all();" value="全部删除">
   ';
    echo '   </td>
    </thead>
    </table>
';
  }
  else
  {
    message ('', '尚未添加Windows快捷方式');
  }
  echo '
</div>
</body>
</html>';
?>

⌨️ 快捷键说明

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