Advertisement
fabi0

Untitled

Jan 11th, 2015
284
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.25 KB | None | 0 0
  1. <?php
  2.  
  3. header('Content-Type: text/html; charset=utf-8');
  4.  
  5. define('DS', DIRECTORY_SEPARATOR);
  6. define('BASEPATH', __DIR__ . DS);
  7. define('CLASS', APP . 'class' . DS);
  8. define('CACHE', BASEPATH . 'cache' . DS);
  9. define('APP', BASEPATH . DS . 'app' . DS);
  10. define('UPLOADDIR', BASEPATH . 'upload' . DS);
  11. define('DBHOST', 'localhost');
  12. define('DBNAME', 'chis3yhk_database');
  13. define('DBPASS', '#[-KwQ;852h;');
  14. define('DBUSER', 'chis3yhk_user');
  15.  
  16. define('BASEURL', 'http://chistdom.com/new/');
  17. session_start();
  18. require_once APP . 'functions.php';
  19. require_once APP . 'class/Database.php';
  20. require_once APP . 'Image/WideImage.php';
  21. $db = new Database(DBHOST, DBNAME, DBUSER, DBPASS);
  22. $origURL = filter_input(INPUT_GET, 'url', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
  23. $url = trim(str_replace('/', '_', $origURL), '_');
  24.  
  25. echo '<pre>' . print_r($url, TRUE) . '</pre>';
  26. echo '<pre>' . print_r($_GET, TRUE) . '</pre>';
  27. if (!$url) {
  28.     require_once APP . 'index.php';
  29.     die();
  30. }
  31.  
  32. if (strpos($origURL, 'product') !== false) {
  33.     $product = str_replace('product/', '', $origURL);
  34.     require_once APP . 'product-single.php';
  35.     die();
  36. }
  37.  
  38. if (!file_exists(APP . $url . '.php')) {
  39.     require_once APP . '404.php';
  40.     die();
  41. }
  42. require_once APP . $url . '.php';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement