| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- <?php
- class leaderboard_c extends Control
- {
- function __construct()
- {
- parent::Control();
- $this->load_model("user");
- $this->load_model("customer");
- $this->load_model("leaderboard");
- }
- function leaderboard_c()
- {
- $this->__construct();
- }
- function index_f()
- {
- if(!$_SESSION["user_id"])
- {
- error('',$this->url('login'));
- }
- $pageid = $this->trans_lib->int(SYS_PAGEID);
- $offset = $pageid>0 ? ($pageid-1)*SYS_PSIZE : 0;
- $rslist = $this->leaderboard_m->get_list($offset,SYS_PSIZE*100);
- $this->tpl->assign("rslist",$rslist);
- //$total = $this->leaderboard_m->get_count();
- //$this->tpl->assign("total",$total);
- //$pageurl = site_url("customer","uid=".$id);
- //$this->page_lib->set_psize(SYS_PSIZE);
- //$pagelist = $this->page_lib->page($pageurl,$total,true);//分页数组
- //$this->tpl->assign("pagelist",$pagelist);
- //$this->tpl->assign("rslist",$rslist);
- //print_r($this->leaderboard_m->get_list(0,$offset,SYS_PSIZE));
- $this->tpl->assign("sitetitle","排行傍");
- $this->tpl->display("leaderboard.".$this->tpl->ext);
-
- }
- function view_f()
- {
- if(!$_SESSION["user_id"])
- {
- error('',$this->url('login'));
- }
- $cid = $this->trans_lib->safe("id");
- //print_r($cid);
- $rs = $this->customer_m->customer_from_id($cid);
- $this->tpl->assign("rs",$rs);
- $this->tpl->display("msg_customer.".$this->tpl->ext);
- }
- }
- ?>
|