Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- header('Content-Type: text/html; charset=utf-8');
- define('DS', DIRECTORY_SEPARATOR);
- define('BASEPATH', __DIR__ . DS);
- define('CLASS', APP . 'class' . DS);
- define('CACHE', BASEPATH . 'cache' . DS);
- define('APP', BASEPATH . DS . 'app' . DS);
- define('UPLOADDIR', BASEPATH . 'upload' . DS);
- define('DBHOST', 'localhost');
- define('DBNAME', 'chis3yhk_database');
- define('DBPASS', '#[-KwQ;852h;');
- define('DBUSER', 'chis3yhk_user');
- define('BASEURL', 'http://chistdom.com/new/');
- session_start();
- require_once APP . 'functions.php';
- require_once APP . 'class/Database.php';
- require_once APP . 'Image/WideImage.php';
- $db = new Database(DBHOST, DBNAME, DBUSER, DBPASS);
- $origURL = filter_input(INPUT_GET, 'url', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
- $url = trim(str_replace('/', '_', $origURL), '_');
- echo '<pre>' . print_r($url, TRUE) . '</pre>';
- echo '<pre>' . print_r($_GET, TRUE) . '</pre>';
- if (!$url) {
- require_once APP . 'index.php';
- die();
- }
- if (strpos($origURL, 'product') !== false) {
- $product = str_replace('product/', '', $origURL);
- require_once APP . 'product-single.php';
- die();
- }
- if (!file_exists(APP . $url . '.php')) {
- require_once APP . '404.php';
- die();
- }
- require_once APP . $url . '.php';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement