123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- <?php
- namespace Cas\Controller\Admin;
- use Cas\Module\Lottery;
- use Cas\Dao\PlatformBulletin;
- use KIF\Core\Request;
- use Cas\Dao\LotteryEvents;
- /**
- * "活动相关" - "默认首页" &"后台大首页"
- * 页面: 后台管理首页 doDefault
- * @author lihuanchun
- *
- */
- class Index extends Controller {
-
- private $objLottery; // 活动后端
- private $operatorData;
- /**
- * 初始化
- */
- public function __construct() {
- header ( "Content-Type: text/html; charset=utf-8" );
- $this->objLottery = new Lottery ();
- $this->operatorData = $this->getUser();
- $this->setOutput('title', $title);
- }
-
- /**
- * 默认页面
- * 1.获取当前操作员用户信息
- * 2.获取平台公告10条信息
- * 3.活动发布快捷通道
- * 4.所有活动
- * 地址:http://cas.lishuy.com/?c=Admin_Index
- */
- public function doDefault(){
-
- # 获取平台公告10条信息
- $bulletinData = array();
- $objPlatformBulletin = new PlatformBulletin();
- $condition = array();
- $limit = 6;
- $order = 'create_time desc';
- $bulletinIds = $objPlatformBulletin -> findIdsBy($condition,$limit,$order);
- $bulletinData = $objPlatformBulletin -> gets($bulletinIds);
-
- # 活动发布快捷通道 ,这里为了方便直接硬编码了
- $url = Request::schemeDomain().'/?c=Admin_Activity_SetBasics&a=PageCreate&type=';
-
-
- # 获取所有活动
- $allActivityData = array();
- $objDLotteryEvents = new LotteryEvents();
- $limit = null;
- $order = 'id desc';
- $condition = array(
- 'operator_uid' => $this->operatorData['uid']
- );
- $ids = $objDLotteryEvents->findIdsBy($condition,null,'id desc');
- $allActivityData = $objDLotteryEvents -> gets($ids);
-
- $this->tpl = 'admin/index';
- $title = '活动首页';
- $this->setOutput('title', $title);
- $this->setOutput('menu_active', array('name' => 'platfromhome', 'item' => '')); //激活菜单
- $this->addNavMenu($title, Request::url());
-
- $allTypeData = $objDLotteryEvents ->getType();
-
- $this->setOutput('allTypeData', $allTypeData);
- $this->setOutput('bulletinData', $bulletinData); // 获取平台公告10条信息
- $this->setOutput('operatorData', $this->operatorData); // 当前操作者信息
- $this->setOutput('myReleaseActivityData', $allActivityData); // 获取所有活动
- $this->setOutput('pagePublicData', $this->getPagePublicData()); // 后台管理相关数据
-
- }
-
- /**
- * 显示方法
- *
- */
- public function display() {
- return $this->render();
- }
-
-
- /**
- * 临时创建二维码图片
- * http://cas.lishuy.com/?c=Admin_Index&a=TMPCreateImg
- */
- public function doTMPCreateImg(){
- $url = Request::p('url');
- $this -> createImgCodeUrl($url);
- $this->ajax_success_exit('ok');
- }
-
-
-
-
- }
-
|