php瀑布流

來源:互聯網
上載者:User

/**
* box查詢列表 首次載入
*/
private function boxList(){
$data = $this->maplist();
$map = $data['map'];
$map['is_del'] = 0;
$_order = $data['_order'];
$count = model('Showbox')->where($map)->count();
import('ORG.Util.Page');
$page = new Page($count,48);
$this->assign('listpage',$page->show());
$this->assign('nowpage',$page->firstRow);
$list = model('Showbox')->where($map)->limit($page->firstRow.',12')->order($_order)->select();
foreach ($list as $k=>$v){
$list[$k]['user_info'] = getUserInfo($v['uid']);
$list[$k]['sid'] = getFirstid($v['id']);
}
$this->assign('list',$list);
}


/**
* box列表滾動顯示。 //滾動顯示
*/
public function boxwater(){
$this->supportList('showbox');
$this->subscripList('showbox');
$supportList = array();
$var['login_uid'] = $this->uid;
if($this->uid){
$supportList = getSupport($this->uid,'showbox');
}
$var['supportList'] = $supportList;
$subscripList = array();
if($this->uid){
$subscripList = getSubscrip($this->uid,'showbox');
}
$var['subscripList'] = $subscripList;
$data = $this->maplist();
$map = $data['map'];
$map['is_del'] = 0;
$_order = $data['_order'];
$st_page = $_GET['page'];
$nowpage = $_GET['nowpage'];
$page = $nowpage+$st_page*12;
$c = $_GET['c'];
$list = model('Showbox')->where($map)->order($_order)->limit($page.',12')->select();
if(!empty($list)){
$html = '';
foreach ($list as $k=>$v){
$list[$k]['user_info'] = getUserInfo($v['uid']);
$list[$k]['sid'] = getFirstid($v['id']);
}
$var['list'] = $list;

$return['status'] = 1;
if($st_page == 3){
$return['status'] = 3;
}
$return['html'] = $this->fetchTpl('boxwater',$var);
}else{
$return['status'] = 2;
}
exit(json_encode($return));exit;

}

?php>


此代碼有許多源碼的資料,參數,望測試

  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.