ajaxSuccess($conf['l']['admin:msg:ChangeSaved']); } else { $admin->checkCSRFCode('navibar'); $view->setMaster('admin'); $view->setPassData(array('themeList' => $view->scanForThemes(), 'extList' => bw::getAllExtensions(), 'newCSRFCode' => $admin->getCSRFCode('newext'), 'extCSRFCode' => $admin->getCSRFCode('extensions'))); $view->setPassData(array('wgtListHtmlhead' => bw::getWidgets('wghtmlhead'), 'wgtListHeader' => bw::getWidgets('wgheader'), 'wgtListSiderbar' => bw::getWidgets('wgsidebar'), 'wgtListFooter' => bw::getWidgets('wgfooter'))); foreach ($allOpenHooks as $openHook) { $allHooks['insert_' . $openHook] = @file_get_contents(P . 'conf/insert_' . $openHook . '.htm'); } $view->setPassData($allHooks); $view->setWorkFlow(array('adminextensions', 'admin')); $view->finalize(); } } if ($canonical->currentArgs['mainAction'] == 'comments') { $comment = new bwComment(); if ($canonical->currentArgs['subAction'] == 'blockitem') { if (!$_REQUEST['comID'] || !$_REQUEST['aID']) { stopError($conf['l']['admin:msg:NotExist']); } $comment->blockItem($_REQUEST['comID'], $_REQUEST['aID']); ajaxSuccess($conf['l']['admin:msg:ChangeSaved']); } if ($canonical->currentArgs['subAction'] == 'blockip') { if (!$_REQUEST['comID']) { stopError($conf['l']['admin:msg:NotExist']); } $comment->blockIP($_REQUEST['comID']); ajaxSuccess($conf['l']['admin:msg:ChangeSaved']); } }
@session_start(); $admin = new bwAdmin(); $admin->storeMobileToken(); bw::$db->dbExec('DELETE FROM cache WHERE caID=?', array('nalogin')); ajaxSuccess($admin->getCSRFCode('navibar')); } } stopError(''); } //Rest is comment if ($conf['commentOpt'] != 0) { loadServices(); if ($conf['commentOpt'] == 1 || $conf['commentOpt'] == 2) { //Build-in comment @session_start(); $comment = new bwComment(); } elseif ($conf['commentOpt'] == 3) { die('Access Denied.'); } } else { die('Access Denied.'); } if ($canonical->currentArgs['mainAction'] == 'comments') { if ($canonical->currentArgs['subAction'] == 'submit') { $smt = $_REQUEST['smt']; if (isset($smt['socialkey'])) { if ($smt['socialkey'] == 'sina' && isset($_SESSION['sina_token'])) { define("WB_AKEY", bw::$conf['sinaAKey']); define("WB_SKEY", bw::$conf['sinaSKey']); define("WB_CALLBACK_URL", bw::$conf['siteURL'] . '/' . bw::$conf['linkPrefixSend'] . '/sina/callback/'); include_once P . 'inc/script/sina-weibo/saetv2.ex.class.php';