home.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?php
  2. class home_c extends Control
  3. {
  4. function __construct()
  5. {
  6. parent::Control();
  7. $this->load_model("home");
  8. $this->load_model("user");
  9. $this->load_model("customer");
  10. }
  11. function home_c()
  12. {
  13. $this->__construct();
  14. }
  15. function index_f()
  16. {
  17. $this->home_m->langid($_SESSION["sys_lang_id"]);
  18. if(function_exists("gd_info"))
  19. {
  20. $gd = gd_info();
  21. $gdinfo = $gd["GD Version"];
  22. }
  23. else
  24. {
  25. $gdinfo = "不支持";
  26. }
  27. $this->tpl->assign("gdinfo",$gdinfo);
  28. $condition = " 1=1 ";
  29. $conditio = " 1=1 ";
  30. $user_count = $this->user_m->get_count($condition);
  31. $customer_count = $this->customer_m->get_count($conditio);
  32. $this->tpl->assign("user_count",$user_count);
  33. $this->tpl->assign("customer_count",$customer_count);
  34. $this->tpl->display("home.html");
  35. }
  36. function info_f()
  37. {
  38. phpinfo();
  39. exit;
  40. }
  41. function ajax_user_f()
  42. {
  43. $this->home_m->langid($_SESSION["sys_lang_id"]);
  44. $condition = " 1=1 ";
  45. $user_count = $this->user_m->get_count($condition);
  46. echo $user_count;
  47. }
  48. function ajax_customer_f()
  49. {
  50. $this->home_m->langid($_SESSION["sys_lang_id"]);
  51. $condition = " 1=1 ";
  52. $customer_count = $this->customer_m->get_count($condition);
  53. echo $customer_count;
  54. }
  55. }
  56. ?>