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


PHP Session::pull方法代码示例

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


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

示例1: index

 public function index()
 {
     $data['title'] = 'Home';
     $data['css'] = 'app/templates/landing/css/LandingPage.css';
     $data['activation_success'] = Session::pull('activation_success');
     $data['activation_error'] = Session::pull('activation_error');
     $data['logged'] = Session::get('loggedin');
     $data = $this->handleHeader(null, $data);
     $data = $this->model->getStats($data);
     View::renderTemplate('header', $data, 'landing');
     View::render('landing/landing', $data);
 }
开发者ID:umihnea,项目名称:e-learning.inkdrop,代码行数:12,代码来源:Landing.php

示例2: newGroup2

 public function newGroup2()
 {
     /*
      *   cookie
      */
     if (!isset($_COOKIE['unfinished_group'])) {
         Url::redirect(DIR . 'teacher/new-group', true);
     }
     /*
      *   search
      */
     $searchModel = new \Models\MemberSearch();
     $searchModel->handleSearch($_POST);
     if (isset($_SESSION['smvc_search_message'])) {
         $data['search_message'] = Session::pull('search_message');
     }
     if (isset($_SESSION['smvc_search_results'])) {
         $data['search_results'] = Session::get('search_results');
     }
     /*
      *   add & delete
      */
     $groupModel = new \Models\GroupModel();
     $data['member_list'] = $groupModel->getGroupMembers();
     if (!is_array($data['member_list'])) {
         unset($data['member_list']);
     }
     if (isset($_POST['add'])) {
         $id = (int) $_POST['id'];
         $data['add_error'] = $groupModel->addGroupMember($id);
         Url::redirect(DIR . 'teacher/new-group-2', true);
     }
     if (isset($_POST['del'])) {
         $id = (int) $_POST['id'];
         $data['del_error'] = $groupModel->delGroupMember($id);
         Url::redirect(DIR . 'teacher/new-group-2', true);
     }
     /*
      *   view
      */
     $data['title'] = 'Add Members';
     $data['username'] = Session::get('username');
     View::renderTemplate('teacher-header', $data, 'teacher-dashboard');
     View::renderTemplate('teacher-sidebar', $data, 'teacher-dashboard');
     View::render('teacher-dashboard/group-members-form', $data);
 }
开发者ID:umihnea,项目名称:e-learning.inkdrop,代码行数:46,代码来源:TeacherDashboard.php

示例3: foreach

<div class="row">
    <div class="col-xs-12">
        <div class="panel panel-default mtop15">
            <div class="panel-heading">
                <h3 class="panel-title">Members</h3>
                <div class="pull-right mtop-20">
                    <a href="<?php 
echo DIR;
?>
admin/members/add" class="btn btn-xs btn-default" title="Add Member"><i class="fa fa-plus"></i></a>
                </div> 
            </div>
            
            <div class="panel-body">
                <?php 
echo Session::pull('message');
?>
                <table class='table table-striped table-hover table-bordered responsive'>
                    <tr>
                        <th>Login</th>
                        <th>Email</th>
                        <th>Action</th>
                    </tr>
                    <?php 
if ($data['members']) {
    foreach ($data['members'] as $row) {
        echo "<tr>";
        echo "<td>{$row->member_username}</td>";
        echo "<td>{$row->member_email}</td>";
        echo "<td><a href='" . DIR . "admin/members/edit/{$row->member_id}'>Editer</a></td>";
        echo "</tr>";
开发者ID:T-PHP,项目名称:Simple-MVC-Blog,代码行数:31,代码来源:members.php

示例4:

                <button type="button" onclick="document.getElementById('captchaImage').src= 
                '<?php 
echo $rainCaptcha->getImage();
?>
&morerandom=' + Math.floor(Math.random() * 10000);">New captcha</button>
                <?php 
if (isset($error["captcha"])) {
    ?>
                    <div class="error">
                         <?php 
    echo $error["captcha"];
    ?>
                    </div>
                <?php 
}
?>
            </div>
            <div class="p">
                <?php 
echo Form::input(array("name" => "register_button", "value" => "Register", "type" => "submit"));
?>
            </div>
        <?php 
echo Form::close();
?>
        <span id="success_message"><?php 
echo Session::pull("message");
?>
</span>
    </div>
</div>
开发者ID:Trettman,项目名称:Something,代码行数:31,代码来源:register.php

示例5: message

 /**
  * Display a one time Message, then clear it from the Session.
  *
  * @param  string $name default Session name
  *
  * @return string
  */
 public static function message($name = 'success')
 {
     if (!static::exists($name)) {
         return null;
     }
     // Pull the Message from Session.
     $message = Session::pull($name);
     if (is_array($message)) {
         // The Message is structured in the New Style.
         $name = $message['type'];
         $message = $message['text'];
     }
     // Prepare the allert Type and Icon.
     $type = null;
     switch ($name) {
         case 'info':
             $icon = 'info';
             break;
         case 'warning':
             $icon = 'warning';
             break;
         case 'danger':
             $icon = 'bomb';
             break;
         default:
             $icon = 'check';
             $type = 'success';
     }
     $type = $type !== null ? $type : $name;
     // Fetch the associated Template Fragment and return the result.
     return Template::make('message', compact('type', 'icon', 'message'))->render();
 }
开发者ID:LuckyCyborg,项目名称:simple-mvc-framework,代码行数:39,代码来源:Session.php


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