Installation.php 829 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. ###
  3. # @name Installation Access
  4. # @copyright 2014 by Tobias Reich
  5. ###
  6. if (!defined('LYCHEE')) exit('Error: Direct access is not allowed!');
  7. if (!defined('LYCHEE_ACCESS_INSTALLATION')) exit('Error: You are not allowed to access this area!');
  8. class Installation extends Access {
  9. public function check($fn) {
  10. switch ($fn) {
  11. case 'dbCreateConfig': $this->dbCreateConfig(); break;
  12. # Error
  13. default: exit('Warning: No configuration!');
  14. return false; break;
  15. }
  16. return true;
  17. }
  18. private function dbCreateConfig() {
  19. Module::dependencies(isset($_POST['dbHost'], $_POST['dbUser'], $_POST['dbPassword'], $_POST['dbName'], $_POST['dbTablePrefix']));
  20. echo Database::createConfig($_POST['dbHost'], $_POST['dbUser'], $_POST['dbPassword'], $_POST['dbName'], $_POST['dbTablePrefix']);
  21. }
  22. }
  23. ?>