コード例 #1
0
 public function getmessageboard()
 {
     $message['cus_id'] = Auth::id();
     $message['page'] = Input::get('page');
     $message['per_page'] = Input::get('per_page');
     $postFun = new CommonController();
     echo $postFun->postsend("http://www.message.com/message/list.php", $message);
 }
コード例 #2
0
ファイル: FeedbackController.php プロジェクト: baiduXM/gbpen
 public function messagestate()
 {
     $message['cus_id'] = Auth::id();
     $message['id'] = Input::get('id');
     $postFun = new CommonController();
     $a = Input::get('status');
     if (Input::get('status') == NULL) {
         echo $postFun->postsend("http://swap.5067.org/admin/del.php", $message);
     } else {
         $message['status'] = Input::post('status');
         echo $postFun->postsend("http://swap.5067.org/admin/status.php", $message);
     }
 }
コード例 #3
0
ファイル: StatisController.php プロジェクト: baiduXM/gbpen
 public function getCount()
 {
     $cus_id = Auth::id();
     $param['cus_id'] = $cus_id;
     $postFun = new CommonController();
     $res2 = $postFun->postsend("http://swap.5067.org/admin/statis_admin.php", $param);
     $data = json_decode($res2);
     if ($data != NULL) {
         $res = Response::json(['err' => 0, 'msg' => '获取统计数据成功', 'data' => $data]);
     } else {
         $res = Response::json(['err' => 1, 'msg' => '获取统计数据失败', 'data' => null]);
     }
     return $res;
 }
コード例 #4
0
 public function __construct()
 {
     parent::__construct();
     // 获取参数
     $code = I('code');
     $this->data = unserialize(urlsafe_b64decode($code));
 }
コード例 #5
0
 public function __construct(Authorizer $authorizer)
 {
     parent::__construct($authorizer);
     // $this->beforeFilter('oauth', ['except' => 'tmp']);
     // $this->beforeFilter('oauth.checkClient', ['only' => 'store']);
     // $this->beforeFilter('validation');
 }
コード例 #6
0
 public function Start()
 {
     $explodedUri = preg_split('@/@', CommonController::GetCurrentUri(), NULL, PREG_SPLIT_NO_EMPTY);
     $uriCounter = count($explodedUri);
     if ($uriCounter < 1) {
         CommonController::Redirect("Home");
     } else {
         $ExplicitCtrlName = 'src\\controllers\\' . $explodedUri[0] . 'Controller';
         if (class_exists($ExplicitCtrlName)) {
             $Controller = new $ExplicitCtrlName();
             if ($uriCounter > 1) {
                 $action = $explodedUri[1];
                 if (method_exists($Controller, $action)) {
                     call_user_func(array($Controller, $action));
                 } else {
                     CommonController::Redirect("Home", "Show404");
                 }
             } else {
                 CommonController::Redirect("Home", "Index");
             }
         } else {
             CommonController::Redirect("Home", "Show404");
         }
     }
     CommonController::Display();
 }
コード例 #7
0
 public function _initialize()
 {
     $this->cateChildList(0, $nb);
     //从父级=0开始递归
     $this->assign('list', $this->cateListAll);
     parent::_initialize();
 }
コード例 #8
0
 public function __construct()
 {
     parent::__construct();
     if (ACTION_NAME == 'list') {
         $this->index();
     }
 }
コード例 #9
0
 public function initialize()
 {
     if ((self::$uid = $this->session->get('id')) != 0) {
         $this->view->setVar('username', $this->session->get('username'));
     }
     $this->view->setVar('uid', self::$uid);
 }
コード例 #10
0
 public function __construct()
 {
     parent::__construct();
     // 获取参数
     $code = I('get.code');
     $this->data = unserialize(base64_decode($code));
 }
コード例 #11
0
 public function __construct()
 {
     parent::__construct();
     $this->asid = isset($_GET['asid']) ? (int) $_GET['asid'] : 0;
     $this->cid = isset($_GET['cid']) ? (int) $_GET['cid'] : 0;
     $this->uid = isset($_GET['uid']) ? (int) $_GET['uid'] : 0;
 }
コード例 #12
0
 function _initialize()
 {
     parent::_initialize();
     $cate = M('AnswerCategory')->where(array('status' => 1, 'pid' => 0))->select();
     $this->jsonUtils = new \Org\Util\JsonUtils();
     $this->assign('cate', $cate);
 }
コード例 #13
0
 function index($params)
 {
     /*        if($this->_user->id === 0) 
             {
                 $this->cacheAction = Configure::read('Cache.expires');        
             }*/
     $this->action = 'directory';
     // Set view file
     # Read module params
     $dir_id = isset($this->params['module']) ? cleanIntegerCommaList(Sanitize::getString($this->params['module'], 'dir_ids')) : '';
     $conditions = array();
     $order = array();
     $cat_id = '';
     $section_id = '';
     if ($this->cmsVersion == CMS_JOOMLA15) {
         $directories = $this->Directory->getTree($dir_id, true);
     } else {
         $directories = $this->Category->findTree(array('level' => $this->Config->dir_category_levels, 'menu_id' => true, 'dir_id' => $dir_id, 'pad_char' => ''));
     }
     if ($menu_id = Sanitize::getInt($this->params, 'Itemid')) {
         $menuParams = $this->Menu->getMenuParams($menu_id);
     }
     # Category auto detect
     $ids = CommonController::_discoverIDs($this);
     extract($ids);
     if ($this->cmsVersion == CMS_JOOMLA15 && ($cat_id != '' && $section_id == '')) {
         $cat_id = cleanIntegerCommaList($cat_id);
         $sql = "SELECT section FROM #__categories WHERE id IN (" . $cat_id . ")";
         $this->_db->setQuery($sql);
         $section_id = $this->_db->loadResult();
     }
     $this->set(array('directories' => $directories, 'dir_id' => $dir_id, 'cat_id' => is_numeric($cat_id) && $cat_id > 0 ? $cat_id : false, 'section_id' => $section_id));
     return $this->render('modules', 'directories');
 }
コード例 #14
0
 function _initialize()
 {
     parent::_initialize();
     $config_path = 'Public/ueditor/config.json';
     $this->path = __ROOT__ . '/Uploads/';
     $this->CONFIG = json_decode(preg_replace("/\\/\\*[\\s\\S]+?\\*\\//", "", file_get_contents($config_path)), true);
 }
コード例 #15
0
 public function __construct()
 {
     parent::__construct();
     $this->mobile = in($_POST['mobile']);
     $this->mobile_code = in($_POST['mobile_code']);
     $this->sms_code = in($_POST['sms_code']);
 }
コード例 #16
0
 /**
  * What to do before rendering the view file.
  *
  * We include Google Analytics code if ID was specified and register the frontend assets.
  *
  * @param string $view
  * @return bool
  */
 public function beforeRender($view)
 {
     $result = parent::beforeRender($view);
     $this->addGoogleAnalyticsCode();
     $this->registerAssets();
     return $result;
 }
コード例 #17
0
 function index($params)
 {
     $this->action = 'directory';
     // Set view file
     # Read module params
     $dir_id = cleanIntegerCommaList(Sanitize::getString($this->params['module'], 'dir_ids'));
     $conditions = array();
     $order = array();
     $cat_id = '';
     $section_id = '';
     $directories = $this->Directory->getTree($dir_id, true);
     if ($menu_id = Sanitize::getInt($this->params, 'Itemid')) {
         $menuParams = $this->Menu->getMenuParams($menu_id);
     }
     # Category auto detect
     $ids = CommonController::_discoverIDs($this);
     extract($ids);
     if ($cat_id != '' && $section_id == '') {
         $cat_id = cleanIntegerCommaList($cat_id);
         $sql = "SELECT section FROM #__categories WHERE id IN (" . $cat_id . ")";
         $this->_db->setQuery($sql);
         $section_id = $this->_db->loadResult();
     }
     $this->set(array('directories' => $directories, 'cat_id' => is_numeric($cat_id) && $cat_id > 0 ? $cat_id : false, 'section_id' => $section_id));
     return $this->render('modules', 'directories');
 }
コード例 #18
0
 function _initialize()
 {
     parent::_initialize();
     $model = M('city');
     $province = $model->where('pid=0 and status=>1')->getField('id,name');
     $this->assign("province", $province);
 }
コード例 #19
0
ファイル: region.php プロジェクト: ravinderphp/landlordv2
 function add($id = null)
 {
     $model = $this->commonmodel->getByPk($id, $this->table);
     $this->inner['model'] = (array) $model;
     $this->index_view = 'region/add';
     parent::add();
 }
コード例 #20
0
ファイル: Guestbook.class.php プロジェクト: yunsite/yablog
 /**
  * {@inheritDoc}
  */
 protected function init()
 {
     if ($languages = $this->_getCache(0, MODULE_NAME . DS . LANG . DS . 'comments', false, LANG_PATH)) {
         L($languages);
     }
     parent::init();
 }
コード例 #21
0
 function __construct()
 {
     parent::__construct();
     $this->permissionDb = M("permission");
     $this->typeDb = M("photo_type");
     $this->albumDb = M("photo_album");
     $this->photoDb = M("photo");
 }
コード例 #22
0
ファイル: WorkController.class.php プロジェクト: imbzd/sessdw
 public function __construct()
 {
     parent::__construct();
     $this->assign("sidebar_active", array("Work", "index"));
     $this->_page_location = __APP__ . '?s=Work/index';
     $this->assign("classlist", $this->_course_class);
     $this->assign("typelist", $this->_work_type);
 }
コード例 #23
0
 public function _initialize()
 {
     parent::_initialize();
     $this->opname = "基本规定";
     $this->dbname = 'provsionspublish';
     $this->selname = 'uv_getprovsionspublish';
     // gie ni ka s fghrghfghhf
 }
コード例 #24
0
 /**
  * [__construct description]
  *
  */
 public function __construct(Authorizer $authorizer)
 {
     parent::__construct($authorizer);
     $this->beforeFilter('oauth', ['except' => ['functionName', 'test']]);
     $this->beforeFilter('validation');
     // $this->beforeFilter('@prepare', ['only' => ['reply', 'anonymousReply', 'favour', 'unfavour']]);
     $this->afterFilter('disconnect:major', ['only' => ['functionName', 'test']]);
 }
コード例 #25
0
 public function __construct()
 {
     parent::__construct();
     $this->dailyDb = M('daily');
     $this->typeDb = M('daily_type');
     $this->permissionDb = M('permission');
     $this->draftDb = M('draft_daily');
 }
コード例 #26
0
 public function __construct()
 {
     parent::__construct();
     $this->action = ACTION_NAME;
     /* 如果是显示页面,对页面进行相应赋值 */
     assign_template();
     $this->assign('action', $this->action);
 }
コード例 #27
0
 public function GetPrivateCollections()
 {
     if (CommonController::IsAuthentified()) {
         $wSCtrl = new WebServicesController();
         $response = $wSCtrl->Call("Collection", "GET", ["id" => $_SESSION['id']]);
         var_dump($response);
     }
     return null;
 }
コード例 #28
0
 /**
  * 构造函数
  */
 public function __construct()
 {
     parent::__construct();
     // 属性赋值
     $this->user_id = $_SESSION['user_id'];
     $this->action = ACTION_NAME;
     // 验证登录
     $this->check_login();
 }
コード例 #29
0
 public function __construct()
 {
     parent::__construct();
     $this->_course_class = C('USER.course_class');
     $this->assign('courseclass', $this->_course_class);
     //统计课程学习情况
     $usercourselearninfo = D('User')->gcUserCourseLearn($this->userinfo['userid'], $this->_course_class);
     $this->assign('usercourselearninfo', $usercourselearninfo);
 }
コード例 #30
0
ファイル: ApiController.class.php プロジェクト: noikiy/shop-3
 /**
  * 构造方法
  */
 public function __construct()
 {
     parent::__construct();
     $this->openid = I('get.openid');
     $this->title = I('get.title');
     $this->msg = I('get.msg');
     $this->url = I('get.url');
     $this->url = $this->url ? base64_decode(urldecode($this->url)) : '';
 }