📄 prodictlist.php
字号:
<?
include_once 'inc/auth.php';
$PAGE_SIZE = 10;
echo '<html>
<head>
<title>相关产品</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
';
echo '<s';
echo 'cript>
function set_page()
{
PAGE_START=PAGE_NUM.value;
location="prodictlist.php?PROVIDER_ID=';
echo $PROVIDER_ID;
echo '&CUR_PAGE="+PAGE_START;
}
</script>
</head>
<body>
';
$query = (((''.'SELECT count(*) FROM `PRODUCT` where PROVIDER_ID=\'').$PROVIDER_ID).'\'');
$cursor = exequery ($connection, $query);
$CUSTOMER_COUNT = 0;
if ($ROW = mysql_fetch_array ($cursor))
{
$CUSTOMER_COUNT = $ROW[0];
}
$PER_PAGE = 10;
$PAGE_COUNT = ceil (($CUSTOMER_COUNT / $PER_PAGE));
if ((($CUR_PAGE <= 0) OR ($CUR_PAGE == '')))
{
$CUR_PAGE = 1;
}
if (($PAGE_COUNT < $CUR_PAGE))
{
$CUR_PAGE = $PAGE_COUNT;
}
$query1 = (((''.'SELECT * from `PRODUCT` a LEFT OUTER JOIN SYS_CODE b
ON a.PRODUCT_MODE = b.CODE_NO AND b.PARENT_NO = \'PRODUCT_MODE\'
where PROVIDER_ID=\'').$PROVIDER_ID).'\' ');
$offest = (($CUR_PAGE - 1) * $PAGE_SIZE);
$query1 = (((($query1.' LIMIT ').$offest).' ,').$PER_PAGE);
$cursor1 = exequery ($connection, $query1);
if (($CUSTOMER_COUNT == 0))
{
message ('<br>提示', '没有相关产品');
echo '
';
exit ();
}
else
{
echo '<table border="0" cellspacing="1" width="95%" class="small" cellpadding="3">
<tr>
<td align="left">
<a href="prodictlist.php?CUR_PAGE=1&PROVIDER_ID=';
echo $PROVIDER_ID;
echo '"><img src=\'/images/first02.gif\' width=\'24\' border=\'0\' height=\'15\' alt=\'首页\'></a>
<a href="prodictlist.php?CUR_PAGE=';
echo ($CUR_PAGE - 1);
echo '&PROVIDER_ID=';
echo $PROVIDER_ID;
echo '"><img src=\'/images/first01.gif\' width=\'24\' border=\'0\' height=\'15\' alt=\'上一页\'></a>
<a href="prodictlist.php?CUR_PAGE=';
echo ($CUR_PAGE + 1);
echo '&PROVIDER_ID=';
echo $PROVIDER_ID;
echo '"><img src=\'/images/last01.gif\' width=\'24\' border=\'0\' height=\'15\' alt=\'下一页\' style="cursor:hand"></a>
<a href="prodictlist.php?CUR_PAGE=';
echo $PAGE_COUNT;
echo '&PROVIDER_ID=';
echo $PROVIDER_ID;
echo '"><img src=\'/images/last02.gif\' width=\'24\' border=\'0\' height=\'15\' alt=\'末页\' style="cursor:hand"></a>
到
<input type="text" name="PAGE_NUM" size="3" maxlength="4" class="SmallInput">
页
<img id="btnGotoPage" src="/images/menu/book.gif" onclick="set_page()" border="0" WIDTH="19" HEIGHT="17" style="cursor:hand" alt="转到相应页面">
</td>
<td align="right">
';
echo $CUR_PAGE;
echo '/';
echo $PAGE_COUNT;
echo '页 共 ';
echo $CUSTOMER_COUNT;
echo ' 条
</td>
</tr>
</table>
<table border="0" cellspacing="1" width="95%" class="small" bgcolor="#000000" cellpadding="3">
';
$LINKMAN_COUNT = 0;
while ($ROW = mysql_fetch_array ($cursor1))
{
++$LINKMAN_COUNT;
$PRODUCT_ID1 = $ROW['PRODUCT_ID'];
$PRODUCT_NAME1 = $ROW['PRODUCT_NAME'];
$PRODUCT_TYPE1 = $ROW['PRODUCT_TYPE'];
$CODE_NAME1 = $ROW['CODE_NAME'];
$MEASURE_UNIT1 = $ROW['MEASURE_UNIT'];
$COST_PRICE1 = $ROW['COST_PRICE'];
$STANDARD_PRICE1 = $ROW['STANDARD_PRICE'];
if (($SEX1 == '0'))
{
$SEX_DESC = '男';
}
else
{
$SEX_DESC = '女';
}
if (($MOBILE1 != ''))
{
($MOBIL_NO_STR .= ($MOBILE1.','));
}
if ((($LINKMAN_COUNT % 2) == 1))
{
$TableLine = 'TableLine1';
}
else
{
$TableLine = 'TableLine2';
}
echo '
<tr class="';
echo $TableLine;
echo '">
<td nowrap align="center">';
echo $PRODUCT_NAME1;
echo '</td>
<td nowrap align="center">';
echo $PRODUCT_TYPE1;
echo '</td>
<td nowrap align="center">';
echo $CODE_NAME1;
echo '</td>
<td nowrap align="center">';
echo $MEASURE_UNIT1;
echo '</td>
<td nowrap align="center">';
echo $COST_PRICE1;
echo '</td>
<td nowrap align="center">';
echo $STANDARD_PRICE1;
echo '</td>
</tr>
';
}
}
echo ' <thead class="TableHeader">
<td nowrap align="center">产品名称</td>
<td nowrap align="center">产品型号</td>
<td nowrap align="center">产品类别</td>
<td nowrap align="center">计量单位</td>
<td nowrap align="center">成本价</td>
<td nowrap align="center">出售价</td>
</thead>
</table>
</body>
</html>';
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -