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

📄 query.php

📁 泛微协同办公系统标准版E-office V5.5的源代码内含泛微办公系统V5.5自动注册文件。
💻 PHP
字号:
<?php

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 );
		}
	}
}

include_once( "inc/auth.php" );
include_once( "inc/conn.php" );
echo "\r\n<html>\r\n<head>\r\n<title>查询文件</title>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n\r\n";
echo "<s";
echo "cript>\r\nfunction CheckForm()\r\n{\r\n   if(document.form1.SUBJECT.value==\"\" && document.form1.KEY1.value==\"\" && document.form1.KEY2.value==\"\" && document.form1.KEY3.value==\"\" && document.form1.ATTACHMENT_DESC.value==\"\" && document.form1.ATTACHMENT_NAME.value==\"\")\r\n   { alert(\"请指定至少一个查询条件!\");\r\n     return (false);\r\n   }\r\n\r\n   return true;\r\n}\r\n\r\n</script>\r\n</head>\r\n\r\n<body class=\"bodycolor\" top";
echo "margin=\"5\" onLoad=\"document.form1.SUBJECT.focus();\">\r\n\r\n";
$connection = openconnection( );
$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" && $DEPT_ID != "" )
	{
		$DEPT_ID = explode( ",", $DEPT_ID );
		$query1 = "SELECT * from DEPARTMENT where DEPT_ID=".$DEPT_ID[0];
		$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 = "个人文件夹";
	}
}
echo "<form action=\"search.php\" name=\"form1\" onSubmit=\"return CheckForm();\">\r\n<table border=\"0\" width=\"100%\" cellspacing=\"1\" cellpadding=\"0\">\r\n  <tr class=\"TableHead1\">\r\n    <td><img src=\"/images//notify_new.gif\" width=\"22\" height=\"20\">       ";
echo $SORT_NAME;
echo "</td>\r\n  </tr>\r\n  <tr class=\"TableLine2\">\r\n    <td><input type=\"image\" src=\"/images/button/submit.gif\" title=\"进行文件查询\">\r\n    <a href=\"folder.php?FILE_SORT=";
echo $FILE_SORT;
echo "&SORT_ID=";
echo $SORT_ID;
echo "&refreshno=";
echo $_REQUEST['refreshno'];
echo "\" ><img src=\"/images/button/return.gif\" border=\"0\"></a>       \r\n\t</td>\r\n  </tr>\r\n</table>\r\n\r\n<hr>\r\n\r\n<table border=\"0\" cellspacing=\"1\" width=\"100%\" class=\"small\" cellpadding=\"5\" align=\"center\">\r\n  <tr>\r\n      <td width=\"25%\" nowrap class=\"TableLine2\">标题包含文字:</td>\r\n      <td nowrap class=\"TableLine1\"><input type=\"text\" name=\"SUBJECT\" size=\"20\"></td>\r\n  </tr>\r\n  <tr>\r\n    <td nowrap class=\"TableLine2\" >内容[";
echo "关键词1]:</td>\r\n    <td class=\"TableLine1\"><input type=\"text\" name=\"KEY1\" size=\"20\"></td>\r\n  </tr>\r\n  <tr>\r\n    <td nowrap class=\"TableLine2\" >内容[关键词2]:</td>\r\n    <td class=\"TableLine1\"><input type=\"text\" name=\"KEY2\" size=\"20\"></td>\r\n  </tr>\r\n  <tr>\r\n    <td nowrap class=\"TableLine2\">内容[关键词3]:</td>\r\n    <td class=\"TableLine1\"><input type=\"text\" name=\"KEY3\" size=\"20\"></td>\r\n  </tr>\r\n  <tr>\r\n      <td nowra";
echo "p class=\"TableLine2\">附件说明包含文字:</td>\r\n      <td nowrap class=\"TableLine1\"><input type=\"text\" name=\"ATTACHMENT_DESC\" size=\"20\"></td>\r\n  </tr>\r\n  <tr>\r\n      <td nowrap class=\"TableLine2\">附件文件名包含文字:</td>\r\n      <td nowrap class=\"TableLine1\"><input type=\"text\" name=\"ATTACHMENT_NAME\" size=\"20\"></td>\r\n  </tr>\r\n";
if ( strtolower( substr( PHP_OS, 0, 3 ) ) == "win" )
{
}
echo "  </table>\r\n  <table border=\"0\" cellspacing=\"1\" width=\"450\" class=\"small\" cellpadding=\"3\" align=\"center\">\r\n  <tr >\r\n      <td nowrap  colspan=\"2\" align=\"center\">\r\n          <input type=\"hidden\" name=\"SORT_ID\" value=\"";
echo $SORT_ID;
echo "\">\r\n          <input type=\"hidden\" name=\"FILE_SORT\" value=\"";
echo $FILE_SORT;
echo "\">\r\n          \r\n          \r\n          <input type=\"hidden\" name=\"refreshno\" value=\"";
echo $_REQUEST['refreshno'];
echo "\">\r\n      </td>\r\n  </tr>\r\n</table>\r\n</form>\r\n\r\n</body>\r\n</html>";
?>

⌨️ 快捷键说明

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