require("inc/sell.inc");
?>
require("inc/buy.inc");
?>
|
|
require("inc/search.inc");
?>
|
require("inc/releaseinfo.inc");
?>
|
|
物品种类: > ".$goodssub[substr($g_type,1)]?>
|
$g = substr($g_type,0,1);
if (substr($g_type,1)!=0)
$query = "select count(8) from info where goodstype='$g_type' and valid=0";
else
$query = "select count(8) from info where goodstype like '$g%' and valid=0";
$result = mysql_query($query,$mysql);
$info_count = mysql_fetch_row($result);
$info_count = $info_count[0];
if ($info_count%$ROWS==0)
$info_pages = $info_count/$ROWS;
else
$info_pages = floor($info_count/$ROWS)+1;
if ($info_pages==0)
$info_pages = 1;
?>
| # |
商品名称 |
留言 |
交易类型 |
种类 |
所在城市 |
价格 |
发布日期 |
 |
$start = ($pageno-1)*$ROWS;
$outstr = "";
$order = $start;
if (substr($g_type,1)!=0)
$query = "select info.infoid, info.goodsname, info.tradetype, info.goodstype, userinfo.city, info.price, info.subtime, info.goodspic, info.msgs from info, userinfo where info.goodstype='$g_type' and info.valid=0 and info.userid=userinfo.userid order by info.infoid desc limit $start,$ROWS";
else
$query = "select info.infoid, info.goodsname, info.tradetype, info.goodstype, userinfo.city, info.price, info.subtime, info.goodspic, info.msgs from info, userinfo where info.goodstype like '$g%' and info.valid=0 and info.userid=userinfo.userid order by info.infoid desc limit $start,$ROWS";
$result = mysql_query($query,$mysql);
while($row_info=mysql_fetch_row($result))
{
$order++;
if ($row_info[7]!="")
$gname = sub_str($row_info[1],14)."(图)";
else
$gname = sub_str($row_info[1],18);
if ($row_info[2]==0)
$ttype = "转让";
else
$ttype = "求购";
$gtype = $goods[substr($row_info[3],0,1)];
if (strlen($row_info[4])>20)
$city = sub_str($row_info[4],18)."..";
else
$city = $row_info[4];
$price = sub_str($row_info[5],10);
$ctime = date("m/d",$row_info[6]);
if ($order%2==0)
$bg = "f1f1f0";
else
$bg = "white";
$outstr .= "
| $order |
$gname |
$row_info[8] |
$ttype |
$gtype |
$city |
$price |
$ctime |
 |
";
}
echo $outstr;
?>
|