first commit

This commit is contained in:
2024-11-17 19:56:17 +01:00
commit 81b1185f8e
6599 changed files with 832395 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
<?php
namespace admin\view;
class Articles
{
public static function browse_list()
{
$tpl = new \Tpl;
return $tpl -> render( 'articles/articles-browse-list' );
}
public static function subpages_list( $pages, $article_pages, $parent_id = 0, $step = 1 )
{
$tpl = new \Tpl();
$tpl -> pages = $pages;
$tpl -> parent_id = $parent_id;
$tpl -> step = $step;
$tpl -> article_pages = $article_pages;
return $tpl -> render( 'articles/subpages-list' );
}
public static function articles_list()
{
$tpl = new \Tpl;
return $tpl -> render( 'articles/articles-list' );
}
public static function article_edit( $values )
{
$tpl = new \Tpl;
if ( is_array( $values ) ) foreach ( $values as $key => $val )
$tpl -> $key = $val;
return $tpl -> render( 'articles/article-edit' );
}
}
?>

View File

@@ -0,0 +1,11 @@
<?php
namespace admin\view;
class ArticlesArchive
{
public static function articles_list()
{
$tpl = new \Tpl;
return $tpl -> render( 'articles/articles-archive-list' );
}
}

View File

@@ -0,0 +1,12 @@
<?php
namespace admin\view;
class Backups {
public static function backups_list($backups) {
$tpl = new \Tpl;
$tpl -> backups = $backups;
return $tpl -> render ('backups/backup-list');
}
}

View File

@@ -0,0 +1,20 @@
<?php
namespace admin\view;
class Banners
{
public static function banners_list()
{
$tpl = new \Tpl;
return $tpl -> render( 'banners/banners-list' );
}
public static function banner_edit( $banner, $languages )
{
$tpl = new \Tpl;
$tpl -> banner = $banner;
$tpl -> languages = $languages;
return $tpl -> render( 'banners/banner-edit' );
}
}
?>

View File

@@ -0,0 +1,17 @@
<?php
namespace admin\view;
class Emails {
public static function emails_list()
{
$tpl = new \Tpl;
return $tpl -> render( 'emails/emails-list' );
}
public static function email_details( $email )
{
$tpl = new \Tpl;
$tpl -> email = $email;
return $tpl -> render( 'emails/email-details' );
}
}

View File

@@ -0,0 +1,12 @@
<?php
namespace admin\view;
class FileManager
{
public function filemanager()
{
$tpl = new \Tpl;
return $tpl -> render( 'filemanager/filemanager' );
}
}
?>

View File

@@ -0,0 +1,32 @@
<?
namespace admin\view;
class Languages
{
public static function translation_edit( $translation, $languages )
{
$tpl = new \Tpl;
$tpl -> languages = $languages;
$tpl -> translation = $translation;
return $tpl -> render( 'languages/translation-edit' );
}
public static function language_edit( $language, $order )
{
$tpl = new \Tpl;
$tpl -> language = $language;
$tpl -> order = $order;
return $tpl -> render( 'languages/language-edit' );
}
public static function translations_list()
{
$tpl = new \Tpl;
return $tpl -> render( 'languages/translations-list' );
}
public static function languages_list()
{
$tpl = new \Tpl;
return $tpl -> render( 'languages/languages-list' );
}
}
?>

View File

@@ -0,0 +1,29 @@
<?php
namespace admin\view;
class Layouts
{
public static function subpages_list( $pages, $layout_pages, $parent_id = null, $step = 1 )
{
$tpl = new \Tpl;
$tpl -> pages = $pages;
$tpl -> step = $step;
$tpl -> layout_pages = $layout_pages;
return $tpl -> render( 'layouts/subpages-list' );
}
public static function layout_edit( $layout, $menus )
{
$tpl = new \Tpl;
$tpl -> layout = $layout;
$tpl -> menus = $menus;
return $tpl -> render( 'layouts/layout-edit' );
}
public static function layouts_list()
{
$tpl = new \Tpl;
return $tpl -> render( 'layouts/layouts-list' );
}
}
?>

View File

@@ -0,0 +1,55 @@
<?php
namespace admin\view;
class Newsletter
{
public static function emails_list()
{
$tpl = new \Tpl;
return $tpl -> render( 'newsletter/emails-list' );
}
public static function preview( $articles, $settings, $template, $dates = '' )
{
$tpl = new \Tpl;
$tpl -> articles = $articles;
$tpl -> settings = $settings;
$tpl -> template = $template;
$tpl -> dates = $dates;
return $tpl -> render( 'newsletter/preview' );
}
public static function prepare( $templates )
{
$tpl = new \Tpl;
$tpl -> templates = $templates;
return $tpl -> render( 'newsletter/prepare' );
}
public static function settings( $settings )
{
$tpl = new \Tpl;
$tpl -> settings = $settings;
return $tpl -> render( 'newsletter/settings' );
}
public static function email_templates_user()
{
$tpl = new \Tpl;
return $tpl -> render( 'newsletter/email-templates-user' );
}
public static function email_templates_admin()
{
$tpl = new \Tpl;
return $tpl -> render( 'newsletter/email-templates-admin' );
}
public static function email_template_edit($template)
{
$tpl = new \Tpl;
$tpl -> email_template = $template;
return $tpl -> render( 'newsletter/email-template-edit' );
}
}

View File

@@ -0,0 +1,18 @@
<?php
namespace admin\view;
class Page {
public static function show()
{
global $user;
if ( !$user || !$user['admin'] )
return \admin\view\Users::login_form();
$tpl = new \Tpl;
$tpl -> content = \admin\Site::route();
return $tpl -> render( 'site/main-layout' );
}
}
?>

View File

@@ -0,0 +1,21 @@
<?php
namespace admin\view;
class PagePanel {
public static function show( $add = false, $save = false, $cancel = false, $title = '', $form = 'formularz', $back = false, $update = false, $save_ajax = false, $delete_ajax = false )
{
$tpl = new \Tpl();
$tpl -> _add = $add;
$tpl -> _save = $save;
$tpl -> _cancel = $cancel;
$tpl -> _id_form = $form;
$tpl -> _title = $title;
$tpl -> _back = $back;
$tpl -> _update = $update;
$tpl -> _save_ajax = $save_ajax;
$tpl -> _delete_ajax = $delete_ajax;
return $tpl -> render( 'other/page-panel' );
}
}
?>

View File

@@ -0,0 +1,68 @@
<?
namespace admin\view;
class Pages
{
public static function subpages_browse_list( $pages, $parent_id = null, $step = 1 )
{
$tpl = new \Tpl();
$tpl -> pages = $pages;
$tpl -> parent_id = $parent_id;
$tpl -> step = $step;
return $tpl -> render( 'pages/subpages-browse-list' );
}
static public function browse_list( $menus, $modal = false )
{
return \Tpl::view( 'pages/pages-browse-list', [
'menus' => $menus,
'modal' => $modal
] );
}
public static function page_articles( $page_id, $articles )
{
$tpl = new \Tpl;
$tpl -> page_id = $page_id;
$tpl -> articles = $articles;
return $tpl -> render( 'pages/page-articles' );
}
public static function page_edit( $page, $parent_id, $menu_id, $menus, $layouts, $languages, $settings )
{
$tpl = new \Tpl;
$tpl -> menu_id = $menu_id;
$tpl -> parent_id = $parent_id;
$tpl -> menus = $menus;
$tpl -> page = $page;
$tpl -> layouts = $layouts;
$tpl -> languages = $languages;
$tpl -> settings = $settings;
return $tpl -> render( 'pages/page-edit' );
}
public static function menu_edit( $menu )
{
$tpl = new \Tpl;
$tpl -> menu = $menu;
return $tpl -> render( 'pages/menu-edit' );
}
public static function pages_list( $menus )
{
$tpl = new \Tpl;
$tpl -> menus = $menus;
return $tpl -> render( 'pages/pages-list' );
}
public static function subpages_list( $pages, $parent_id = null, $step = 1 )
{
$tpl = new \Tpl();
$tpl -> pages = $pages;
$tpl -> parent_id = $parent_id;
$tpl -> step = $step;
return $tpl -> render( 'pages/subpages-list' );
}
}
?>

View File

@@ -0,0 +1,20 @@
<?php
namespace admin\view;
class Scontainers
{
public static function container_edit( $container, $languages )
{
$tpl = new \Tpl;
$tpl -> container = $container;
$tpl -> languages = $languages;
return $tpl -> render( 'scontainers/container-edit' );
}
public static function containers_list()
{
$tpl = new \Tpl;
return $tpl -> render( 'scontainers/containers-list' );
}
}

View File

@@ -0,0 +1,17 @@
<?php
namespace admin\view;
class SeoAdditional
{
public static function element_edit( $element = '' )
{
$tpl = new \Tpl;
$tpl -> element = $element;
return $tpl -> render( 'seo-additional/element-edit' );
}
public static function main_view()
{
$tpl = new \Tpl;
return $tpl -> render( 'seo-additional/main-view' );
}
}

View File

@@ -0,0 +1,13 @@
<?
namespace admin\view;
class Settings
{
public static function view( $settings )
{
$tpl = new \Tpl;
$tpl -> settings = $settings;
return $tpl -> render( 'settings/settings' );
}
}
?>

View File

@@ -0,0 +1,13 @@
<?php
namespace admin\view;
class Update
{
public static function main_view()
{
$tpl = new \Tpl;
$tpl -> ver = \S::get_version();
$tpl -> new_ver = \S::get_new_version();
return $tpl -> render( 'update/main-view' );
}
}

View File

@@ -0,0 +1,26 @@
<?php
namespace admin\view;
class Users
{
public static function login_form()
{
$tpl = new \Tpl;
return $tpl -> render( 'site/unlogged-layout' );
}
public static function users_list()
{
$tpl = new \Tpl;
return $tpl -> render( 'users/users-list' );
}
public static function user_edit( $user, $privileges )
{
$tpl = new \Tpl;
$tpl -> user = $user;
$tpl -> privileges = $privileges;
return $tpl -> render( 'users/user-edit' );
}
}
?>