public function before($context) { /*{{{*/ $curOperator = DAL::get()->find("TeleOperator", $context->request->getCookie('operator')); /** * 如果没有登录,调到登录页面 */ if ($curOperator->isNull()) { header('Location:http://' . URL_PREFIX . 'callcenter.haodf.com/operator/login'); exit; } $bk = $context->request->getCookie('bk'); $ip = RequestDelegate::getIp(); $session = SessionDefault::singleton(); /** * 网站用户已登录,而且允许在外网访问管理后台 * 或者 * 是超级管理员 * 可以在外放访问呼叫中心 */ if (false == RequestDelegate::isOfficeIp()) { if ($bk && isset($session->UserId) && BackYardAuth::authVerificationCode($bk, $session->UserId, $ip) || $curOperator->isSupperAdmin()) { } else { echo "本系统只允许在办公室内使用!"; exit; } } }
public function before($context) { if (false == BackYardAuth::authAdmin4Interceptor()) { echo '系统错误,请联系技术人员!!!'; exit; } }
private function backYardAuth($context) { $ip = RequestDelegate::getIp(); $userInfo = $context->request->getCookie('userinfo'); $userId = isset($userInfo['id'])?$userInfo['id']:0; $bk = $context->request->getCookie('bk'); return ($bk && isset($userId) && BackYardAuth::authVerificationCode($bk, $userId, $ip)); }
public function showList($request, $response) {/*{{{*/ if(false == BackYardAuth::authAdmin4Interceptor()) { echo '系统错误,请联系技术人员!!!';exit; } $response->fileList = self::getUrl(); }/*}}}*/
public function before($context) { $ip = RequestDelegate::getIp(); $userInfo = $context->request->getCookie('userinfo'); if(isset($_COOKIE['bk']) && isset($userInfo['id']) && BackYardAuth::authVerificationCode($_COOKIE['bk'], $userInfo['id'], $ip)) { } else if(false == RequestDelegate::isOfficeIp()) { echo '系统错误,请联系技术人员!!!';exit; } }
| license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: Harun Yayli <harunyayli at gmail.com> | +----------------------------------------------------------------------+ */ require 'init.php'; include '/home/avatar/system/libs/service_common/dalsetting.php'; $MEMCACHE_SERVERS = array(); foreach ($caches as $sets) { foreach ($sets as $set) { $MEMCACHE_SERVERS[] = "{$set['host']}:{$set['port']}"; // add more as an array } } $MEMCACHE_SERVERS = array_values(array_unique($MEMCACHE_SERVERS)); if (false == BackYardAuth::authAdmin4Interceptor()) { echo '系统错误,请联系技术人员!!!'; exit; } $VERSION = '$Id: memcache.php,v 1.2 2008/09/11 19:21:06 mikl Exp $'; define('ADMIN_USERNAME', 'root'); // Admin Username define('ADMIN_PASSWORD', 'haodf.com'); // Admin Password define('DATE_FORMAT', 'Y/m/d H:i:s'); define('GRAPH_SIZE', 200); define('MAX_ITEM_DUMP', 50); $request = new Request(); if (false == $request->op) { $request->op = 1; }