Guest User

Untitled

a guest
Jul 21st, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.67 KB | None | 0 0
  1. <?php
  2.  
  3. /*
  4. |-----------------------------------------------------------------
  5. | Site Name
  6. |-----------------------------------------------------------------
  7. |
  8. | This variable will be called throughout the website, allowing
  9. | you to change all occurences of the website name, through this
  10. | variable.
  11. |
  12. */
  13. $config['site_name'] = 'Krenia';
  14.  
  15. /*
  16. |-----------------------------------------------------------------
  17. | Static Salt
  18. |-----------------------------------------------------------------
  19. |
  20. | This variable will hold a static salt, that will be used to add
  21. | even more protection to the passwords. The dynamic salt can be
  22. | read from the same table as the password, so if a hacker gained
  23. | access to the users table, he may be able to guess the salt's
  24. | code. However, by adding a static salt, it adds to the
  25. | complexity of the hash.
  26. |
  27. */
  28. $config['static_salt'] = "!-l0v3/v1r7u4l_p37.5!T3S";
  29.  
  30. /*
  31. |-----------------------------------------------------------------
  32. | Connection Type
  33. |-----------------------------------------------------------------
  34. |
  35. | This variable specifies what kind of connection you are trying
  36. | to create. Typically 'mysql'. Set to null for no database
  37. | connection.
  38. |
  39. */
  40. $config['connType'] = 'mysql';
  41.  
  42. /*
  43. |-----------------------------------------------------------------
  44. | Database Information
  45. |-----------------------------------------------------------------
  46. |
  47. | host - The database host to connect to. Typically 'localhost'.
  48. | name - The database name to connect to.
  49. | user - The username to connect to the database with.
  50. | pass - The password to connect to the database with.
  51. |
  52. */
  53. $config['connInfo'] = array( 'host' => 'localhost',
  54. 'name' => 'krenia',
  55. 'user' => 'root',
  56. 'pass' => ''
  57. );
  58.  
  59. /*
  60. |-----------------------------------------------------------------
  61. | Developmental Level
  62. |-----------------------------------------------------------------
  63. |
  64. | 1 - Production environment
  65. | 2 - Developmental environment
  66. |
  67. */
  68. $config['dev_level'] = 2;
  69.  
  70. /*
  71. |=================================================================
  72. | End of User-Configurable Variables
  73. |=================================================================
  74. */
  75.  
  76. /*
  77. |-----------------------------------------------------------------
  78. | Error Reporting Level
  79. |-----------------------------------------------------------------
  80. |
  81. | The only reason this will change is so that when developing, it
  82. | is possible to view any errors. However, when in a production
  83. | environment, setting error_reporting() to anything but NONE will
  84. | decrease the execution time of the script.
  85. |
  86. */
  87. if($config['dev_level'] == 1)
  88. error_reporting(NONE);
  89. else
  90. error_reporting(E_ALL);
  91.  
  92. /*
  93. |-----------------------------------------------------------------
  94. | Start sessions
  95. |-----------------------------------------------------------------
  96. */
  97. session_start();
  98.  
  99. /*
  100. |-----------------------------------------------------------------
  101. | Include Required Libraries
  102. |-----------------------------------------------------------------
  103. |
  104. | database - A PDO wrapper developed by juddster
  105. |
  106. */
  107. require_once('classes/database.php');
  108.  
  109. /*
  110. |-----------------------------------------------------------------
  111. | Connect to the database
  112. |-----------------------------------------------------------------
  113. |
  114. | Calls the database class using the above provided connType and
  115. | connInfo variables.
  116. |
  117. */
  118. if (!is_null($config['connType']) && !is_null($config['connInfo']))
  119. {
  120. $database = new database($config['connInfo'], $config['connType']);
  121. if($config['dev_level'] == 2)
  122. {
  123. $database->setVerbose(true);
  124. $database->setLogging(true);
  125. }
  126. }
  127.  
  128. ?>
Add Comment
Please, Sign In to add comment