first commit
This commit is contained in:
9
autoload/view/.htaccess
Normal file
9
autoload/view/.htaccess
Normal 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>
|
||||
11
autoload/view/class.Cron.php
Normal file
11
autoload/view/class.Cron.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
namespace view;
|
||||
|
||||
class Cron
|
||||
{
|
||||
public static function main_view()
|
||||
{
|
||||
$tpl = new \Tpl;
|
||||
return $tpl -> render( 'cron/main-view' );
|
||||
}
|
||||
}
|
||||
36
autoload/view/class.Site.php
Normal file
36
autoload/view/class.Site.php
Normal 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' );
|
||||
}
|
||||
}
|
||||
}
|
||||
18
autoload/view/class.Users.php
Normal file
18
autoload/view/class.Users.php
Normal 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' );
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user