first commit

This commit is contained in:
2025-04-30 23:59:49 +02:00
commit 652863d54f
117 changed files with 12276 additions and 0 deletions

9
autoload/view/.htaccess Normal file
View File

@@ -0,0 +1,9 @@
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

View File

@@ -0,0 +1,11 @@
<?php
namespace view;
class Cron
{
public static function main_view()
{
$tpl = new \Tpl;
return $tpl -> render( 'cron/main-view' );
}
}

View File

@@ -0,0 +1,36 @@
<?php
namespace view;
class Site
{
public static function show()
{
global $user;
$class = '\controls\\';
$results = explode( '_', \S::get( 'module' ) );
if ( is_array( $results ) ) foreach ( $results as $row )
$class .= ucfirst( $row );
$action = \S::get( 'action' );
$tpl = new \Tpl;
$tpl -> content = \controls\Site::route();
if ( ( $class == '\controls\Apanel' && $action != 'login_view' ) && !$user )
{
header( 'Location: /apanel/login_view/' );
exit;
// return $tpl -> render( 'site/layout-unlogged' );
}
else
{
if ( $alert = \S::get_session( 'alert' ) )
{
$tpl -> alert = $alert;
unset( $_SESSION['alert'] );
}
return $tpl -> render( 'site/layout-logged' );
}
}
}

View File

@@ -0,0 +1,18 @@
<?php
namespace view;
class Users
{
public static function points_history( $user )
{
$tpl = new \Tpl;
$tpl -> user = $user;
return $tpl -> render( 'users/points-history' );
}
public static function settings( $user )
{
$tpl = new \Tpl;
$tpl -> user = $user;
return $tpl -> render( 'users/settings' );
}
}