本文整理汇总了PHP中Session::Get方法的典型用法代码示例。如果您正苦于以下问题:PHP Session::Get方法的具体用法?PHP Session::Get怎么用?PHP Session::Get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Session
的用法示例。
在下文中一共展示了Session::Get方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: check_user_login
function check_user_login()
{
global $ttH;
$login = 0;
$session_user_cur = Session::Get('user_cur', array());
$ttH->data['user_cur'] = isset($ttH->data['user_cur']) ? $ttH->data['user_cur'] : array();
if (count($ttH->data['user_cur']) >= 4) {
if ($ttH->data['user_cur']["user_id"] == $session_user_cur["userid"] && $ttH->data['user_cur']["username"] == $session_user_cur["username"] && $ttH->data['user_cur']["password"] == $session_user_cur["password"] && $ttH->data['user_cur']["session"] == $session_user_cur["session"]) {
return 1;
} else {
$arr_user = Session::Get('user_cur', array('userid' => '', 'username' => '', 'password' => '', 'session' => ''));
return 0;
}
} else {
$arr_user = Session::Get('user_cur', array('userid' => '', 'username' => '', 'password' => '', 'session' => ''));
$query = "select * from user where is_show=1 and user_id='" . $arr_user["userid"] . "'";
//echo $query;
$result = $ttH->db->query($query);
if ($row = $ttH->db->fetch_row($result)) {
if ($row["user_id"] == $arr_user["userid"] && $row["username"] == $arr_user["username"] && $row["password"] == $arr_user["password"] && $row["session"] == $arr_user["session"]) {
$row['arr_address_book'] = unserialize($row['arr_address_book']);
$ttH->data['user_cur'] = $row;
$login = 1;
}
}
}
return $login;
}
示例2: render
public function render()
{
?>
<table cellspacing="0" cellpadding="5">
<thead>
<th>Key</th>
<th>Value</th>
</thead>
<tbody>
<?php
foreach (Session::Get()->data as $key => $value) {
?>
<tr>
<td><?php
echo $key;
?>
</td>
<td><?php
if (is_array($value)) {
print_r($value);
} else {
echo $value;
}
?>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
<?php
}
示例3: displayPage
public function displayPage()
{
// Configure the theme
Theme::Set('id', 'LogGridForRefresh');
Theme::Set('form_meta', '<input type="hidden" name="p" value="auditlog"><input type="hidden" name="q" value="Grid">');
Theme::Set('filter_id', 'XiboFilterPinned' . uniqid('filter'));
Theme::Set('pager', ResponseManager::Pager('LogGridForRefresh'));
// Construct Filter Form
if (Kit::IsFilterPinned('auditlog', 'Filter')) {
$filter_pinned = 1;
$filterFromDt = Session::Get('auditlog', 'filterFromDt');
$filterToDt = Session::Get('auditlog', 'filterToDt');
$filterUser = Session::Get('auditlog', 'filterUser');
$filterEntity = Session::Get('auditlog', 'filterEntity');
} else {
$filter_pinned = 0;
$filterFromDt = NULL;
$filterToDt = NULL;
$filterUser = NULL;
$filterEntity = NULL;
}
// Fields
$formFields = array();
$formFields[] = FormManager::AddDatePicker('filterFromDt', __('From Date'), $filterFromDt, NULL, 'f');
$formFields[] = FormManager::AddDatePicker('filterToDt', __('To Date'), $filterToDt, NULL, 't');
$formFields[] = FormManager::AddText('filterUser', __('User'), $filterUser, NULL, 'u');
$formFields[] = FormManager::AddText('filterEntity', __('Entity'), $filterEntity, NULL, 'e');
$formFields[] = FormManager::AddCheckbox('XiboFilterPinned', __('Keep Open'), $filter_pinned, NULL, 'k');
// Call to render the template
Theme::Set('header_text', __('Audit Trail'));
Theme::Set('form_fields', $formFields);
Theme::Render('grid_render');
}
示例4: displayPage
/**
* Controls which pages are to be displayed
* @return
*/
function displayPage()
{
// Configure the theme
$id = uniqid();
Theme::Set('id', $id);
Theme::Set('displaygroup_form_add_url', 'index.php?p=displaygroup&q=AddForm');
Theme::Set('form_meta', '<input type="hidden" name="p" value="user"><input type="hidden" name="q" value="UserGrid">');
Theme::Set('filter_id', 'XiboFilterPinned' . uniqid('filter'));
Theme::Set('pager', ResponseManager::Pager($id));
if (Kit::IsFilterPinned('user_admin', 'Filter')) {
$filter_pinned = 1;
$filter_username = Session::Get('user_admin', 'filter_username');
$filter_usertypeid = Session::Get('user_admin', 'filter_usertypeid');
$filterRetired = Session::Get('user_admin', 'filterRetired');
} else {
$filter_pinned = 0;
$filter_username = NULL;
$filter_usertypeid = NULL;
$filterRetired = 0;
}
$formFields = array();
$formFields[] = FormManager::AddText('filter_username', __('Name'), $filter_username, NULL, 'n');
$usertypes = $this->db->GetArray("SELECT usertypeID, usertype FROM usertype ORDER BY usertype");
array_unshift($usertypes, array('usertypeID' => 0, 'usertype' => 'All'));
$formFields[] = FormManager::AddCombo('filter_usertypeid', __('User Type'), $filter_usertypeid, $usertypes, 'usertypeID', 'usertype', NULL, 't');
$formFields[] = FormManager::AddCombo('filterRetired', __('Retired?'), $filterRetired, array(array('retiredId' => -1, 'retired' => 'All'), array('retiredId' => 1, 'retired' => 'Yes'), array('retiredId' => 0, 'retired' => 'No')), 'retiredId', 'retired', NULL, 'r');
$formFields[] = FormManager::AddCheckbox('XiboFilterPinned', __('Keep Open'), $filter_pinned, NULL, 'k');
// Call to render the template
Theme::Set('header_text', __('Users'));
Theme::Set('form_fields', $formFields);
Theme::Render('grid_render');
}
示例5: displayPage
public function displayPage()
{
$db =& $this->db;
// Default options
if (Kit::IsFilterPinned('mediamanager', 'Filter')) {
$filter_pinned = 1;
$filter_layout_name = Session::Get('mediamanager', 'filter_layout_name');
$filter_region_name = Session::Get('mediamanager', 'filter_region_name');
$filter_media_name = Session::Get('mediamanager', 'filter_media_name');
$filter_type = Session::Get('mediamanager', 'filter_type');
} else {
$filter_pinned = 0;
$filter_layout_name = NULL;
$filter_region_name = NULL;
$filter_media_name = NULL;
$filter_type = 0;
}
$id = uniqid();
Theme::Set('id', $id);
Theme::Set('filter_id', 'XiboFilterPinned' . uniqid('filter'));
Theme::Set('pager', ResponseManager::Pager($id));
Theme::Set('form_meta', '<input type="hidden" name="p" value="mediamanager"><input type="hidden" name="q" value="MediaManagerGrid">');
$formFields = array();
$formFields[] = FormManager::AddText('filter_layout_name', __('Layout'), $filter_layout_name, NULL, 'l');
$formFields[] = FormManager::AddText('filter_region_name', __('Region'), $filter_region_name, NULL, 'r');
$formFields[] = FormManager::AddText('filter_media_name', __('Media'), $filter_media_name, NULL, 'm');
$types = $db->GetArray("SELECT moduleid AS moduleid, Name AS module FROM `module` WHERE Enabled = 1 ORDER BY 2");
array_unshift($types, array('moduleid' => 0, 'module' => 'All'));
$formFields[] = FormManager::AddCombo('filter_type', __('Type'), $filter_type, $types, 'moduleid', 'module', NULL, 't');
$formFields[] = FormManager::AddCheckbox('XiboFilterPinned', __('Keep Open'), $filter_pinned, NULL, 'k');
// Call to render the template
Theme::Set('header_text', __('Media Manager'));
Theme::Set('form_fields', $formFields);
Theme::Render('grid_render');
}
示例6: GetNotice
public static function GetNotice($type = self::MESSAGE_INDEX, $once = true)
{
$key = self::$messageKey . "_notice_{$type}";
$value = Session::Get($key, $once);
$value = trim($value, ', ');
return $value;
}
示例7: displayPage
function displayPage()
{
$db =& $this->db;
// Configure the theme
$id = uniqid();
Theme::Set('id', $id);
Theme::Set('form_meta', '<input type="hidden" name="p" value="sessions"><input type="hidden" name="q" value="Grid">');
Theme::Set('filter_id', 'XiboFilterPinned' . uniqid('filter'));
Theme::Set('pager', ResponseManager::Pager($id));
// Construct Filter Form
if (Kit::IsFilterPinned('sessions', 'Filter')) {
$filter_pinned = 1;
$filter_type = Session::Get('sessions', 'filter_type');
$filter_fromdt = Session::Get('sessions', 'filter_fromdt');
} else {
$filter_pinned = 0;
$filter_type = '0';
$filter_fromdt = NULL;
}
$formFields = array();
$formFields[] = FormManager::AddDatePicker('filter_fromdt', __('From Date'), $filter_fromdt, NULL, 't');
$formFields[] = FormManager::AddCombo('filter_type', __('Type'), $filter_type, array(array('typeid' => '0', 'type' => 'All'), array('typeid' => 'active', 'type' => 'Active'), array('typeid' => 'guest', 'type' => 'Guest'), array('typeid' => 'expired', 'type' => 'Expired')), 'typeid', 'type', NULL, 'd');
$formFields[] = FormManager::AddCheckbox('XiboFilterPinned', __('Keep Open'), $filter_pinned, NULL, 'k');
// Call to render the template
Theme::Set('header_text', __('Sessions'));
Theme::Set('form_fields', $formFields);
Theme::Render('grid_render');
}
示例8: GetDefault
/**
* Return default skin path from configuration
*/
private static function GetDefault()
{
/**
* Multilenguage Support
*/
$lang = Session::Get('lang');
if (!$lang) {
$default = Configuration::Query("/configuration/skins/skin[@default='1']");
/* We should have one default skin */
if (!$default) {
Error::Alert('Default Skin is not defined.');
}
/* Default skin should have the language defined */
$lang = $default->item(0)->getAttribute('lang');
if (empty($lang)) {
Error::Alert('Default Skin does not have a language defined.');
}
Session::Set('lang', $lang);
}
// Util::debug($lang);
$skin = Configuration::Query("/configuration/skins/skin[@lang='" . $lang . "']/path");
/* If there is not a skin for the language stored, something is really wrong */
if (!$skin) {
Session::Destroy('lang');
Error::Alert('Could not load the skin for language "' . $lang . '".');
}
$default = $skin->item(0)->nodeValue;
$subdir = Configuration::Query('/configuration/domain/@subdir');
if ($subdir) {
$default = '/' . $subdir->item(0)->nodeValue . $default;
}
return $default;
}
示例9: __construct
public function __construct($request)
{
$this->session = Session::Get();
$this->request = $request;
$this->metadata = AttributeReader::ClassAttributes($this);
$this->setup();
}
示例10: displayPage
/**
* Display page logic
*/
function displayPage()
{
$db =& $this->db;
// Default options
if (Kit::IsFilterPinned('template', 'Filter')) {
$pinned = 1;
$name = Session::Get('template', 'filter_name');
$tags = Session::Get('template', 'filter_tags');
$showThumbnail = Session::Get('template', 'showThumbnail');
} else {
$pinned = 0;
$name = '';
$tags = '';
$showThumbnail = 1;
}
$id = uniqid();
Theme::Set('header_text', __('Templates'));
Theme::Set('id', $id);
Theme::Set('filter_id', 'XiboFilterPinned' . uniqid('filter'));
Theme::Set('pager', ResponseManager::Pager($id));
Theme::Set('form_meta', '<input type="hidden" name="p" value="template"><input type="hidden" name="q" value="TemplateView">');
$formFields = array();
$formFields[] = FormManager::AddText('filter_name', __('Name'), $name, NULL, 'n');
$formFields[] = FormManager::AddText('filter_tags', __('Tags'), $tags, NULL, 't');
$formFields[] = FormManager::AddCheckbox('showThumbnail', __('Show Thumbnails'), $showThumbnail, NULL, 't');
$formFields[] = FormManager::AddCheckbox('XiboFilterPinned', __('Keep Open'), $pinned, NULL, 'k');
Theme::Set('form_fields', $formFields);
// Call to render the template
Theme::Render('grid_render');
}
示例11: displayPage
/**
* Displays the page logic
*/
function displayPage()
{
$db =& $this->db;
// Default options
if (Kit::IsFilterPinned('content', 'Filter')) {
Theme::Set('filter_pinned', 'checked');
Theme::Set('filter_name', Session::Get('content', 'filter_name'));
Theme::Set('filter_type', Session::Get('content', 'filter_type'));
Theme::Set('filter_retired', Session::Get('content', 'filter_retired'));
Theme::Set('filter_owner', Session::Get('content', 'filter_owner'));
Theme::Set('filter_duration_in_seconds', Session::Get('content', 'filter_duration_in_seconds'));
Theme::Set('filter_duration_in_seconds_checked', Theme::Get('filter_duration_in_seconds') == 1 ? 'checked' : '');
} else {
Theme::Set('filter_retired', 0);
Theme::Set('filter_duration_in_seconds', 0);
}
Theme::Set('library_form_add_url', 'index.php?p=content&q=displayForms');
$id = uniqid();
Theme::Set('id', $id);
Theme::Set('filter_id', 'XiboFilterPinned' . uniqid('filter'));
Theme::Set('pager', ResponseManager::Pager($id));
Theme::Set('form_meta', '<input type="hidden" name="p" value="content"><input type="hidden" name="q" value="LibraryGrid">');
// Field list for a "retired" dropdown list
Theme::Set('retired_field_list', array(array('retiredid' => 1, 'retired' => 'Yes'), array('retiredid' => 0, 'retired' => 'No')));
// Field list for a "owner" dropdown list
Theme::Set('owner_field_list', $db->GetArray("SELECT 0 AS UserID, 'All' AS UserName UNION SELECT DISTINCT user.UserID, user.UserName FROM `media` INNER JOIN `user` ON media.UserID = user.UserID "));
// Module types filter
$types = $db->GetArray("SELECT Module AS moduleid, Name AS module FROM `module` WHERE RegionSpecific = 0 AND Enabled = 1 ORDER BY 2");
array_unshift($types, array('moduleid' => '', 'module' => 'All'));
Theme::Set('module_field_list', $types);
// Call to render the template
Theme::Render('library_page');
}
示例12: displayPage
/**
* Controls which pages are to be displayed
* @return
*/
function displayPage()
{
// Configure the theme
$id = uniqid();
Theme::Set('id', $id);
Theme::Set('displaygroup_form_add_url', 'index.php?p=displaygroup&q=AddForm');
Theme::Set('form_meta', '<input type="hidden" name="p" value="user"><input type="hidden" name="q" value="UserGrid">');
Theme::Set('filter_id', 'XiboFilterPinned' . uniqid('filter'));
Theme::Set('pager', ResponseManager::Pager($id));
// Button URL's
Theme::Set('user_form_add_url', 'index.php?p=user&q=DisplayForm');
Theme::Set('myapplications_form_add_url', 'index.php?p=user&q=MyApplications');
if (Kit::IsFilterPinned('user', 'Filter')) {
Theme::Set('filter_pinned', 'checked');
Theme::Set('filter_username', Session::Get('user', 'filter_username'));
Theme::Set('filter_usertypeid', Session::Get('user', 'filter_usertypeid'));
} else {
Theme::Set('filter_usertypeid', 0);
}
// List of Displays this user has permission for
$usertypes = $this->db->GetArray("SELECT usertypeID, usertype FROM usertype ORDER BY usertype");
array_unshift($usertypes, array('usertypeID' => 0, 'usertype' => 'All'));
Theme::Set('usertype_field_list', $usertypes);
// Render the Theme and output
Theme::Render('user_page');
}
示例13: cerrar
public function cerrar()
{
$bitacora_inicio_cerrar = $this->_admin->bitacora_login_cerrar(Session::Get('id_usuario'));
//Se destruyen todas las variables de sesión
Session::destroy();
//Se redirecciona a otra página
$this->redireccionar('principal/principal');
}
示例14: __construct
/**
* Constructor
*
* @param Component Parent component, null if none.
*/
public function __construct(View $view = null, $content = null)
{
$this->view = $view;
if ($view) {
$this->controller = $view->controller;
}
$this->session = Session::Get();
$this->content = $content;
}
示例15: GetBizLoginId
/**
* Get the login user id in wap
* @author abei <abei@qiang8.cn>
* @version 20131028
*/
static public function GetBizLoginId(){
$bizer_id = abs(intval(Session::Get('partner_mobile_id')));
if (!$bizer_id) {
$bizer = self::GetRemeberPwdForWapBiz();
$bizer_id = $bizer['id'];
}
if ($bizer_id) self::BizLogin($bizer_id);
return $bizer_id;
}