Exemplo n.º 1
0
 public static function getLoginUserTypeAdmin()
 {
     $err = true;
     if (SessionHandlers::isSetSession(User::SESSION_USER)) {
         $err = false;
         $log_user = new User();
         $log_user = SessionHandlers::getObjSession(User::SESSION_USER);
         if ($log_user->getStatus() == $log_user::STATUS_ADMIN) {
             return $log_user;
         } else {
             $err = true;
         }
     }
     if ($err) {
         self::pageError(User::LOGIN_FAIL);
         die;
     }
 }
Exemplo n.º 2
0
<?php

$foodList = SessionHandlers::getObjSession("foodList");
//SessionHandlers::destroySession('foodList');
?>
				
<table class="table table-th-block table-dark">
	<thead>
		<tr>
			<th style="width: 100px"><?php 
i18n::getLabel("food.id");
?>
</th>
			<th><?php 
i18n::getLabel("food.image");
?>
</th>
			<th><?php 
i18n::getLabel("food.name");
?>
</th>
			<th><?php 
i18n::getLabel("food.price");
?>
</th>
			<th><?php 
i18n::getLabel("food.type");
?>
</th>
			<th><?php 
i18n::getLabel("food.counttype");
Exemplo n.º 3
0
 public function getSession()
 {
     SessionHandlers::getObjSession(self::SESSION_USER);
 }
Exemplo n.º 4
0
 public function getSession()
 {
     return SessionHandlers::getObjSession(self::SESSIONNAME);
 }
Exemplo n.º 5
0
<?php

$page = CREATE;
$user = new User();
$edit = false;
if ($_GET[VIEW] == EDIT) {
    $edit = true;
    $user = SessionHandlers::getObjSession('edit_user');
    //SessionHandlers::destroySession('edit_user');
    $page = EDIT;
}
?>
<div class="container-fluid">
	<h1 class="page-heading"><?php 
i18n::getLabel("message.user.manageuser.title");
?>
</h1>
	<div class="the-box rounded">
		<form id="UserForm" method="post" class="form-horizontal"
			action="controls/UserControl.php?<?php 
echo $page;
?>
"
			data-bv-message="This value is not valid"
			data-bv-feedbackicons-valid="glyphicon glyphicon-ok"
			data-bv-feedbackicons-invalid="glyphicon glyphicon-remove"
			data-bv-feedbackicons-validating="glyphicon glyphicon-refresh">
			<input type="hidden" name="id" value="<?php 
echo $user->getId();
?>
"/>