|
$j = 0;
for($i=$start_col_index,$retrived_line=0;$i 0 && $start_pos){
$db_data_seek($result,$start_pos);
}
}
while(($rows=$db_fetch_array($result)) && $retrived_line ++ < $lineperpage){
$p_pid = intval($rows['pid']);
$p_name = $rows['name'];
$p_alias = $rows['alias'];
$p_status = $rows['status'];
$p_orders = $rows['orders'];
$p_rank = $rows['rank'];
$p_viewcount = $rows['viewcount'];
$p_soldcount = $rows['soldcount'];
$p_ondate = substr($rows['ondate'],0,10);
$p_description = cutstr(stripslashes($rows['description']),120);
$p_lphotoname = $rows['lphotoname'];
$p_mphotoname = $rows['mphotoname'];
$p_sphotoname = $rows['sphotoname'];
$storage = intval($rows['storage']);
$p_photo = $dir."/".$p_sphotoname;
$p_mprice = sprintf("%.2f",$rows["$global_mprice"]);
$p_tprice = sprintf("%.2f",$rows["$global_tprice"]);
$price_dif = sprintf("%.2f",$rows["$global_mprice"] - $rows["$global_tprice"]);
if($price_dif > 0 && $p_tprice > 0){
$price_dif_rat = sprintf("%0d",$price_dif/$p_tprice * 100);
}
$p_typeid = $rows['typeid'];
$pid = $columnid * 1000000 + $p_pid;
//$cart_str = ($storage > 0)?"订购":"脱销";
$cart_str = ($storage > 0)?"订购":"脱销";
$j ++;
echo "
";
}
}
?>
|