Initial rewiring
This commit is contained in:
20
index.php
20
index.php
@@ -12,11 +12,11 @@ define('base_url', rtrim($base_url, '/') . '/');
|
||||
// Initialize a new session
|
||||
session_start();
|
||||
// Include the configuration file, this contains settings you can change.
|
||||
include 'config.php';
|
||||
include './custom/settings/config.php';
|
||||
// Include functions and connect to the database using PDO MySQL
|
||||
include 'functions.php';
|
||||
// Include translation file
|
||||
include './custom/translations_'.strtoupper(language_code).'.php';
|
||||
include './custom/translations/translations/translations_'.strtoupper(language_code).'.php';
|
||||
// Connect to MySQL database
|
||||
$pdo = pdo_connect_mysql();
|
||||
// Output error variable
|
||||
@@ -42,8 +42,8 @@ if (isset($_POST['banner_move'])){
|
||||
// Define all the routes for all pages
|
||||
$url = routes([
|
||||
'/' => 'home.php',
|
||||
'/about' => 'about.php',
|
||||
'/about_morval' => 'about_morval.php',
|
||||
'/about' => '/custom/pages/about.php',
|
||||
'/about_morval' => '/custom/pages/about_morval.php',
|
||||
'/product/{id}' => 'product.php',
|
||||
'/product/{id}/{option_id}' => 'product.php',
|
||||
'/products' => 'products.php',
|
||||
@@ -60,12 +60,12 @@ $url = routes([
|
||||
'/placeorder/{order_id}' => 'placeorder.php',
|
||||
'/search/{query}' => 'search.php',
|
||||
'/logout' => 'logout.php',
|
||||
'/termsandconditions'=> 'termsandconditions.php',
|
||||
'/termsandconditions/{download}'=> 'termsandconditions.php',
|
||||
'/faq'=> 'faq.php',
|
||||
'/privacy'=> 'privacy.php',
|
||||
'/privacy/{download}'=> 'privacy.php',
|
||||
'instructions-for-use' => 'faq.php'
|
||||
'/termsandconditions'=> '/custom/pages/termsandconditions.php',
|
||||
'/termsandconditions/{download}'=> '/custom/pages/termsandconditions.php',
|
||||
'/faq'=> '/custom/pages/faq.php',
|
||||
'/privacy'=> '/custom/pages/privacy.php',
|
||||
'/privacy/{download}'=> '/custom/pages/privacy.php',
|
||||
'/instructions-for-use' => '/custom/pages/faq.php'
|
||||
]);
|
||||
// Check if route exists
|
||||
if ($url) {
|
||||
|
||||
Reference in New Issue
Block a user