ConfigController.class.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <?php
  2. namespace Admin\Controller;
  3. /**
  4. * 配置设置
  5. * @author Devil
  6. * @blog http://gong.gg/
  7. * @version 0.0.1
  8. * @datetime 2016-12-01T21:51:08+0800
  9. */
  10. class ConfigController extends CommonController
  11. {
  12. /**
  13. * [_initialize 前置操作-继承公共前置方法]
  14. * @author Devil
  15. * @blog http://gong.gg/
  16. * @version 0.0.1
  17. * @datetime 2016-12-03T12:39:08+0800
  18. */
  19. public function _initialize()
  20. {
  21. // 调用父类前置方法
  22. parent::_initialize();
  23. // 登录校验
  24. $this->Is_Login();
  25. // 权限校验
  26. $this->Is_Power();
  27. }
  28. /**
  29. * [Index 配置列表]
  30. * @author Devil
  31. * @blog http://gong.gg/
  32. * @version 0.0.1
  33. * @datetime 2016-12-06T21:31:53+0800
  34. */
  35. public function Index()
  36. {
  37. // 学期
  38. $semester_list = M('Semester')->field(array('id', 'name'))->where(array('is_enable'=>1))->order('id desc')->select();
  39. $this->assign('semester_list', $semester_list);
  40. // csv
  41. $this->assign('common_excel_charset_list', L('common_excel_charset_list'));
  42. // 配置信息
  43. $data = M('Config')->getField('only_tag,name,describe,value,error_tips');
  44. $this->assign('data', $data);
  45. $this->display('Index');
  46. }
  47. /**
  48. * [Save 配置数据保存]
  49. * @author Devil
  50. * @blog http://gong.gg/
  51. * @version 0.0.1
  52. * @datetime 2017-01-02T23:08:19+0800
  53. */
  54. public function Save()
  55. {
  56. $this->MyConfigSave();
  57. }
  58. }
  59. ?>