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

📄 query.php

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

<html>
<head>
<title>查询文件</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">

<script>
function CheckForm()
{
   if(document.form1.SUBJECT.value=="" && document.form1.CONTENT_NO.value=="" && document.form1.KEY1.value=="" && document.form1.KEY2.value=="" && document.form1.KEY3.value=="" && document.form1.ATTACHMENT_DESC.value=="" && document.form1.ATTACHMENT_NAME.value=="" && document.form1.ATTACHMENT_DATA.value=="")
   { alert("请指定至少一个查询条件!");
     return (false);
   }

   return true;
}

</script>
</head>

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

<?
function tree_parent($SORT_ID)
{
  $connection=OpenConnection();
  $query = "SELECT * from FILE_SORT where SORT_ID='$SORT_ID'";
  $cursor= exequery($connection,$query);
  if($ROW=mysql_fetch_array($cursor))
  {
      $SORT_PARENT=$ROW["SORT_PARENT"];

      if($SORT_PARENT==0)
         return $SORT_ID;
      else
         return tree_parent($SORT_PARENT);
  }
  return 0;
}

 $TREE_PARENT=tree_parent($SORT_ID);

 $query = "SELECT * from FILE_SORT where SORT_ID='$TREE_PARENT'";
 $cursor = exequery($connection,$query);
 if($ROW=mysql_fetch_array($cursor))
 {
    $SORT_TYPE=$ROW["SORT_TYPE"];
 }

 //------- 文件夹信息 -------
 $query = "SELECT * from FILE_SORT where SORT_ID='$SORT_ID'";
 $cursor = exequery($connection,$query);
 if($ROW=mysql_fetch_array($cursor))
 {
    $SORT_NAME=$ROW["SORT_NAME"];

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

    $DEPT_ID=$ROW["DEPT_ID"];

    if($DEPT_ID!="0")
    {
      $query1 = "SELECT * from DEPARTMENT where DEPT_ID=" .$DEPT_ID;
      $cursor1= exequery($connection,$query1);
      if($ROW=mysql_fetch_array($cursor1))
         $DEPT_NAME=$ROW["DEPT_NAME"];
    }

     switch($SORT_TYPE)
    {
       case "1":
                $SORT_TYPE_DESC="全体";
                break;
       case "2":
                $SORT_TYPE_DESC=$DEPT_NAME;
                break;
       case "3":
                $SORT_TYPE_DESC="指定人员";
                break;
       case "4":
                $SORT_TYPE_DESC="个人文件夹";
                break;
    }
 }
 else
 {
 	 $SORT_NAME="根目录";
 	 $SORT_TYPE_DESC="个人文件夹";
 }
?>

<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
  <tr>
    <td class="Big"><img src="/images/folder_search.gif" align="absmiddle"><b><span class="Big1"> <?=$SORT_NAME?>(<?=$SORT_TYPE_DESC?>)- 查询文件</span></b><br>
    </td>
  </tr>
</table>

<br>

<table border="0" cellspacing="1" width="450" class="small" bgcolor="#000000" cellpadding="3" align="center">
<form action="search.php" name="form1" onsubmit="return CheckForm();">
  <tr class="TableData">
      <td nowrap align="center">标题包含文字:</td>
      <td nowrap><input type="text" name="SUBJECT" class="BigInput" size="20"></td>
  </tr>
  <tr class="TableData">
      <td nowrap align="center">排序号:</td>
      <td nowrap><input type="text" name="CONTENT_NO" class="BigInput" size="10"></td>
  </tr>
  <tr>
    <td nowrap class="TableData" align="center">内容[关键词1]:</td>
    <td class="TableData"><input type="text" name="KEY1" class="BigInput" size="20"></td>
  </tr>
  <tr>
    <td nowrap class="TableData" align="center">内容[关键词2]:</td>
    <td class="TableData"><input type="text" name="KEY2" class="BigInput" size="20"></td>
  </tr>
  <tr>
    <td nowrap class="TableData" align="center">内容[关键词3]:</td>
    <td class="TableData"><input type="text" name="KEY3" class="BigInput" size="20"></td>
  </tr>
  <tr class="TableData">
      <td nowrap align="center">附件说明包含文字:</td>
      <td nowrap><input type="text" name="ATTACHMENT_DESC" class="BigInput" size="20"></td>
  </tr>
  <tr class="TableData">
      <td nowrap align="center">附件文件名包含文字:</td>
      <td nowrap><input type="text" name="ATTACHMENT_NAME" class="BigInput" size="20"></td>
  </tr>
  <tr class="TableData">
      <td nowrap align="center">附件内容包含文字:</td>
      <td nowrap><input type="text" name="ATTACHMENT_DATA" class="BigInput" size="20"></td>
  </tr>
<?
if(strtolower(substr(PHP_OS,0,3))=="win")
{
?>
  <tr class="TableData">
      <td nowrap align="center">搜索Word(doc)文档:</td>
      <td nowrap><input type="checkbox" name="SEARCH_DOC" id="SEARCH_DOC">&nbsp;&nbsp;<label for="SEARCH_DOC">可能会导致搜索速度很慢!</label></td>
  </tr>
<?
}
?>
  <tr >
      <td nowrap class="TableControl" colspan="2" align="center">
          <input type="hidden" name="SORT_ID" value="<?=$SORT_ID?>">
          <input type="hidden" name="FILE_SORT" value="<?=$FILE_SORT?>">
          <input type="submit" value="查询" class="BigButton" title="进行文件查询">&nbsp;&nbsp;
          <input type="button" value="返回" class="BigButton" onclick="location='folder.php?FILE_SORT=<?=$FILE_SORT?>&SORT_ID=<?=$SORT_ID?>'">
      </td>
  </tr>
</table>
</form>

</body>
</html>

⌨️ 快捷键说明

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