Personal.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <?php
  2. class personal_c extends Control
  3. {
  4. var $subject;
  5. function __construct()
  6. {
  7. parent::Control();
  8. $this->load_model("user");
  9. $this->load_model("customer");
  10. $this->load_model("personal");
  11. }
  12. function personal_c()
  13. {
  14. $this->__construct();
  15. }
  16. function index_f()
  17. {
  18. if(!$_SESSION["user_id"])
  19. {
  20. error('',$this->url('login'));
  21. }
  22. $rs = $this->user_m->user_from_id($_SESSION["user_id"]);
  23. $id=$rs["id"];
  24. $this->tpl->assign("urs",$rs);
  25. /*$pageid = $this->trans_lib->int(SYS_PAGEID);
  26. $offset = $pageid>0 ? ($pageid-1)*SYS_PSIZE : 0;
  27. $rslist = $this->customer_m->get_list($id,$offset,SYS_PSIZE);
  28. $this->tpl->assign("rslist",$rslist);
  29. $total = $this->customer_m->get_count($id);
  30. $this->tpl->assign("total",$total);
  31. $pageurl = site_url("customer","uid=".$id);
  32. $this->page_lib->set_psize(SYS_PSIZE);
  33. $pagelist = $this->page_lib->page($pageurl,$total,true);//分页数组
  34. $this->tpl->assign("pagelist",$pagelist);
  35. $this->tpl->assign("rslist",$rslist);
  36. $sitetitle = $this->lang["customer"];*/
  37. //print_r($id);
  38. $AllCustomerCount=$this->personal_m->get_count_all($id);
  39. $OKCoustomerCount=$this->personal_m->get_count_ok($id);
  40. $this->tpl->assign("AllCustomerCount",$AllCustomerCount);
  41. $this->tpl->assign("OKCoustomerCount",$OKCoustomerCount);
  42. $this->tpl->assign("sitetitle",$sitetitle);
  43. $this->tpl->display("personal.".$this->tpl->ext);
  44. }
  45. function view_f()
  46. {
  47. if(!$_SESSION["user_id"])
  48. {
  49. error('',$this->url('login'));
  50. }
  51. $cid = $this->trans_lib->safe("id");
  52. $rs = $this->customer_m->customer_from_id($cid);
  53. $this->tpl->assign("rs",$rs);
  54. $this->tpl->display("msg_customer.".$this->tpl->ext);
  55. }
  56. }
  57. ?>