Fixes in settings admin
This commit is contained in:
parent
2df08a0e7d
commit
e3775e1045
6 changed files with 597 additions and 14 deletions
|
|
@ -12,7 +12,7 @@ class TplController extends PhangoApp\PhaRouter\Controller {
|
|||
|
||||
session_start();
|
||||
|
||||
$useradmin=new WPDO\WTable('useradmin', ['id', 'username', 'password', 'email', 'double_auth', 'auth_token']);
|
||||
$useradmin=new WPDO\WTable('useradmin', ['id', 'username', 'password', 'email', 'double_auth', 'auth_token', 'theme']);
|
||||
|
||||
$login_tries=new WPDO\WTable('login_tries', ['ip', 'num_tries', 'date']);
|
||||
|
||||
|
|
@ -28,11 +28,6 @@ class TplController extends PhangoApp\PhaRouter\Controller {
|
|||
|
||||
if(isset($_SESSION['double_auth']) && $this->path_info!='/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;
|
||||
|
|
@ -43,8 +38,16 @@ class TplController extends PhangoApp\PhaRouter\Controller {
|
|||
header('Location: '.PhangoApp\PhaRouter\Url::make_url('admin', 'app', ['logout']));
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
}
|
||||
header('Location: '.PhangoApp\PhaRouter\Url::make_url('admin', 'app', ['check_auth']));
|
||||
|
||||
}
|
||||
|
||||
die;
|
||||
|
||||
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue