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


PHP Utils::load_client_files方法代码示例

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


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

示例1: class1

 public function class1()
 {
     $this->template->content = View::instance("v_javascript_class1");
     $client_files = array("/js/class1.js");
     $this->template->client_files = Utils::load_client_files($client_files);
     echo $this->template;
 }
开发者ID:nvarney,项目名称:dwa,代码行数:7,代码来源:c_javascriptOld.php

示例2: __construct

 public function __construct()
 {
     parent::__construct();
     #Specific css is added to an array which already has one element from the parent constructor method.
     #$this->$client_files[] = "/css/users.css"; # doesn't work so I use the following array_push invocation instead
     array_push($this->client_files, "/css/users.css");
     # this works
     $this->template->client_files = Utils::load_client_files($this->client_files);
 }
开发者ID:rtizard,项目名称:dwa,代码行数:9,代码来源:c_users.php

示例3: proposal

 public function proposal()
 {
     //     array_push($this->client_files, "/css/styleProposal.css");
     $this->client_files[0] = "/css/styleProposal.css";
     // replace sitewide.css, don't add an element to the array
     $this->template->client_files = Utils::load_client_files($this->client_files);
     $this->template->content = View::instance('v_index_proposal');
     echo $this->template;
 }
开发者ID:rtizard,项目名称:dwa,代码行数:9,代码来源:c_index.php

示例4: cardgenerator

 public function cardgenerator()
 {
     # Set up the view
     $this->template->content = View::instance("v_javascript_cardgenerator");
     # Specify what JS/CSS files we need to load in the view
     $client_files = array("/css/cardgenerator.css", "/js/cardgenerator.js");
     # Load the above specified files
     $this->template->client_files = Utils::load_client_files($client_files);
     # Render the view
     echo $this->template;
 }
开发者ID:rebekahheacock,项目名称:dwa15-archive,代码行数:11,代码来源:c_javascript.php

示例5: index

 public function index()
 {
     # Any method that loads a view will commonly start with this
     # First, set the content of the template with a view file
     $this->template->active_tab = 'home';
     $this->template->body = View::instance('v_index_landing');
     # If this view needs any JS or CSS files, add their paths to this array so they will get loaded in the head
     $client_files = array("");
     $this->template->client_files = Utils::load_client_files($client_files);
     # Render the view
     echo $this->template;
 }
开发者ID:nbotchan,项目名称:dwa,代码行数:12,代码来源:c_index.php

示例6: __construct

 public function __construct()
 {
     parent::__construct();
     #Specific css is added to an array which already has one element from the parent constructor method.
     array_push($this->client_files, "/css/posts.css");
     # this works
     $this->template->client_files = Utils::load_client_files($this->client_files);
     # Make sure user is logged in if they want to use anything in this controller
     if (!$this->user) {
         Router::redirect('/users/signupOrLogin/');
     }
 }
开发者ID:rtizard,项目名称:dwa,代码行数:12,代码来源:c_posts.php

示例7: index

 public function index()
 {
     # Any method that loads a view will commonly start with this
     # First, set the content of the template with a view file
     $this->template->content = View::instance('v_index_index');
     # Now set the <title> tag
     $this->template->title = "HSPH Helpdesk";
     # If this view needs any JS or CSS files, add their paths to this array so they will get loaded in the head
     $client_files = array("");
     $this->template->client_files = Utils::load_client_files($client_files);
     # Render the view
     echo $this->template;
 }
开发者ID:nvarney,项目名称:dwa_prod,代码行数:13,代码来源:c_index.php

示例8: __construct

 public function __construct()
 {
     parent::__construct();
     # Make sure user is logged in if they want to use anything in this controller
     if (!$this->user) {
         # Send them to login or signup
         Router::redirect("/users/signupOrLogin/");
     }
     array_push($this->client_files, "/css/requests.css");
     array_push($this->client_files, "/js/requests.js");
     array_push($this->client_files, "ajax.googleapis.com/ajax/libs/jqueryui/1.9.1/jquery-ui.min.js");
     $this->template->client_files = Utils::load_client_files($this->client_files);
 }
开发者ID:rtizard,项目名称:dwa,代码行数:13,代码来源:c_requests.php

示例9: index

 public function index()
 {
     # Any method that loads a view will commonly start with this
     # First, set the content of the template with a view file
     $this->template->content = View::instance('v_index_index');
     # Now set the <title> tag
     $this->template->title = "p2.neokobe.com";
     # If this view needs any JS or CSS files, add their paths to this array so they will get loaded in the head
     $client_files = array("views/css/main.css", "views/js/modernizr-2.6.1.min.js");
     $this->template->client_files = Utils::load_client_files($client_files);
     # Render the view
     echo $this->template;
 }
开发者ID:rayden7,项目名称:p2.neokobe.com,代码行数:13,代码来源:c_index.php

示例10: __construct

 public function __construct()
 {
     parent::__construct();
     # Make sure user is logged in if they want to use anything in this controller
     if (!$this->user) {
         # Send them to login or signup
         Router::redirect("/users/signupOrLogin/");
     }
     #Specific css is added to an array which already has one element from the parent constructor method.
     #$this->$client_files[] = "/css/users.css"; # doesn't work so I use the following array_push invocation instead
     array_push($this->client_files, "/css/peptide.css");
     # this works
     array_push($this->client_files, "//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js");
     array_push($this->client_files, "//ajax.googleapis.com/ajax/libs/jqueryui/1.9.1/jquery-ui.min.js");
     array_push($this->client_files, "http://code.jquery.com/ui/1.9.1/themes/base/jquery-ui.css");
     array_push($this->client_files, "/js/peptide.js");
     $this->template->client_files = Utils::load_client_files($this->client_files);
 }
开发者ID:rtizard,项目名称:dwa,代码行数:18,代码来源:c_peptide.php

示例11: profile

 public function profile($user_name)
 {
     #only want logged in users
     if (!$this->user) {
         echo "Members only, please login";
         return false;
     } else {
         # Setup the view
         $this->template->content = View::instance("v_users_profile");
         $this->template->title = $user_name . "'s Profile";
         $this->template->content->user_name = $user_name;
         # Setup client Files
         $client_files = array("/css/users.css", "/js/users.js");
         $this->template->client_files = Utils::load_client_files($client_files);
         # Render the view
         echo $this->template;
     }
 }
开发者ID:nvarney,项目名称:dwa,代码行数:18,代码来源:c_users.php

示例12: index

 public function index()
 {
     # If user is blank, they are not logged in, show the message and don't do anything
     if (!$this->user) {
         echo "Members only. <a href='/users/login'>Login</a>";
         # Return will force this method to exit here so the rest of the code won't be executed and the profile view won't be displayed.
         return false;
     }
     # Any method that loads a view will commonly start with this
     # First, set the content of the template with a view file
     $this->template->content = View::instance('v_calendar');
     # Now set the <title> tag
     $this->template->title = "Event Calendar of " . $this->user->first_name;
     # If this view needs any JS or CSS files,
     # add their paths to this array so they will get loaded in the head
     $client_files = array("");
     $this->template->client_files = Utils::load_client_files($client_files);
     # Render the view
     echo $this->template;
 }
开发者ID:rupeshmore85,项目名称:dwa,代码行数:20,代码来源:c_calendar.php

示例13: add

 public function add()
 {
     # Set up the view
     $this->template->content = View::instance("v_posts_add");
     $this->template->title = "Add a new post";
     # Set up client files
     $client_files = array("/js/jquery.form.js");
     $this->template->client_files = Utils::load_client_files($client_files);
     # Render the view
     echo $this->template;
 }
开发者ID:rebekahheacock,项目名称:dwa15-archive,代码行数:11,代码来源:c_posts.php

示例14: friends

 public function friends()
 {
     # remove any old "following" notices
     unset($_SESSION['following_notice']);
     $this->template->content = View::instance('v_posts_all');
     # Now set the <title> tag
     $this->template->title = "My Friend's Posts";
     $this->template->content->title = $this->template->title;
     $client_files = array("/views/css/main.css", "/views/js/modernizr-2.6.1.min.js");
     $this->template->client_files = Utils::load_client_files($client_files);
     # look up ALL the posts from the database, including user information
     # so that we can show the follow / unfollow links
     $q = "\n              SELECT   p.post_id,\n                       p.created AS post_created,\n                       p.modified AS post_modified,\n                       p.content AS post_content,\n                       u.user_id,\n                       u.first_name,\n                       u.last_name,\n                       u.email,\n                       u.username\n              FROM     posts AS p\n                       JOIN users AS u USING(user_id)\n                       JOIN users_users AS uu ON uu.user_id_followed = u.user_id\n              WHERE    uu.user_id = " . $this->user->user_id . "\n              ORDER BY p.created DESC\n             ";
     $friend_posts = DB::instance(DB_NAME)->select_rows($q);
     # pass the posts variable to the template, by creating a "posts" variable "on-the-fly"
     $this->template->content->all_posts = $friend_posts;
     echo $this->template;
 }
开发者ID:rayden7,项目名称:p2.neokobe.com,代码行数:18,代码来源:c_posts.php

示例15: all

 public function all()
 {
     // only show the profile page for logged-in users and those that have the correct session data (inluding their user_id)
     if (!$this->user || !isset($_SESSION['user']['user_id'])) {
         $this->template->content = View::instance('v_users_login');
         $this->template->title = "Members Only";
         $client_files = array("/views/css/main.css", "/views/js/modernizr-2.6.1.min.js");
         $this->template->client_files = Utils::load_client_files($client_files);
         $this->template->content->error_title = "Members Only";
         $_SESSION['users']['errors'][] = "Please use the login form at the top of the page.";
         echo $this->template;
         die;
     }
     # Get all the users and how many posts they have submitted
     $q = "\n              SELECT     u.user_id,\n                         u.first_name,\n                         u.last_name,\n                         u.username,\n                         CASE\n                             WHEN\n                                 (SELECT COUNT(*)\n                                  FROM   users_users uu\n                                  WHERE  uu.user_id = " . $_SESSION['user']['user_id'] . "\n                                         AND uu.user_id_followed = u.user_id\n                                 ) > 0\n                             THEN 1\n                             ELSE 0\n                         END as currentlyFollowing,\n                         (\n                             SELECT     COUNT(*)\n                             FROM       posts p\n                             WHERE      p.user_id = u.user_id\n                         ) AS total_posts\n              FROM       users u\n              WHERE u.user_id != " . $_SESSION['user']['user_id'] . "\n              ORDER BY total_posts DESC\n             ";
     $all_users = DB::instance(DB_NAME)->select_rows($q);
     if ($all_users != null) {
         // prepare the view for display
         $this->template->content = View::instance('v_users_all');
         $this->template->title = "All Users";
         $this->template->content->title = $this->template->title;
         $client_files = array("/views/css/main.css", "/views/js/modernizr-2.6.1.min.js");
         $this->template->client_files = Utils::load_client_files($client_files);
         $this->template->content->all_users = $all_users;
         echo $this->template;
     } else {
         $this->template->content = View::instance('v_users_error');
         $this->template->title = "No users!";
         $this->template->content->title_error = $this->template->title;
         $client_files = array("/views/css/main.css", "/views/js/modernizr-2.6.1.min.js");
         $_SESSION['users']['errors'][] = "Sorry, the site currently has no users!  Quick, <a href=\"/users/signup\">sign up for a new account</a> yourself!";
         $this->template->client_files = Utils::load_client_files($client_files);
         echo $this->template;
     }
 }
开发者ID:rayden7,项目名称:p2.neokobe.com,代码行数:35,代码来源:c_users.php


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