ver. 0.285: Tpl → Shared\Tpl namespace, CurlServer removal, thumb.php fix

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-17 00:13:59 +01:00
parent fc7d18123d
commit 28b30c1e56
144 changed files with 385 additions and 285 deletions

View File

@@ -5,7 +5,7 @@ class Menu
{
public static function pages( $pages, $level = 0, $current_page = 0 )
{
$tpl = new \Tpl;
$tpl = new \Shared\Tpl\Tpl;
$tpl -> pages = $pages;
$tpl -> level = $level;
$tpl -> current_page = $current_page;
@@ -14,7 +14,7 @@ class Menu
public static function menu( $menu, $current_page )
{
$tpl = new \Tpl;
$tpl = new \Shared\Tpl\Tpl;
$tpl -> menu = $menu;
$tpl -> current_page = $current_page;
return $tpl -> render( 'menu/menu' );

View File

@@ -5,7 +5,7 @@ class Scontainers
{
public static function scontainer( $id )
{
$tpl = new \Tpl;
$tpl = new \Shared\Tpl\Tpl;
$tpl -> scontainer = \front\factory\Scontainers::scontainer_details( $id );
return $tpl -> render( 'scontainers/scontainer' );
}

View File

@@ -4,7 +4,7 @@ class ShopCategory
{
static public function category_description( $category )
{
return \Tpl::view( 'shop-category/category-description', [
return \Shared\Tpl\Tpl::view( 'shop-category/category-description', [
'category' => $category
] );
}
@@ -19,7 +19,7 @@ class ShopCategory
if ( $results['ls'] > 1 )
{
$tpl = new \Tpl;
$tpl = new \Shared\Tpl\Tpl;
$tpl -> ls = $results['ls'];
$tpl -> bs = $bs ? $bs : 1;
$tpl -> page = $page;
@@ -27,7 +27,7 @@ class ShopCategory
$pager = $tpl -> render( 'site/pager' );
}
return \Tpl::view( 'shop-category/category', [
return \Shared\Tpl\Tpl::view( 'shop-category/category', [
'category' => $category,
'products' => $results['products'],
'pager' => $pager,
@@ -37,7 +37,7 @@ class ShopCategory
}
$products_count = \front\factory\ShopCategory::category_products_count( $category, $lang_id );
return \Tpl::view( 'shop-category/category-infinitescroll', [
return \Shared\Tpl\Tpl::view( 'shop-category/category-infinitescroll', [
'category' => $category,
'products_count' => $products_count,
'category_description' => (int)$bs <= 1 ? true : false,
@@ -47,7 +47,7 @@ class ShopCategory
public static function categories( $categories, $current_category = 0, $level = 0 )
{
$tpl = new \Tpl;
$tpl = new \Shared\Tpl\Tpl;
$tpl -> level = $level;
$tpl -> current_category = $current_category;
$tpl -> categories = $categories;

View File

@@ -4,7 +4,7 @@ class ShopClient
{
public static function address_edit( $values )
{
$tpl = new \Tpl;
$tpl = new \Shared\Tpl\Tpl;
if ( is_array( $values ) ) foreach ( $values as $key => $val )
$tpl -> $key = $val;
return $tpl -> render( 'shop-client/address-edit' );
@@ -12,7 +12,7 @@ class ShopClient
public static function client_addresses( $values )
{
$tpl = new \Tpl;
$tpl = new \Shared\Tpl\Tpl;
if ( is_array( $values ) ) foreach ( $values as $key => $val )
$tpl -> $key = $val;
return $tpl -> render( 'shop-client/client-addresses' );
@@ -21,7 +21,7 @@ class ShopClient
public static function client_menu( $values )
{
$tpl = new \Tpl;
$tpl = new \Shared\Tpl\Tpl;
if ( is_array( $values ) ) foreach ( $values as $key => $val )
$tpl -> $key = $val;
return $tpl -> render( 'shop-client/client-menu' );
@@ -29,7 +29,7 @@ class ShopClient
public static function client_orders( $values )
{
$tpl = new \Tpl;
$tpl = new \Shared\Tpl\Tpl;
if ( is_array( $values ) ) foreach ( $values as $key => $val )
$tpl -> $key = $val;
return $tpl -> render( 'shop-client/client-orders' );
@@ -37,21 +37,21 @@ class ShopClient
public static function recover_password()
{
$tpl = new \Tpl;
$tpl = new \Shared\Tpl\Tpl;
return $tpl -> render( 'shop-client/recover-password' );
}
public static function mini_login()
{
global $client;
$tpl = new \Tpl;
$tpl = new \Shared\Tpl\Tpl;
$tpl -> client = $client;
return $tpl -> render( 'shop-client/mini-login' );
}
public static function login_form( $values = '' )
{
$tpl = new \Tpl;
$tpl = new \Shared\Tpl\Tpl;
if ( is_array( $values ) ) foreach ( $values as $key => $val )
$tpl -> $key = $val;
return $tpl -> render( 'shop-client/login-form' );
@@ -59,7 +59,7 @@ class ShopClient
public static function register_form()
{
$tpl = new \Tpl;
$tpl = new \Shared\Tpl\Tpl;
return $tpl -> render( 'shop-client/register-form' );
}
}

View File

@@ -4,7 +4,7 @@ class ShopOrder
{
public static function order_details( $values )
{
$tpl = new \Tpl;
$tpl = new \Shared\Tpl\Tpl;
if ( is_array( $values ) ) foreach ( $values as $key => $val )
$tpl -> $key = $val;
return $tpl -> render( 'shop-order/order-details' );

View File

@@ -4,7 +4,7 @@ class ShopPaymentMethod
{
public static function basket_payment_methods( $payment_methods, $payment_id )
{
$tpl = new \Tpl;
$tpl = new \Shared\Tpl\Tpl;
$tpl -> payment_methods = $payment_methods;
$tpl -> payment_id = $payment_id;
return $tpl -> render( 'shop-basket/basket-payments-methods' );

View File

@@ -60,7 +60,7 @@ class Site
$html = str_replace( '[BANER_STRONA_GLOWNA]', \front\Views\Banners::mainBanner( $bannerRepo->mainBanner( $lang_id ) ), $html );
$html = str_replace( '[BANERY]', \front\Views\Banners::banners( $bannerRepo->banners( $lang_id ) ), $html );
$html = str_replace( '[KATEGORIE]', \Tpl::view( 'shop-category/categories', [
$html = str_replace( '[KATEGORIE]', \Shared\Tpl\Tpl::view( 'shop-category/categories', [
'level' => $level,
'current_category' => \Shared\Helpers\Helpers::get( 'category' ),
'categories' => \front\factory\ShopCategory::categories_details()
@@ -76,7 +76,7 @@ class Site
$products_promoted_tmp[1] ? $pattern = '[PROMOWANE_PRODUKTY:' . $products_promoted_tmp[1] . ']' : $pattern = '[PROMOWANE_PRODUKTY]';
$html = str_replace( $pattern,
\Tpl::view( 'shop-product/promoted-products', [
\Shared\Tpl\Tpl::view( 'shop-product/promoted-products', [
'products' => \front\factory\ShopProduct::promoted_products( $limit )
] ),
$html
@@ -99,7 +99,7 @@ class Site
}
$html = str_replace( '[KOSZYK]',
\Tpl::view( 'shop-basket/basket-mini', [
\Shared\Tpl\Tpl::view( 'shop-basket/basket-mini', [
'basket' => \Shared\Helpers\Helpers::get_session( 'basket' ),
'lang_id' => $lang_id,
'coupon' => \Shared\Helpers\Helpers::get_session( 'coupon' )
@@ -129,7 +129,7 @@ class Site
$menu_tmp = explode( ':', $menu_tmp );
$html = str_replace(
'[MENU_GLOWNE:' . $menu_tmp[1] . ']',
\Tpl::view( 'menu/main-menu', [
\Shared\Tpl\Tpl::view( 'menu/main-menu', [
'menu' => \front\factory\Menu::menu_details( $menu_tmp[1] )
] ),
$html );
@@ -237,7 +237,7 @@ class Site
$single_product = explode( ':', $single_product );
$html = str_replace(
'[PRODUKT:' . $single_product[1] . ']',
\Tpl::view( 'shop-product/product-mini', [
\Shared\Tpl\Tpl::view( 'shop-product/product-mini', [
'product' => \shop\Product::getFromCache( (int)$single_product[1], $lang_id )
] ),
$html
@@ -259,7 +259,7 @@ class Site
$html = str_replace(
'[PRODUKTY_BOX:' . $products_box[1] . ']',
\Tpl::view( 'shop-product/products-box', [
\Shared\Tpl\Tpl::view( 'shop-product/products-box', [
'products' => $products
] ),
$html
@@ -287,7 +287,7 @@ class Site
}
$html = str_replace( $pattern,
\Tpl::view( 'shop-product/products-top', [
\Shared\Tpl\Tpl::view( 'shop-product/products-top', [
'products' => $top_products_arr,
] ),
$html
@@ -316,7 +316,7 @@ class Site
}
$html = str_replace( $pattern,
\Tpl::view( 'shop-product/products-new', [
\Shared\Tpl\Tpl::view( 'shop-product/products-new', [
'products' => $top_products_arr,
] ),
$html
@@ -377,7 +377,7 @@ class Site
$html = str_replace(
$pattern,
\Tpl::view( 'shop-category/blog-category-products', [
\Shared\Tpl\Tpl::view( 'shop-category/blog-category-products', [
'products' => \front\factory\ShopCategory::blog_category_products( $category_list_tmp[1], $lang_id, $products_limit )
] ),
$html );
@@ -421,14 +421,14 @@ class Site
public static function facebook( $facebook_link )
{
$tpl = new \Tpl;
$tpl = new \Shared\Tpl\Tpl;
$tpl -> facebook_link = $facebook_link;
return $tpl -> render( 'site/facebook' );
}
static public function title( $title, $show_title, $page_title )
{
return \Tpl::view( 'site/title', [
return \Shared\Tpl\Tpl::view( 'site/title', [
'title' => $title,
'page_title' => $page_title,
'show_title' => $show_title
@@ -441,7 +441,7 @@ class Site
{
\Shared\Helpers\Helpers::delete_session( 'alert' );
return $tpl = \Tpl::view( 'site/alert', [
return $tpl = \Shared\Tpl\Tpl::view( 'site/alert', [
'alert' => $alert
] );
}
@@ -450,7 +450,7 @@ class Site
{
\Shared\Helpers\Helpers::delete_session( 'error' );
$tpl = new \Tpl;
$tpl = new \Shared\Tpl\Tpl;
$tpl -> error = $error;
return $tpl -> render( 'site/error' );
}
@@ -458,19 +458,19 @@ class Site
public static function copyright()
{
$tpl = new \Tpl;
$tpl = new \Shared\Tpl\Tpl;
return $tpl -> render( 'site/copyright' );
}
public static function contact()
{
$tpl = new \Tpl;
$tpl = new \Shared\Tpl\Tpl;
return $tpl -> render( 'site/contact' );
}
public static function cookie_information()
{
$tpl = new \Tpl;
$tpl = new \Shared\Tpl\Tpl;
return $tpl -> render( 'site/cookie-information' );
}
}