- Created new directories and index files for controls, factory, and views. - Added .htaccess files for URL rewriting in layout and images directories. - Included a logo image in the layout/images directory. - Implemented load_prices.php to load ticket prices from the database into settings. - Developed admin panel settings page for enabling ticket sales. - Created tickets management page in the admin panel to display and edit ticket prices. - Added upgrade.php for database migrations, including creating the ticket_prices table and adding weekend price column.
34 lines
970 B
PHP
34 lines
970 B
PHP
<?php
|
|
error_reporting( E_ALL ^ E_NOTICE ^ E_STRICT ^ E_WARNING ^ E_DEPRECATED );
|
|
|
|
function __autoload_my_classes( $classname )
|
|
{
|
|
$q = explode( '\\', $classname );
|
|
$c = array_pop( $q );
|
|
$f = 'autoload/' . implode( '/', $q ) . '/class.' . $c . '.php';
|
|
|
|
if ( file_exists( $f ) )
|
|
require_once( $f );
|
|
}
|
|
spl_autoload_register( '__autoload_my_classes' );
|
|
date_default_timezone_set( 'Europe/Warsaw' );
|
|
|
|
require_once 'config.php';
|
|
require_once 'libraries/medoo/medoo.php';
|
|
require_once 'libraries/grid/config.php';
|
|
require_once 'libraries/phpmailer/class.phpmailer.php';
|
|
require_once 'libraries/phpmailer/class.smtp.php';
|
|
require_once 'libraries/rb.php';
|
|
|
|
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 'load_prices.php'; |