public function invoke() { $arrRequest = Saf_SmartMain::getCgi(); $arrInput = $arrRequest['get']; $tpl = Bd_TplFactory::getInstance(); $tpl->display('naviServerAdmin/operation/v2/messagedetail.tpl'); }
/** * @brief 保存用户信息到passport * * @author cuichao02 * @date 2011/02/21 **/ public static function saveModDatat() { $arrSavePassport = Saf_SmartMain::getSavePassport(); if (is_array($arrSavePassport) && count($arrSavePassport) > 0) { $safConf = Bd_Conf::getAppConf('/saf'); if (empty($safConf)) { $safConf = Bd_Conf::getConf('/saf'); } $intPassportSaveLen = intval($safConf['passport_save_len']); if ($intPassportSaveLen == 0) { $intPassportSaveLen = 32; } Bd_Passport::initDataBuf($arrCachePass, $intPassportSaveLen); foreach ($arrSavePassport as $bit => $v) { Bd_Passport::modDataBufByBit($arrCachePass, intval($bit), intval($v)); } $arrOutput = Bd_Passport::modData($_COOKIE['BDUSS'], '', '', $arrCachePass['data'], $arrCachePass['mask']); if ($arrOutput['status'] != 0 || $arrOutput == false) { Saf_SmartMain::setSafLog("保存到passport服务器出错(" . var_export($arrOutput, true) . ")", 2); Saf_Base_Hook::warningAction('save_passport', 'system busy'); return false; } } return true; }
public function execute() { //1. check if user is login as needed $arrUserinfo = Saf_SmartMain::getUserInfo(); if (empty($arrUserinfo)) { //ouput error } //2. get and validate input params $arrRequest = Saf_SmartMain::getCgi(); $arrInput = $arrRequest['get']; if (!isset($arrInput['id'])) { //output error } Bd_Log::debug('request input', 0, $arrInput); //3. call PageService $objServicePageSample = new Service_Page_Sample(); $arrPageInfo = $objServicePageSample->execute($arrInput); //4. chage data to out format $arrOutput = $arrPageInfo; //5. build page // smarty模板,以下渲染模板的代码依赖于提供一个tpl模板 //$tpl = Bd_TplFactory::getInstance(); //$tpl->assign($arrOutput); //$tpl->display('en/newapp/index.tpl'); //这里直接输出,作为示例 $strOut = $arrOutput['data']; echo $strOut; //notice日志信息打印,只需要添加日志信息,saf会自动打一条log Bd_Log::addNotice('out', $arrOutput); }
public function execute() { $arrCgi = Saf_SmartMain::getCgi(); $arrRequest = $arrCgi['post']; if (isset($arrRequest['method'])) { $objDS = null; $strFunc = null; $arrParams = array(); $arrOutput = array(); $strApp = isset($arrRequest['app']) ? $arrRequest['app'] : APP; $res = $this->getMethod($arrRequest['method'], $strApp, $objDS, $strFunc, $arrParams, $arrOutput); if ($res == self::SUCCESS) { $arrInput = $this->getParmas($arrParams, $arrRequest); if (false === $arrInput) { $errno = self::PARAM_ERROR; return array('errno' => $errno); } try { $res = call_user_func_array(array($objDS, $strFunc), $arrInput); } catch (Exception $e) { $errno = $e->getCode(); return array('errno' => $errno); } if ($arrOutput == null) { $arrData['output'] = $res; } else { $arrData[$arrOutput[0]] = $res; } return array('errno' => self::SUCCESS, 'data' => $arrData); } } }
public function execute() { $arrRequest = Saf_SmartMain::getCgi(); $arrInput = $arrRequest['get']; $pageService = new Service_Page_Track_V1_GetDetailsTrack('param_get_details_track'); $pageInfo = $pageService->execute($arrInput); //echo json_encode($pageInfo['data']['yaw_point']); if ($pageInfo['errno'] == 0) { $tpl = Bd_TplFactory::getInstance(); $tpl->assign('track_details', json_encode($pageInfo['data']['gps'])); $tpl->assign('yaw_point_list', $pageInfo['data']['yaw_point']); $tpl->assign('is_yaw', json_encode($pageInfo['data']['yaw_point'])); $tpl->assign('track_count', json_encode($pageInfo['data']['track_count'])); $tpl->assign('track_base_data', $pageInfo['data']['details']); /** if(!Bd_PhpCas::isAuthenticated()) { $user_name = mb_strtoupper(Bd_PhpCas::login()); } else { $user_name = mb_strtoupper(Bd_PhpCas::isAuthenticated()); } **/ $tpl->assign('user_name', $user_name); $tpl->display('naviServerAdmin/track/TrackDetails.tpl'); } else { echo json_encode($pageInfo); } }
public function invoke() { $arrRequest = Saf_SmartMain::getCgi(); $arrInput = $arrRequest['get']; $pageService = new Service_Page_Operation_V2_Details(null); $arrPageInfo = $pageService->execute($arrInput); $arrOutput = $arrPageInfo; // if ($arrInput['is_data']) { echo json_encode($arrOutput); } else { $tpl = Bd_TplFactory::getInstance(); /* if(!Bd_PhpCas::isAuthenticated()) { $user_name = mb_strtoupper(Bd_PhpCas::login()); } else { $user_name = mb_strtoupper(Bd_PhpCas::isAuthenticated()); } */ $tpl->assign('user_name', $user_name); $tpl->assign('operation_details', $arrOutput['data']); $tpl->assign('type_list', $arrOutput['type_list']); if ($arrOutput['data']['status'] && $arrOutput['data']['stop_time'] < time()) { $tpl->display('naviServerAdmin/operation/v2/operation_message_details.tpl'); } else { $tpl->display('naviServerAdmin/operation/v2/showupdatemessage.tpl'); } } }
public function __execute() { $arrRequest = Saf_SmartMain::getCgi(); $arrInput = $arrRequest['get']; $objServicePageSampleApi = new Service_Page_SampleApi(); $arrPageInfo = $objServicePageSampleApi->execute($arrInput); return $arrPageInfo; }
public function execute() { $arrRequest = Saf_SmartMain::getCgi(); $arrInput = $arrRequest['get']; $pageService = new Service_Page_Track_V1_GetOtherVersion('param_get_other_version_track'); $pageInfo = $pageService->execute($arrInput); echo json_encode($pageInfo); }
public function invoke() { $arrRequest = Saf_SmartMain::getCgi(); $arrInput = $arrRequest['post']; $pageService = new Service_Page_Operation_V2_Post('param_post_operation'); $arrPageInfo = $pageService->execute($arrInput); $arrOutput = $arrPageInfo; echo json_encode($arrOutput); }
/** * @brief 设置用户信息数据 * @return success-array failed-false * @retval array/boolean * @author chenyijie * @date 2011/08/07 21:59:25 **/ public static function setUserInfo($arrValue) { if (parent::__setDict(parent::USER_INFO, $arrValue) === true) { return parent::__getDict(parent::USER_INFO); } else { Saf_SmartMain::setSafLog("保存用户信息出错", 1); return false; } }
public function invoke() { $arrRequest = Saf_SmartMain::getCgi(); $arrInput = $arrRequest['post']; $pageService = new Service_Page_Operation_V2_SaveOperationMessage('params_save_opmessage'); $ret = $pageService->execute($arrInput); $msg = $ret['errmsg']; Net_Util::showAndReturn($msg, '/naviServerAdmin/v2/viewoperation'); }
/** * @brief 设置公共字典数据 * * @return 失败false, 成功array() * @author cuichao02 * @date 2011/02/21 **/ public static function setPublic($arrValue) { if (parent::__setDict(parent::PUBLIC_PARAM, $arrValue) === true) { return parent::__getDict(parent::PUBLIC_PARAM); } else { Saf_SmartMain::setSafLog("保存公共字典数据时出错", 1); return false; } }
public function execute() { $arrRequest = Saf_SmartMain::getCgi(); $arrInput = $arrRequest["post"]; $pageService = new Service_Page_Apiplatform_CurlProxy("param_apiplatform_curlproxy"); $ret = $pageService->execute($arrInput); Navilib_View::output($ret, Navilib_View::JSON); Navilib_LogHook::addNotice('err_no', $ret["errno"]); }
public function execute() { $arrRequest = Saf_SmartMain::getCgi(); $arrInput = $arrRequest['get']; $pageService = new Service_Page_Feedback_V1_PageList('param_pagelist_feedback'); $arrPageInfo = $pageService->execute($arrInput); $arrOutput = json_encode($arrPageInfo); // var_dump($arrOutput); echo $arrOutput; }
public function execute() { $arrRequest = Saf_SmartMain::getCgi(); $arrInput = $arrRequest["get"]; $pageService = new Service_Page_Apiplatform_GetAllAppName("param_apiplatform_getallappname"); $ret = $pageService->execute($arrInput); //header("Access-Control-Allow-Origin: *"); //允许所有域名发起的跨域请求 Navilib_View::output($ret, Navilib_View::JSON); Navilib_LogHook::addNotice('err_no', $ret["errno"]); }
public function invoke() { $pageService = new Service_Page_Operation_V2_ShowAddMessage(null); $arrRequest = Saf_SmartMain::getCgi(); $arrInput = $arrRequest['post']; $data = $pageService->execute($arrInput); $tpl = Bd_TplFactory::getInstance(); $tpl->assign('data', $data); $tpl->display('naviServerAdmin/operation/v2/showaddmessage.tpl'); }
/** * @brief 设置Log数据 * * @param array(key=>value) * @return 失败false, 成功array() * @author cuichao02 * @date 2011/02/21 **/ public static function setLogNotice($arrValue) { if (parent::__setDict(parent::LOG_NOTICE, $arrValue) === true) { Saf_Base_Log::addLogNotice($arrValue); return parent::__getDict(parent::LOG_NOTICE); } else { Saf_SmartMain::setSafLog("设置log字典数据报错(" . var_export($arrValue, true) . ")", 1); return false; } }
public function invoke() { $arrRequest = Saf_SmartMain::getCgi(); $arrInput = $arrRequest['post']; $pageService = new Service_Page_Operation_V2_UpdateMessageType(null); $ret = $pageService->execute($arrInput); $refer = $_SERVER['HTTP_REFERER'] ? htmlspecialchars($_SERVER['HTTP_REFERER']) : "/naviServerAdmin/typelist"; echo '<meta http-equiv="content-type" content="text/html; charset=UTF-8">'; echo '<script>alert("' . $ret . '");location.href="' . $refer . '"</script>'; }
public function invoke() { $arrRequest = Saf_SmartMain::getCgi(); $arrInput = $arrRequest['get']; $pageService = new Service_Page_Operation_V2_PushStatics(null); $arr = $pageService->execute($arrInput); //echo json_encode($arr); $tpl = Bd_TplFactory::getInstance(); $tpl->assign('out', $arr); $tpl->display('naviServerAdmin/operation/v2/pushstatics.tpl'); }
public function invoke() { $arrRequest = Saf_SmartMain::getCgi(); $arrInput = $arrRequest['get']; $pageService = new Service_Page_Operation_V2_Preview(null); $arrOutput = $pageService->execute($arrInput); $tpl = Bd_TplFactory::getInstance(); $tpl->assign('out', $arrOutput); #$tpl->assign('type_list',$arrOutput['type_list']); $tpl->display('naviServerAdmin/operation/v2/preview.tpl'); }
public function invoke() { $arrRequest = Saf_SmartMain::getCgi(); $arrInput = $arrRequest['get']; $pageService = new Service_Page_Operation_V2_CallIntelligence(null); $arr = $pageService->execute($arrInput); if ($arr['errno'] !== 0) { $msg = $arr['errmsg']; } Net_Util::showAndReturn($msg, '/naviServerAdmin/v2/viewoperation'); }
public function execute() { $arrRequest = Saf_SmartMain::getCgi(); $this->strFromApi = isset($arrRequest['get']['fromapi']) ? $arrRequest['get']['fromapi'] : 0; $intLogId = $arrRequest['request_param']['logid']; $arrRes = $this->__execute(); if (!$this->strFromApi) { $this->__render($arrRes); } else { $this->__value($arrRes); } }
public function execute() { $arrRequest = Saf_SmartMain::getCgi(); $arrInput = $arrRequest['get']; $pageService = new Service_Page_Common_V2_UEditor(null); $ret = $pageService->execute($arrInput); if ($arrInput['callback']) { $callback = htmlspecialchars($arrInput['callback']); echo "{$callback} && {$callback}( " . json_encode($ret) . ");"; } else { echo json_encode($ret); } }
public function execute() { $pageService = new Service_Page_Common_V2_ImageUploader(null); $arrRequest = Saf_SmartMain::getCgi(); $arrInput = $arrRequest['get']; $arrInput = array(); $arr = $pageService->execute($arrInput); if (isset($arrInput['callback'])) { echo $arrInput['callback'] . "&" . $arrInput['callback'] . "(" . json_encode($arr) . ");"; } else { echo json_encode($arr); } exit; }
public function invoke() { $arrRequest = Saf_SmartMain::getCgi(); $arrInput = $arrRequest['get']; $pageService = new Service_Page_Operation_V1_View('param_view_operation'); $arrPageInfo = $pageService->execute($arrInput); $arrOutput = $arrPageInfo; // echo json_encode($arrOutput); $tpl = Bd_TplFactory::getInstance(); // echo json_encode($arrOutput['data']['operation_message_list']); $tpl->assign('operation_message_list', $arrOutput['data']['operation_message_list']); $tpl->assign('user_name', $arrOutput['data']['user_name']); $tpl->display('naviServerAdmin/operation/view_operation_message.tpl'); }
public function execute() { $arrRequest = Saf_SmartMain::getCgi(); $arrInput = $arrRequest['get']; $pageService = new Service_Page_Apiplatform_RegressionTest('param_apiplatform_regressiontest'); $pageInfo = $pageService->execute($arrInput); Navilib_LogHook::addNotice('err_no', $pageInfo["errno"]); if (Navilib_CommonError::SUCCESS !== $pageInfo["errno"]) { Navilib_View::output($pageInfo, Navilib_View::JSON); } else { $tpl = Bd_TplFactory::getInstance(); $tpl->assign('urlHost', $pageInfo['data']['urlHost']); $tpl->assign('proxyHost', $pageInfo['data']['proxyHost']); $tpl->assign('appName', $pageInfo['data']['appName']); $tpl->assign('userName', CURRENT_USER); $tpl->display('naviServerAdmin/apiplatform/RegressionTest.tpl'); } }
public function execute() { $arrRequest = Saf_SmartMain::getCgi(); $arrInput = $arrRequest['get']; // $pageService = new Service_Page_Feedback_V1_View('param_view_feedback'); // $arrPageInfo = $pageService->execute($arrInput); // $arrOutput = $arrPageInfo; $tpl = Bd_TplFactory::getInstance(); /* if(!Bd_PhpCas::isAuthenticated()) { $user_name = mb_strtoupper(Bd_PhpCas::login()); } else { $user_name = mb_strtoupper(Bd_PhpCas::isAuthenticated()); } */ $tpl->assign('user_name', $user_name); $tpl->display('naviServerAdmin/index.tpl'); }
public function invoke() { $arrRequest = Saf_SmartMain::getCgi(); $arrInput = $arrRequest['get']; $pageService = new Service_Page_Operation_V2_Delete('param_delete_operation'); $arrPageInfo = $pageService->execute($arrInput); $arrOutput = $arrPageInfo; echo json_encode($arrOutput); // $tpl = Bd_TplFactory::getInstance(); // if(!Bd_PhpCas::isAuthenticated()) { // $user_name = mb_strtoupper(Bd_PhpCas::login()); // } // else { // $user_name = mb_strtoupper(Bd_PhpCas::isAuthenticated()); // } // $tpl->assign('user_name',$user_name); // $tpl->assign('operation_details',$arrOutput['data']); // $tpl->display('feedbackAdmin/operation_message_details.tpl'); }
public function execute() { $arrRequest = Saf_SmartMain::getCgi(); $arrInput = $arrRequest['get']; $pageService = new Service_Page_Apiplatform_Testman('param_apiplatform_testman'); $pageInfo = $pageService->execute($arrInput); Navilib_LogHook::addNotice('err_no', $pageInfo["errno"]); if (Navilib_CommonError::SUCCESS !== $pageInfo["errno"]) { Navilib_View::output($pageInfo, Navilib_View::JSON); } else { $tpl = Bd_TplFactory::getInstance(); $tpl->assign('freqDomain', $pageInfo['data']['freqDomain']); $tpl->assign('freqModule', $pageInfo['data']['freqModule']); $tpl->assign('history', $pageInfo['data']['history']); $tpl->assign('offset', $pageInfo['data']['offset']); $tpl->assign('hasPre', $pageInfo['data']['hasPre']); $tpl->assign('hasNext', $pageInfo['data']['hasNext']); $tpl->assign('userName', CURRENT_USER); $tpl->display('naviServerAdmin/apiplatform/Testman.tpl'); } }
public function execute() { $arrRequest = Saf_SmartMain::getCgi(); $arrInput = $arrRequest['get']; $pageService = new Service_Page_Feedback_V1_FeedbackDetails('param_details_feedback'); $arrPageInfo = $pageService->execute($arrInput); $arrOutput = $arrPageInfo; //将数据传到前端渲染页面 $tpl = Bd_TplFactory::getInstance(); /** if(!Bd_PhpCas::isAuthenticated()) { $user_name = mb_strtoupper(Bd_PhpCas::login()); } else { $user_name = mb_strtoupper(Bd_PhpCas::isAuthenticated()); } **/ $tpl->assign('user_name', $user_name); $tpl->assign('feedback_details', $arrOutput['data']); $tpl->assign('pic_list', json_decode($arrOutput['data']['opt'], true)); $tpl->display('naviServerAdmin/feedback/feedback_details.tpl'); }