//团购1
$t=1;
$tugou = esf(" * "," setindex='1' $cwhere order by id desc limit 0,6","A表");
foreach( $tugou as $v =>$_v )
{
$tugou[$v]['i'] =$t++;
}
$abpccount = count( $tugou );
//echo $abpccount;
if( $abpccount
{
$page->tpl->assign('notg',1);//调用团购标签
$abpclimit = 6 - $abpccount;
$tugou_loupan = esf(" * "," index_dt='1' $cwhere order by id desc limit 0,$abpclimit ","B表");
foreach( $tugou_loupan as $v =>$_v )
{
$tugou_loupan[$v]['i'] =$t++;
$tugou_loupan[$v]['abpcindexpic'] = $_v['abpcthumb'];
$tugou_loupan[$v]['abpclitpic'] = $_v['abpcthumb'];
$tugou_loupan[$v]['abpcname'] = mt_rand(10,80);
$tugou_loupan[$v]['abpcdown'] = 'xx 惠';
$tugou_loupan[$v]['abpclpname'] = $_v['abpcname'];
}
$tugou = array_merge($tugou,$tugou_loupan);
}
$page->tpl->assign('tugou',$tugou);
|