setting.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. class setting_c extends Control
  3. {
  4. var $module_sign = "setting";
  5. function __construct()
  6. {
  7. parent::Control();
  8. }
  9. function setting_c()
  10. {
  11. $this->__construct();
  12. }
  13. function index_f()
  14. {
  15. sys_popedom($this->module_sign.":setting","tpl");
  16. $file = ROOT_DATA."system_".$_SESSION["sys_lang_id"].".php";
  17. $_sys = array();
  18. if(file_exists($file))
  19. {
  20. include($file);
  21. }
  22. $this->tpl->assign("rs",$_sys);
  23. $if_modify = sys_popedom($this->module_sign.":modify");
  24. $this->tpl->assign("if_modify",$if_modify);
  25. $this->load_model("gdtype");
  26. $gdlist = $this->gdtype_m->get_all();
  27. $this->tpl->assign("gdlist",$gdlist);
  28. $this->tpl->assign("SiteDomainName",$this->STCModel->SiteDomainName);
  29. $this->tpl->display("setting.html");
  30. }
  31. function setok_f()
  32. {
  33. sys_popedom($this->module_sign.":setting","tpl");
  34. $rs = array();
  35. if($_POST && is_array($_POST) && count($_POST)>0)
  36. {
  37. foreach($_POST AS $key=>$value)
  38. {
  39. $rs[$key] = $this->trans_lib->safe($key);
  40. }
  41. }
  42. $this->file_lib->vi($rs,ROOT_DATA."system_".$_SESSION["sys_lang_id"].".php","_sys");
  43. error("数据更新成功!",site_url("setting"));
  44. }
  45. }
  46. ?>