cache.php 922 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. /*
  3. [UCenter] (C)2001-2099 Comsenz Inc.
  4. This is NOT a freeware, use is subject to license terms
  5. $Id: cache.php 1059 2011-03-01 07:25:09Z monkey $
  6. */
  7. !defined('IN_UC') && exit('Access Denied');
  8. class control extends adminbase {
  9. function __construct() {
  10. $this->control();
  11. }
  12. function control() {
  13. parent::__construct();
  14. $this->check_priv();
  15. if(!$this->user['isfounder'] && !$this->user['allowadmincache']) {
  16. $this->message('no_permission_for_this_module');
  17. }
  18. $this->load('cache');
  19. }
  20. function onupdate() {
  21. $updated = false;
  22. if($this->submitcheck('submit')) {
  23. $type = getgpc('type', 'P');
  24. if(!is_array($type) || in_array('data', $type)) {
  25. $_ENV['cache']->updatedata();
  26. }
  27. if(!is_array($type) || in_array('tpl', $type)) {
  28. $_ENV['cache']->updatetpl();
  29. }
  30. $updated = true;
  31. }
  32. $this->view->assign('updated', $updated);
  33. $this->view->display('admin_cache');
  34. }
  35. }
  36. ?>