Guest User

Untitled

a guest
Jul 31st, 2018
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.28 KB | None | 0 0
  1. <?php
  2. ## INDEX
  3. define('QD_VERSION', '5.0');
  4. define('QD_INTERNAL_VERSION', '5.0');
  5.  
  6. define('QD_TIME', microtime(true));
  7.  
  8. //paths
  9. define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application/')); //quick hack for webroot but system is in a submap...
  10.  
  11. define('PHP_INT_MIN', (int)(PHP_INT_MAX+1));
  12.  
  13. // Ensure library/ is on include_path
  14. set_include_path(implode(PATH_SEPARATOR, array(
  15. realpath(APPLICATION_PATH . '/../library'),
  16. get_include_path(),
  17. )));
  18.  
  19. require_once 'Zend/Application.php';
  20. require_once("QD/QD.php");
  21.  
  22. # QD/QD.php
  23. // At this function the app gives an error (init the real zend_application)
  24. public static function init($sMode) {
  25. // Create application, bootstrap, and run
  26. self::$_app = new Zend_Application(
  27. $sMode,
  28. APPLICATION_PATH . '/application.ini'
  29. );
  30.  
  31. Zend_Loader_Autoloader::getInstance()->registerNamespace("QD");
  32. self::$_enviroment = $sMode;
  33. }
  34.  
  35.  
  36.  
  37.  
  38. # Bootstrap.php #
  39. <?php
  40. class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
  41. {
  42. protected function _initDatabase(){
  43. $this->bootstrap('db');
  44. }
  45.  
  46. protected function _initTimezone(){
  47. date_default_timezone_set('Europe/Amsterdam');
  48. }
  49.  
  50. protected function _initAutoload() {
  51. $autoloader = new Zend_Application_Module_Autoloader(array(
  52. 'namespace' => '',
  53. 'basePath' => dirname(__FILE__),
  54. ));
  55. return $autoloader;
  56. }
  57.  
  58. protected function _initSession(){
  59. session_start();
  60. }
  61. }
  62.  
  63.  
  64. # Application.ini #
  65. [production]
  66. phpSettings.display_startup_errors = 0
  67. phpSettings.display_errors = 0
  68. phpSettings.date.timezone = "CET"
  69. bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
  70.  
  71. resources.frontController.params.displayExceptions = 0
  72. resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
  73. resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
  74. resources.layout.layoutPath = APPLICATION_PATH "/layouts/default"
  75. resources.locale.default = "en_EN"
  76. resources.db.adapter = PDO_MYSQL
  77. resources.db.params.host = localhost
  78. resources.db.params.username = *
  79. resources.db.params.password = *
  80. resources.db.params.dbname = *
  81. resources.modules = ""
  82.  
  83. website.url = "beatproviders.eu"
  84. website.title = "Beat Providers - DJs & Producers - Official Website"
Add Comment
Please, Sign In to add comment