lychee/php/access/Installation.php

38 lines
827 B
PHP
Raw Normal View History

2014-04-30 09:10:31 +00:00
<?php
###
# @name Installation Access
# @copyright 2014 by Tobias Reich
###
if (!defined('LYCHEE')) exit('Error: Direct access is not allowed!');
if (!defined('LYCHEE_ACCESS_INSTALLATION')) exit('Error: You are not allowed to access this area!');
class Installation extends Access {
public function check($fn) {
switch ($fn) {
case 'dbCreateConfig': $this->dbCreateConfig(); break;
# Error
2015-01-23 19:50:52 +00:00
default: exit('Warning: No configuration!');
return false; break;
2014-04-30 09:10:31 +00:00
}
return true;
}
private function dbCreateConfig() {
Module::dependencies(isset($_POST['dbHost'], $_POST['dbUser'], $_POST['dbPassword'], $_POST['dbName'], $_POST['dbTablePrefix']));
echo Database::createConfig($_POST['dbHost'], $_POST['dbUser'], $_POST['dbPassword'], $_POST['dbName'], $_POST['dbTablePrefix']);
2014-04-30 09:10:31 +00:00
}
}
?>