本文整理汇总了PHP中CommonController类的典型用法代码示例。如果您正苦于以下问题:PHP CommonController类的具体用法?PHP CommonController怎么用?PHP CommonController使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CommonController类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getmessageboard
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: messagestate
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: getCount
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: Start
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();
}
示例5: index
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');
}
示例6: index
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');
}
示例7: __construct
public function __construct()
{
parent::__construct();
// 获取参数
$code = I('code');
$this->data = unserialize(urlsafe_b64decode($code));
}
示例8: __construct
public function __construct(Authorizer $authorizer)
{
parent::__construct($authorizer);
// $this->beforeFilter('oauth', ['except' => 'tmp']);
// $this->beforeFilter('oauth.checkClient', ['only' => 'store']);
// $this->beforeFilter('validation');
}
示例9: _initialize
public function _initialize()
{
$this->cateChildList(0, $nb);
//从父级=0开始递归
$this->assign('list', $this->cateListAll);
parent::_initialize();
}
示例10: __construct
public function __construct()
{
parent::__construct();
if (ACTION_NAME == 'list') {
$this->index();
}
}
示例11: initialize
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);
}
示例12: __construct
public function __construct()
{
parent::__construct();
// 获取参数
$code = I('get.code');
$this->data = unserialize(base64_decode($code));
}
示例13: __construct
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;
}
示例14: M
function _initialize()
{
parent::_initialize();
$cate = M('AnswerCategory')->where(array('status' => 1, 'pid' => 0))->select();
$this->jsonUtils = new \Org\Util\JsonUtils();
$this->assign('cate', $cate);
}
示例15:
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);
}