foreach ($method_blacklist as $method) { if (method_exists($obj, $method)) { showmessage('插件不符合性能要求规定,请与插件作者联系', 'admin.php#plugin'); } } if (property_exists($obj, 'modules')) { foreach ($obj->modules as $module) { if ($module['type'] == 'cron') { DB::insert('cron', array_merge($module['cron'], array('nextrun' => TIMESTAMP)), false, true); } } } CACHE::update('plugins'); showmessage('启用插件成功!', 'admin.php#plugin#'); case 'update_check': $ret = Updater::check(); if (is_array($ret)) { $return = array('status' => 1, 'files' => $ret); } else { $return = array('status' => $ret, 'files' => array()); } echo json_encode($return); exit; case 'get_file': echo json_encode(Updater::loop()); exit; case 'write_file': echo json_encode(Updater::write_file()); exit; case 'disable_plugin': if ($formhash != $_GET['formhash']) {
<?php if (!defined('IN_KKFRAME')) { exit; } cron_set_nextrun($tomorrow); CACHE::clear(); $date = date('Ymd', TIMESTAMP + 900); DB::query("INSERT IGNORE INTO sign_log (tid, uid, `date`) SELECT tid, uid, '{$date}' FROM my_tieba"); $delete_date = date('Ymd', TIMESTAMP - 86400 * 30); DB::query("DELETE FROM sign_log WHERE date<'{$delete_date}'"); saveSetting('extsign_uid', 0); saveSetting('autoupdate_uid', 0); Updater::check(); cloud::check_remote_disabled();