當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。