2020-11-19 22:44:19 +01:00
|
|
|
<?php
|
|
|
|
// Datenbank-Verbindungsparameter
|
|
|
|
require_once ('dbutils.php');
|
|
|
|
require_once ('admin.php');
|
|
|
|
require_once ('queuecontent.php');
|
|
|
|
require_once ('products.php');
|
|
|
|
require_once ('roomtables.php');
|
|
|
|
require_once ('reports.php');
|
|
|
|
require_once ('bill.php');
|
2020-11-19 23:14:55 +01:00
|
|
|
require_once ('vouchermanager.php');
|
2020-11-19 23:02:19 +01:00
|
|
|
require_once ('rksv.php');
|
2020-11-19 22:44:19 +01:00
|
|
|
require_once ('closing.php');
|
|
|
|
require_once ('printqueue.php');
|
|
|
|
require_once ('feedback.php');
|
2020-11-19 22:47:44 +01:00
|
|
|
require_once ('reservation.php');
|
|
|
|
require_once ('rating.php');
|
2020-11-19 23:02:08 +01:00
|
|
|
require_once ('customers.php');
|
2020-11-19 23:00:58 +01:00
|
|
|
require_once ('commonutils.php');
|
2020-11-19 23:02:33 +01:00
|
|
|
require_once ('updater.php');
|
2020-11-19 23:03:48 +01:00
|
|
|
require_once ('workreceipts.php');
|
2020-11-19 22:47:44 +01:00
|
|
|
require_once ('utilities/Logger.php');
|
2020-11-19 23:03:48 +01:00
|
|
|
require_once ('utilities/roles.php');
|
2020-11-19 23:11:33 +01:00
|
|
|
require_once ('utilities/permissions.php');
|
2020-11-19 23:11:49 +01:00
|
|
|
require_once ('utilities/basetemplater.php');
|
|
|
|
require_once ('utilities/clostemplater.php');
|
2020-11-19 23:12:46 +01:00
|
|
|
require_once ('utilities/demodata.php');
|
2020-11-19 23:14:48 +01:00
|
|
|
require_once ('utilities/tse.php');
|
|
|
|
require_once ('utilities/operations.php');
|
|
|
|
require_once ('utilities/layouter.php');
|
|
|
|
require_once ('utilities/terminals.php');
|
|
|
|
require_once ('utilities/vouchers.php');
|
2020-11-19 23:10:06 +01:00
|
|
|
require_once ('guestsync.php');
|
2020-11-19 23:11:27 +01:00
|
|
|
require_once ('timetracking.php');
|
2020-11-19 23:11:33 +01:00
|
|
|
require_once ('tasks.php');
|
2020-11-19 23:11:52 +01:00
|
|
|
require_once ('pickup.php');
|
2020-11-19 22:44:19 +01:00
|
|
|
|
|
|
|
$module = $_GET["module"];
|
|
|
|
$command = $_GET["command"];
|
|
|
|
|
2020-11-19 22:47:44 +01:00
|
|
|
Logger::logcmd($module,$command,"");
|
|
|
|
|
2020-11-19 23:00:05 +01:00
|
|
|
$plugins = havePlugins();
|
|
|
|
|
2020-11-19 23:12:13 +01:00
|
|
|
if(session_id() == '') {
|
|
|
|
ini_set('session.gc_maxlifetime',65535);
|
|
|
|
session_set_cookie_params(65535);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-11-19 23:01:01 +01:00
|
|
|
if (defined('IS_INSTALLMODE')) {
|
|
|
|
$pdo = DbUtils::openDbAndReturnPdoStatic();
|
|
|
|
$memlimit = CommonUtils::getConfigValue($pdo, "memorylimit", '256');
|
|
|
|
if ($memlimit != "-1") {
|
|
|
|
$memlimit = $memlimit . 'M';
|
|
|
|
}
|
|
|
|
ini_set('memory_limit',$memlimit);
|
|
|
|
$pdo = null;
|
2020-11-19 23:00:58 +01:00
|
|
|
}
|
|
|
|
|
2020-11-19 22:44:19 +01:00
|
|
|
if ($module == 'admin') {
|
2020-11-19 23:00:05 +01:00
|
|
|
$adminModule = new Admin();
|
2020-11-19 22:44:19 +01:00
|
|
|
$adminModule->handleCommand($command);
|
|
|
|
} else if ($module == 'queue') {
|
|
|
|
$queueContent = new QueueContent();
|
|
|
|
$queueContent->handleCommand($command);
|
|
|
|
} else if ($module == 'products') {
|
|
|
|
$products = new Products();
|
|
|
|
$products->handleCommand($command);
|
|
|
|
} else if ($module == 'roomtables') {
|
|
|
|
$roomtables = new Roomtables();
|
|
|
|
$roomtables->handleCommand($command);
|
|
|
|
} else if ($module == 'reports') {
|
|
|
|
$reports = new Reports();
|
|
|
|
$reports->handleCommand($command);
|
|
|
|
} else if ($module == 'bill') {
|
|
|
|
$reports = new Bill();
|
|
|
|
$reports->handleCommand($command);
|
|
|
|
} else if ($module == 'closing') {
|
|
|
|
$closingModule = new Closing();
|
|
|
|
$closingModule->handleCommand($command);
|
|
|
|
} else if ($module == 'printqueue') {
|
|
|
|
$printQueue = new PrintQueue();
|
|
|
|
$printQueue->handleCommand($command);
|
|
|
|
} else if ($module == 'feedback') {
|
|
|
|
$feedback = new Feedback();
|
|
|
|
$feedback->handleCommand($command);
|
2020-11-19 22:47:44 +01:00
|
|
|
} else if ($module == 'reservation') {
|
|
|
|
$reservation = new Reservation();
|
|
|
|
$reservation->handleCommand($command);
|
|
|
|
} else if ($module == 'rating') {
|
|
|
|
$rating = new Rating();
|
|
|
|
$rating->handleCommand($command);
|
2020-11-19 23:02:08 +01:00
|
|
|
} else if ($module == 'customers') {
|
|
|
|
$rating = new Customers();
|
|
|
|
$rating->handleCommand($command);
|
2020-11-19 23:02:33 +01:00
|
|
|
} else if ($module == 'updater') {
|
|
|
|
$updater = new Updater();
|
|
|
|
$updater->handleCommand($command);
|
2020-11-19 23:10:06 +01:00
|
|
|
} else if ($module == 'guestsync') {
|
|
|
|
Guestsync::handleCommand($command);
|
2020-11-19 23:11:27 +01:00
|
|
|
} else if ($module == 'timetracking') {
|
|
|
|
Timetracking::handleCommand($command);
|
2020-11-19 23:11:33 +01:00
|
|
|
} else if ($module == 'tasks') {
|
|
|
|
Tasks::handleCommand($command);
|
2020-11-19 23:11:52 +01:00
|
|
|
} else if ($module == 'pickup') {
|
|
|
|
Pickup::handleCommand($command);
|
2020-11-19 23:12:46 +01:00
|
|
|
} else if ($module == 'demodata') {
|
|
|
|
Demodata::handleCommand($command);
|
2020-11-19 23:14:48 +01:00
|
|
|
} else if ($module == 'tse') {
|
|
|
|
Tse::handleCommand($command);
|
2020-11-19 23:14:55 +01:00
|
|
|
} else if ($module == 'vouchers') {
|
|
|
|
Vouchermanager::handleCommand($command);
|
2020-11-19 22:44:19 +01:00
|
|
|
}
|
|
|
|
|
2020-11-19 23:00:05 +01:00
|
|
|
|
|
|
|
function havePlugins() {
|
|
|
|
if (file_exists("../plugins")) {
|
|
|
|
if (file_exists("../plugins/config.json")) {
|
|
|
|
$content = file_get_contents("../plugins/config.json");
|
|
|
|
|
|
|
|
$pluginconfig = json_decode($content);
|
|
|
|
|
|
|
|
$props = get_object_vars($pluginconfig);
|
|
|
|
$keys = array_keys($props);
|
|
|
|
foreach ($keys as $aKey) {
|
|
|
|
$aPluginConfig = $pluginconfig->$aKey;
|
|
|
|
$className = $aPluginConfig->PluginClass;
|
|
|
|
require_once "../plugins/$className.php";
|
|
|
|
}
|
|
|
|
CommonUtils::setPluginConfig($pluginconfig);
|
|
|
|
return $pluginconfig;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return null;
|
2020-11-19 23:03:26 +01:00
|
|
|
}
|