first commit

This commit is contained in:
2023-09-04 21:59:34 +02:00
commit 650ef5b3e1
196 changed files with 24080 additions and 0 deletions

View File

@@ -0,0 +1,76 @@
<?php
namespace article;
class VArticle
{
public function drawArticleListStatic( $id )
{
$tpl = new \Savant3;
$tpl -> _id = $id;
$tpl -> _site = new \site\Site( $id );
$tpl -> _articles = \article\FArticle::getArticles( 0, $id );
return $tpl -> fetch( 'articles/articles-list-static' );
}
public function drawListArticles( $articles )
{
$tpl = new \Savant3;
$tpl -> _articles = $articles;
return $tpl -> fetch( 'articles/articles-list' );
}
public function drawMiniatureArticles( $articles )
{
$tpl = new \Savant3;
$tpl -> _articles = $articles;
return $tpl -> fetch( 'articles/articles-miniature' );
}
public function drawSlider( $article_id, $images )
{
$tpl = new \Savant3;
$tpl -> _article_id = $article_id;
$tpl -> _images = $images;
return $tpl -> fetch( 'articles/article-slider' );
}
public function draw( $id )
{
global $user;
if ( \article\FArticle::isArticleOnlyForLogged( $id ) && !$user )
return \user\VUser::drawLoginForm();
$article = \article\FArticle::loadArticle( $id );
if ( !$article -> _values['enabled'] || $article -> _values['archive'] )
return false;
$tpl = new \Savant3;
$tpl -> _article = $article;
return $tpl -> fetch( 'articles/article-draw' );
}
public function drawEntryArticles( $articles )
{
$tpl = new \Savant3;
$tpl -> _articles = $articles;
return $tpl -> fetch( 'articles/articles-entry' );
}
public function drawGallery( $id, $images )
{
$tpl = new \Savant3;
$tpl -> _id = $id;
$tpl -> _images = $images;
return $tpl -> fetch( 'articles/article-gallery' );
}
public static function drawFullArticles( $articles )
{
$tpl = new \Savant3;
$tpl -> _articles = $articles;
return $tpl -> fetch( 'articles/articles-full' );
}
}
?>