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

📄 index.php

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

include_once( "inc/auth.php" );
include_once( "inc/function_page_01.php" );
if ( $_REQUEST['cur_page'] == "" )
{
	$cur_page = 1;
}
else
{
	$cur_page = $_REQUEST['cur_page'];
}
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</head>\r\n\r\n<body class=\"bodycolor\" topmargin=\"5\">\r\n<table border=\"0\" width=\"100%\" cellspacing=\"1\" cellpadding=\"0\">\r\n\t<tr class=\"tablehead1\">\r\n\t\t<td><img src=\"/images/manage/news.gif\" align=\"absmiddle\">入库管理和库存</td>\r\n\t</tr>\r\n\t<tr class=\"tablehead2\">\r\n\t\t<td><BUTTON class=btn onClick=\"javascri";
echo "pt:location='add.php';\"><table><tr valign=top ><td><img src=\"/images/littlegif/b_u.gif\" align=\"center\"></td> <td>";
echo "<s";
echo "pan id=\"showallid\">新增入库单</span></td></tr></table></BUTTON> <BUTTON class=btn onClick=\"javscript:location='search.php';\"><table><tr valign=top ><td><img src=\"/images/littlegif/b_u.gif\" align=\"center\"></td> <td>";
echo "<s";
echo "pan id=\"showallid\">入库单查询</span></td></tr></table></BUTTON></td>\r\n\t</tr>\r\n</table>\r\n<br>\r\n";
$connection = openconnection( );
$query = "SELECT DISTINCT oj.JOIN_APPELLATION_SORT, oj.JOIN_APPELLATION, oa.STOCKPILE, oa.CAUTION_AMOUNT, oa.CAUTION,oj.APPELLATION_ID FROM officeitem_sort as os, officeitem_appellation as oa, officeitem_joinstoreroom as oj  WHERE oa.SORT_ID=os.SORT_ID AND oa.IS_JOIN='1' and oj.APPELLATION_ID=oa.APPELLATION_ID GROUP BY oj.APPELLATION_ID ";
switch ( $_REQUEST['order'] )
{
case "appellation" :
	$query .= " order by oj.JOIN_APPELLATION";
	break;
case "sort" :
	$query .= " order by oj.JOIN_APPELLATION_SORT";
	break;
case "stockpile" :
	$query .= " order by oa.STOCKPILE";
	break;
case "caution_amount" :
	$query .= " order by oa.CAUTION_AMOUNT";
	break;
default :
	$query .= " order by oa.STOCKPILE";
	break;
}
$query .= $_REQUEST['sens'] ? " DESC" : " ASC";
$query = page( $query, 15 );
$cursor = exequery( $connection, $query );
$count = 0;
echo "<table border=\"0\" width=\"100%\" cellspacing=\"1\" cellpadding=\"5\" class=\"small\">\r\n";
while ( $row = mysql_fetch_row( $cursor ) )
{
	++$count;
	$sort = $row[0];
	$appellation = $row[1];
	$stockpile = $row[2];
	$caution_amount = $row[3];
	$caution = $row[4];
	$appellation_id = $row[5];
	if ( $caution == 0 )
	{
		$caution_text = "未启用";
	}
	else
	{
		$caution_text = "已启用";
	}
	if ( $count % 2 == 1 )
	{
		$TableLine = "TableLine1";
	}
	else
	{
		$TableLine = "TableLine2";
	}
	$sqlap = "SELECT * FROM officeitem_sort os,officeitem_appellation oa WHERE  os.SORT_ID=oa.SORT_ID AND oa.APPELLATION_ID=".$appellation_id;
	$rsap = exequery( $connection, $sqlap );
	$rowap = mysql_fetch_array( $rsap );
	$appellation = $rowap['APPELLATION'];
	$sort = $rowap['SORT'];
	if ( $stockpile <= $caution_amount )
	{
		echo "\t<tr style=\"color:#FF0000;\" class=\"";
		echo $TableLine;
		echo "\">\r\n\t\t<td style=\"font:bold\" nowrap>";
		echo $caution_text;
		echo "</td>\r\n\t\t<td nowrap>";
		echo $sort;
		echo "</td>\r\n\t\t<td nowrap>";
		echo $appellation;
		echo "</td>\r\n\t\t<td nowrap>";
		echo $stockpile;
		echo "</td>\r\n\t\t<td nowrap>";
		echo $caution_amount;
		echo "</td>\r\n\t</tr>\r\n";
	}
	else
	{
		echo "\t<tr class=\"";
		echo $TableLine;
		echo "\">\r\n\t\t<td style=\"font:bold\" nowrap>";
		echo $caution_text;
		echo "</td>\r\n\t\t<td nowrap>";
		echo $sort;
		echo "</td>\r\n\t\t<td nowrap>";
		echo $appellation;
		echo "</td>\r\n\t\t<td nowrap>";
		echo $stockpile;
		echo "</td>\r\n\t\t<td nowrap>";
		echo $caution_amount;
		echo "</td>\r\n\t</tr>\r\n";
	}
}
echo "<center>";
if ( $count == 0 )
{
	message( "提示", "暂无记录" );
	exit( );
}
echo "</center>";
$sens = $_REQUEST['sens'] ? 0 : 1;
$sensimg = $_REQUEST['sens'] ? "arrow_up.gif" : "arrow_down.gif";
$sensimg = "/images/".$sensimg;
$sufurl = $_SERVER['PHP_SELF']."?sens=".$sens;
echo "\t<thead class=\"TableHeader\">\r\n\t\t<td>警示状态</td>\r\n\t\t<td><a href=\"";
echo $sufurl;
echo "&order=sort\">类别";
if ( $_REQUEST['order'] == "sort" )
{
	echo "<img src='".$sensimg."' border='0'>";
}
echo "</a></td>\r\n\t\t<td><a href=\"";
echo $sufurl;
echo "&order=appellation\">名称";
if ( $_REQUEST['order'] == "appellation" )
{
	echo "<img src='".$sensimg."' border='0'>";
}
echo "</a></td>\r\n\t\t<td><a href=\"";
echo $sufurl;
echo "&order=stockpile\">总库存";
if ( $_REQUEST['order'] == "stockpile" )
{
	echo "<img src='".$sensimg."' border='0'>";
}
echo "</a></td>\r\n\t\t<td><a href=\"";
echo $sufurl;
echo "&order=caution_amount\">警示数量";
if ( $_REQUEST['order'] == "caution_amount" )
{
	echo "<img src='".$sensimg."' border='0'>";
}
echo "</a></td>\r\n\t</thead>\r\n</table>\r\n<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"5\">\r\n\t<tr>\r\n\t\t<td class=\"TableLine1\" nowrap align=\"right\">";
disp( "sens=".$_REQUEST['sens']."&order=".$_REQUEST['order'] );
echo "</td>\r\n\t</tr>\r\n</table>\r\n";
if ( 0 < ( $n = $_REQUEST['cur_page'] - $total_page_nums ) )
{
	$cur_page = $_REQUEST['cur_page'] - $n;
	header( "location:".$_SERVER['PHP_SELF']."?&order=".$_REQUEST['order']."&sens=".$_REQUEST['sens']."&cur_page=".$cur_page );
}
echo "</body>\r\n</html>";
?>

⌨️ 快捷键说明

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