refill_config.php 798 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. class refill_configControl extends SystemControl
  3. {
  4. public function __construct()
  5. {
  6. parent::__construct();
  7. }
  8. public function indexOp()
  9. {
  10. if(chksubmit())
  11. {
  12. foreach ($_POST as $key => $value) {
  13. $cache[$key] = $value;
  14. }
  15. wcache('config', ['data' => serialize($_POST)], 'refill-');
  16. showMessage('编辑成功');
  17. }
  18. else
  19. {
  20. $config = rcache('config', 'refill-');
  21. if (empty($config)) {
  22. $config = [];
  23. } else {
  24. $config = unserialize($config['data']);
  25. }
  26. Tpl::output('config', $config);
  27. Tpl::showpage('refill.config');
  28. }
  29. }
  30. }