disable.php 1.1 KB

123456789101112131415161718192021222324252627
  1. <?php
  2. /**
  3. * This is NOT a freeware, use is subject to license terms
  4. * From www.1314study.com
  5. * 应用售后问题:http://www.discuz.1314study.com/services.php?mod=ask&sid=1
  6. * 应用售前咨询:http://www.discuz.1314study.com/services.php?mod=ask&sid=2
  7. * 二次开发定制:http://www.discuz.1314study.com/services.php?mod=ask&sid=22
  8. */
  9. if(!defined('IN_ADMINCP')) {
  10. exit('Access Denied');
  11. }
  12. $available = $operation == 'enable' ? 1 : 0;
  13. C::t('common_plugin')->update($_GET['pluginid'], array('available' => $available));
  14. updatecache(array('plugin', 'setting', 'styles'));
  15. cleartemplatecache();
  16. updatemenu('plugin');
  17. $_statInfo = array();
  18. $_statInfo['pluginName'] = $plugin['identifier'];
  19. $_statInfo['bbsVersion'] = DISCUZ_VERSION;
  20. $_statInfo['bbsUrl'] = $_G['siteurl'];
  21. $_statInfo['action'] = $operation;
  22. $_statInfo['nextUrl'] = ADMINSCRIPT.'?action=plugins';
  23. $_statInfo = base64_encode(serialize($_statInfo));
  24. $_md5Check = md5($_statInfo);
  25. cpmsg('plugins_'.$operation.'_succeed', 'http://addon.1314study.com/api/outer_addon.php?type=js&info='.$_statInfo.'&md5check='.$_md5Check, 'succeed');