first commit
This commit is contained in:
47
admin/checktimeout.php
Normal file
47
admin/checktimeout.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
use KupShop\KupShopBundle\Util\Compat\ServiceContainer;
|
||||
|
||||
class Checktimeout extends Window
|
||||
{
|
||||
public function get_vars()
|
||||
{
|
||||
$vars = parent::get_vars();
|
||||
|
||||
$pageVars = getVal('body', $vars);
|
||||
|
||||
if (getVal('frame')) {
|
||||
$this->setTemplate('window/checktimeoutFrame.tpl');
|
||||
} else {
|
||||
$this->setTemplate('window/checktimeoutWindow.tpl');
|
||||
}
|
||||
|
||||
$session = ServiceContainer::getService('session');
|
||||
|
||||
$pageVars['expiry'] = $session->get('_expiry');
|
||||
$pageVars['time'] = time();
|
||||
|
||||
$vars['body'] = $pageVars;
|
||||
|
||||
return $vars;
|
||||
}
|
||||
|
||||
public function handle()
|
||||
{
|
||||
}
|
||||
|
||||
public function hasRights($name = null)
|
||||
{
|
||||
switch ($name) {
|
||||
case Window::RIGHT_SAVE:
|
||||
case Window::RIGHT_DELETE:
|
||||
case Window::RIGHT_DUPLICATE:
|
||||
return false;
|
||||
default:
|
||||
return parent::hasRights($name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$checktimeout = new Checktimeout();
|
||||
$checktimeout->run();
|
||||
Reference in New Issue
Block a user