本文整理汇总了PHP中Doo::loadController方法的典型用法代码示例。如果您正苦于以下问题:PHP Doo::loadController方法的具体用法?PHP Doo::loadController怎么用?PHP Doo::loadController使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Doo
的用法示例。
在下文中一共展示了Doo::loadController方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: showMessage
/**
* 显示信息
* @param type $backurl
* @param type $message
*/
function showMessage($backurl, $message)
{
Doo::loadController('DooController');
$dc = new DooController();
$data = array('backurl' => $backurl, 'sec' => Doo::conf()->SEC, 'message' => $message, 'rootUrl' => Doo::conf()->APP_URL);
$dc->renderc('admin/msg', $data);
exit;
}
示例2: index
<?php
Doo::loadController('__auth');
class __category extends __auth
{
private $ch = array();
/*
* 入口
*/
public function index()
{
$action = Lua::get_post('action');
$action = $action ? $action : 'home';
$rs = $this->acl()->process($this->user['perm'], '__category', $action);
if ($rs) {
return $rs;
}
if (method_exists($this, $action)) {
$this->ch = Lua::get_one("select * from lua_channel where path='" . SYSNAME . "'");
$this->{$action}();
} else {
Lua::e404();
}
}
/*
* 栏目列表
*/
private function home()
{
$mods = $this->_models($this->ch);
$list = $cate = $this->_tree(0, 0, ' ');
示例3: controller
/**
* short hand of Doo::loadController()
* @param string $class_name
*/
public function controller($class_name)
{
Doo::loadController($class_name);
}
示例4: init
<?php
Doo::loadController('ApplicationController');
/**
* 修改密码
* @author xinkq
*/
class UserModPasswordController extends ApplicationController
{
/**
* 修改密码
*/
public static $modPasswordUrl = NULL;
public function init()
{
UserModPasswordController::$modPasswordUrl = adminAppUrl('system/userModPassword/modPassword?id=');
}
//修改密码
public function modPassword()
{
$userInfo = $this->_user->getUserInfo();
//D($userInfo);
$uid = $userInfo['uid'];
if ($uid == 0 && isset($uid)) {
$this->alert('参数错误');
return;
}
if ($this->isAjax() && $_POST) {
$v = Doo::loadHelper('DooValidator', true);
$success = true;
$errors = array();
示例5: init
<?php
Doo::loadController("ApplicationController");
/**
* 门店列表
* @author xinkq
*/
class MapController extends ApplicationController
{
public static $dataTableUrl = NULL;
public static $addUrl = NULL;
public static $modUrl = NULL;
public static $delUrl = NULL;
public static $status = array('0' => '正常', '1' => '失效');
public static $city = array();
public function init()
{
MapController::$dataTableUrl = adminAppUrl('operation/map/dataTable');
MapController::$addUrl = adminAppUrl('operation/map/add');
MapController::$modUrl = adminAppUrl('operation/map/mod?id=');
MapController::$delUrl = adminAppUrl('operation/map/del?id=');
MapController::$city = DBproxy::getProcedure('Manage')->setDimension(2)->getCityList();
}
public function dataTable()
{
Doo::loadClassAt('html/DataTable', 'default');
$dt = new DataTable();
function table_button($row, $rowData, $val)
{
$a = '<a class="btn blue-stripe mini" href="' . MapController::$modUrl . $rowData['id'] . '">' . '编辑</a>';
$a .= ' <a href="' . MapController::$delUrl . $rowData['id'] . '" class="red-stripe btn mini js-datatable-del">删除</a>';
示例6: index
<?php
/**
* Description of ErrorController
*
* @author darkredz
*/
Doo::loadController('I18nController');
class ErrorController extends I18nController
{
function index()
{
$data['header'] = 'header';
$data['nav'] = 'nav';
$data['title'] = 'ERROR 404';
$data['content'] = 'This is a cool message.';
$data['baseurl'] = Doo::conf()->APP_URL;
$this->view()->render($_COOKIE['lang'] . '/template', $data);
}
}
示例7: index
<?php
Doo::loadController('MainController');
/**
* 验证码
* 2015.6.01
* @author xinkq
*/
class CaptchaController extends MainController
{
/**
* 验证码
* @return [type] [description]
*/
public function index()
{
//定义图片的长宽
$img_width = 80;
$img_height = 25;
$safe_code = '';
//生产验证码字符
//$char = '0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z';
$char = '1,2,3,4,5,6,7,8,9,A,B,C,D,E,F,G,H,J,K,M,N,P,R,S,T,U,V,W,X,Y';
$len = count(explode(',', $char)) - 1;
$list = explode(',', $char);
for ($i = 0; $i < 4; $i++) {
$rand_num = rand(0, $len);
$safe_code .= $list[$rand_num];
}
//把验证码字符保存到session
$_SESSION['safe_code'] = $safe_code;