OrderSprinter 1.3.24
This commit is contained in:
parent
3358ea081f
commit
c12865fb1a
Binary file not shown.
|
@ -85,7 +85,7 @@ class Installer {
|
|||
}
|
||||
Database::dropTables($pdo);
|
||||
Database::createEmptyTables($pdo, $prefix);
|
||||
Database::setVersion($pdo,$prefix,"1.3.23");
|
||||
Database::setVersion($pdo,$prefix,"1.3.24");
|
||||
Database::setAccessPassword($pdo,$prefix,$adminpass);
|
||||
Database::setRefreshRate($pdo,$prefix,"5"); // default: 5 times per hour
|
||||
return array("status" => "OK","msg" => "Installation successful");
|
||||
|
|
|
@ -181,5 +181,3 @@ function readclients() {
|
|||
header("Location: ../infopage.html?i=overview.php=Import_war_erfolgreich."); /* Browser umleiten */
|
||||
exit;
|
||||
}
|
||||
|
||||
?>
|
|
@ -125,5 +125,3 @@ function getDataFromClient($clientid,$command,$data) {
|
|||
|
||||
echo $file;
|
||||
}
|
||||
|
||||
?>
|
Binary file not shown.
|
@ -5,7 +5,7 @@
|
|||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<meta name="author" content="Stefan Pichel">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.23">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.24">
|
||||
|
||||
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||
|
@ -109,7 +109,7 @@ function initializeEverything() {
|
|||
</ul>
|
||||
</div><!-- /panel -->
|
||||
<div data-role="header" data-theme="b" data-position="fixed" id="headerline">
|
||||
<h1>Bar <img src="img/printerstatus.png" class="printerstatus" style="display:none;" /></h1>
|
||||
<h1>Bar <img src="img/connection.png" class="connectionstatus" style="display:none;" /> <img src="img/printerstatus.png" class="printerstatus" style="display:none;" /></h1>
|
||||
<div data-type="horizontal" style="top:0px;position:absolute;float:right;z-index:10;display:inline;" align="right" class="ui-btn-right">
|
||||
<a href="#" data-role="button" data-icon="arrow-d" data-ajax="false" id="menuswitch">Hauptmenü</a>
|
||||
</div>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<meta name="author" content="Stefan Pichel">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.23">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.24">
|
||||
|
||||
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||
|
@ -464,7 +464,7 @@ $(document).on("pageinit", "#bill-page", function () {
|
|||
</ul>
|
||||
</div><!-- /panel -->
|
||||
<div data-role="header" data-theme="b" data-position="fixed" id="theheader">
|
||||
<h1><span id="billtitletxt">Kassenbons</span> <img src="img/printerstatus.png" class="printerstatus" style="display:none;" /></h1>
|
||||
<h1><span id="billtitletxt">Kassenbons</span> <img src="img/connection.png" class="connectionstatus" style="display:none;" /> <img src="img/printerstatus.png" class="printerstatus" style="display:none;" /></h1>
|
||||
<div data-type="horizontal" style="top:0px;position:absolute;float:right;z-index:10;display:inline;" align="right" class="ui-btn-right">
|
||||
<a href="#" data-role="button" data-icon="arrow-d" data-ajax="false" id="menuswitch"><span id="modulstxt2">Hauptmenü</span></a>
|
||||
</div>
|
||||
|
|
|
@ -125,7 +125,7 @@ $(document).on("pageinit", "#info-page", function () {
|
|||
</ul>
|
||||
</div><!-- /panel -->
|
||||
<div data-role="header" data-theme="b" data-position="fixed" id="theheader">
|
||||
<h1><span id="reportttitletxt">Gäste</span> <img src="img/printerstatus.png" class="printerstatus" style="display:none;" /></h1>
|
||||
<h1><span id="reportttitletxt">Gäste</span> <img src="img/connection.png" class="connectionstatus" style="display:none;" /> <img src="img/printerstatus.png" class="printerstatus" style="display:none;" /></h1>
|
||||
<div data-type="horizontal" style="top:0px;position:absolute;float:right;z-index:10;display:inline;" align="right" class="ui-btn-right">
|
||||
<a href="#" data-role="button" data-icon="arrow-d" data-ajax="false" id="menuswitch">Hauptmenü</a>
|
||||
</div>
|
||||
|
|
|
@ -214,7 +214,7 @@
|
|||
</ul>
|
||||
</div><!-- /panel -->
|
||||
<div data-role="header" data-theme="b" data-position="fixed" id="theheader">
|
||||
<h1>OrderSprinter <img src="img/printerstatus.png" class="printerstatus" style="display:none;" /></h1>
|
||||
<h1>OrderSprinter <img src="img/connection.png" class="connectionstatus" style="display:none;" /> <img src="img/printerstatus.png" class="printerstatus" style="display:none;" /></h1>
|
||||
<div data-type="horizontal" style="top:0px;position:absolute;float:right;z-index:10;display:inline;" align="right" class="ui-btn-right">
|
||||
<a href="#" data-role="button" data-icon="arrow-d" data-ajax="false" id="menuswitch">Hauptmenü</a>
|
||||
</div>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.23">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.24">
|
||||
|
||||
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||
|
|
|
@ -39,7 +39,7 @@ $(document).on("pageinit", "#help-page", function () {
|
|||
</ul>
|
||||
</div><!-- /panel -->
|
||||
<div data-role="header" data-theme="b" data-position="fixed" id="theheader">
|
||||
<h1>OrderSprinter Hilfe <img src="img/printerstatus.png" class="printerstatus" style="display:none;" /></h1>
|
||||
<h1>OrderSprinter Hilfe <img src="img/connection.png" class="connectionstatus" style="display:none;" /> <img src="img/printerstatus.png" class="printerstatus" style="display:none;" /></h1>
|
||||
<div data-type="horizontal" style="top:0px;position:absolute;float:right;z-index:10;display:inline;" align="right" class="ui-btn-right">
|
||||
<a href="#" data-role="button" data-icon="arrow-d" data-ajax="false" id="menuswitch">Hauptmenü</a>
|
||||
</div>
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
|
@ -9,8 +9,8 @@
|
|||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<meta name="author" content="Stefan Pichel">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.23">
|
||||
<link rel="stylesheet" type="text/css" href="css/numfield.css?v=1.3.23">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.24">
|
||||
<link rel="stylesheet" type="text/css" href="css/numfield.css?v=1.3.24">
|
||||
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.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") {
|
||||
useInstallation();
|
||||
} else {
|
||||
setTimeout(function(){document.location.href = "install.html?v=1.3.23"},500);
|
||||
setTimeout(function(){document.location.href = "install.html?v=1.3.24"},500);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -240,7 +240,7 @@ $(document).on("pageinit", "#index-page", function () {
|
|||
</ul>
|
||||
</div><!-- /panel -->
|
||||
<div data-role="header" data-theme="b" data-position="fixed" id="theheader">
|
||||
<h1>OrderSprinter <img src="img/printerstatus.png" class="printerstatus" style="display:none;" /></h1>
|
||||
<h1>OrderSprinter <img src="img/connection.png" class="connectionstatus" style="display:none;" /> <img src="img/printerstatus.png" class="printerstatus" style="display:none;" /></h1>
|
||||
<div data-type="horizontal" style="top:0px;position:absolute;float:right;z-index:10;display:inline;" align="right" class="ui-btn-right">
|
||||
<a href="#" data-role="button" data-icon="arrow-d" data-ajax="false" id="menuswitch">Hauptmenü</a>
|
||||
</div>
|
||||
|
|
|
@ -47,8 +47,8 @@ var NOTWRITEABLE = ["Nicht beschreibbar","No write access","Imposible sobrescrib
|
|||
var WORKING = ["Arbeitet...","Working...","Trabajando..."];
|
||||
var DB_SETTING_WRONG = ["Datenbank-Angaben falsch","Data base values wrong","Datos de la base de datos falsos"];
|
||||
var ERROR = ["Installation/Update nicht erfolgreich: ", "Install/Update not performed: ", "Problema con el update/instal: "];
|
||||
var UPDATE_OK = ["Update erfolgreich! Bitte install-Verzeichnis löschen.","Update successful! Please remove install directory.","Update completo. Esta recomendado removar el fichero 'install'"];
|
||||
var AUTO_UPDATE_OK = ["Update erfolgreich! Bitte vergessen Sie nicht, auch den Printserver zu updaten, wenn Sie dessen neuen Funktionen nutzen möchten.","Update successful! Please do not forget to update the printservers if you want to use its new features.","Update completo. No olvide el printserver si quiere usa sus funciones nuevas."];
|
||||
var UPDATE_OK = ["Update erfolgreich! Bitte install-Verzeichnis löschen. Bitte beachten Sie, dass die Software im Fehlerfall Debug-Daten an den Anbieter sendet. Mehr Infos dazu auf der Homepage.","Update successful! Please remove install directory. Please be aware that debug data will be sent to the provider in case of malfunctions.","Update completo. Esta recomendado removar el fichero 'install'. Por favor dar cuenta que debug data esta enviado fuera en caso de malfunctions."];
|
||||
var AUTO_UPDATE_OK = ["Update erfolgreich! Bitte vergessen Sie nicht, auch den Printserver zu updaten, wenn Sie dessen neuen Funktionen nutzen möchten. Bitte beachten Sie, dass die Software im Fehlerfall Debug-Daten an den Anbieter sendet. Mehr Infos dazu auf der Homepage.","Update successful! Please do not forget to update the printservers if you want to use its new features. Please be aware that debug data will be sent to the provider in case of malfunctions.","Update completo. No olvide el printserver si quiere usa sus funciones nuevas. Por favor dar cuenta que debug data esta enviado fuera en caso de malfunctions."];
|
||||
|
||||
var SAMPLE_HEADLINE = ["Sie können die Datenbank mit Beispieldaten füllen. Diese können später beliebig wieder in der Verwaltungs- und Angebotsansicht verändert werden.",
|
||||
"You can fill the data base with sample data. The content can later be changed in the manager and product view.",
|
||||
|
@ -387,20 +387,22 @@ function resultOfSampleData(jsonAnswer) {
|
|||
+ "umgeleitet. Wenn Sie sich mit dem soeben vergebenen Passwort einloggen "
|
||||
+ "können, war die Installation erfolgreich. Löschen Sie in diesem Fall "
|
||||
+ "das Verzeichnis 'install', damit die Installation nicht zu einem späteren "
|
||||
+ "Zeitpunkt versehentlich überschrieben wird!");
|
||||
+ "Zeitpunkt versehentlich überschrieben wird! Bitte beachten Sie, dass in Fehlerfällen "
|
||||
+ "Debug-Daten zum Anbieter geschickt werden. Genaueres dazu ist auf der Homepage beschrieben.");
|
||||
window.location.href = "index.html";
|
||||
} else if (langid == 1) {
|
||||
$("#progress").html("<b style='color:green;'>Finished</b>");
|
||||
alert("The installation is finished. You will be directed to the main page. If you can log "
|
||||
+ "in with the admin password the installation was successful. Remove the install "
|
||||
+ "directory to avoid a later change of the installation by accident");
|
||||
+ "directory to avoid a later change of the installation by accident. Please be aware that "
|
||||
+ " in case of malfunctions debug data will be sent to the provider of the software.");
|
||||
window.location.href = "index.html";
|
||||
} else if (langid == 2) {
|
||||
$("#progress").html("<b style='color:green;'>Acabado</b>");
|
||||
alert("La instalación esta completada. Vas a ser dirijido a la página principal. Si puedes"
|
||||
+ " log in con la contraseña que has ponido en la página de instalación, la"
|
||||
+ " instalación esta completada con éxito. Esta recomendado removar el fichero "
|
||||
+ " 'install'");
|
||||
+ " 'install'. Por favor, dar cuenta de que en problemas debug data esta enviado fuera.");
|
||||
window.location.href = "index.html";
|
||||
}
|
||||
} else {
|
||||
|
@ -725,7 +727,7 @@ $(document).ready(function() {
|
|||
<tr id=updateline>
|
||||
<td> </td>
|
||||
<td align=center>
|
||||
<button id="updatebtn">Update -> 1.3.23</button>
|
||||
<button id="updatebtn">Update -> 1.3.24</button>
|
||||
<span id="updateinprogresstxt" style="display:none;">Update... bitte warten.</span>
|
||||
</td>
|
||||
<td> </td>
|
||||
|
|
|
@ -2633,6 +2633,28 @@ return false;
|
|||
}
|
||||
}
|
||||
|
||||
function updateUserTable1323_1324($prefix, $version, $dbname) {
|
||||
$pdo = $this->pdo;
|
||||
try {
|
||||
if ($version != "1.3.23") {
|
||||
$ret = $this->updateUserTable1322_1323($prefix, $version, $dbname);
|
||||
if (!$ret) {
|
||||
echo "Version update v1.3.22 to 1.3.23 not successful.";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
DbUtils::overrulePrefix($prefix);
|
||||
|
||||
$this->updateVersion($pdo, '1.3.24');
|
||||
|
||||
return true;
|
||||
} catch (PDOException $e) {
|
||||
echo "Error in v1.3.23 to 1.3.24: $e";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function insertIntRow($pdo,$table,$rowToInsert,$afterRow) {
|
||||
$sql = "SHOW COLUMNS FROM $table LIKE '$rowToInsert'";
|
||||
|
@ -2789,7 +2811,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 , '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 , 'version', '1.3.23')");
|
||||
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'version', '1.3.24')");
|
||||
$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 , 'decpoint', '$decpoint')");
|
||||
|
@ -3018,7 +3040,7 @@ echo json_encode("ERROR");
|
|||
}
|
||||
|
||||
function writeConfigFile($host,$db,$user,$password,$prefix) {
|
||||
$errorlevel = "<?php\nerror_reporting(E_ERROR);\n\n"; // development: E_ALL
|
||||
$errorlevel = "<?php\nerror_reporting(E_ALL);\n\n"; // development: E_ALL
|
||||
|
||||
$hostlines = "// Zum Aufbau der Verbindung zur Datenbank\n";
|
||||
$hostlines .= "// die Daten erhalten Sie von Ihrem Provider\n";
|
||||
|
@ -3233,7 +3255,7 @@ $zones[] = $timezone_identifiers[$i];
|
|||
}
|
||||
echo json_encode($zones);
|
||||
} else if ($command == 'update') {
|
||||
$installerVersion = "1.3.23";
|
||||
$installerVersion = "1.3.24";
|
||||
|
||||
$admin = new InstallAdmin();
|
||||
$pdo = $admin->openDbAndReturnPdo($_POST['host'],$_POST['db'],$_POST['user'],$_POST['password']);
|
||||
|
@ -3264,7 +3286,7 @@ $supportedVersions = array("1.0.22","1.0.23","1.0.24","1.0.25","1.0.26","1.0.27"
|
|||
"1.1.18","1.1.19","1.1.20","1.1.21","1.1.22","1.1.23","1.1.24","1.1.25","1.1.26","1.1.27","1.1.28","1.1.29","1.1.30",
|
||||
"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.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.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"
|
||||
);
|
||||
|
||||
if (!in_array($version, $supportedVersions)) {
|
||||
|
@ -3272,7 +3294,7 @@ echo json_encode("Quellversion nicht unterstützt");
|
|||
return;
|
||||
}
|
||||
|
||||
$ret = $admin->updateUserTable1322_1323($_POST['prefix'], $version, $_POST['db']);
|
||||
$ret = $admin->updateUserTable1323_1324($_POST['prefix'], $version, $_POST['db']);
|
||||
|
||||
if(session_id() == '') {
|
||||
session_start();
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<meta name="author" content="Stefan Pichel">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.23">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.24">
|
||||
|
||||
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||
|
@ -111,7 +111,7 @@ function initializeEverything() {
|
|||
</ul>
|
||||
</div><!-- /panel -->
|
||||
<div data-role="header" data-theme="b" data-position="fixed" id="headerline">
|
||||
<h1><span id="moduleheadline">Küche</span> <img src="img/printerstatus.png" class="printerstatus" style="display:none;" /></h1>
|
||||
<h1><span id="moduleheadline">Küche</span> <img src="img/connection.png" class="connectionstatus" style="display:none;" /> <img src="img/printerstatus.png" class="printerstatus" style="display:none;" /></h1>
|
||||
<div data-type="horizontal" style="top:0px;position:absolute;float:right;z-index:10;display:inline;" align="right" class="ui-btn-right">
|
||||
<a href="#" data-role="button" data-icon="arrow-d" data-ajax="false" id="menuswitch">Hauptmenü</a>
|
||||
</div>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<meta name="author" content="Stefan Pichel">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.23">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.24">
|
||||
|
||||
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||
|
@ -1231,7 +1231,7 @@ function initRestoreFileUpload() {
|
|||
} else {
|
||||
alert("Import war erfolgreich.");
|
||||
setTimeout(function(){
|
||||
document.location.href = "index.html?v=1.3.23";
|
||||
document.location.href = "index.html?v=1.3.24";
|
||||
},250);
|
||||
}
|
||||
},
|
||||
|
@ -1790,9 +1790,9 @@ function handleUpdateCheckResult(answer) {
|
|||
|
||||
var millis=getMillis();
|
||||
setTimeout(function(){
|
||||
document.location.href = "install.html?v=1.3.23&mode=onlyupdate&n=" + millis;
|
||||
document.location.href = "install.html?v=1.3.24&mode=onlyupdate&n=" + millis;
|
||||
},250);
|
||||
document.location.href = "install.html?v=1.3.23&mode=onlyupdate&n=" + millis;
|
||||
document.location.href = "install.html?v=1.3.24&mode=onlyupdate&n=" + millis;
|
||||
}
|
||||
|
||||
function handleUpdateReplace(answer) {
|
||||
|
@ -3189,7 +3189,7 @@ $(document).on("pageinit", "#admin-page", function () {
|
|||
</div><!-- /panel -->
|
||||
|
||||
<div data-role="header" data-theme="b" data-position="fixed" id="theheader" class="noprint">
|
||||
<h1>Administration <img src="img/printerstatus.png" class="printerstatus" style="display:none;" /></h1>
|
||||
<h1>Administration <img src="img/connection.png" class="connectionstatus" style="display:none;" /> <img src="img/printerstatus.png" class="printerstatus" style="display:none;" /></h1>
|
||||
<div data-type="horizontal" style="top:0px;position:absolute;float:right;z-index:10;display:inline;" align="right" class="ui-btn-right">
|
||||
<a href="#" data-role="button" data-icon="arrow-d" data-ajax="false" id="menuswitch">Hauptmenü</a>
|
||||
</div>
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1215,7 +1215,7 @@ class Admin {
|
|||
$view = "preferences.html";
|
||||
}
|
||||
|
||||
echo json_encode($view . "?v=1.3.23");
|
||||
echo json_encode($view . "?v=1.3.24");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1422,27 +1422,27 @@ class Admin {
|
|||
|
||||
if (!self::isOnlyRatingUser($rights, $right_rating, true)) {
|
||||
if ($_SESSION['modus'] == 0) {
|
||||
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waitertxt[$lang], "link" => "waiter.html?v=1.3.23"); };
|
||||
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waitertxt[$lang], "link" => "waiter.html?v=1.3.24"); };
|
||||
} else {
|
||||
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waiterdesktxt[$lang], "link" => "waiterdesktop.php?v=1.3.23"); };
|
||||
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waiterdesktxt[$lang], "link" => "waiterdesktop.php?v=1.3.24"); };
|
||||
}
|
||||
if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.3.23"); };
|
||||
if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.3.23"); };
|
||||
if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.3.23"); };
|
||||
if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.3.24"); };
|
||||
if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.3.24"); };
|
||||
if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.3.24"); };
|
||||
if ($_SESSION['modus'] == 0) {
|
||||
if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html?v=1.3.23"); };
|
||||
if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html?v=1.3.24"); };
|
||||
}
|
||||
if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.3.23"); };
|
||||
if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.3.23"); };
|
||||
if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.3.23"); };
|
||||
if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.3.23"); };
|
||||
if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=1.3.23"); };
|
||||
if ($_SESSION['right_customers']) { $mainMenu[] = array("name" => $customerstxt[$lang], "link" => "customers.html?v=1.3.23"); };
|
||||
if ($_SESSION['right_dash']) { $mainMenu[] = array("name" => $dashtxt[$lang], "link" => "dash.php?v=1.3.23"); };
|
||||
if ($_SESSION['right_manager'] || $_SESSION['is_admin'] || $_SESSION['right_closing']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=1.3.23"); };
|
||||
$mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.3.23");
|
||||
$mainMenu[] = array("name" => "Hilfe", "link" => "help.php?v=1.3.23");
|
||||
$mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.3.23");
|
||||
if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.3.24"); };
|
||||
if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.3.24"); };
|
||||
if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.3.24"); };
|
||||
if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.3.24"); };
|
||||
if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=1.3.24"); };
|
||||
if ($_SESSION['right_customers']) { $mainMenu[] = array("name" => $customerstxt[$lang], "link" => "customers.html?v=1.3.24"); };
|
||||
if ($_SESSION['right_dash']) { $mainMenu[] = array("name" => $dashtxt[$lang], "link" => "dash.php?v=1.3.24"); };
|
||||
if ($_SESSION['right_manager'] || $_SESSION['is_admin'] || $_SESSION['right_closing']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=1.3.24"); };
|
||||
$mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.3.24");
|
||||
$mainMenu[] = array("name" => "Hilfe", "link" => "help.php?v=1.3.24");
|
||||
$mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.3.24");
|
||||
}
|
||||
|
||||
$mainMenu[] = array("name" => $logout[$lang], "link" => "logout.php");
|
||||
|
@ -1450,7 +1450,7 @@ class Admin {
|
|||
|
||||
$waiterMessage = $this->getMessage(null, "waitermessage");
|
||||
}
|
||||
$mainMenuAndVersion = array ("version" => "OrderSprinter 1.3.23",
|
||||
$mainMenuAndVersion = array ("version" => "OrderSprinter 1.3.24",
|
||||
"user" => $currentUser,
|
||||
"menu" => $mainMenu,
|
||||
"waitermessage" => $waiterMessage,
|
||||
|
@ -1593,7 +1593,7 @@ class Admin {
|
|||
}
|
||||
|
||||
function getRoleListCore($pdo) {
|
||||
$sql = "SELECT * from %roles% ORDER BY is_admin,right_manager";
|
||||
$sql = "SELECT * from %roles% ORDER BY is_admin,right_manager,right_waiter DESC,right_kitchen DESC,right_bar DESC,right_paydesk DESC,right_bill DESC,right_supply DESC";
|
||||
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
||||
$stmt->execute();
|
||||
$roles = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||
|
@ -1602,7 +1602,7 @@ class Admin {
|
|||
|
||||
function getUserList() {
|
||||
$pdo = DbUtils::openDbAndReturnPdoStatic();
|
||||
$sql = "SELECT *,%user%.id as id,is_admin,right_manager FROM %user%,%roles% WHERE active='1' AND %user%.roleid=%roles%.id ORDER BY is_admin,right_manager";
|
||||
$sql = "SELECT *,%user%.id as id,is_admin,right_manager FROM %user%,%roles% WHERE active='1' AND %user%.roleid=%roles%.id ORDER BY is_admin,right_manager,right_waiter DESC,right_kitchen DESC,right_bar DESC,right_paydesk DESC,right_bill DESC,right_supply DESC";
|
||||
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
||||
$stmt->execute();
|
||||
$users = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||
|
|
|
@ -0,0 +1,54 @@
|
|||
<?php
|
||||
|
||||
// forward of message to server
|
||||
|
||||
require_once ('dbutils.php');
|
||||
if (isset($_POST["cmd"])) {
|
||||
// error message as it was sent from client
|
||||
$cmd = $_POST["cmd"];
|
||||
$fct = $_POST["fct"];
|
||||
$xhr = $_POST["xhr"];
|
||||
$errormsg = $_POST["errormsg"];
|
||||
$status = $_POST["status"];
|
||||
|
||||
if (strlen($cmd) > 150) {
|
||||
$cmd = substr($cmd, 0,149);
|
||||
}
|
||||
if (strlen($xhr) > 500) {
|
||||
$xhr = substr($xhr, 0,499);
|
||||
}
|
||||
if (strlen($fct) > 100) {
|
||||
$fct = substr($fct, 0,99);
|
||||
}
|
||||
if (strlen($errormsg) > 150) {
|
||||
$errormsg = substr($errormsg, 0,149);
|
||||
}
|
||||
if (strlen($status) > 150) {
|
||||
$status = substr($status, 0,149);
|
||||
}
|
||||
$version = "1.3.24";
|
||||
|
||||
$arr = array("cmd" => $cmd,"fct" => $fct, "xhr" => $xhr,"errormsg" => $errormsg,"status" => $status,"version" => $version);
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
|
||||
$url = "http://www.ordersprinter.de/debug/save.php?cmd=save";
|
||||
|
||||
$query = http_build_query($arr);
|
||||
$opts = array(
|
||||
'http'=>array(
|
||||
'header' => "Content-Type: application/x-www-form-urlencoded\r\n".
|
||||
"Content-Length: ".strlen($query)."\r\n".
|
||||
"User-Agent:MyAgent/1.0\r\n",
|
||||
|
||||
'method' => 'POST',
|
||||
'content' => $query
|
||||
)
|
||||
);
|
||||
|
||||
$context = stream_context_create($opts);
|
||||
|
||||
$ret = file_get_contents($url, false, $context);
|
||||
|
||||
echo $ret;
|
|
@ -5,7 +5,7 @@
|
|||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<meta name="author" content="Stefan Pichel">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.23">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.24">
|
||||
|
||||
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
|
||||
<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 name="author" content="Stefan Pichel">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.23">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.24">
|
||||
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||
|
||||
|
@ -1124,7 +1124,7 @@ function setLanguage(language) {
|
|||
</ul>
|
||||
</div><!-- /panel -->
|
||||
<div data-role="header" data-theme="b" data-position="fixed" id="theheader">
|
||||
<h1><span id="prodtitletxt">Angebot</span> <img src="img/printerstatus.png" class="printerstatus" style="display:none;" /></h1>
|
||||
<h1><span id="prodtitletxt">Angebot</span> <img src="img/connection.png" class="connectionstatus" style="display:none;" /> <img src="img/printerstatus.png" class="printerstatus" style="display:none;" /></h1>
|
||||
<div data-type="horizontal" style="top:0px;position:absolute;float:right;z-index:10;display:inline;" align="right" class="ui-btn-right">
|
||||
<a href="#" data-role="button" data-icon="arrow-d" data-ajax="false" id="menuswitch">Hauptmenü</a>
|
||||
</div>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<meta name="author" content="Stefan Pichel">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.23">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.24">
|
||||
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
|
||||
<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 name="author" content="Stefan Pichel">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.23">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.24">
|
||||
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||
|
||||
|
@ -221,7 +221,7 @@ function setLanguage(language) {
|
|||
</ul>
|
||||
</div><!-- /panel -->
|
||||
<div data-role="header" data-theme="b" data-position="fixed" id="theheader">
|
||||
<h1><span id="reportttitletxt">Statistik</span> <img src="img/printerstatus.png" class="printerstatus" style="display:none;" /></h1>
|
||||
<h1><span id="reportttitletxt">Statistik</span> <img src="img/connection.png" class="connectionstatus" style="display:none;" /> <img src="img/printerstatus.png" class="printerstatus" style="display:none;" /></h1>
|
||||
<div data-type="horizontal" style="top:0px;position:absolute;float:right;z-index:10;display:inline;" align="right" class="ui-btn-right">
|
||||
<a href="#" data-role="button" data-icon="arrow-d" data-ajax="false" id="menuswitch">Hauptmenü</a>
|
||||
</div>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<meta name="author" content="Stefan Pichel">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.23">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.24">
|
||||
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||
|
||||
|
@ -609,7 +609,7 @@ $(document).on("pagebeforeshow", "#changeres-page", function () {
|
|||
</ul>
|
||||
</div><!-- /panel -->
|
||||
<div data-role="header" data-theme="b" data-position="fixed" id="theheader">
|
||||
<h1><span id="restitletxt">Reservierung</span> <img src="img/printerstatus.png" class="printerstatus" style="display:none;" /></h1>
|
||||
<h1><span id="restitletxt">Reservierung</span> <img src="img/connection.png" class="connectionstatus" style="display:none;" /> <img src="img/printerstatus.png" class="printerstatus" style="display:none;" /></h1>
|
||||
<div data-type="horizontal" style="top:0px;position:absolute;float:right;z-index:10;display:inline;" align="right" class="ui-btn-right">
|
||||
<a href="#" data-role="button" data-icon="arrow-d" data-ajax="false" id="menuswitch"><span id="modulstxt2">Hauptmenü</span></a>
|
||||
</div>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<meta name="author" content="Stefan Pichel">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.23">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.24">
|
||||
|
||||
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||
|
@ -285,7 +285,7 @@ function initializeEverything() {
|
|||
</ul>
|
||||
</div><!-- /panel -->
|
||||
<div data-role="header" data-theme="b" data-position="fixed">
|
||||
<h1><span id="supplyheadline">Bereitstellung</span> <img src="img/printerstatus.png" class="printerstatus" style="display:none;" /></h1>
|
||||
<h1><span id="supplyheadline">Bereitstellung</span> <img src="img/connection.png" class="connectionstatus" style="display:none;" /> <img src="img/printerstatus.png" class="printerstatus" style="display:none;" /></h1>
|
||||
<div data-type="horizontal" style="top:0px;position:absolute;float:right;z-index:10;display:inline;" align="right" class="ui-btn-right">
|
||||
<a href="#" data-role="button" data-icon="arrow-d" data-ajax="false" id="menuswitch">Hauptmenü</a>
|
||||
</div>
|
||||
|
|
|
@ -38,6 +38,7 @@ function initializeMainMenu(menuid) {
|
|||
});
|
||||
|
||||
intervalGetPrinterStatus(5);
|
||||
intervalCheckConnection(2);
|
||||
}
|
||||
|
||||
function intervalGetPrinterStatus(seconds) {
|
||||
|
@ -76,41 +77,82 @@ function refreshList(selector) {
|
|||
}
|
||||
}
|
||||
|
||||
function doAjax(getOrPost,url,data,functionToCallIfSuccess,errorMsg,doAsync) {
|
||||
if (typeof doAsync === 'undefined') { doAsync = false; }
|
||||
$.ajax({ type: getOrPost,
|
||||
function doAjax(getOrPost, url, data, functionToCallIfSuccess, errorMsg, doAsync) {
|
||||
if (typeof doAsync === 'undefined') {
|
||||
doAsync = false;
|
||||
}
|
||||
$.ajax({type: getOrPost,
|
||||
url: url,
|
||||
dataType: "json",
|
||||
data: data,
|
||||
async: doAsync,
|
||||
success : function(jsonContent)
|
||||
success: function (jsonContent)
|
||||
{
|
||||
if (functionToCallIfSuccess != null) {
|
||||
functionToCallIfSuccess(jsonContent);
|
||||
}
|
||||
},
|
||||
error: function(xhr,status,error ) {
|
||||
error: function (xhr, status, error) {
|
||||
|
||||
if (url != "php/debug.php") {
|
||||
var debugData = {
|
||||
cmd: url,
|
||||
fct: functionToCallIfSuccess.name,
|
||||
xhr: xhr.responseText,
|
||||
errormsg: errorMsg,
|
||||
status: status
|
||||
};
|
||||
|
||||
var n = getMillis();
|
||||
|
||||
if (errorMsg != null) {
|
||||
var errorMsgTxt = errorMsg + ", Status: " + status + ", Error:" + error + ", Msg: " + xhr.responseText + " (" + url + ")";
|
||||
alert( "Kommunikationsfehler zum Server: " + errorMsgTxt);
|
||||
if ($(".connectionstatus").is(":visible")) {
|
||||
alert("Kommunikation zum Server ist unterbrochen!");
|
||||
} else {
|
||||
var errorMsgTxt = errorMsg + error + " (" + url + ")";
|
||||
alert("Kommunikationsfehler zum Server: " + errorMsgTxt);
|
||||
doAjax("POST", "php/debug.php?n=" + n, debugData, null, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function doAjaxAsync(getOrPost,url,data,functionToCallIfSuccess) {
|
||||
$.ajax({ type: getOrPost,
|
||||
function doAjaxAsync(getOrPost, url, data, functionToCallIfSuccess) {
|
||||
$.ajax({type: getOrPost,
|
||||
url: url,
|
||||
dataType: "json",
|
||||
data: data,
|
||||
async: true,
|
||||
success : function(jsonContent)
|
||||
success: function (jsonContent)
|
||||
{
|
||||
if (functionToCallIfSuccess != null) {
|
||||
functionToCallIfSuccess(jsonContent);
|
||||
}
|
||||
},
|
||||
error: function(xhr,status,error ) {
|
||||
error: function (xhr, status, error) {
|
||||
if (url != "php/debug.php") {
|
||||
var debugData = {
|
||||
cmd: url,
|
||||
fct: functionToCallIfSuccess.name,
|
||||
xhr: xhr.responseText,
|
||||
errormsg: errorMsg,
|
||||
status: status
|
||||
};
|
||||
|
||||
var n = getMillis();
|
||||
|
||||
if (errorMsg != null) {
|
||||
if ($(".connectionstatus").is(":visible")) {
|
||||
alert("Kommunikation zum Server ist unterbrochen!");
|
||||
} else {
|
||||
var errorMsgTxt = errorMsg + error + " (" + url + ")";
|
||||
alert("Kommunikationsfehler zum Server: " + errorMsgTxt);
|
||||
doAjax("POST", "php/debug.php?n=" + n, debugData, null, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -209,3 +251,21 @@ function getMillis() {
|
|||
var n = d.getTime();
|
||||
return n;
|
||||
}
|
||||
|
||||
function intervalCheckConnection(seconds) {
|
||||
checkConnection();
|
||||
var fetchTimer = setInterval(function() {
|
||||
checkConnection();
|
||||
}, seconds * 1000);
|
||||
}
|
||||
|
||||
function checkConnection() {
|
||||
var img = new Image();
|
||||
img.onerror = function () {
|
||||
$(".connectionstatus").show();
|
||||
}
|
||||
img.onload = function () {
|
||||
$(".connectionstatus").hide();
|
||||
}
|
||||
img.src = "img/gray.png?t=" + (+new Date);
|
||||
}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue