当前位置: 首页>>代码示例>>PHP>>正文


PHP Base_Common::getUrl方法代码示例

本文整理汇总了PHP中Base_Common::getUrl方法的典型用法代码示例。如果您正苦于以下问题:PHP Base_Common::getUrl方法的具体用法?PHP Base_Common::getUrl怎么用?PHP Base_Common::getUrl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Base_Common的用法示例。


在下文中一共展示了Base_Common::getUrl方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: indexAction

 public function indexAction()
 {
     //检查权限
     $PermissionCheck = $this->manager->checkMenuPermission(0);
     if ($PermissionCheck['return']) {
         $SexList = $this->oUser->getSexList();
         $AuthStatusList = $this->oUser->getAuthStatus();
         $AuthIdTypesList = $this->oUser->getAuthIdType();
         $params['Sex'] = isset($SexList[strtoupper(trim($this->request->Sex))]) ? substr(strtoupper(trim($this->request->Sex)), 0, 8) : "";
         $params['Name'] = urldecode(trim($this->request->Name)) ? substr(urldecode(trim($this->request->Name)), 0, 8) : "";
         $params['NickName'] = urldecode(trim($this->request->NickName)) ? substr(urldecode(trim($this->request->NickName)), 0, 8) : "";
         $params['AuthStatus'] = isset($AuthStatusList[strtoupper(trim($this->request->AuthStatus))]) ? substr(strtoupper(trim($this->request->AuthStatus)), 0, 8) : "";
         $params['Page'] = abs(intval($this->request->Page)) ? abs(intval($this->request->Page)) : 1;
         $params['PageSize'] = 5;
         $params['getCount'] = 1;
         $UserList = $this->oUser->getUserLst($params);
         //导出EXCEL链接
         $export_var = "<a href =" . Base_Common::getUrl('', 'xrace/user', 'user.list.download', $params) . "><导出表格></a>";
         //翻页参数
         $page_url = Base_Common::getUrl('', 'xrace/user', 'index', $params) . "&Page=~page~";
         $page_content = base_common::multi($UserList['UserCount'], $page_url, $params['Page'], $params['PageSize'], 10, $maxpage = 100, $prevWord = '上一页', $nextWord = '下一页');
         foreach ($UserList['UserList'] as $UserId => $UserInfo) {
             echo $UserInfo['auth_state'] . "<br>";
             $UserList['UserList'][$UserId]['sex'] = isset($SexList[$UserInfo['sex']]) ? $SexList[$UserInfo['sex']] : "保密";
             $UserList['UserList'][$UserId]['AuthStatus'] = isset($AuthStatusList[$UserInfo['auth_state']]) ? $AuthStatusList[$UserInfo['auth_state']] : "未知";
             $UserList['UserList'][$UserId]['AuthStatus'] = $UserInfo['auth_state'] == "AUTHED" && isset($AuthIdTypesList[strtoupper(trim($UserInfo['id_type']))]) ? $UserList['UserList'][$UserId]['AuthStatus'] . "/" . $AuthIdTypesList[strtoupper(trim($UserInfo['id_type']))] : $UserList['UserList'][$UserId]['AuthStatus'];
             $UserList['UserList'][$UserId]['Birthday'] = is_null($UserInfo['birth_day']) ? "未知" : $UserInfo['birth_day'];
         }
         include $this->tpl('Xrace_User_UserList');
     } else {
         $home = $this->sign;
         include $this->tpl('403');
     }
 }
开发者ID:eappl,项目名称:admin_prototype,代码行数:34,代码来源:UserController.php

示例2: sendUserResetPasswordMail

 public function sendUserResetPasswordMail($UserId, $UserMail)
 {
     $this->db->begin();
     $UserInfo = $this->GetUserById($UserId);
     $AsignResetTime = time();
     $ResetPasswordLog = array('UserId' => $UserId, 'PartnerId' => $UserInfo['PartnerId'], 'AsignResetTime' => $AsignResetTime, 'ResetStatus' => 0, 'ResetType' => 1);
     $ResetLog = $this->createResetPassword($ResetPasswordLog);
     if ($ResetLog) {
         $User = array('UserId' => $UserId, 'PartnerId' => $UserInfo['PartnerId'], 'EndTime' => $AsignResetTime + 86400, 'UserMail' => $UserMail, 'ResetId' => $ResetLog);
         $User['sign'] = base_common::check_sign($User, "resetpassword");
         $ResetUrl = $this->config->passporturl . Base_Common::getUrl('', '', '', $User) . "&c=forgot_password&m=reset_by_email";
         $UrlList = array('ResetUrl' => array('href' => $ResetUrl, 'txt' => $ResetUrl));
         $MailContent = array('UserMail' => $UserMail, 'UserName' => $UserInfo['UserName'], 'UrlList' => $UrlList, 'title' => "用户密码找回");
         $MailType = "ResetPassWord";
         $oMail = new Lm_Mail();
         $mail = $oMail->createMail($MailType, $UserId, $MailContent);
         if ($mail) {
             $this->db->commit();
             return $ResetLog;
         } else {
             $this->db->rollBack();
             return false;
         }
     } else {
         $this->db->rollBack();
         return false;
     }
 }
开发者ID:eappl,项目名称:prototype,代码行数:28,代码来源:User.php

示例3: authLogAction

 public function authLogAction()
 {
     //检查权限
     $PermissionCheck = $this->manager->checkMenuPermission(0);
     if ($PermissionCheck['return']) {
         //页面参数预处理
         $params['StartDate'] = isset($this->request->StartDate) ? substr(strtoupper(trim($this->request->StartDate)), 0, 10) : date("Y-m-d", time());
         $params['EndDate'] = isset($this->request->EndDate) ? substr(strtoupper(trim($this->request->EndDate)), 0, 10) : date("Y-m-d", time());
         $params['AuthResult'] = isset($this->request->AuthResult) ? substr(strtoupper(trim($this->request->AuthResult)), 0, 8) : "";
         $params['ManagerId'] = isset($this->request->ManagerId) ? intval($this->request->ManagerId) : 0;
         //分页参数
         $params['Page'] = abs(intval($this->request->Page)) ? abs(intval($this->request->Page)) : 1;
         $params['PageSize'] = 2;
         //获取用户列表时需要获得记录总数
         $params['getCount'] = 1;
         //获取实名认证记录的状态列表
         $AuthLogIdStatusList = $this->oUser->getAuthLogStatusTypeList();
         //获取所有管理员列表
         $ManagerList = $this->manager->getAll('id,name');
         //获取实名认证记录
         $AuthLog = $this->oUser->getAuthLog($params);
         //导出EXCEL链接
         $export_var = "<a href =" . Base_Common::getUrl('', 'xrace/user', 'auth.log.download', $params) . "><导出表格></a>";
         //翻页参数
         $page_url = Base_Common::getUrl('', 'xrace/user', 'auth.log', $params) . "&Page=~page~";
         $page_content = base_common::multi($AuthLog['AuthLogCount'], $page_url, $params['Page'], $params['PageSize'], 10, $maxpage = 100, $prevWord = '上一页', $nextWord = '下一页');
         //初始化一个空的用户数组
         $UserList = array();
         foreach ($AuthLog['AuthLog'] as $AuthId => $LogInfo) {
             //管理员账号
             $AuthLog['AuthLog'][$AuthId]['ManagerName'] = isset($ManagerList[$LogInfo['op_uid']]) ? $ManagerList[$LogInfo['op_uid']]['name'] : "未知";
             $AuthLog['AuthLog'][$AuthId]['AuthResultName'] = isset($AuthLogIdStatusList[$LogInfo['auth_result']]) ? $AuthLogIdStatusList[$LogInfo['auth_result']] : "未知";
             // 如果管理员记录已经获取到
             if (isset($UserList[$LogInfo['user_id']])) {
                 $ManagerInfo = $UserList[$LogInfo['user_id']];
             } else {
                 $ManagerInfo = $this->oUser->getUserInfo($LogInfo['user_id'], "name");
             }
             $AuthLog['AuthLog'][$AuthId]['UserName'] = $ManagerInfo['name'];
             //实名认证提交的照片
             $AuthLog['AuthLog'][$AuthId]['submit_img1'] = isset($AuthLog['AuthLog'][$AuthId]['submit_img1']) ? urldecode($AuthLog['AuthLog'][$AuthId]['submit_img1']) : "";
             $AuthLog['AuthLog'][$AuthId]['submit_img2'] = isset($AuthLog['AuthLog'][$AuthId]['submit_img2']) ? urldecode($AuthLog['AuthLog'][$AuthId]['submit_img2']) : "";
         }
         //模板渲染
         include $this->tpl('Xrace_User_AuthLog');
     } else {
         $home = $this->sign;
         include $this->tpl('403');
     }
 }
开发者ID:032404cxd,项目名称:xrace_main,代码行数:50,代码来源:UserController.php

示例4: indexAction

 public function indexAction()
 {
     //检查权限
     $PermissionCheck = $this->manager->checkMenuPermission(0);
     if ($PermissionCheck['return']) {
         $RootUrl = "http://" . $_SERVER['HTTP_HOST'];
         //赛事ID
         $RaceCatalogId = isset($this->request->RaceCatalogId) ? intval($this->request->RaceCatalogId) : 0;
         //赛事列表
         $RaceCatalogArr = $this->oRace->getAllRaceCatalogList();
         //赛事分站列表
         $RaceStageArr = $this->oRace->getAllRaceStageList($RaceCatalogId);
         //赛事分组列表
         $RaceGroupArr = $this->oRace->getAllRaceGroupList($RaceCatalogId, 'RaceGroupId,RaceGroupName');
         //初始化一个空的赛事分站列表
         $RaceStageList = array();
         //循环赛事分站列表
         foreach ($RaceStageArr as $key => $value) {
             $RaceStageList[$value['RaceCatalogId']]['RaceStageList'][$key] = $value;
             //计算分站数量,用于页面跨行显示
             $RaceStageList[$value['RaceCatalogId']]['RaceStageCount'] = isset($RaceStageList[$value['RaceCatalogId']]['RaceStageCount']) ? $RaceStageList[$value['RaceCatalogId']]['RaceStageCount'] + 1 : 1;
             $RaceStageList[$value['RaceCatalogId']]['RowCount'] = $RaceStageList[$value['RaceCatalogId']]['RaceStageCount'] + 1;
             //如果相关赛事ID有效
             if (isset($RaceCatalogArr[$value['RaceCatalogId']])) {
                 //获取赛事ID
                 $RaceStageList[$value['RaceCatalogId']]['RaceCatalogName'] = isset($RaceStageList[$value['RaceCatalogId']]['RaceCatalogName']) ? $RaceStageList[$value['RaceCatalogId']]['RaceCatalogName'] : $RaceCatalogArr[$value['RaceCatalogId']]['RaceCatalogName'];
                 //解包压缩数组
                 $value['comment'] = json_decode($value['comment'], true);
                 $t = array();
                 //如果有已经选择的赛事组别
                 if (isset($value['comment']['SelectedRaceGroup']) && is_array($value['comment']['SelectedRaceGroup'])) {
                     //循环各个组别
                     foreach ($value['comment']['SelectedRaceGroup'] as $k => $v) {
                         //获取各个组别的比赛场次数量
                         $RaceCount = $this->oRace->getRaceCount($value['RaceStageId'], $v);
                         //如果有配置比赛场次
                         if ($RaceCount > 0) {
                             //添加场次数量
                             $Suffix = "(" . $RaceCount . ")";
                         } else {
                             $Suffix = "";
                         }
                         //如果赛事组别配置有效
                         if (isset($RaceGroupArr[$v])) {
                             //生成到比赛详情页面的链接
                             $t[$k] = "<a href='" . Base_Common::getUrl('', 'xrace/race.stage', 'race.list', array('RaceStageId' => $value['RaceStageId'], 'RaceGroupId' => $v)) . "'>" . $RaceGroupArr[$v]['RaceGroupName'] . $Suffix . "</a>";
                         }
                     }
                 }
                 //如果检查后有至少一个有效的赛事组别配置
                 if (count($t)) {
                     //生成页面显示的数组
                     $RaceStageList[$value['RaceCatalogId']]['RaceStageList'][$key]['SelectedGroupList'] = implode("/", $t);
                     $RaceStageList[$value['RaceCatalogId']]['RaceStageList'][$key]['GroupCount'] = count($t);
                     $RaceStageList[$value['RaceCatalogId']]['RaceStageList'][$key]['RowCount'] = $RaceStageList[$value['RaceCatalogId']]['RaceStageList'][$key]['GroupCount'] + 1;
                 } else {
                     //生成默认的入口
                     $RaceStageList[$value['RaceCatalogId']]['RaceStageList'][$key]['SelectedGroupList'] = "<a href='" . Base_Common::getUrl('', 'xrace/race.stage', 'race.list', array('RaceStageId' => $key)) . "'>尚未配置</a>";
                     $RaceStageList[$value['RaceCatalogId']]['RaceStageList'][$key]['GroupCount'] = 0;
                     $RaceStageList[$value['RaceCatalogId']]['RaceStageList'][$key]['RowCount'] = 1;
                 }
             } else {
                 $RaceStageList[$value['RaceCatalogId']]['RaceCatalogName'] = "未定义";
             }
             if (isset($value['comment']['RaceStageIconList']) && is_array($value['comment']['RaceStageIconList'])) {
                 foreach ($value['comment']['RaceStageIconList'] as $k => $v) {
                     $RaceStageList[$value['RaceCatalogId']]['RaceStageList'][$key]['RaceStageIconList'] .= "<a href='" . $RootUrl . $v['RaceStageIcon_root'] . "' target='_blank'>图标" . $k . "</a>/";
                 }
                 $RaceStageList[$value['RaceCatalogId']]['RaceStageList'][$key]['RaceStageIconList'] = rtrim($RaceStageList[$value['RaceCatalogId']]['RaceStageList'][$key]['RaceStageIconList'], "/");
             } else {
                 $RaceStageList[$value['RaceCatalogId']]['RaceStageList'][$key]['RaceStageIconList'] = '未上传';
             }
             $RaceStageList[$value['RaceCatalogId']]['RaceStageList'][$key]['RaceStageStatus'] = $this->oRace->getRaceStageTimeStatus($key, 0);
         }
         //渲染模板
         include $this->tpl('Xrace_Race_RaceStageList');
     } else {
         $home = $this->sign;
         include $this->tpl('403');
     }
 }
开发者ID:032404cxd,项目名称:xrace_main,代码行数:81,代码来源:RaceStageController.php

示例5: raceStageGroupSportsTypeAddAction

 public function raceStageGroupSportsTypeAddAction()
 {
     //检查权限
     $PermissionCheck = $this->manager->checkMenuPermission("RaceStageModify");
     if ($PermissionCheck['return']) {
         $RaceStageId = intval($this->request->RaceStageId);
         $RaceGroupId = intval($this->request->RaceGroupId);
         $SportsTypeId = intval($this->request->SportsTypeId);
         $After = isset($this->request->After) ? intval($this->request->After) : 0;
         echo "After:" . $After;
         //获取当前分站信息
         $oRaceStage = $this->oRace->getRaceStage($RaceStageId, '*');
         //解包压缩数组
         $oRaceStage['comment'] = json_decode($oRaceStage['comment'], true);
         //如果当前分站未配置了当前分组
         if (!isset($oRaceStage['comment']['SelectedRaceGroup'][$RaceGroupId])) {
             //跳转到分站列表页面
             $this->response->redirect($this->sign);
         }
         //获取赛事分组信息
         $oRaceGroup = $this->oRace->getRaceGroup($RaceGroupId, '*');
         //如果赛事分组尚未配置
         if (!$oRaceGroup['RaceGroupId']) {
             //跳转到分站列表页面
             $this->response->redirect($this->sign);
         }
         $this->oSports = new Xrace_Sports();
         $oSportsType = $this->oSports->getSportsType($SportsTypeId, '*');
         if (!isset($oSportsType['SportsTypeId'])) {
             $url = Base_Common::getUrl('', 'xrace/race.stage', 'race.stage.group.detail', array('RaceStageId' => $RaceStageId, 'RaceGroupId' => $RaceGroupId));
             $this->response->redirect($url);
         }
         //获取分站分组配置详情
         $RaceStageGroupInfo = $this->oRace->getRaceStageGroup($RaceStageId, $RaceGroupId);
         //默认开始时间
         $StartTime = date("Y-m-d H:i:s", time() + 86400);
         //默认结束时间
         $EndTime = date("Y-m-d H:i:s", time() + 86400 * 2);
         //如果尚未配置分站分组详情,则用默认空数组替代
         if (!is_array($RaceStageGroupInfo)) {
             $RaceStageGroupInfo = array('PriceList' => 0, 'SingleUser' => 1, 'TeamUser' => 1, 'StartTime' => $StartTime, 'EndTime' => $EndTime, 'comment' => "");
             $NewDetail = 1;
         }
         $RaceStageGroupInfo['comment'] = json_decode($RaceStageGroupInfo['comment'], true);
         $RaceStageGroupInfo['comment']['DetailList'] = isset($RaceStageGroupInfo['comment']['DetailList']) ? $RaceStageGroupInfo['comment']['DetailList'] : array();
         ksort($RaceStageGroupInfo['comment']['DetailList']);
         //如果添加在某个元素之后 且 元素下标不越界
         if ($After >= 0 && $After < count(count($RaceStageGroupInfo['comment']['DetailList']))) {
             //添加元素
             $RaceStageGroupInfo['comment']['DetailList'] = Base_Common::array_insert($RaceStageGroupInfo['comment']['DetailList'], array('SportsTypeId' => $SportsTypeId), $After + 1);
         } else {
             //默认为在表尾部添加元素
             $RaceStageGroupInfo['comment']['DetailList'][count($RaceStageGroupInfo['comment']['DetailList'])] = array('SportsTypeId' => $SportsTypeId);
         }
         //生成修改后的元素列表
         $RaceStageGroupInfo['RaceStageId'] = $RaceStageId;
         $RaceStageGroupInfo['RaceGroupId'] = $RaceGroupId;
         $RaceStageGroupInfo['comment'] = json_encode($RaceStageGroupInfo['comment']);
         //如果认为需要新建数据
         if (isset($NewDetail)) {
             //插入新的数据
             $res = $this->oRace->insertRaceStageGroup($RaceStageGroupInfo);
         } else {
             //更新数据
             $res = $this->oRace->updateRaceStageGroup($RaceStageId, $RaceGroupId, $RaceStageGroupInfo);
         }
         $url = Base_Common::getUrl('', 'xrace/race.stage', 'race.stage.group.detail', array('RaceStageId' => $RaceStageId, 'RaceGroupId' => $RaceGroupId));
         $this->response->redirect($url);
     } else {
         $home = $this->sign;
         include $this->tpl('403');
     }
 }
开发者ID:032404cxd,项目名称:prototype_main,代码行数:73,代码来源:RaceStageController.php

示例6: detailAction

 public function detailAction()
 {
     //检查权限
     $this->manager->checkMenuPermission($this->sign, Widget_Manager::MENU_PURVIEW_UPDATE);
     $SourceProjectId = intval($this->request->SourceProjectId);
     $SourceProject = $this->oSourceProject->getRow($SourceProjectId, '*');
     $SourceProjectDetail = $this->oSourceProject->getDetail($SourceProjectId);
     $SourceList = $this->oSource->getAll();
     $SourceDetailList = $this->oSourceDetail->getAll(0);
     //下载参数
     $export = $this->request->export ? intval($this->request->export) : 0;
     $links = 'http://passport.wjyx.com/?c=media&PageId=2';
     foreach ($SourceProjectDetail as $key => $value) {
         $SourceProjectDetail[$key]['SourceName'] = $SourceList[$value['SourceId']]['name'];
         $SourceProjectDetail[$key]['SourceDetailName'] = $value['SourceDetail'] ? $SourceDetailList[$value['SourceDetail']]['name'] : "<font color = 'red'>全部</font>";
         $SourceProjectDetail[$key]['SourceUrl'] = $links . "&UserSourceId=" . $value['SourceId'] . "&UserSourceDetail=" . $value['SourceDetail'] . "&UserSourceProjectId=" . $value['SourceProjectId'];
         //$SourceProjectDetail[$key]['SourceUrl'] = "&UserSourceId=".$value['SourceId']."UserSourceDetail".$value['SourceDetail']."UserSourceProjectId".$value['SourceProjectId'];
         //			$SourceProjectDetail[$key]['SourceUrl'] = Base_Common::my_authcode($SourceProjectDetail[$key]['SourceUrl'],'','limaogame');
     }
     $param['SourceProjectId'] = $SourceProjectId;
     $execlParam = $param + array("export" => 1);
     $export_var = "<a href =" . Base_Common::getUrl('', 'config/source/project', 'detail', $execlParam) . "><导出表格></a>";
     if ($export == 1) {
         $oExcel = new Third_Excel();
         $FileName = '广告位列表--' . $SourceProject['name'];
         //标题栏
         $title = array("广告商", "广告位", "连接参数");
         $oExcel->download($FileName)->addSheet('广告位列表');
         $oExcel->addRows(array($title));
         foreach ($SourceProjectDetail as $key => $sourceproject_detail) {
             //生成单行数据
             $t['SourceName'] = $sourceproject_detail['SourceName'];
             $t['SourceDetailName'] = $sourceproject_detail['SourceDetailName'];
             $t['SourceUrl'] = $sourceproject_detail['SourceUrl'];
             $oExcel->addRows(array($t));
             unset($t);
         }
         //结束excel
         $oExcel->closeSheet()->close();
     }
     include $this->tpl('Config_Source_Project_Detail_list');
 }
开发者ID:eappl,项目名称:prototype,代码行数:42,代码来源:ProjectController.php

示例7: machineMapAction

 public function machineMapAction()
 {
     $sign = "?ctl=config/depot&ac=machine.map";
     $this->manager->checkMenuPermission($this->sign, Widget_Manager::MENU_PURVIEW_SELECT);
     $export = $this->request->export ? intval($this->request->export) : 0;
     $DepotParame['export'] = 1;
     $DepotList = $this->oDepot->getAll();
     //用于设置默认的页面参数
     $DepotIdStr = Base_Common::getArrList($DepotList);
     $DepotArr = explode(",", $DepotIdStr);
     //页面参数
     $DepotId = $this->request->DepotId ? $this->request->DepotId : $DepotArr[0];
     $DepotX = $this->request->X;
     $DepotXList = $this->getDepotX($DepotId);
     $DepotName = $DepotList[$DepotId]['name'];
     if ($DepotId && $DepotX) {
         $DepotParame['DepotId'] = $DepotId;
         $DepotParame['X'] = $DepotX;
         $CageList = $this->oCage->getCageListParams($DepotId, $DepotX);
         $MachineFields = "MachineId,MachineCode,EstateCode,Position,Size,LocalIP,WebIP,Purpose,Flag";
         foreach ($CageList as $CageId => $CageInfo) {
             $MachineList = $this->oMachine->getMachineByCageId($CageId, $MachineFields);
             $SizeList = array();
             for ($i = 1; $i <= $CageInfo["Size"]; $i++) {
                 $SizeList[$i] = 0;
             }
             foreach ($MachineList as $key => $MachineInfo) {
                 $MachineInfo['LocalIP'] = long2ip($MachineInfo['LocalIP']);
                 $MachineInfo['WebIP'] = long2ip($MachineInfo['WebIP']);
                 $SizeList[$MachineInfo['Position']] = $MachineInfo;
                 for ($i = $MachineInfo['Position']; $i <= $MachineInfo['Position'] + $MachineInfo['Size'] - 1; $i++) {
                     if ($i > $MachineInfo['Position']) {
                         unset($SizeList[$i]);
                     }
                 }
                 ksort($SizeList);
                 $CageList[$CageId]['SizeList'] = $SizeList;
             }
         }
     }
     $imgPath = __APP_ROOT_DIR__ . "admin/html/img/machine/";
     //导出表格
     $export_var = "<a href =" . Base_Common::getUrl('', 'config/depot', 'machine.map', $DepotParame) . "><导出表格></a>";
     if ($export == 1) {
         /*header("Content-type:application/vnd.ms-excel;charset=UTF-8");
         		header("Content-Disposition:attachment;filename=test_data.xls");
         		
         		foreach($CageList as $CageId=> $CageInfo)
         		{
         			echo "<table>";
         			echo "<tr><td>编号:{$CageInfo['CageCode']}</td></tr>";
         			echo "<tr><td>电量:{$CageInfo['Current']}A</td></tr>";
         			echo "<tr><td>实际电量:{$CageInfo['ActualCurrent']}A</td></tr>";
         			foreach($CageInfo['SizeList'] as $k=> $v)
         			{
         				if($v == 0)
         				{
         					echo "<tr><td></td></tr>";			
         			  }else{
         			  	if($v['Flag']==1)
         			  	{
         			  		echo "<tr><td><img title='内网IP:".$v['LocalIP']." 外网IP:".$v['WebIP']."' src='{$imgPath}server/server".$v['Size'].".png' style='height:".($v['Size']*15)."px' /></td></tr>";		  	
         			  	}elseif($v['Flag']==2)//交换机
         			  	{
         			  		echo "<tr><td><img title='内网IP:".$v['MachineCode']."外网IP:".$v['WebIP']."' src='{$imgPath}exchange/exchange".$v['Size'].".png' style='height:".($v['Size']*15)."px' /></td></tr>";			  	
         			  	}elseif($v['Flag']==3)//防火墙
         			  	{
         			  		echo "<tr><td><img  title='内网IP:".$v['MachineCode']."外网IP:".$v['WebIP']."' src='{$imgPath}router/router".$v['Size'].".png' style='height:".($v['Size']*15)."px' /></td></tr>";			  	
         			  	}elseif($v['Flag']==4)//路由器
         			  	{
         			  		echo "<tr><td><img  title='内网IP:".$v['MachineCode']."外网IP:".$v['WebIP']."' src='{$imgPath}router/router".$v['Size'].".png' style='height:".($v['Size']*15)."px' /></td></tr>";			  	
         			  	}
         	
         	
         			  }
         			
         			}
         			 
         			echo "</table>";
         			
         		}*/
         /*$FileName='机器列表图';
         		$oExcel = new Third_Excel();
         		$oExcel->download($FileName)->addSheet('机器列表图');
         		include $this->tpl('Config_Depot_MapList3');lll
         		$oExcel->closeSheet()->close();	*/
         header("Content-type:application/vnd.ms-excel;charset=UTF-8");
         header("Content-Disposition:attachment;filename=MachineMap.xls");
         include $this->tpl('Config_Depot_MapExecl');
     } else {
         include $this->tpl('Config_Depot_MapList');
     }
 }
开发者ID:eappl,项目名称:prototype,代码行数:93,代码来源:DepotController.php

示例8: ipListAction

 public function ipListAction()
 {
     //检查当前页面权限
     $sign = '?ctl=config/machine&ac=ip.list';
     $this->manager->checkMenuPermission($sign, Widget_Manager::MENU_PURVIEW_SELECT);
     $CageList = $this->CageList;
     $DepotId = $this->request->DepotId;
     $export = $this->request->export ? intval($this->request->export) : 0;
     $page = $this->request->page ? intval($this->request->page) : 1;
     $pageSize = $export ? 0 : 20;
     $DepotList = $this->DepotList;
     $ServerList = $this->ServerList;
     $PartnerList = $this->PartnerList;
     $param = array();
     if ($DepotId) {
         $param['DepotId'] = $DepotId;
         $CageIdList = Base_Common::getArrList($CageList[$DepotId]);
     }
     $MachineList = $this->oMachine->getIpList($CageIdList, ($page - 1) * $pageSize, $pageSize);
     $MachineArr = $MachineList['MachineDetail'];
     foreach ($MachineArr as $MachineId => &$MachineInfo) {
         $MachineInfo['PartnerName'] = $PartnerList[$ServerList[$MachineInfo['ServerId']]['PartnerId']]['name'];
         $MachineInfo['LocalIP'] = long2ip($MachineInfo['LocalIP']);
         $MachineInfo['WebIP'] = long2ip($MachineInfo['WebIP']);
         $MachineInfo['Purpose'] = $MachineInfo['Purpose'];
     }
     //翻页
     $pageParam = $param + array("export" => 0);
     $page_url = Base_Common::getUrl('', 'config/machine', 'ip.list', $pageParam) . "&page=~page~";
     $page_content = base_common::multi($MachineList['MachineCount'], $page_url, $page, $pagesize, 10, $maxpage = 100, $prevWord = '上一页', $nextWord = '下一页');
     //表格导出
     $execlParam = $param + array("export" => 1);
     $export_var = "<a href =" . Base_Common::getUrl('', 'config/machine', 'ip.list', $execlParam) . "><导出表格></a>";
     if ($export == 1) {
         $oExcel = new Third_Excel();
         $FileName = 'IP地址信息';
         $oExcel->download($FileName)->addSheet('IP地址信息');
         //标题栏
         $title = array("序列号", "资产编号", "内网IP", "外网IP", "项目", "用途");
         $oExcel->addRows(array($title));
         foreach ($MachineArr as $MachineCode => $MachineInfot) {
             //生成单行数据
             $t = array();
             $t['MachineCode'] = $MachineInfot['MachineCode'];
             $t['EstateCode'] = $MachineInfot['EstateCode'];
             $t['LocalIP'] = $MachineInfot['LocalIP'];
             $t['WebIP'] = $MachineInfot['WebIP'];
             $t['PartnerName'] = $MachineInfot['PartnerName'];
             $t['Purpose'] = $MachineInfot['Purpose'];
             $oExcel->addRows(array($t));
             unset($t);
         }
         $oExcel->closeSheet()->close();
     }
     include $this->tpl('Config_Machine_ipList');
 }
开发者ID:eappl,项目名称:prototype,代码行数:56,代码来源:MachineController.php

示例9: genPackCodeLogAction

 public function genPackCodeLogAction()
 {
     set_time_limit(0);
     $pagesize = 10;
     //检查当前页面权限
     $sign = '?ctl=config/product/pack&ac=gen.pack.code.log';
     $this->manager->checkMenuPermission($sign, Widget_Manager::MENU_PURVIEW_SELECT);
     //页面输入变量
     $AppId = intval($this->request->AppId);
     $PartnerId = intval($this->request->PartnerId);
     $GenNum = intval($this->request->GenNum) ? intval($this->request->GenNum) : 100;
     $AreaId = $this->request->AreaId ? intval($this->request->AreaId) : 0;
     $app_type = $this->request->app_type ? intval($this->request->app_type) : 0;
     $partner_type = $this->request->partner_type ? intval($this->request->partner_type) : 0;
     $is_abroad = $this->request->is_abroad ? intval($this->request->is_abroad) : 0;
     $page = intval(max($this->request->page, 1));
     //时间范围初始化
     $StartDate = $this->request->StartDate ? $this->request->StartDate : date("Y-m-01", time());
     $EndDate = $this->request->EndDate ? $this->request->EndDate : date("Y-m-d", time());
     $ProductPackArr = $this->oProductPack->getAll($AppId);
     $ProductPackId = $this->request->ProductPackId ? intval($this->request->ProductPackId) : 0;
     //初始化图表配置
     $Input = array('AppId' => $AppId, 'PartnerId' => $PartnerId, 'is_abroad' => $is_abroad, 'AreaId' => $AreaId, 'app_type' => $app_type, 'partner_type' => $partner_type, 'ProductPackId' => $ProductPackId, 'export' => 1);
     //初始化游戏列表
     $permitted_app = $this->permitted_app;
     //初始化合作商列表
     $permitted_partner = array();
     //初始化服务器列表
     $permitted_server = array();
     $AreaList = $this->AreaList;
     //获取当前地区列表
     $AreaList = $this->oArea->getAbroad($is_abroad, $AreaList);
     //生成允许的地区id数组
     if ($app_type > 0) {
         //筛选是否平台产品
         $permitted_app = $this->oApp->getApp($app_type, $permitted_app);
     }
     if ($AppId > 0) {
         //获取可查看的权限总表
         $permitted_partner = $this->oPermission->getPartner($this->manager->data_groups, $AppId, 'PartnerId,name,AreaId');
         //根据合作方式筛选
         $permitted_partner = $this->oPartnerApp->getPermittedPartnerByPartnerType($partner_type, $permitted_partner);
         //根据所在地区筛选
         $permitted_partner = $this->oPartnerApp->getPermittedPartnerByPartnerArea($AreaList, $permitted_partner);
     }
     //获取用于查询的权限sql语句
     $oWherePartnerPermission = $this->oPermission->getWherePermittedPartner($this->manager->data_groups, $AppId, $PartnerId, $app_type, $partner_type, $AreaList, $AreaId, $is_abroad, '');
     $GenLog = $this->oProductPack->getGenLog(0, 0, $ProductPackId, 0, $oWherePartnerPermission, ($page - 1) * $pagesize, $pagesize);
     $page_url = Base_Common::getUrl('', 'config/product/pack', 'gen.pack.code.log', $Input) . "&page=~page~";
     $page_content = base_common::multi($GenLog['GenLogCount'], $page_url, $page, $pagesize, 10, $maxpage = 100, $prevWord = '上一页', $nextWord = '下一页');
     if (count($GenLog['GenLog'])) {
         foreach ($GenLog['GenLog'] as $GenId => $GenInfo) {
             $GenLog['GenLog'][$GenId]['AppName'] = $permitted_app[$GenInfo['AppId']]['name'];
             if (!isset($PartnerInfo[$GenInfo['PartnerId']])) {
                 $PartnerInfo[$GenInfo['PartnerId']] = $this->oPartner->getRow($GenInfo['PartnerId']);
             }
             if (!isset($ManagerInfo[$GenInfo['ManagerId']])) {
                 $ManagerInfo[$GenInfo['ManagerId']] = $this->manager->getRow($GenInfo['ManagerId']);
             }
             $GenLog['GenLog'][$GenId]['PartnerName'] = $PartnerInfo[$GenInfo['PartnerId']]['name'];
             $GenLog['GenLog'][$GenId]['ManagerName'] = $ManagerInfo[$GenInfo['ManagerId']]['name'];
             if (!isset($ProductPackList[$GenInfo['ProductPackId']])) {
                 $ProductPackList[$GenInfo['ProductPackId']] = $this->oProductPack->getRow($GenInfo['ProductPackId']);
                 $Comment = json_decode($ProductPackList[$GenInfo['ProductPackId']]['Comment'], true);
                 if (is_array($Comment)) {
                     unset($ProductList);
                     unset($TypeList);
                     unset($ProductInfo);
                     foreach ($Comment as $Type => $TypeInfo) {
                         foreach ($TypeInfo as $ProductId => $Count) {
                             if (!isset($ProductInfo[$Type][$AppId][$ProductId])) {
                                 if ($Type == "hero") {
                                     $ProductInfo[$Type][$AppId][$ProductId] = $this->oHero->getRow($ProductId, $AppId, '*');
                                 } elseif ($Type == "skin") {
                                     $ProductInfo[$Type][$AppId][$ProductId] = $this->oSkin->getRow($ProductId, $AppId, '*');
                                 } elseif ($Type == "product") {
                                     $ProductInfo[$Type][$AppId][$ProductId] = $this->oProduct->getRow($ProductId, $AppId, '*');
                                 } elseif ($Type == "money") {
                                     $ProductInfo[$Type][$AppId][$ProductId] = $this->oMoney->getRow($ProductId, $AppId, '*');
                                 } elseif ($Type == "appcoin") {
                                     $AppInfo = $this->oApp->getRow($AppId);
                                     $Comment = json_decode($AppInfo['comment'], true);
                                     $ProductInfo[$Type][$AppId][$ProductId]['name'] = $Comment['coin_name'];
                                 }
                             }
                             $ProductList[$Type]['detail'][$ProductId] = $ProductInfo[$Type][$AppId][$ProductId]['name'] . "*" . $Count . "个";
                         }
                         $TypeList[$Type] = implode(",", $ProductList[$Type]['detail']);
                     }
                     $ProductPackArr[$AppId][$GenInfo['ProductPackId']]['ProductListText'] = implode(",", $TypeList);
                 } else {
                     $ProductPackArr[$AppId][$GenInfo['ProductPackId']]['ProductListText'] = "无道具";
                 }
             }
             $GenLog['GenLog'][$GenId]['PackName'] = $ProductPackList[$GenInfo['ProductPackId']]['name'];
             $GenLog['GenLog'][$GenId]['ProductListText'] = $ProductPackArr[$GenInfo['AppId']][$GenInfo['ProductPackId']]['ProductListText'];
             $GenLog['GenLog'][$GenId]['ExportUrl'] = "<a href =" . Base_Common::getUrl('', 'config/product/pack', 'download.pack.code', array('export' => 1, 'GenId' => $GenId)) . "><导出礼包码></a>";
         }
     }
     $page_title = "礼包码生成记录";
//.........这里部分代码省略.........
开发者ID:eappl,项目名称:prototype,代码行数:101,代码来源:PackController.php

示例10: productQueueSendDetailAction

 public function productQueueSendDetailAction()
 {
     $oArea = new Config_Area();
     $oPartnerApp = new Config_Partner_App();
     $oServer = new Config_Server();
     $oPermission = new Config_Permission();
     $oUser = new Lm_User();
     $ProductSendTypeArr = $this->config->ProductSendTypeArr;
     $ProductTypeArr = $this->config->ProductTypeArr;
     //获取用户可以查看的游戏列表
     $permitted_app = $oPermission->getApp($this->manager->data_groups, 'AppId,name');
     $AreaList = $oArea->getAll();
     set_time_limit(0);
     $page = intval(max($this->request->page, 1));
     //检查当前页面权限
     $sign = '?ctl=config/product/product&ac=product.queue.send.detail';
     $this->manager->checkMenuPermission($sign, Widget_Manager::MENU_PURVIEW_SELECT);
     //页面输入变量
     $AppId = intval($this->request->AppId);
     $PartnerId = intval($this->request->PartnerId);
     $PassageId = intval($this->request->PassageId);
     $AreaId = intval($this->request->AreaId) ? intval($this->request->AreaId) : 0;
     $UserName = $this->request->UserName;
     $app_type = intval($this->request->app_type);
     $partner_type = intval($this->request->partner_type);
     $is_abroad = intval($this->request->is_abroad) ? intval($this->request->is_abroad) : 0;
     //页面输入变量
     $ProductSendType = $this->request->ProductSendType;
     $ProductType = $this->request->ProductType;
     //是否导出当前页面表格
     $export = $this->request->export ? intval($this->request->export) : 0;
     $pagesize = $export ? 0 : 20;
     //初始化图表配置
     $Input = array('UserName' => urlencode($UserName), 'AppId' => $AppId, 'PartnerId' => $PartnerId, 'ServerId' => $ServerId, 'ProductSendType' => $ProductSendType, 'export' => 1);
     $export_var = "<a href =" . Base_Common::getUrl('', 'config/product/product', 'product.queue.send.detail', $Input) . "><导出表格></a>";
     //初始化合作商列表
     $permitted_partner = array();
     //获取当前地区列表
     $AreaList = $oArea->getAbroad($is_abroad, $AreaList);
     //生成允许的地区id数组
     if ($app_type > 0) {
         //筛选是否平台产品
         $permitted_app = $this->oApp->getApp($app_type, $permitted_app);
     }
     if ($AppId > 0) {
         //获取可查看的权限总表
         $permitted_partner = $oPermission->getPartner($this->manager->data_groups, $AppId, 'PartnerId,name,AreaId');
         //根据合作方式筛选
         $permitted_partner = $oPartnerApp->getPermittedPartnerByPartnerType($partner_type, $permitted_partner);
         //根据所在地区筛选
         $permitted_partner = $oPartnerApp->getPermittedPartnerByPartnerArea($AreaList, $permitted_partner);
         if ($PartnerId > 0) {
             //获取服务器列表
             $permitted_server = $oPermission->getServer($this->manager->data_groups, $AppId, $PartnerId, 'ServerId,name');
         }
     }
     if ($UserName) {
         $UserInfo = $oUser->getUserByName($UserName);
         if ($UserInfo['UserId']) {
             $UserId = $UserInfo['UserId'];
         } else {
             $UserId = -1;
         }
     } else {
         $UserId = 0;
     }
     $ProductSendQueueDetailArr = $this->oProduct->getProductSendQueueDetail($UserId, $ProductSendType, $ProductType, $ServerId, ($page - 1) * $pagesize, $pagesize);
     $UserInfoList = array();
     if (is_array($ProductSendQueueDetailArr['ProductSendQueueDetail'])) {
         foreach ($ProductSendQueueDetailArr['ProductSendQueueDetail'] as $key => $value) {
             if ($value['UserId']) {
                 if (!isset($UserInfoList[$value['UserId']])) {
                     $UserInfo = $oUser->getUserById($value['UserId']);
                     $UserInfoList[$value['UserId']] = $UserInfo;
                 }
             }
             if (!isset($ServerInfo[$value['ServerId']])) {
                 $ServerInfo[$value['ServerId']] = $oServer->getRow($value['ServerId']);
             }
             $Comment = json_decode($value['Comment'], true);
             $ProductSendQueueDetailArr['ProductSendQueueDetail'][$key]['UserName'] = $value['UserId'] ? $UserInfoList[$value['UserId']]['UserName'] : "未指定";
             $ProductSendQueueDetailArr['ProductSendQueueDetail'][$key]['ProductSendTypeName'] = $ProductSendTypeArr[$value['SendType']];
             $ProductSendQueueDetailArr['ProductSendQueueDetail'][$key]['ProductTypeName'] = $ProductTypeArr[$value['ProductType']];
             $ProductSendQueueDetailArr['ProductSendQueueDetail'][$key]['ServerName'] = $ServerInfo[$value['ServerId']]['name'];
         }
     }
     $page_title = "道具发送队列详情";
     $page_form_action = $sign;
     //调取模板
     include $this->tpl('Config_Product_ProductSendQueueDetail');
 }
开发者ID:eappl,项目名称:prototype,代码行数:91,代码来源:ProductController.php


注:本文中的Base_Common::getUrl方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。