Files
project-pro.pl/autoload/admin/view/class.Page.php
Jacek Pyziak a956ec670d Refactor settings retrieval and improve article rendering
- Cleaned up whitespace in `class.Settings.php` for better readability.
- Enhanced `class.Articles.php` to allow optional template parameter in the `news` method.
- Updated regex patterns in `class.Site.php` for better matching of news parameters.
- Streamlined HTML generation in `class.Site.php` by reducing redundancy and improving readability.
- Improved handling of SEO metadata and canonical links in `class.Site.php`.
- Refactored calendar and visit counter methods for consistency in `class.Site.php`.
2025-12-09 23:25:54 +01:00

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' );
}
}
?>