OrderSprinter 1.4.6
This commit is contained in:
parent
00e310abcf
commit
6ac093bae8
|
@ -9,8 +9,8 @@
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||||
<meta name="author" content="Stefan Pichel">
|
<meta name="author" content="Stefan Pichel">
|
||||||
|
|
||||||
<link rel="stylesheet" href="css/gueststyle.css?v=1.4.5" />
|
<link rel="stylesheet" href="css/gueststyle.css?v=1.4.6" />
|
||||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css?v=1.4.5" />
|
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css?v=1.4.6" />
|
||||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||||
<link rel="stylesheet" href="php/3rdparty/jquery.mobile-1.4.0.min.css" type="text/css" />
|
<link rel="stylesheet" href="php/3rdparty/jquery.mobile-1.4.0.min.css" type="text/css" />
|
||||||
<script src="php/3rdparty/jquery-1.11.3.min.js"></script>
|
<script src="php/3rdparty/jquery-1.11.3.min.js"></script>
|
||||||
|
@ -46,11 +46,18 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div data-role="collapsible" data-content-theme="c" data-collapsed="false" data-theme="e" id="tablecodediv" style="display:none;" class="notcollapsible">
|
<div data-role="collapsible" data-content-theme="c" data-collapsed="false" data-theme="e" id="tablecodediv" style="display:none;" class="notcollapsible">
|
||||||
<H2>Tisch-Code</H2>
|
<H2>Code-Eingabe</H2>
|
||||||
<p>Bitte geben Sie hier den Tisch-Code ein:
|
|
||||||
<p><input class="whiteinput" type="text" id="tablecodefield" /><br>
|
<div id="tablecodearea" style="display:none;">
|
||||||
<p>Bitte geben Sie hier die Tageslosung ein:
|
<p>Bitte geben Sie hier den Tisch-Code ein:
|
||||||
<p><input class="whiteinput" type="text" id="dailycodefield" /><br>
|
<p><input class="whiteinput" type="text" id="tablecodefield" /><br>
|
||||||
|
</div> <!-- tablecodearea -->
|
||||||
|
|
||||||
|
<div id="daycodearea" style="display:none;">
|
||||||
|
<p>Bitte geben Sie hier die Tageslosung ein:
|
||||||
|
<p><input class="whiteinput" type="text" id="dailycodefield" /><br>
|
||||||
|
</div> <!-- daycodearea -->
|
||||||
|
|
||||||
<div class="ui-grid-a">
|
<div class="ui-grid-a">
|
||||||
<div class="ui-block-a"><button type="submit" data-theme="d" data-icon="back" id="codebackbtn">Zurück</button></div>
|
<div class="ui-block-a"><button type="submit" data-theme="d" data-icon="back" id="codebackbtn">Zurück</button></div>
|
||||||
<div class="ui-block-b"><button type="submit" data-theme="f" data-icon="check" id="submitcodesbtn">Weiter</button></div>
|
<div class="ui-block-b"><button type="submit" data-theme="f" data-icon="check" id="submitcodesbtn">Weiter</button></div>
|
||||||
|
@ -98,7 +105,7 @@
|
||||||
<div data-role="footer" data-theme="b" id="thefooter1">
|
<div data-role="footer" data-theme="b" id="thefooter1">
|
||||||
<div class="ui-grid-a">
|
<div class="ui-grid-a">
|
||||||
<div class="ui-block-a"> OrderSprinter</div>
|
<div class="ui-block-a"> OrderSprinter</div>
|
||||||
<div class="ui-block-b grid_right" id="versioninfo">1.4.5 </div>
|
<div class="ui-block-b grid_right" id="versioninfo">1.4.6 </div>
|
||||||
</div><!-- /grid-a -->
|
</div><!-- /grid-a -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -90,10 +90,10 @@ if (isset($_POST['code'])) {
|
||||||
} else {
|
} else {
|
||||||
echo "<html>";
|
echo "<html>";
|
||||||
echo "<head><title>Installation Gastsystem</title>";
|
echo "<head><title>Installation Gastsystem</title>";
|
||||||
echo '<link rel="stylesheet" type="text/css" href="css/gueststyle.css?v=1.4.5">';
|
echo '<link rel="stylesheet" type="text/css" href="css/gueststyle.css?v=1.4.6">';
|
||||||
echo "</head>";
|
echo "</head>";
|
||||||
echo "<body><div class=surround>";
|
echo "<body><div class=surround>";
|
||||||
echo "<span class=headerline>Installation OrderSprinter-Gastsystem 1.4.5</span><br><br>";
|
echo "<span class=headerline>Installation OrderSprinter-Gastsystem 1.4.6</span><br><br>";
|
||||||
echo "<form action='install.php' method='post'><input class=installfield name=code id=code type=text placeholder='Installationscode' />";
|
echo "<form action='install.php' method='post'><input class=installfield name=code id=code type=text placeholder='Installationscode' />";
|
||||||
echo "<br><input type=submit value='Installation starten' class=installbtn />";
|
echo "<br><input type=submit value='Installation starten' class=installbtn />";
|
||||||
echo "</form></div></html>";
|
echo "</form></div></html>";
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -12,6 +12,3 @@ defined('TAB_PREFIX') || define ('TAB_PREFIX', 'os_');
|
||||||
|
|
||||||
// Code für die Installation, und als Gastsystemscode in der Kernapplikation einzutragen
|
// Code für die Installation, und als Gastsystemscode in der Kernapplikation einzutragen
|
||||||
defined('CODE') || define ('CODE', '123456xxx');
|
defined('CODE') || define ('CODE', '123456xxx');
|
||||||
|
|
||||||
// Timeout in Sekunden: danach müssen Gaeste wieder den Tischcode und die Tageslosung eingeben
|
|
||||||
defined('TIMEOUT') || define ('TIMEOUT', '300');
|
|
||||||
|
|
|
@ -55,4 +55,14 @@ class DbUtils {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function getConfigItem($pdo,$item,$default) {
|
||||||
|
$sql = "SELECT value FROM %ossystem% WHERE item=?";
|
||||||
|
$result = self::fetchSqlAll($pdo, $sql, array($item));
|
||||||
|
if (count($result) == 0) {
|
||||||
|
return $default;
|
||||||
|
} else {
|
||||||
|
return $result[0]["value"];
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -25,24 +25,28 @@ class Tables {
|
||||||
$tablesArr[] = array("id" => $t["id"],"name" => $t["name"]);
|
$tablesArr[] = array("id" => $t["id"],"name" => $t["name"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$currency = "";
|
$currency = DbUtils::getConfigItem($pdo, 'currency', "");
|
||||||
$decpoint = ".";
|
$decpoint = DbUtils::getConfigItem($pdo, 'decpoint', ".");
|
||||||
|
$askdaycode = DbUtils::getConfigItem($pdo, 'askdaycode', 1);
|
||||||
|
$asktablecode = DbUtils::getConfigItem($pdo, 'asktablecode', 1);
|
||||||
|
$guesttimeout = DbUtils::getConfigItem($pdo, 'guesttimeout', 5) * 60;
|
||||||
|
|
||||||
$result = DbUtils::fetchSqlAll($pdo, $sql, array('currency'));
|
return array("status" => "OK",
|
||||||
if (count($result) > 0) {
|
"msg" => $tablesArr,
|
||||||
$currency = $result[0]["value"];
|
"currency" => $currency,
|
||||||
}
|
"decpoint" => $decpoint,
|
||||||
$result = DbUtils::fetchSqlAll($pdo, $sql, array('decpoint'));
|
"askdaycode" => $askdaycode,
|
||||||
if (count($result) > 0) {
|
"asktablecode" => $asktablecode,
|
||||||
$decpoint = $result[0]["value"];
|
"timeout" => $guesttimeout);
|
||||||
}
|
|
||||||
|
|
||||||
return array("status" => "OK","msg" => $tablesArr,"currency" => $currency,"decpoint" => $decpoint, "timeout" => TIMEOUT);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function checkcodes($pdo,$tableid,$tablecode,$dailycode) {
|
public static function checkcodes($pdo,$tableid,$tablecode,$dailycode) {
|
||||||
$tablecode = trim($tablecode);
|
$tablecode = trim($tablecode);
|
||||||
$dailycode = trim($dailycode);
|
$dailycode = trim($dailycode);
|
||||||
|
|
||||||
|
$askdaycode = DbUtils::getConfigItem($pdo, 'askdaycode', 1);
|
||||||
|
$asktablecode = DbUtils::getConfigItem($pdo, 'asktablecode', 1);
|
||||||
|
|
||||||
$sql = "SELECT value FROM %ossystem% WHERE item=?";
|
$sql = "SELECT value FROM %ossystem% WHERE item=?";
|
||||||
$result = DbUtils::fetchSqlAll($pdo, $sql, array('resttables'));
|
$result = DbUtils::fetchSqlAll($pdo, $sql, array('resttables'));
|
||||||
|
|
||||||
|
@ -50,32 +54,37 @@ class Tables {
|
||||||
return array("status" => "ERROR","msg" => "Keine Tischdefinition hinterlegt.");
|
return array("status" => "ERROR","msg" => "Keine Tischdefinition hinterlegt.");
|
||||||
}
|
}
|
||||||
|
|
||||||
$resttables = $result[0];
|
if ($asktablecode == 1) {
|
||||||
$tables = json_decode($resttables["value"], true);
|
$resttables = $result[0];
|
||||||
|
$tables = json_decode($resttables["value"], true);
|
||||||
|
|
||||||
foreach ($tables as $t) {
|
foreach ($tables as $t) {
|
||||||
if ($t["id"] == $tableid) {
|
if ($t["id"] == $tableid) {
|
||||||
if (trim($t["code"]) == $tablecode) {
|
if (trim($t["code"]) == $tablecode) {
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
return array("status" => "ERROR","msg" => "Falscher Tischcode!");
|
return array("status" => "ERROR","msg" => "Falscher Tischcode!");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = "SELECT value FROM %ossystem% WHERE item=?";
|
if ($askdaycode == 1) {
|
||||||
$result = DbUtils::fetchSqlAll($pdo, $sql, array('dailycode'));
|
$sql = "SELECT value FROM %ossystem% WHERE item=?";
|
||||||
|
$result = DbUtils::fetchSqlAll($pdo, $sql, array('dailycode'));
|
||||||
|
|
||||||
if (count($result) == 0) {
|
if (count($result) == 0) {
|
||||||
return array("status" => "ERROR","msg" => "Keine Tageslosung wurde hinterlegt.");
|
return array("status" => "ERROR","msg" => "Keine Tageslosung wurde hinterlegt.");
|
||||||
}
|
}
|
||||||
|
|
||||||
$dailycodeInDb = trim($result[0]["value"]);
|
$dailycodeInDb = trim($result[0]["value"]);
|
||||||
if ($dailycode == $dailycodeInDb) {
|
if ($dailycode == $dailycodeInDb) {
|
||||||
return array("status" => "OK");
|
return array("status" => "OK");
|
||||||
} else {
|
} else {
|
||||||
return array("status" => "ERROR","msg" => "Falsche Tageslosung angegeben!");
|
return array("status" => "ERROR","msg" => "Falsche Tageslosung angegeben!");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
return array("status" => "OK");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,12 +3,10 @@
|
||||||
require_once 'php/dbutils.php';
|
require_once 'php/dbutils.php';
|
||||||
require_once 'php/config.php';
|
require_once 'php/config.php';
|
||||||
|
|
||||||
// REM* wget "http://localhost/bestellung/php/contenthandler.php?module=guestsync&command=sync"
|
|
||||||
|
|
||||||
class Sync {
|
class Sync {
|
||||||
public static function insertSystemData($pdo,$systemdata) {
|
public static function insertSystemData($pdo,$systemdata) {
|
||||||
try {
|
try {
|
||||||
// REM* check for guestcode
|
|
||||||
if (!isset($systemdata["guestcode"])) {
|
if (!isset($systemdata["guestcode"])) {
|
||||||
return array("status" => "ERROR","msg" => "No Access code transmitted!");
|
return array("status" => "ERROR","msg" => "No Access code transmitted!");
|
||||||
}
|
}
|
||||||
|
@ -26,6 +24,10 @@ class Sync {
|
||||||
self::insertIntoSystemTable($pdo, $systemdata, 'currency');
|
self::insertIntoSystemTable($pdo, $systemdata, 'currency');
|
||||||
self::insertIntoSystemTable($pdo, $systemdata, 'decpoint');
|
self::insertIntoSystemTable($pdo, $systemdata, 'decpoint');
|
||||||
|
|
||||||
|
self::insertIntoSystemTableWithCheck($pdo, $systemdata, 'askdaycode');
|
||||||
|
self::insertIntoSystemTableWithCheck($pdo, $systemdata, 'asktablecode');
|
||||||
|
self::insertIntoSystemTableWithCheck($pdo, $systemdata, 'guesttimeout');
|
||||||
|
|
||||||
if (isset($systemdata["timezone"])) {
|
if (isset($systemdata["timezone"])) {
|
||||||
self::updateOsAccessStatus($pdo, $systemdata["timezone"]);
|
self::updateOsAccessStatus($pdo, $systemdata["timezone"]);
|
||||||
}
|
}
|
||||||
|
@ -44,11 +46,22 @@ class Sync {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// REM* update that an access from OrderSprinter core webapp has taken place
|
private static function insertIntoSystemTableWithCheck($pdo,$data,$item) {
|
||||||
|
if (isset($data[$item])) {
|
||||||
|
$sql = "SELECT id FROM %ossystem% WHERE item=?";
|
||||||
|
$result = DbUtils::fetchSqlAll($pdo, $sql, array($item));
|
||||||
|
if (count($result) == 0) {
|
||||||
|
$sql = "INSERT INTO %ossystem% (item,value) VALUES(?,?)";
|
||||||
|
DbUtils::execSql($pdo, $sql, array($item,$data[$item]));
|
||||||
|
} else {
|
||||||
|
self::insertIntoSystemTable($pdo, $data, $item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private static function updateOsAccessStatus($pdo,$timezone) {
|
private static function updateOsAccessStatus($pdo,$timezone) {
|
||||||
date_default_timezone_set($timezone);
|
date_default_timezone_set($timezone);
|
||||||
$date = new DateTime();
|
$date = new DateTime();
|
||||||
// REM* seconds since Jan 01 1970. (UTC)
|
|
||||||
$currentTimeStamp = $date->getTimestamp();
|
$currentTimeStamp = $date->getTimestamp();
|
||||||
|
|
||||||
$sql = "SELECT id FROM %gueststatus% WHERE item=?";
|
$sql = "SELECT id FROM %gueststatus% WHERE item=?";
|
||||||
|
|
Binary file not shown.
|
@ -85,7 +85,7 @@ class Installer {
|
||||||
}
|
}
|
||||||
Database::dropTables($pdo);
|
Database::dropTables($pdo);
|
||||||
Database::createEmptyTables($pdo, $prefix);
|
Database::createEmptyTables($pdo, $prefix);
|
||||||
Database::setVersion($pdo,$prefix,"1.4.5");
|
Database::setVersion($pdo,$prefix,"1.4.6");
|
||||||
Database::setAccessPassword($pdo,$prefix,$adminpass);
|
Database::setAccessPassword($pdo,$prefix,$adminpass);
|
||||||
Database::setRefreshRate($pdo,$prefix,"5"); // default: 5 times per hour
|
Database::setRefreshRate($pdo,$prefix,"5"); // default: 5 times per hour
|
||||||
return array("status" => "OK","msg" => "Installation successful");
|
return array("status" => "OK","msg" => "Installation successful");
|
||||||
|
|
Binary file not shown.
|
@ -5,7 +5,7 @@
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||||
<meta name="author" content="Stefan Pichel">
|
<meta name="author" content="Stefan Pichel">
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.4.5">
|
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.4.6">
|
||||||
|
|
||||||
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
|
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
|
||||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||||
<meta name="author" content="Stefan Pichel">
|
<meta name="author" content="Stefan Pichel">
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.4.5">
|
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.4.6">
|
||||||
|
|
||||||
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
|
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
|
||||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -4,7 +4,7 @@
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.4.5">
|
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.4.6">
|
||||||
|
|
||||||
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
|
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
|
||||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||||
|
@ -58,7 +58,7 @@ var FEED_SENT_TXT = ["Wenn eine Kopie der Nachricht an die angegebene Emailadres
|
||||||
|
|
||||||
var FEED_ERROR_TXT = ["Fehler beim Nachrichtenversand: ","Error during mail transmisión: ","Error durante envío del mail: "];
|
var FEED_ERROR_TXT = ["Fehler beim Nachrichtenversand: ","Error during mail transmisión: ","Error durante envío del mail: "];
|
||||||
|
|
||||||
var FEED_INFO_TXT = ["Diese Seite dient zur Übermittlung von Feedback an den Entwickler. Die Email wird das Mailkonto des Betreibers versendet.",
|
var FEED_INFO_TXT = ["Diese Seite dient zur Übermittlung von Feedback an den Entwickler. Die Email wird über das Mailkonto des Betreibers versendet.",
|
||||||
"This page serves for sending a feedmail email to the developer of this software. The email will be send by use of the mail account of the administrator.",
|
"This page serves for sending a feedmail email to the developer of this software. The email will be send by use of the mail account of the administrator.",
|
||||||
"Esta página sirve para enviar un email al programador de este software. El email va a ser enviado por la cuenta del administrador."];
|
"Esta página sirve para enviar un email al programador de este software. El email va a ser enviado por la cuenta del administrador."];
|
||||||
|
|
||||||
|
|
|
@ -9,8 +9,8 @@
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||||
<meta name="author" content="Stefan Pichel">
|
<meta name="author" content="Stefan Pichel">
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.4.5">
|
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.4.6">
|
||||||
<link rel="stylesheet" type="text/css" href="css/numfield.css?v=1.4.5">
|
<link rel="stylesheet" type="text/css" href="css/numfield.css?v=1.4.6">
|
||||||
|
|
||||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
||||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||||
|
@ -215,7 +215,7 @@ function handleResultOfInstallCheck(is_installed) {
|
||||||
if (is_installed == "Yes") {
|
if (is_installed == "Yes") {
|
||||||
useInstallation();
|
useInstallation();
|
||||||
} else {
|
} else {
|
||||||
setTimeout(function(){document.location.href = "install.html?v=1.4.5"},500);
|
setTimeout(function(){document.location.href = "install.html?v=1.4.6"},500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -727,7 +727,7 @@ $(document).ready(function() {
|
||||||
<tr id=updateline>
|
<tr id=updateline>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
<td align=center>
|
<td align=center>
|
||||||
<button id="updatebtn">Update -> 1.4.5</button>
|
<button id="updatebtn">Update -> 1.4.6</button>
|
||||||
<span id="updateinprogresstxt" style="display:none;">Update... bitte warten.</span>
|
<span id="updateinprogresstxt" style="display:none;">Update... bitte warten.</span>
|
||||||
</td>
|
</td>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
|
|
|
@ -2893,6 +2893,44 @@ return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function updateUserTable1405_1406($prefix, $version, $dbname) {
|
||||||
|
$pdo = $this->pdo;
|
||||||
|
try {
|
||||||
|
if ($version != "1.4.5") {
|
||||||
|
$ret = $this->updateUserTable1404_1405($prefix, $version, $dbname);
|
||||||
|
if (!$ret) {
|
||||||
|
echo "Version update v1.4.4 to 1.4.5 not successful.";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
DbUtils::overrulePrefix($prefix);
|
||||||
|
|
||||||
|
$this->execSqlWithParam($pdo, "INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL,?,?)", array('askdaycode','1'));
|
||||||
|
$this->execSqlWithParam($pdo, "INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL,?,?)", array('asktablecode','1'));
|
||||||
|
$this->execSqlWithParam($pdo, "INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL,?,?)", array('guesttimeout','5'));
|
||||||
|
$this->execSqlWithParam($pdo, "INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL,?,?)", array('showdaycode','0'));
|
||||||
|
|
||||||
|
$sql = "ALTER TABLE %products% ADD INDEX pcatindex (category)";
|
||||||
|
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
||||||
|
$stmt->execute();
|
||||||
|
$sql = "OPTIMIZE TABLE %products%";
|
||||||
|
$stmt = $pdo->prepare($this->basedb->resolveTablenamesInSqlString($sql));
|
||||||
|
$stmt->execute();
|
||||||
|
$sql = "OPTIMIZE TABLE %queue%";
|
||||||
|
$stmt = $pdo->prepare($this->basedb->resolveTablenamesInSqlString($sql));
|
||||||
|
$stmt->execute();
|
||||||
|
|
||||||
|
|
||||||
|
$this->updateVersion($pdo, '1.4.6');
|
||||||
|
|
||||||
|
return true;
|
||||||
|
} catch (PDOException $e) {
|
||||||
|
echo "Error in v1.4.5 to 1.4.6: $e";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function insertIntRow($pdo,$table,$rowToInsert,$afterRow) {
|
function insertIntRow($pdo,$table,$rowToInsert,$afterRow) {
|
||||||
$this->insertTypeRow($pdo, $table, $rowToInsert, $afterRow, 'INT(1) NULL');
|
$this->insertTypeRow($pdo, $table, $rowToInsert, $afterRow, 'INT(1) NULL');
|
||||||
}
|
}
|
||||||
|
@ -3068,7 +3106,7 @@ $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VAL
|
||||||
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'billlanguage', $billlanguage)");
|
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'billlanguage', $billlanguage)");
|
||||||
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'currency', '$currency')");
|
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'currency', '$currency')");
|
||||||
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'receiptfontsize', '12')");
|
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'receiptfontsize', '12')");
|
||||||
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'version', '1.4.5')");
|
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'version', '1.4.6')");
|
||||||
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'paymentconfig', '0')");
|
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'paymentconfig', '0')");
|
||||||
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'remoteaccesscode', null)");
|
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'remoteaccesscode', null)");
|
||||||
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'decpoint', '$decpoint')");
|
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'decpoint', '$decpoint')");
|
||||||
|
@ -3078,6 +3116,10 @@ $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VAL
|
||||||
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'bigfontworkreceipt', '0')");
|
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'bigfontworkreceipt', '0')");
|
||||||
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'prominentsearch', '0')");
|
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'prominentsearch', '0')");
|
||||||
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'guestjobprint', '1')");
|
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'guestjobprint', '1')");
|
||||||
|
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'askdaycode', '1')");
|
||||||
|
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'showdaycode', '0')");
|
||||||
|
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'asktablecode', '1')");
|
||||||
|
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'guesttimeout', '5')");
|
||||||
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'groupworkitemsf', '1')");
|
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'groupworkitemsf', '1')");
|
||||||
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'groupworkitemsd', '1')");
|
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'groupworkitemsd', '1')");
|
||||||
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'addreceipttoprinter', null)");
|
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'addreceipttoprinter', null)");
|
||||||
|
@ -3516,7 +3558,7 @@ $zones[] = $timezone_identifiers[$i];
|
||||||
echo json_encode($zones);
|
echo json_encode($zones);
|
||||||
} else if ($command == 'update') {
|
} else if ($command == 'update') {
|
||||||
set_time_limit(60*30);
|
set_time_limit(60*30);
|
||||||
$installerVersion = "1.4.5";
|
$installerVersion = "1.4.6";
|
||||||
|
|
||||||
$admin = new InstallAdmin();
|
$admin = new InstallAdmin();
|
||||||
$pdo = $admin->openDbAndReturnPdo($_POST['host'],$_POST['db'],$_POST['user'],$_POST['password']);
|
$pdo = $admin->openDbAndReturnPdo($_POST['host'],$_POST['db'],$_POST['user'],$_POST['password']);
|
||||||
|
@ -3548,7 +3590,7 @@ $supportedVersions = array("1.0.22","1.0.23","1.0.24","1.0.25","1.0.26","1.0.27"
|
||||||
"1.2.0","1.2.1","1.2.2", "1.2.3", "1.2.4","1.2.5","1.2.6","1.2.7","1.2.8","1.2.9","1.2.10","1.2.11","1.2.12","1.2.13","1.2.14","1.2.15","1.2.16","1.2.17",
|
"1.2.0","1.2.1","1.2.2", "1.2.3", "1.2.4","1.2.5","1.2.6","1.2.7","1.2.8","1.2.9","1.2.10","1.2.11","1.2.12","1.2.13","1.2.14","1.2.15","1.2.16","1.2.17",
|
||||||
"1.2.18","1.2.19","1.2.20","1.2.21","1.2.22","1.3.0","1.3.1","1.3.2","1.3.3","1.3.4","1.3.5","1.3.6","1.3.7","1.3.8","1.3.9","1.3.10","1.3.11","1.3.12",
|
"1.2.18","1.2.19","1.2.20","1.2.21","1.2.22","1.3.0","1.3.1","1.3.2","1.3.3","1.3.4","1.3.5","1.3.6","1.3.7","1.3.8","1.3.9","1.3.10","1.3.11","1.3.12",
|
||||||
"1.3.13","1.3.14","1.3.15","1.3.16","1.3.17","1.3.18","1.3.19","1.3.20","1.3.21","1.3.22","1.3.23","1.3.24","1.3.25","1.3.26","1.4.0","1.4.1","1.4.2","1.4.3",
|
"1.3.13","1.3.14","1.3.15","1.3.16","1.3.17","1.3.18","1.3.19","1.3.20","1.3.21","1.3.22","1.3.23","1.3.24","1.3.25","1.3.26","1.4.0","1.4.1","1.4.2","1.4.3",
|
||||||
"1.4.4"
|
"1.4.4","1.4.5"
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!in_array($version, $supportedVersions)) {
|
if (!in_array($version, $supportedVersions)) {
|
||||||
|
@ -3556,7 +3598,7 @@ echo json_encode("Quellversion nicht unterstützt");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$ret = $admin->updateUserTable1404_1405($_POST['prefix'], $version, $_POST['db']);
|
$ret = $admin->updateUserTable1405_1406($_POST['prefix'], $version, $_POST['db']);
|
||||||
|
|
||||||
if(session_id() == '') {
|
if(session_id() == '') {
|
||||||
session_start();
|
session_start();
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||||
<meta name="author" content="Stefan Pichel">
|
<meta name="author" content="Stefan Pichel">
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.4.5">
|
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.4.6">
|
||||||
|
|
||||||
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
|
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
|
||||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||||
<meta name="author" content="Stefan Pichel">
|
<meta name="author" content="Stefan Pichel">
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.4.5">
|
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.4.6">
|
||||||
|
|
||||||
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
|
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
|
||||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||||
|
@ -357,6 +357,11 @@ var MAN_SHOWPAYMENT8 = ["Gast","Guest","Huésped"];
|
||||||
var MAN_DBLOG = ["Debug-Logging","Debug logging","Debug logging"];
|
var MAN_DBLOG = ["Debug-Logging","Debug logging","Debug logging"];
|
||||||
var MAN_PRICE_IN_LIST = ["Preisangabe neben Produkt","List price next to product","Mostrar precio en lista de productos"];
|
var MAN_PRICE_IN_LIST = ["Preisangabe neben Produkt","List price next to product","Mostrar precio en lista de productos"];
|
||||||
var MAN_GUEST_JOB_PRINT = ["Gastbestelljob drucken","Print guest order","Imprimir orden de remote"];
|
var MAN_GUEST_JOB_PRINT = ["Gastbestelljob drucken","Print guest order","Imprimir orden de remote"];
|
||||||
|
var MAN_ASK_DAYCODE = ["Abfrage Tageslosung","Require input of day code in guest system","Pregunta código del dia en sistema de huéspedes"];
|
||||||
|
var MAN_SHOW_DAYCODE = ["Tageslosung in Bestellansicht anzeigen","Show day code in order view","Mostrat códiga del dia en vista de ordenes"];
|
||||||
|
var MAN_ASK_TABLECODE = ["Abfrage Tischcode","Require input of table code","Pregunta código de la mesa en sistem de huéspedes"];
|
||||||
|
var MAN_GUEST_TIMEOUT = ["Timeout (Min)","Timeout (min)","Timeout (min)"];
|
||||||
|
var MAN_GUESTTIMEOUT_HINT = ["Ein Timeout von 0 bedeutet, dass gar ein Timeout abläuft.","A timeout value of 0 means that there is no timeout at all.","Un valor de timeout de 0 significa que no hay ningún timeout."];
|
||||||
var MAN_RESTAURANT_MODE = ["Restaurantmodus","Restaurant mode","Usar para restaurantes"];
|
var MAN_RESTAURANT_MODE = ["Restaurantmodus","Restaurant mode","Usar para restaurantes"];
|
||||||
var MAN_REST_MODE_HINT = ["Hinweis: Wird der Restaurantmodus auf <i>Nein</i> gesetzt, wird in der <b>Desktopansicht</b> die Tischauswahl deaktiviert. Alle Produkte werden als Außer-Haus-Verkauf gebucht.","Hint: If the restautant mode is set to <i>no</i> in the <b>desktop view</b> the table selection is deactivated and all products are ordered as <i>to-go</i>","Nota: Si el modus del restaurante es configurado a <i>no</i> en la vista de <b>Desktop</b> la selección de las mesas es deactivada y todos los productos son ordenados como <i>to-go</i>"];
|
var MAN_REST_MODE_HINT = ["Hinweis: Wird der Restaurantmodus auf <i>Nein</i> gesetzt, wird in der <b>Desktopansicht</b> die Tischauswahl deaktiviert. Alle Produkte werden als Außer-Haus-Verkauf gebucht.","Hint: If the restautant mode is set to <i>no</i> in the <b>desktop view</b> the table selection is deactivated and all products are ordered as <i>to-go</i>","Nota: Si el modus del restaurante es configurado a <i>no</i> en la vista de <b>Desktop</b> la selección de las mesas es deactivada y todos los productos son ordenados como <i>to-go</i>"];
|
||||||
var MAN_SPECIAL_SETTINGS_TXT = ["Einstellungen für spezielle Abläufe:","Settings for special workflows:","Configuración para workflows muy escpeciales:"];
|
var MAN_SPECIAL_SETTINGS_TXT = ["Einstellungen für spezielle Abläufe:","Settings for special workflows:","Configuración para workflows muy escpeciales:"];
|
||||||
|
@ -392,7 +397,7 @@ var MAN_TMPDIRHINT = ["Wird das PHP-Tmp-Verzeichnis angegeben, so können z.B. k
|
||||||
"Si el tmp esta espcificado es posible crear backups comprimidos por ejemplo. Normalmente el valor default es corecto pero de vez en cuando los providers cambian el valor sin adaptar el PHP framework!"];
|
"Si el tmp esta espcificado es posible crear backups comprimidos por ejemplo. Normalmente el valor default es corecto pero de vez en cuando los providers cambian el valor sin adaptar el PHP framework!"];
|
||||||
|
|
||||||
var lang = 0;
|
var lang = 0;
|
||||||
var generalVals = [12,2,0,3,0,1,1,0,0,1, 0,50,20,10,1,0,0,0,1,0,1,0,0,1,1, 1,1,1,1,1,1,1,1,1,1, 1,2,3, 1,0, 1,0,1];
|
var generalVals = [12,2,0,3,0,1,1,0,0,1, 0,50,20,10,1,0,0,0,1,0,1,0,0,1,1, 1,1,1,1,1,1,1,1,1,1, 1,2,3, 1,0, 1,0,1, 1,1,0];
|
||||||
|
|
||||||
var numberOfClosings = 0;
|
var numberOfClosings = 0;
|
||||||
|
|
||||||
|
@ -503,6 +508,10 @@ var generalValuesSettings = [
|
||||||
["dblog",MAN_DBLOG[lang],"s",40],
|
["dblog",MAN_DBLOG[lang],"s",40],
|
||||||
["priceinlist",MAN_PRICE_IN_LIST[lang],"s",41],
|
["priceinlist",MAN_PRICE_IN_LIST[lang],"s",41],
|
||||||
["guestjobprint",MAN_GUEST_JOB_PRINT[lang],"s",42],
|
["guestjobprint",MAN_GUEST_JOB_PRINT[lang],"s",42],
|
||||||
|
["askdaycode",MAN_ASK_DAYCODE[lang],"s",43],
|
||||||
|
["asktablecode",MAN_ASK_TABLECODE[lang],"s",44],
|
||||||
|
["guesttimeout",MAN_GUEST_TIMEOUT[lang],"i",0,""],
|
||||||
|
["showdaycode",MAN_SHOW_DAYCODE[lang],"s",45]
|
||||||
];
|
];
|
||||||
|
|
||||||
var predef = "";
|
var predef = "";
|
||||||
|
@ -551,6 +560,7 @@ function setLanguage(l) {
|
||||||
$("#smtpusertxt").html(MAN_SMTPUSER[l]);
|
$("#smtpusertxt").html(MAN_SMTPUSER[l]);
|
||||||
$("#smtppasstxt").html(MAN_SMTPPASS[l]);
|
$("#smtppasstxt").html(MAN_SMTPPASS[l]);
|
||||||
$("#smtpporttxt").html(MAN_SMTPPORT[l]);
|
$("#smtpporttxt").html(MAN_SMTPPORT[l]);
|
||||||
|
$("#guesttimeouttxt").html(MAN_GUEST_TIMEOUT[l]);
|
||||||
|
|
||||||
$("#startprodsearchtxt").html(MAN_STARTPRODSEARCH[l]);
|
$("#startprodsearchtxt").html(MAN_STARTPRODSEARCH[l]);
|
||||||
|
|
||||||
|
@ -660,6 +670,8 @@ function setLanguage(l) {
|
||||||
|
|
||||||
$("#applyPrinterInstances").html(MAN_APPLY[l]);
|
$("#applyPrinterInstances").html(MAN_APPLY[l]);
|
||||||
$("#printerInstanceHint").html(MAN_PRINSTANCE_HINT[l]);
|
$("#printerInstanceHint").html(MAN_PRINSTANCE_HINT[l]);
|
||||||
|
|
||||||
|
$("#guesttimeouthint").html(MAN_GUESTTIMEOUT_HINT[l]);
|
||||||
}
|
}
|
||||||
|
|
||||||
function createMonthSelection(label) {
|
function createMonthSelection(label) {
|
||||||
|
@ -782,6 +794,9 @@ function insertGeneralConfigItems(configResult) {
|
||||||
$("#partOfDblog").html(createYesNo("dblog",MAN_DBLOG, values.dblog));
|
$("#partOfDblog").html(createYesNo("dblog",MAN_DBLOG, values.dblog));
|
||||||
$("#partOfPriceinlist").html(createYesNo("priceinlist",MAN_PRICE_IN_LIST, values.priceinlist));
|
$("#partOfPriceinlist").html(createYesNo("priceinlist",MAN_PRICE_IN_LIST, values.priceinlist));
|
||||||
$("#partOfGuestjobprint").html(createYesNo("guestjobprint",MAN_GUEST_JOB_PRINT, values.guestjobprint));
|
$("#partOfGuestjobprint").html(createYesNo("guestjobprint",MAN_GUEST_JOB_PRINT, values.guestjobprint));
|
||||||
|
$("#partOfAskdaycode").html(createYesNo("askdaycode",MAN_ASK_DAYCODE, values.askdaycode));
|
||||||
|
$("#partOfAsktablecode").html(createYesNo("asktablecode",MAN_ASK_TABLECODE, values.asktablecode));
|
||||||
|
$("#partOfShowdaycode").html(createYesNo("showdaycode",MAN_SHOW_DAYCODE, values.showdaycode));
|
||||||
|
|
||||||
$("#partOfclosshowci").html(createYesNo("closshowci",MAN_CLOSSHOWCI,values.closshowci));
|
$("#partOfclosshowci").html(createYesNo("closshowci",MAN_CLOSSHOWCI,values.closshowci));
|
||||||
$("#partOfclosshowpaytaxes").html(createYesNo("closshowpaytaxes",MAN_CLOSSHOWPAYTAXES,values.closshowpaytaxes));
|
$("#partOfclosshowpaytaxes").html(createYesNo("closshowpaytaxes",MAN_CLOSSHOWPAYTAXES,values.closshowpaytaxes));
|
||||||
|
@ -868,6 +883,9 @@ function insertGeneralConfigItems(configResult) {
|
||||||
generalVals[40] = values.dblog;
|
generalVals[40] = values.dblog;
|
||||||
generalVals[41] = values.priceinlist;
|
generalVals[41] = values.priceinlist;
|
||||||
generalVals[42] = values.guestjobprint;
|
generalVals[42] = values.guestjobprint;
|
||||||
|
generalVals[43] = values.askdaycode;
|
||||||
|
generalVals[44] = values.asktablecode;
|
||||||
|
generalVals[45] = values.showdaycode;
|
||||||
|
|
||||||
defaulttmp = values.defaulttmp;
|
defaulttmp = values.defaulttmp;
|
||||||
|
|
||||||
|
@ -877,6 +895,7 @@ function insertGeneralConfigItems(configResult) {
|
||||||
$("#smtppass").val(values.smtppass);
|
$("#smtppass").val(values.smtppass);
|
||||||
$("#partOfSmtpsecure").html(createSMTPSecure(values.smtpsecure));
|
$("#partOfSmtpsecure").html(createSMTPSecure(values.smtpsecure));
|
||||||
$("#smtpport").val(values.smtpport);
|
$("#smtpport").val(values.smtpport);
|
||||||
|
$("#guesttimeout").val(values.guesttimeout);
|
||||||
$("#startprodsearch").val(values.startprodsearch);
|
$("#startprodsearch").val(values.startprodsearch);
|
||||||
|
|
||||||
$("#discountname1").val(values.discountname1);
|
$("#discountname1").val(values.discountname1);
|
||||||
|
@ -1227,7 +1246,7 @@ function initRestoreFileUpload() {
|
||||||
} else {
|
} else {
|
||||||
alert("Import war erfolgreich.");
|
alert("Import war erfolgreich.");
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
document.location.href = "index.html?v=1.4.5";
|
document.location.href = "index.html?v=1.4.6";
|
||||||
},250);
|
},250);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -1764,9 +1783,9 @@ function handleUpdateCheckResult(answer) {
|
||||||
|
|
||||||
var millis=getMillis();
|
var millis=getMillis();
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
document.location.href = "install.html?v=1.4.5&mode=onlyupdate&n=" + millis;
|
document.location.href = "install.html?v=1.4.6&mode=onlyupdate&n=" + millis;
|
||||||
},250);
|
},250);
|
||||||
document.location.href = "install.html?v=1.4.5&mode=onlyupdate&n=" + millis;
|
document.location.href = "install.html?v=1.4.6&mode=onlyupdate&n=" + millis;
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleUpdateReplace(answer) {
|
function handleUpdateReplace(answer) {
|
||||||
|
@ -3539,6 +3558,14 @@ $(document).on("pageinit", "#admin-page", function () {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="partOfGuestjobprint"></div>
|
<div id="partOfGuestjobprint"></div>
|
||||||
|
<div id="partOfAskdaycode"></div>
|
||||||
|
<div id="partOfAsktablecode"></div>
|
||||||
|
<div id="partOfShowdaycode"></div>
|
||||||
|
<div data-role="fieldcontain">
|
||||||
|
<label for="guesttimeout"><span id="guesttimeoutxt">Timeout</span>:</label>
|
||||||
|
<input type="text" value="" data-mini="true" placeholder="5" id="guesttimeout" data-theme="c" class="genConfigEl"/><br>
|
||||||
|
<i id=guesttimeouthint style="padding-left: 50px;padding-right: 50px;">Hinweis: 0 = kein Timeout</i>
|
||||||
|
</div>
|
||||||
|
|
||||||
<br><b><u><span id="specialsettingssectiontxt">Spezialeinstellungen</span></u></b><br><br>
|
<br><b><u><span id="specialsettingssectiontxt">Spezialeinstellungen</span></u></b><br><br>
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||||
<meta name="author" content="Stefan Pichel">
|
<meta name="author" content="Stefan Pichel">
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.4.5">
|
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.4.6">
|
||||||
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
|
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
|
||||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||||
|
|
||||||
|
|
|
@ -99,7 +99,8 @@ class Admin {
|
||||||
"getprinterinstances" => array("loggedin" => 1, "isadmin" => 0, "rights" => array("manager_or_admin")),
|
"getprinterinstances" => array("loggedin" => 1, "isadmin" => 0, "rights" => array("manager_or_admin")),
|
||||||
"setprinterinstances" => array("loggedin" => 1, "isadmin" => 0, "rights" => array("manager_or_admin")),
|
"setprinterinstances" => array("loggedin" => 1, "isadmin" => 0, "rights" => array("manager_or_admin")),
|
||||||
|
|
||||||
"getdashreports" => array("loggedin" => 1, "isadmin" => 0, "rights" => array("dash"))
|
"getdashreports" => array("loggedin" => 1, "isadmin" => 0, "rights" => array("dash")),
|
||||||
|
"getDailycode" => array("loggedin" => 1, "isadmin" => 0, "rights" => null)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
@ -360,6 +361,8 @@ class Admin {
|
||||||
$this->setprinterinstances($_POST["k1"],$_POST["k2"],$_POST["k3"],$_POST["k4"],$_POST["k5"],$_POST["k6"],$_POST["f1"],$_POST["f2"],$_POST["d1"],$_POST["d2"]);
|
$this->setprinterinstances($_POST["k1"],$_POST["k2"],$_POST["k3"],$_POST["k4"],$_POST["k5"],$_POST["k6"],$_POST["f1"],$_POST["f2"],$_POST["d1"],$_POST["d2"]);
|
||||||
} else if ($command == 'getdashreports') {
|
} else if ($command == 'getdashreports') {
|
||||||
$this->getdashreports();
|
$this->getdashreports();
|
||||||
|
} else if ($command == 'getDailycode') {
|
||||||
|
$this->getDailycode();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo "Command not supported.";
|
echo "Command not supported.";
|
||||||
|
@ -944,7 +947,7 @@ class Admin {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$configItems = join(",",array("'decpoint'","'version'","'cancelunpaidcode'","'tax'","'togotax'","'taxaustrianormal'","'taxaustriaerm1'","'taxaustriaerm2'","'taxaustriaspecial'","'currency'","'workflowconfig'","'prominentsearch'","'discount1'","'discount2'","'discount3'","'discountname1'","'discountname2'","'discountname3'","'waitergopayprint'","'cashenabled'","'returntoorder'","'restaurantmode'","'startprodsearch'","'priceinlist'"));
|
$configItems = join(",",array("'decpoint'","'version'","'cancelunpaidcode'","'tax'","'togotax'","'taxaustrianormal'","'taxaustriaerm1'","'taxaustriaerm2'","'taxaustriaspecial'","'currency'","'workflowconfig'","'prominentsearch'","'discount1'","'discount2'","'discount3'","'discountname1'","'discountname2'","'discountname3'","'waitergopayprint'","'cashenabled'","'returntoorder'","'restaurantmode'","'startprodsearch'","'priceinlist'","'showdaycode'","'dailycode'"));
|
||||||
$sql = "select name,setting FROM %config% WHERE name in ($configItems)";
|
$sql = "select name,setting FROM %config% WHERE name in ($configItems)";
|
||||||
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
||||||
$stmt->execute();
|
$stmt->execute();
|
||||||
|
@ -1024,6 +1027,10 @@ class Admin {
|
||||||
$bigfontworkreceipt = CommonUtils::getConfigValueStmt($pdo,$stmt,"bigfontworkreceipt",null);
|
$bigfontworkreceipt = CommonUtils::getConfigValueStmt($pdo,$stmt,"bigfontworkreceipt",null);
|
||||||
$prominentsearch = CommonUtils::getConfigValueStmt($pdo,$stmt,"prominentsearch",null);
|
$prominentsearch = CommonUtils::getConfigValueStmt($pdo,$stmt,"prominentsearch",null);
|
||||||
$guestjobprint = CommonUtils::getConfigValueStmt($pdo,$stmt,"guestjobprint",null);
|
$guestjobprint = CommonUtils::getConfigValueStmt($pdo,$stmt,"guestjobprint",null);
|
||||||
|
$askdaycode = CommonUtils::getConfigValueStmt($pdo,$stmt,"askdaycode",null);
|
||||||
|
$showdaycode = CommonUtils::getConfigValueStmt($pdo,$stmt,"showdaycode",null);
|
||||||
|
$asktablecode = CommonUtils::getConfigValueStmt($pdo,$stmt,"asktablecode",null);
|
||||||
|
$guesttimeout = CommonUtils::getConfigValueStmt($pdo,$stmt,"guesttimeout",5);
|
||||||
$discount1 = CommonUtils::getConfigValueStmt($pdo,$stmt,"discount1",null);
|
$discount1 = CommonUtils::getConfigValueStmt($pdo,$stmt,"discount1",null);
|
||||||
$discount2 = CommonUtils::getConfigValueStmt($pdo,$stmt,"discount2",null);
|
$discount2 = CommonUtils::getConfigValueStmt($pdo,$stmt,"discount2",null);
|
||||||
$discount3 = CommonUtils::getConfigValueStmt($pdo,$stmt,"discount3",null);
|
$discount3 = CommonUtils::getConfigValueStmt($pdo,$stmt,"discount3",null);
|
||||||
|
@ -1132,6 +1139,7 @@ class Admin {
|
||||||
"userlanguage" => $userlang, "receiptprinter" => $receiptprinter,
|
"userlanguage" => $userlang, "receiptprinter" => $receiptprinter,
|
||||||
"receiptfontsize" => $receiptfontsize, "reservationnote" => $reservationnote, "paymentconfig" => $paymentconfig,
|
"receiptfontsize" => $receiptfontsize, "reservationnote" => $reservationnote, "paymentconfig" => $paymentconfig,
|
||||||
"workflowconfig" => $workflowconfig, "emailratingcontact" => $emailratingcontact,"emailbadrating" => $emailbadrating, "guestjobprint" => $guestjobprint,
|
"workflowconfig" => $workflowconfig, "emailratingcontact" => $emailratingcontact,"emailbadrating" => $emailbadrating, "guestjobprint" => $guestjobprint,
|
||||||
|
"askdaycode" => $askdaycode, "asktablecode" => $asktablecode, "guesttimeout" => $guesttimeout, "showdaycode" => $showdaycode,
|
||||||
"rightchangeprice" => $right_changeprice, "bigfontworkreceipt" => $bigfontworkreceipt, "prominentsearch" => $prominentsearch,"groupworkitemsf" => $groupworkitemsf,"groupworkitemsd" => $groupworkitemsd,
|
"rightchangeprice" => $right_changeprice, "bigfontworkreceipt" => $bigfontworkreceipt, "prominentsearch" => $prominentsearch,"groupworkitemsf" => $groupworkitemsf,"groupworkitemsd" => $groupworkitemsd,
|
||||||
"sday" => $now["mday"],"smonth" => $now["mon"], "syear" => $now["year"], "shour" => $now["hours"], "smin" => $now["minutes"],
|
"sday" => $now["mday"],"smonth" => $now["mon"], "syear" => $now["year"], "shour" => $now["hours"], "smin" => $now["minutes"],
|
||||||
"smtphost" => $smtphost,"smtpauth" => $smtpauth,"smtpuser" => $smtpuser,"smtppass" => $smtppass,"smtpsecure" => $smtpsecure,"smtpport" => $smtpport,
|
"smtphost" => $smtphost,"smtpauth" => $smtpauth,"smtpuser" => $smtpuser,"smtppass" => $smtppass,"smtpsecure" => $smtpsecure,"smtpport" => $smtpport,
|
||||||
|
@ -1245,7 +1253,7 @@ class Admin {
|
||||||
$view = "preferences.html";
|
$view = "preferences.html";
|
||||||
}
|
}
|
||||||
|
|
||||||
echo json_encode($view . "?v=1.4.5");
|
echo json_encode($view . "?v=1.4.6");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1452,27 +1460,27 @@ class Admin {
|
||||||
|
|
||||||
if (!self::isOnlyRatingUser($rights, $right_rating, true)) {
|
if (!self::isOnlyRatingUser($rights, $right_rating, true)) {
|
||||||
if ($_SESSION['modus'] == 0) {
|
if ($_SESSION['modus'] == 0) {
|
||||||
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waitertxt[$lang], "link" => "waiter.html?v=1.4.5"); };
|
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waitertxt[$lang], "link" => "waiter.html?v=1.4.6"); };
|
||||||
} else {
|
} else {
|
||||||
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waiterdesktxt[$lang], "link" => "waiterdesktop.php?v=1.4.5"); };
|
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waiterdesktxt[$lang], "link" => "waiterdesktop.php?v=1.4.6"); };
|
||||||
}
|
}
|
||||||
if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.4.5"); };
|
if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.4.6"); };
|
||||||
if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.4.5"); };
|
if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.4.6"); };
|
||||||
if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.4.5"); };
|
if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.4.6"); };
|
||||||
if ($_SESSION['modus'] == 0) {
|
if ($_SESSION['modus'] == 0) {
|
||||||
if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html?v=1.4.5"); };
|
if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html?v=1.4.6"); };
|
||||||
}
|
}
|
||||||
if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.4.5"); };
|
if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.4.6"); };
|
||||||
if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.4.5"); };
|
if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.4.6"); };
|
||||||
if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.4.5"); };
|
if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.4.6"); };
|
||||||
if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.4.5"); };
|
if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.4.6"); };
|
||||||
if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=1.4.5"); };
|
if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=1.4.6"); };
|
||||||
if ($_SESSION['right_customers']) { $mainMenu[] = array("name" => $customerstxt[$lang], "link" => "customers.html?v=1.4.5"); };
|
if ($_SESSION['right_customers']) { $mainMenu[] = array("name" => $customerstxt[$lang], "link" => "customers.html?v=1.4.6"); };
|
||||||
if ($_SESSION['right_dash']) { $mainMenu[] = array("name" => $dashtxt[$lang], "link" => "dash.php?v=1.4.5"); };
|
if ($_SESSION['right_dash']) { $mainMenu[] = array("name" => $dashtxt[$lang], "link" => "dash.php?v=1.4.6"); };
|
||||||
if ($_SESSION['right_manager'] || $_SESSION['is_admin'] || $_SESSION['right_closing']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=1.4.5"); };
|
if ($_SESSION['right_manager'] || $_SESSION['is_admin'] || $_SESSION['right_closing']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=1.4.6"); };
|
||||||
$mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.4.5");
|
$mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.4.6");
|
||||||
$mainMenu[] = array("name" => "Hilfe", "link" => "help.php?v=1.4.5");
|
$mainMenu[] = array("name" => "Hilfe", "link" => "help.php?v=1.4.6");
|
||||||
$mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.4.5");
|
$mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.4.6");
|
||||||
}
|
}
|
||||||
|
|
||||||
$mainMenu[] = array("name" => $logout[$lang], "link" => "logout.php");
|
$mainMenu[] = array("name" => $logout[$lang], "link" => "logout.php");
|
||||||
|
@ -1480,7 +1488,7 @@ class Admin {
|
||||||
|
|
||||||
$waiterMessage = $this->getMessage(null, "waitermessage");
|
$waiterMessage = $this->getMessage(null, "waitermessage");
|
||||||
}
|
}
|
||||||
$mainMenuAndVersion = array ("version" => "OrderSprinter 1.4.5",
|
$mainMenuAndVersion = array ("version" => "OrderSprinter 1.4.6",
|
||||||
"user" => $currentUser,
|
"user" => $currentUser,
|
||||||
"menu" => $mainMenu,
|
"menu" => $mainMenu,
|
||||||
"waitermessage" => $waiterMessage,
|
"waitermessage" => $waiterMessage,
|
||||||
|
@ -1552,6 +1560,17 @@ class Admin {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function getDailycode() {
|
||||||
|
try {
|
||||||
|
$pdo = DbUtils::openDbAndReturnPdoStatic();
|
||||||
|
$dailycode = CommonUtils::getConfigValue($pdo, 'dailycode', "");
|
||||||
|
echo json_encode(array("status" => "OK","msg" => $dailycode));
|
||||||
|
} catch (Exception $ex) {
|
||||||
|
echo json_encode(array("status" => "ERROR","msg" => "Error: " . $ex->getMessage()));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private function getDbStat() {
|
private function getDbStat() {
|
||||||
try {
|
try {
|
||||||
$pdo = DbUtils::openDbAndReturnPdoStatic();
|
$pdo = DbUtils::openDbAndReturnPdoStatic();
|
||||||
|
@ -1910,6 +1929,10 @@ class Admin {
|
||||||
"bigfontworkreceipt" => array("dbcol" => "bigfontworkreceipt","checknum" => 0),
|
"bigfontworkreceipt" => array("dbcol" => "bigfontworkreceipt","checknum" => 0),
|
||||||
"prominentsearch" => array("dbcol" => "prominentsearch","checknum" => 0),
|
"prominentsearch" => array("dbcol" => "prominentsearch","checknum" => 0),
|
||||||
"guestjobprint" => array("dbcol" => "guestjobprint","checknum" => 0),
|
"guestjobprint" => array("dbcol" => "guestjobprint","checknum" => 0),
|
||||||
|
"askdaycode" => array("dbcol" => "askdaycode","checknum" => 0),
|
||||||
|
"asktablecode" => array("dbcol" => "asktablecode","checknum" => 0),
|
||||||
|
"showdaycode" => array("dbcol" => "showdaycode","checknum" => 0),
|
||||||
|
"guesttimeout"=> array("dbcol" => "guesttimeout","checknum" => 0),
|
||||||
"discount1" => array("dbcol" => "discount1","checknum" => 0),
|
"discount1" => array("dbcol" => "discount1","checknum" => 0),
|
||||||
"discount2" => array("dbcol" => "discount2","checknum" => 0),
|
"discount2" => array("dbcol" => "discount2","checknum" => 0),
|
||||||
"discount3" => array("dbcol" => "discount3","checknum" => 0),
|
"discount3" => array("dbcol" => "discount3","checknum" => 0),
|
||||||
|
@ -2031,6 +2054,17 @@ class Admin {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($name == "guesttimeout") {
|
||||||
|
if (is_numeric($aVal)) {
|
||||||
|
$aVal = round($aVal);
|
||||||
|
if ($aVal < 0) {
|
||||||
|
$aVal = 0;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$aVal = 5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (($name == "updateurl") || ($name == "tmpdir") || ($name == "ftphost") || ($name == "ftpuser")) {
|
if (($name == "updateurl") || ($name == "tmpdir") || ($name == "ftphost") || ($name == "ftpuser")) {
|
||||||
$aVal = trim($aVal);
|
$aVal = trim($aVal);
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@ if (isset($_POST["cmd"])) {
|
||||||
if (strlen($status) > 150) {
|
if (strlen($status) > 150) {
|
||||||
$status = substr($status, 0,149);
|
$status = substr($status, 0,149);
|
||||||
}
|
}
|
||||||
$version = "1.4.5";
|
$version = "1.4.6";
|
||||||
|
|
||||||
$arr = array("cmd" => $cmd,"fct" => $fct, "xhr" => $xhr,"errormsg" => $errormsg,"status" => $status,"version" => $version,"phpversion" => $phpversion);
|
$arr = array("cmd" => $cmd,"fct" => $fct, "xhr" => $xhr,"errormsg" => $errormsg,"status" => $status,"version" => $version,"phpversion" => $phpversion);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -47,6 +47,10 @@ class Guestsync {
|
||||||
$currency = CommonUtils::getConfigValue($pdo, 'currency', 'Euro');
|
$currency = CommonUtils::getConfigValue($pdo, 'currency', 'Euro');
|
||||||
$decpoint = CommonUtils::getConfigValue($pdo, 'decpoint', '.');
|
$decpoint = CommonUtils::getConfigValue($pdo, 'decpoint', '.');
|
||||||
|
|
||||||
|
$askdaycode = CommonUtils::getConfigValue($pdo, 'askdaycode', "1");
|
||||||
|
$asktablecode = CommonUtils::getConfigValue($pdo, 'asktablecode', "1");
|
||||||
|
$guesttimeout = CommonUtils::getConfigValue($pdo, 'guesttimeout', "5");
|
||||||
|
|
||||||
$transferdata = array(
|
$transferdata = array(
|
||||||
"timezone" => $timezone,
|
"timezone" => $timezone,
|
||||||
"dailycode" => $dailycode,
|
"dailycode" => $dailycode,
|
||||||
|
@ -55,7 +59,10 @@ class Guestsync {
|
||||||
"types" => $types,
|
"types" => $types,
|
||||||
"products" => $products,
|
"products" => $products,
|
||||||
"currency" => $currency,
|
"currency" => $currency,
|
||||||
"decpoint" => $decpoint
|
"decpoint" => $decpoint,
|
||||||
|
"askdaycode" => $askdaycode,
|
||||||
|
"asktablecode" => $asktablecode,
|
||||||
|
"guesttimeout" => $guesttimeout
|
||||||
);
|
);
|
||||||
|
|
||||||
$data = json_encode($transferdata);
|
$data = json_encode($transferdata);
|
||||||
|
@ -118,19 +125,25 @@ class Guestsync {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function checkPermission($pdo,$tableid,$tablecode,$prodid,$dailycode) {
|
private static function checkPermission($pdo,$tableid,$tablecode,$prodid,$dailycode) {
|
||||||
$dailycodeInDb = trim(CommonUtils::getConfigValue($pdo, 'dailycode', ''));
|
$askdaycode = CommonUtils::getConfigValue($pdo, 'askdaycode', 1);
|
||||||
if ($dailycode != trim($dailycodeInDb)) {
|
if ($askdaycode == 1) {
|
||||||
return false;
|
$dailycodeInDb = trim(CommonUtils::getConfigValue($pdo, 'dailycode', ''));
|
||||||
|
if ($dailycode != trim($dailycodeInDb)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = "SELECT IFNULL(code,'') as code from %resttables% WHERE id=? AND allowoutorder=?";
|
$asktablecode = CommonUtils::getConfigValue($pdo, 'asktablecode', 1);
|
||||||
$result = CommonUtils::fetchSqlAll($pdo, $sql, array($tableid,1));
|
if ($asktablecode == 1) {
|
||||||
if (count($result) == 0) {
|
$sql = "SELECT IFNULL(code,'') as code from %resttables% WHERE id=? AND allowoutorder=?";
|
||||||
return false;
|
$result = CommonUtils::fetchSqlAll($pdo, $sql, array($tableid,1));
|
||||||
}
|
if (count($result) == 0) {
|
||||||
$tablecodeInDb = trim($result[0]["code"]);
|
return false;
|
||||||
if ($tablecodeInDb != $tablecode) {
|
}
|
||||||
return false;
|
$tablecodeInDb = trim($result[0]["code"]);
|
||||||
|
if ($tablecodeInDb != $tablecode) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = "SELECT id FROM %products% WHERE id=? AND removed is null AND (display is null OR display='KG' OR display='G')";
|
$sql = "SELECT id FROM %products% WHERE id=? AND removed is null AND (display is null OR display='KG' OR display='G')";
|
||||||
|
@ -140,7 +153,6 @@ class Guestsync {
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function shallWeSync($pdo) {
|
private static function shallWeSync($pdo) {
|
||||||
|
|
|
@ -209,11 +209,8 @@ class Products {
|
||||||
$pdo = DbUtils::openDbAndReturnPdoStatic();
|
$pdo = DbUtils::openDbAndReturnPdoStatic();
|
||||||
$pdo->beginTransaction();
|
$pdo->beginTransaction();
|
||||||
|
|
||||||
$sql = "select setting FROM %config% WHERE name=?";
|
$pricelevel = CommonUtils::getConfigValue($pdo, 'pricelevel', 1);
|
||||||
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
|
||||||
$stmt->execute(array("pricelevel"));
|
|
||||||
$row = $stmt->fetchObject();
|
|
||||||
$pricelevel = $row->setting;
|
|
||||||
$priceTxt = "priceA";
|
$priceTxt = "priceA";
|
||||||
if ($pricelevel == 2) {
|
if ($pricelevel == 2) {
|
||||||
$priceTxt = "priceB";
|
$priceTxt = "priceB";
|
||||||
|
@ -222,9 +219,7 @@ class Products {
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = "select id,name,reference from %prodtype% where removed is null";
|
$sql = "select id,name,reference from %prodtype% where removed is null";
|
||||||
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
|
$result = CommonUtils::fetchSqlAll($pdo, $sql, null);
|
||||||
$stmt->execute();
|
|
||||||
$result = $stmt->fetchAll();
|
|
||||||
$typeArray = array();
|
$typeArray = array();
|
||||||
|
|
||||||
foreach($result as $row) {
|
foreach($result as $row) {
|
||||||
|
@ -265,10 +260,63 @@ class Products {
|
||||||
}
|
}
|
||||||
$pdo->commit();
|
$pdo->commit();
|
||||||
|
|
||||||
$retArray = array("types" => $typeArray, "prods" => $prodArray);
|
$filteredTypes = self::filterUsedTypes($typeArray, $prodArray);
|
||||||
|
$retArray = array("types" => $filteredTypes, "prods" => $prodArray);
|
||||||
echo json_encode($retArray);
|
echo json_encode($retArray);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private static function filterUsedTypes($types,$products) {
|
||||||
|
$typesWithContent = array();
|
||||||
|
foreach ($products as $p) {
|
||||||
|
$ref = $p["ref"];
|
||||||
|
$typeOfProd = self::getTypeOfId($types, $ref);
|
||||||
|
if (!is_null($typeOfProd)) {
|
||||||
|
$typesWithContent = self::declareProdTypeAndParentsInUse($types, $typeOfProd,$typesWithContent);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$out = array();
|
||||||
|
$keys = array_keys($typesWithContent);
|
||||||
|
foreach($keys as $aKey) {
|
||||||
|
$t = $typesWithContent[$aKey];
|
||||||
|
$out[] = array("id" => $t["id"],"name" => $t["name"],"ref" => $t["ref"]);
|
||||||
|
}
|
||||||
|
return $out;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static function getTypeOfId($alltypes,$typeid) {
|
||||||
|
foreach($alltypes as $t) {
|
||||||
|
if ($t["id"] == $typeid) {
|
||||||
|
return $t;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static function declareProdTypeAndParentsInUse($alltypes,$aType,$typesWithContent) {
|
||||||
|
$typeid = $aType["id"];
|
||||||
|
$reference = $aType["ref"];
|
||||||
|
if (!array_key_exists($typeid, $typesWithContent)) {
|
||||||
|
$typesWithContent[$typeid] = array("id" => $typeid,"name" => $aType["name"],"ref" => $reference);
|
||||||
|
|
||||||
|
$parent = null;
|
||||||
|
foreach($alltypes as $a) {
|
||||||
|
$typeid = $a["id"];
|
||||||
|
if ($typeid == $reference) {
|
||||||
|
$parent = $a;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!is_null($parent)) {
|
||||||
|
$typesWithContent = self::declareProdTypeAndParentsInUse($alltypes,$parent,$typesWithContent);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $typesWithContent;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Return all available product with id and name, category
|
* Return all available product with id and name, category
|
||||||
* (used for re-assignment to type)
|
* (used for re-assignment to type)
|
||||||
|
@ -1311,13 +1359,26 @@ class Products {
|
||||||
}
|
}
|
||||||
|
|
||||||
function createProdType($id,$prodTypeName) {
|
function createProdType($id,$prodTypeName) {
|
||||||
|
$pdo = DbUtils::openDbAndReturnPdoStatic();
|
||||||
|
$pdo->beginTransaction();
|
||||||
|
|
||||||
|
if ($id == "top") {
|
||||||
|
$kind = 0;
|
||||||
|
if (isset($_POST["kind"])) {
|
||||||
|
$kind = $_POST["kind"];
|
||||||
|
}
|
||||||
|
$sql = "INSERT INTO `%prodtype%` (`name`,`usekitchen`,`usesupplydesk`,`kind`,`printer`,`sorting`,`reference`) VALUES(?,1,1,?,1,NULL,?)";
|
||||||
|
CommonUtils::execSql($pdo, $sql, array($prodTypeName,$kind,null));
|
||||||
|
$pdo->commit();
|
||||||
|
echo json_encode(array("status" => "OK"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!is_numeric($id)) {
|
if (!is_numeric($id)) {
|
||||||
echo json_encode(array("status" => "ERROR", "code" => ERROR_GENERAL_ID_TYPE, "msg" => ERROR_GENERAL_ID_TYPE_MSG));
|
echo json_encode(array("status" => "ERROR", "code" => ERROR_GENERAL_ID_TYPE, "msg" => ERROR_GENERAL_ID_TYPE_MSG));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$pdo = $this->dbutils->openDbAndReturnPdo();
|
|
||||||
$pdo->beginTransaction();
|
|
||||||
|
|
||||||
$sql = "SELECT kind FROM %prodtype% WHERE id=?";
|
$sql = "SELECT kind FROM %prodtype% WHERE id=?";
|
||||||
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
|
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
|
||||||
|
|
|
@ -420,6 +420,7 @@ class Basedb {
|
||||||
`prodimageid` INT(10) NULL,
|
`prodimageid` INT(10) NULL,
|
||||||
`display` VARCHAR(3) NULL,
|
`display` VARCHAR(3) NULL,
|
||||||
`removed` INT(1) NULL,
|
`removed` INT(1) NULL,
|
||||||
|
INDEX pcatindex (category),
|
||||||
FOREIGN KEY (category) REFERENCES %prodtype%(id),
|
FOREIGN KEY (category) REFERENCES %prodtype%(id),
|
||||||
FOREIGN KEY (prodimageid) REFERENCES %prodimages%(id)
|
FOREIGN KEY (prodimageid) REFERENCES %prodimages%(id)
|
||||||
) CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE = InnoDb ;
|
) CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE = InnoDb ;
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||||
<meta name="author" content="Stefan Pichel">
|
<meta name="author" content="Stefan Pichel">
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.4.5">
|
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.4.6">
|
||||||
|
|
||||||
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
|
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
|
||||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||||
<meta name="author" content="Stefan Pichel">
|
<meta name="author" content="Stefan Pichel">
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.4.5">
|
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.4.6">
|
||||||
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
|
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
|
||||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||||
|
|
||||||
|
@ -280,6 +280,17 @@ function setLanguage(language) {
|
||||||
txt += PROD_CATS_LIST[lang] + ":<br>" + cats;
|
txt += PROD_CATS_LIST[lang] + ":<br>" + cats;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ct == null) {
|
||||||
|
// on highest levels show fields to create types on highest level
|
||||||
|
txt += '<br><input id="topleveltypefield" placeholder="' + PROD_PLACEHOLDER_NEW_PRODTYPE[lang] + '" style="background:white;" />';
|
||||||
|
|
||||||
|
txt += '<div class="ui-grid-a">';
|
||||||
|
txt += '<div class="ui-block-a"><button id="createtoptypebtn_food" class="oscmd" type="submit" data-theme="c">' + PROD_NEW_CAT[lang] + " (" + PROD_FOOD[lang] + ") </button></div>";
|
||||||
|
txt += '<div class="ui-block-b"><button id="createtoptypebtn_drink" class="oscmd" type="submit" data-theme="c">' + PROD_NEW_CAT[lang] + " (" + PROD_DRINKS[lang] + ") </button></div>";
|
||||||
|
txt += '</div>';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
var prodsListPrinted = false;
|
var prodsListPrinted = false;
|
||||||
|
|
||||||
var pt = content.containedProds;
|
var pt = content.containedProds;
|
||||||
|
@ -378,6 +389,8 @@ function setLanguage(language) {
|
||||||
proddel(objid);
|
proddel(objid);
|
||||||
} else if (cmd == "newtype") {
|
} else if (cmd == "newtype") {
|
||||||
typenew(objid);
|
typenew(objid);
|
||||||
|
} else if (cmd == "createtoptypebtn") {
|
||||||
|
newtoptype(objid);
|
||||||
} else if (cmd == "typeapply") {
|
} else if (cmd == "typeapply") {
|
||||||
typeapply(objid);
|
typeapply(objid);
|
||||||
} else if (cmd == "typecancel") {
|
} else if (cmd == "typecancel") {
|
||||||
|
@ -396,6 +409,8 @@ function setLanguage(language) {
|
||||||
doAjax("GET","php/contenthandler.php?module=products&command=getAssignedExtrasOfProd&prodid=" + objid,null,handleAssignedExtras,"Zugewiesene Optionen");
|
doAjax("GET","php/contenthandler.php?module=products&command=getAssignedExtrasOfProd&prodid=" + objid,null,handleAssignedExtras,"Zugewiesene Optionen");
|
||||||
} else if (cmd == 'toggleprodtype') {
|
} else if (cmd == 'toggleprodtype') {
|
||||||
toggleProdType(objid);
|
toggleProdType(objid);
|
||||||
|
} else if (cmd == 'createtoptypebtn') {
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -768,17 +783,27 @@ function setLanguage(language) {
|
||||||
doAjax("POST","php/contenthandler.php?module=products&command=delproduct",{prodid:prodid},reloadCurrentType,"Produktsort./entf.");
|
doAjax("POST","php/contenthandler.php?module=products&command=delproduct",{prodid:prodid},reloadCurrentType,"Produktsort./entf.");
|
||||||
}
|
}
|
||||||
|
|
||||||
function typenew(typeid) {
|
function createNewTypeOnServer(refid,name,kind) {
|
||||||
var newTypeName = $("#newtypename_" + typeid).val();
|
if (name == "") {
|
||||||
if (newTypeName.trim() == "") {
|
alert(PROD_ENTER_CAT_NAME[lang]);
|
||||||
alert(PROD_ENTER_CAT_NAME[lang]);
|
} else {
|
||||||
} else {
|
var data = {
|
||||||
var data = {
|
refid: refid,
|
||||||
refid: typeid,
|
name: name,
|
||||||
name: newTypeName
|
kind: kind
|
||||||
};
|
};
|
||||||
doAjax("POST","php/contenthandler.php?module=products&command=createProdType",data,reloadPageWithTimeout,"Neue Kategorie nicht anlegbar");
|
doAjax("POST","php/contenthandler.php?module=products&command=createProdType",data,reloadPageWithTimeout,"Neue Kategorie nicht anlegbar");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function newtoptype(kind) {
|
||||||
|
var name = $("#topleveltypefield").val().trim();
|
||||||
|
createNewTypeOnServer("top",name,(kind == "food" ? 0 : 1));
|
||||||
|
}
|
||||||
|
|
||||||
|
function typenew(typeid) {
|
||||||
|
var name = $("#newtypename_" + typeid).val().trim();
|
||||||
|
createNewTypeOnServer(typeid,name,0);
|
||||||
}
|
}
|
||||||
|
|
||||||
function typeapply(typeid) {
|
function typeapply(typeid) {
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||||
<meta name="author" content="Stefan Pichel">
|
<meta name="author" content="Stefan Pichel">
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.4.5">
|
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.4.6">
|
||||||
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
|
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
|
||||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||||
<meta name="author" content="Stefan Pichel">
|
<meta name="author" content="Stefan Pichel">
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.4.5">
|
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.4.6">
|
||||||
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
|
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
|
||||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||||
<meta name="author" content="Stefan Pichel">
|
<meta name="author" content="Stefan Pichel">
|
||||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.4.5">
|
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.4.6">
|
||||||
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
|
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
|
||||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||||
<meta name="author" content="Stefan Pichel">
|
<meta name="author" content="Stefan Pichel">
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.4.5">
|
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.4.6">
|
||||||
|
|
||||||
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
|
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
|
||||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -11,6 +11,8 @@
|
||||||
<div id=tableoverlay></div>
|
<div id=tableoverlay></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="daycodeareamobile" style="display:none;"><span class="daycodetxt">Tageslosung</span>: <span class="daycodefield"></span></div>
|
||||||
|
|
||||||
<div id="receiptpanel" style="display:none;"></div>
|
<div id="receiptpanel" style="display:none;"></div>
|
||||||
|
|
||||||
<td id="main" class="tablemain">
|
<td id="main" class="tablemain">
|
||||||
|
|
Loading…
Reference in New Issue