| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- <?php
- class personal_c extends Control
- {
- var $subject;
- function __construct()
- {
- parent::Control();
- $this->load_model("user");
- $this->load_model("customer");
- $this->load_model("personal");
- }
- function personal_c()
- {
- $this->__construct();
- }
- function index_f()
- {
- if(!$_SESSION["user_id"])
- {
- error('',$this->url('login'));
- }
- $rs = $this->user_m->user_from_id($_SESSION["user_id"]);
- $id=$rs["id"];
- $this->tpl->assign("urs",$rs);
-
-
- /*$pageid = $this->trans_lib->int(SYS_PAGEID);
- $offset = $pageid>0 ? ($pageid-1)*SYS_PSIZE : 0;
- $rslist = $this->customer_m->get_list($id,$offset,SYS_PSIZE);
- $this->tpl->assign("rslist",$rslist);
- $total = $this->customer_m->get_count($id);
- $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);
- $sitetitle = $this->lang["customer"];*/
- //print_r($id);
- $AllCustomerCount=$this->personal_m->get_count_all($id);
- $OKCoustomerCount=$this->personal_m->get_count_ok($id);
-
- $this->tpl->assign("AllCustomerCount",$AllCustomerCount);
- $this->tpl->assign("OKCoustomerCount",$OKCoustomerCount);
- $this->tpl->assign("sitetitle",$sitetitle);
- $this->tpl->display("personal.".$this->tpl->ext);
- }
- function view_f()
- {
- if(!$_SESSION["user_id"])
- {
- error('',$this->url('login'));
- }
- $cid = $this->trans_lib->safe("id");
- $rs = $this->customer_m->customer_from_id($cid);
- $this->tpl->assign("rs",$rs);
- $this->tpl->display("msg_customer.".$this->tpl->ext);
- }
- }
- ?>
|