排序代码怎么导入html中

浏览:665 发布日期:2015/01/23 分类:求助交流 关键字: php html
html中怎么写才能把这个排序导入进去


//排序
(strtolower($_GET['sort'])=="asc")?$sort="desc":$sort="asc";
unset($surl['orderby'],$surl['sort']);
$orderUrl = http_build_query($surl);
if($_GET['orderby']){
//if(strtolower($_GET['orderby'])=="leve") $parm['orderby'] = "m.credits ".text($_GET['sort']);
if(strtolower($_GET['orderby'])=="rate") $parm['orderby'] = "b.borrow_interest_rate ".text($_GET['sort']);
elseif(strtolower($_GET['orderby'])=="borrow_money") $parm['orderby'] = "b.borrow_money ".text($_GET['sort']);
else $parm['orderby']="b.id DESC";
}else{
$parm['orderby']="b.borrow_status ASC,b.id DESC";
}


$Sorder['Corderby'] = strtolower(text($_GET['orderby']));
$Sorder['Csort'] = strtolower(text($_GET['sort']));
$Sorder['url'] = $orderUrl;
$Sorder['sort'] = $sort;
$Sorder['orderby'] = text($_GET['orderby']);
//排序
$list = getBorrowList($parm);
//dump(M()->GetLastsql());exit;
$this->assign("Sorder",$Sorder);
$this->assign("searchUrl",$searchUrl);
$this->assign("searchMap",$searchMap);
$this->assign("Bconfig",$Bconfig);
$this->assign("Buse",$this->gloconf['BORROW_USE']);
$this->assign("list",$list);
$this->display();
}
最佳答案
评论( 相关
后面还有条评论,点击查看>>