- Created Articles.php for rendering article views including full articles, miniature lists, and news sections. - Added Banners.php for handling banner displays. - Introduced Languages.php for rendering language options. - Implemented Menu.php for dynamic menu rendering. - Developed Newsletter.php for newsletter view rendering. - Created Scontainers.php for rendering specific containers. - Added ShopCategory.php for category descriptions and product listings. - Introduced ShopClient.php for managing client-related views such as address editing and order history. - Implemented ShopPaymentMethod.php for displaying payment methods in the basket. - Created ShopProduct.php for generating product URLs. - Added ShopSearch.php for rendering a simple search form. - Added .htaccess file to enhance security by restricting access to sensitive files and directories.
42 lines
1.1 KiB
PHP
42 lines
1.1 KiB
PHP
<?
|
|
error_reporting( E_ALL ^ E_NOTICE ^ E_STRICT );
|
|
function __autoload_my_classes( $classname )
|
|
{
|
|
$q = explode( '\\' , $classname );
|
|
$c = array_pop( $q );
|
|
$f = '../autoload/' . implode( '/' , $q ) . '/class.' . $c . '.php';
|
|
if ( $c == 'Savant3' )
|
|
{
|
|
require_once( '../autoload/Savant3.php' );
|
|
return true;
|
|
}
|
|
if ( file_exists( $f ) )
|
|
require_once( $f );
|
|
else
|
|
{
|
|
$f = '../autoload/' . implode( '/' , $q ) . '/' . $c . '.php';
|
|
if ( file_exists( $f ) )
|
|
require_once( $f );
|
|
}
|
|
}
|
|
spl_autoload_register( '__autoload_my_classes' );
|
|
|
|
require_once '../config.php';
|
|
require_once '../libraries/medoo/medoo.php';
|
|
date_default_timezone_set('Europe/Warsaw');
|
|
|
|
session_start();
|
|
|
|
$mdb = new medoo( [
|
|
'database_type' => 'mysql',
|
|
'database_name' => $database['name'],
|
|
'server' => $database['host'],
|
|
'username' => $database['user'],
|
|
'password' => $database['password'],
|
|
'charset' => 'utf8'
|
|
] );
|
|
|
|
require_once 'ajax/shop-category.php';
|
|
require_once 'ajax/users.php';
|
|
?>
|