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


PHP Doo::conf方法代码示例

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


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

示例1: __construct

 function __construct()
 {
     if (isset($_GET['lang'])) {
         if (in_array($_GET['lang'], $this->langs)) {
             setcookie('lang', $_GET['lang'], time() + 3600 * 240, '/');
             Doo::conf()->lang = $_GET['lang'];
         } else {
             setcookie('lang', 'en');
             Doo::conf()->lang = 'en';
         }
     } else {
         if (!isset($_COOKIE['lang'])) {
             // if user doesn't specify any language, check his/her browser language
             // check if the visitor language is supported
             // $this->language(true) to return the country code such as en-US zh-CN zh-TW
             if (in_array($this->language(), $this->langs)) {
                 setcookie('lang', $this->language(), time() + 3600 * 240, '/');
                 Doo::conf()->lang = $this->language();
             } else {
                 setcookie('lang', 'en', time() + 3600 * 240, '/');
                 Doo::conf()->lang = 'en';
             }
         } else {
             Doo::conf()->lang = $_COOKIE['lang'];
         }
     }
 }
开发者ID:mindaugas-valinskis,项目名称:doophp,代码行数:27,代码来源:I18nController.php

示例2: dataTable

 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>';
         return $a;
     }
     function table_status($row, $rowData, $val)
     {
         if (trim($rowData['status']) == '0') {
             $a = '<span class="label label-success">正常可用</span>';
         } else {
             $a = '<span class="label">失效';
         }
         return $a;
     }
     // 表头
     $header = array('name' => array('name' => '名称'), 'longitude' => array('name' => '经度'), 'latitude' => array('name' => '纬度'), 'status' => array('name' => '可用状态', 'callback' => 'table_status'), 'action' => array('name' => '操作', 'callback' => 'table_button'));
     $param = array('pagesize' => $this->getCurPage() . ',' . Doo::conf()->pagesize);
     $res = DBproxy::getProcedure('Manage')->setDimension(2)->getMap($param);
     // 生产表格
     $content = $dt->setTitle('')->setAttr(array('class' => 'table', 'id' => 'js-queryTable'))->setHeader($header)->setData($res['data'])->setTopContent('')->setBottomContent($this->pager($res['total']))->setDefaultValue('unkown')->render(false);
     $btn = '<a href="' . MapController::$addUrl . '" 
                 class="btn green-stripe"><i class="icon-plus"></i>' . L('添加门店') . '</a>';
     // 显示模版
     $this->contentlayoutRender($btn . $content);
 }
开发者ID:aising,项目名称:ding,代码行数:30,代码来源:MapController.php

示例3: modPassword

 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();
         $password = $_POST['password'];
         $password1 = $_POST['password1'];
         $password2 = $_POST['password2'];
         $pwd = $this->_user->password($password);
         //md5(KEY_PASSWORD.$password);
         if ($userInfo['passwd'] != $pwd) {
             $success = false;
             $errors[] = '密码不正确';
         }
         if (!isset($password1)) {
             $success = false;
             $errors[] = '新登陆密码不能为空';
         }
         if (!isset($password2)) {
             $success = false;
             $errors[] = '再次输入密码不能为空';
         }
         if ($password1 != $password2) {
             $success = false;
             $errors[] = '两次输入的密码不一致,请检查';
         }
         // 插入数据库(接口没有验证数据是否重复,需添加者自己注意)
         if ($success) {
             $result = $this->_user->update_pwd(1, $uid, $password1);
             if (isset($result) && $result != 0) {
                 $success = false;
                 $errors[] = '插入数据库出错,不可连续修改两次密码且不可与原密码相同';
             }
         }
         // 处理返回路径
         if ($success) {
             if (isset($_POST['saveAndReutrn'])) {
                 $errors = Doo::conf()->APP_URL . 'index.php/in';
             }
         }
         // 处理表单位提交
         $this->ajaxFormResult($success, $errors, true, 'loginOut');
     } else {
         //取某用户信息
         $row = $this->_user->get_one($uid);
         //D($row);
         // 显示生成表单
         Doo::loadClassAt('html/DooFormExt', 'default');
         $form = new DooFormExt($this->_getPasswordFormConfig(false, $row));
         $this->contentlayoutRender($form->render());
     }
 }
开发者ID:aising,项目名称:ding,代码行数:60,代码来源:UserModPasswordController.php

示例4: example

 public function example()
 {
     $data['header'] = 'header';
     $data['nav'] = 'nav';
     $data['baseurl'] = Doo::conf()->APP_URL;
     $this->view()->render(Doo::conf()->lang . '/example', $data);
 }
开发者ID:mindaugas-valinskis,项目名称:doophp,代码行数:7,代码来源:MainController.php

示例5: get

 public static function get($dbName)
 {
     if (!isset(self::$_dbList[$dbName])) {
         Doo::loadClassAt('Mysql', 'default');
         self::$_dbList[$dbName] = new Mysql(Doo::conf()->dbconfig[$dbName]);
     }
     return self::$_dbList[$dbName];
 }
开发者ID:aising,项目名称:ding,代码行数:8,代码来源:DBproxy.php

示例6: loginRequire

 function loginRequire()
 {
     $data['baseurl'] = Doo::conf()->APP_URL;
     $data['title'] = 'Login Required!';
     $data['content'] = 'You cannot access this!';
     $data['printr'] = 'You have to be logined to access this section.';
     $this->render('template', $data);
 }
开发者ID:mindaugas-valinskis,项目名称:doophp,代码行数:8,代码来源:ErrorController.php

示例7: deleteComment

 function deleteComment()
 {
     $data['baseurl'] = Doo::conf()->APP_URL;
     $data['title'] = 'Blog - delete comment';
     $data['content'] = 'You can access this~';
     $data['printr'] = 'You are the admin <input type="button" value="Delete this comment" />';
     $this->render('template', $data);
 }
开发者ID:mindaugas-valinskis,项目名称:doophp,代码行数:8,代码来源:BlogController.php

示例8: dbAAA2

 public function dbAAA2()
 {
     Doo::loadCore('db/DooSqlMagic');
     $dbAAA = new DooSqlMagic();
     $dbAAA->setDb(Doo::conf()->db_aaa2, Doo::conf()->APP_MODE);
     $dbAAA->connect();
     return $dbAAA;
 }
开发者ID:berlianaputri,项目名称:rps,代码行数:8,代码来源:SDPAPI.php

示例9: 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;
 }
开发者ID:nofuyun,项目名称:tool,代码行数:13,代码来源:DooOwner.php

示例10: postError

 function postError()
 {
     $this->data['rootUrl'] = Doo::conf()->APP_URL;
     $this->data['title'] = 'Post Not Found!';
     $this->data['content'] = '<p style="color:#ff0000;">The post with ID ' . $this->params['pid'] . ' is not found.</p>';
     $this->prepareSidebar();
     $this->render('error', $this->data);
 }
开发者ID:mindaugas-valinskis,项目名称:doophp,代码行数:8,代码来源:ErrorController.php

示例11: index

 public function index()
 {
     $data['title'] = 'AdminController->index';
     $data['content'] = 'Thanks for logging in to admin!';
     $data['baseurl'] = Doo::conf()->APP_URL;
     $data['printr'] = $this->params;
     $this->view()->render('template', $data);
 }
开发者ID:mindaugas-valinskis,项目名称:doophp,代码行数:8,代码来源:AdminController.php

示例12: contact

 function contact()
 {
     $data['baseurl'] = Doo::conf()->APP_URL;
     $data['title'] = 'Contact Us';
     $data['content'] = 'You can access this~';
     $data['printr'] = 'Contact Us form.';
     $this->render('template', $data);
 }
开发者ID:mindaugas-valinskis,项目名称:doophp,代码行数:8,代码来源:PageController.php

示例13: show_news_by_title

 public function show_news_by_title()
 {
     $data['title'] = 'NewsController->show_news_by_title';
     $data['content'] = 'News title is ' . str_replace('%20', ' ', $this->params['title']);
     $data['baseurl'] = Doo::conf()->APP_URL;
     $data['printr'] = $this->params;
     $this->view()->render('template', $data);
 }
开发者ID:nofuyun,项目名称:tool,代码行数:8,代码来源:NewsController.php

示例14: showVipHome

 function showVipHome()
 {
     $data['baseurl'] = Doo::conf()->APP_URL;
     $data['title'] = 'VIP Lounge';
     $data['content'] = 'You can access this~';
     $data['printr'] = 'SuperDuber contents! Thanks for being a paid member :)';
     $this->render('template', $data);
 }
开发者ID:mindaugas-valinskis,项目名称:doophp,代码行数:8,代码来源:SnsController.php

示例15: moo

 public function moo()
 {
     $data['title'] = 'CamelCaseController->moo';
     $data['content'] = 'camel mooing??? Hell no!';
     $data['baseurl'] = Doo::conf()->APP_URL;
     $data['printr'] = $this->params;
     $this->view()->render('template', $data);
 }
开发者ID:mindaugas-valinskis,项目名称:doophp,代码行数:8,代码来源:CamelCaseController.php


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