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


PHP Sessions::get方法代码示例

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


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

示例1: checkCRF

 /**
  * Check token submitted
  * @param $token
  * @return bool
  */
 public static function checkCRF($token)
 {
     if (!$token) {
         return false;
     }
     return Sessions::get('current_token') != trim($token) ? false : true;
 }
开发者ID:rivomanana,项目名称:rv-slim-base,代码行数:12,代码来源:Token.php

示例2: logout

 public function logout()
 {
     /*
      * compares session token against get method to see if it's the actual user
      */
     if (Sessions::get('token') == Requests::get('token')) {
         Sessions::destroy();
     }
 }
开发者ID:nc1991,项目名称:Basic-MVC,代码行数:9,代码来源:UserController.php

示例3: loginCheck

 public static function loginCheck()
 {
     global $db;
     if (Sessions::get("login")) {
         $username = Session::get("login")['username'];
         if ($username) {
             $kontrol = $db->query("SELECT username FROM username = '{$username}'")->rowCount();
             return $kontrol ? true : false;
         }
     } else {
         return false;
     }
 }
开发者ID:vahitserifsaglam1,项目名称:ozsa-src,代码行数:13,代码来源:Security.php

示例4: Sessions

$pagetitle = "My Sessions";
require_once 'includes/header.php';
echo '<h3 class="text-center">My Sessions</h3><br>';
$s = new Sessions();
?>

<div class="row">
	<div class="col-md-10 col-md-offset-1">
		<div class="panel panel-primary">
			<div class="panel-heading">
				<h3 class="panel-title">Forthcoming Sessions</h3>
			</div>
			<div class="panel-body">
				<?php 
try {
    $sessions = $s->get(array('student' => $user->data()->id, 'future' => 1));
    if (!empty($sessions)) {
        ?>
					<table class="table table-condensed table-striped">
						<tr>
							<td>
								<strong>Mentor</strong>
							</td>
							<td>
								<strong>Program</strong>
							</td>
							<td>
								<strong>Position</strong>
							</td>
							<td>
								<strong>Type</strong>
开发者ID:Ashilta,项目名称:VATeir,代码行数:31,代码来源:sessions.php

示例5: foreach

			    <h3 class="panel-title">The following errors occured:</h3>
			  </div>
			  <div class="panel-body">';
        foreach ($validation->errors() as $error) {
            echo $error . '<br>';
        }
        echo '</div>
			</div>
		</div>
		';
    }
}
// else {
try {
    $s = new Sessions();
    $session = $s->get(['id' => Input::get('s')])[0];
    $type = $r->getTypes(0, ['type' => $session->report_type])[0];
    $positions = $r->getPositionsByProgram($type->program_id);
    //get all positions for this program level
    $sliders = $r->getSliders(1, $type->program_id);
    if (!count($type)) {
        Session::flash('error', 'No report type found for that ID');
        Redirect::to('./view_student.php?cid=' . $session->student);
    }
    if (!$user->hasPermission($session->program_permissions)) {
        Session::flash('error', 'Insufficient permissions');
        Redirect::to('./');
    }
} catch (Exception $e) {
    echo $e->getMessage();
}
开发者ID:Ashilta,项目名称:VATeir,代码行数:31,代码来源:add_report.php

示例6: Sessions

$pagetitle = "My Sessions";
require_once '../includes/header.php';
echo '<h3 class="text-center">My Sessions</h3><br>';
$s = new Sessions();
?>

<div class="row">
	<div class="col-md-10 col-md-offset-1">
		<div class="panel panel-primary">
			<div class="panel-heading">
				<h3 class="panel-title">Forthcoming Sessions</h3>
			</div>
			<div class="panel-body">
				<?php 
try {
    $sessions = $s->get(array('mentor' => $user->data()->id, 'future' => 1));
    if (!empty($sessions)) {
        ?>
					<table class="table table-condensed table-striped">
						<tr>
							<td>
								<strong>Student</strong>
							</td>
							<td>
								<strong>Program</strong>
							</td>
							<td>
								<strong>Position</strong>
							</td>
							<td>
								<strong>Type</strong>
开发者ID:Ashilta,项目名称:VATeir,代码行数:31,代码来源:my_sessions.php

示例7: Sessions

<?php

//llamamos la constante URL
require '../util/constants.php';
//controlamos que se haya iniciado session.
require '../class/sessions.php';
$objSes = new Sessions();
$objSes->init();
$profile = $objSes->get('profi');
if (!isset($profile) && $profile != 'Admin') {
    header('location: ' . URL);
}
if (isset($_POST['nombre'])) {
    require '../class/books.php';
    $objBook = new Books();
    $objBook->insert_book();
} else {
    header('location: ' . URL . 'admin/');
}
开发者ID:dareyesm,项目名称:paginadorPHP,代码行数:19,代码来源:newB_exe.php

示例8: Sessions

				</table>
			</div>
		</div>
	</div>
</div>
<div class="row">
	<div class="col-md-6">
		<div class="panel panel-default">
			<div class="panel-heading">
				<h3 class="panel-title">Sessions without reports</h3>
			</div>
			<div class="panel-body" style="padding:0px;">
			<?php 
try {
    $s = new Sessions();
    $noreport = $s->get(array('all' => 1, 'noreport' => 1, 'future' => 2));
    if (!empty($noreport)) {
        ?>
					<table class="table table-condensed table-striped">
						<tr>
							<td>
								<strong>Student</strong>
							</td>
							<td>
								<strong>Mentor</strong>
							</td>
							<td>
								<strong>Position</strong>
							</td>
							<td>
								<strong>Date</strong>
开发者ID:Ashilta,项目名称:VATeir,代码行数:31,代码来源:index.php


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