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


PHP Flight::jsrender方法代码示例

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


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

示例1: admin_manage

 public static function admin_manage()
 {
     Flight::cssrender("/public/js/select2/select2.css");
     Flight::cssrender("/public/js/select2/select2-bootstrap.css");
     Flight::cssrender("/public/css/bootstrap-datepicker.min.css");
     Flight::cssrender("/public/css/bootstrap-datepicker3.min.css");
     Flight::jsrender("/public/js/select2/select2.min.js");
     Flight::jsrender("/public/js/select2/select2_locale_zh-CN.js");
     Flight::jsrender("/public/js/bootstrap-datepicker.min.js");
     Flight::jsrender("/public/js/bootstrap-datepicker.zh-CN.min.js");
     Flight::jsrender("/public/js/bootbox.min.js");
     Flight::jsrender("/public/js/admin/admin_manage.js");
     Flight::render("admin/admin_manage");
 }
开发者ID:August2012,项目名称:Salary,代码行数:14,代码来源:Admin.php

示例2: index

 public static function index()
 {
     Flight::jsrender('/public/js/admin/service.js');
     Flight::render('service/index');
 }
开发者ID:August2012,项目名称:Salary,代码行数:5,代码来源:Service.php

示例3: change_info

 /**
  * 修改密码
  *
  * @return [type]     [description]
  * @author zhaozl
  * @since  2015-09-21
  */
 public static function change_info()
 {
     if (IS_POST) {
         $data = Flight::request()->data;
         $email = isset($data['email']) ? $data['email'] : '';
         $phone = isset($data['phone']) ? $data['phone'] : '';
         if (Session::get('is_admin')) {
             if (Flight::get('db')->has('admin', array("AND" => array('admin_phone' => $phone, "admin_id[!]" => Session::get('admin_id'))))) {
                 Flight::json(array("success" => false, "message" => "此手机号码已经被别人使用"));
                 die;
             }
             $id = Flight::get('db')->update('admin', array("admin_email" => $email, "admin_phone" => $phone), array("admin_id" => Session::get('admin_id')));
         } else {
             if (Flight::get('db')->has('services', array("AND" => array('ser_phone' => $phone, "ser_id[!]" => Session::get('ser_id'))))) {
                 Flight::json(array("success" => false, "message" => "此手机号码已经被别人使用"));
                 die;
             }
             $id = Flight::get('db')->update('services', array("ser_email" => $email, "ser_phone" => $phone), array("ser_id" => Session::get('ser_id')));
         }
         if ($id) {
             Flight::json(array("success" => true, "message" => "修改成功"));
         } else {
             Flight::json(array("success" => false, "message" => "修改失败"));
         }
     } else {
         if (Session::get('is_admin')) {
             $data = Flight::get("db")->get("admin", array("admin_email", "admin_phone"), array("admin_id" => Session::get('admin_id')));
             $res['email'] = $data['admin_email'];
             $res['phone'] = $data['admin_phone'];
         } else {
             $data = Flight::get("db")->get("services", array("ser_email", "ser_phone"), array("ser_id" => Session::get('ser_id')));
             $res['email'] = $data['ser_email'];
             $res['phone'] = $data['ser_phone'];
         }
         Flight::jsrender('/public/js/user/change_info.js');
         Flight::render('user/change_info', $res);
     }
 }
开发者ID:August2012,项目名称:Salary,代码行数:45,代码来源:User.php


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