23 lines
419 B
PHP
23 lines
419 B
PHP
<?php
|
|
namespace admin\view;
|
|
|
|
class Page {
|
|
|
|
public static function show()
|
|
{
|
|
global $user;
|
|
|
|
if ( $_GET['module'] == 'user' && $_GET['action'] == 'twofa' ) {
|
|
return \admin\controls\Users::twofa();
|
|
}
|
|
|
|
if ( !$user || !$user['admin'] )
|
|
return \admin\view\Users::login_form();
|
|
|
|
$tpl = new \Tpl;
|
|
$tpl -> content = \admin\Site::route();
|
|
return $tpl -> render( 'site/main-layout' );
|
|
}
|
|
}
|
|
?>
|