Move libraries to autoload format
This commit is contained in:
parent
7ac0f6c850
commit
b4f758f0b5
8 changed files with 1009 additions and 23 deletions
|
|
@ -26,11 +26,24 @@ class TplController extends PhangoApp\PhaRouter\Controller {
|
|||
|
||||
if(isset($_SESSION['admin_login'])) {
|
||||
|
||||
if(isset($_SESSION['double_auth'])) {
|
||||
if(isset($_SESSION['double_auth']) && $this->path_info!='/admin/app/check_auth') {
|
||||
|
||||
//header('Location: '.PhangoApp\PhaRouter\Url::make_url('admin', 'app', ['check_auth']));
|
||||
header('Location: '.PhangoApp\PhaRouter\Url::make_url('admin', 'app', ['check_auth']));
|
||||
die;
|
||||
|
||||
} else {
|
||||
|
||||
$now=date("Y-m-d H:i:s");
|
||||
|
||||
$timestamp_5_min=strtotime($now)-300;
|
||||
$timestamp_last_login=strtotime($_SESSION['date_login']);
|
||||
|
||||
if($timestamp_5_min>$timestamp_last_login) {
|
||||
|
||||
header('Location: '.PhangoApp\PhaRouter\Url::make_url('admin', 'app', ['logout']));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue