first commit

This commit is contained in:
2024-11-17 19:39:31 +01:00
commit cb82696b82
7146 changed files with 892742 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
<?php
namespace front\view;
class Banners
{
public static function banners( $banners )
{
$tpl = new \Tpl;
$tpl -> banners = $banners;
return $tpl -> render( 'banner/banners' );
}
public static function main_banner( $banner )
{
if ( file_exists( 'templates/banner/draw.php' ) and !file_exists( 'templates/banner/main-banner.php' ) )
copy( 'templates/banner/draw.php', 'templates/banner/main-banner.php' );
if ( file_exists( 'templates/banner/draw.php' ) and file_exists( 'templates/banner/main-banner.php' ) )
unlink( 'templates/banner/draw.php' );
if ( file_exists( 'templates_user/banner/draw.php' ) and !file_exists( 'templates_user/banner/main-banner.php' ) )
copy( 'templates_user/banner/draw.php', 'templates_user/banner/main-banner.php' );
if ( file_exists( 'templates_user/banner/draw.php' ) and file_exists( 'templates_user/banner/main-banner.php' ) )
unlink( 'templates_user/banner/draw.php' );
if ( !\S::get_session( 'banner_close' ) && is_array( $banner ) )
{
$tpl = new \Tpl;
$tpl -> banner = $banner;
return $tpl -> render( 'banner/main-banner' );
}
}
}