OrderSprinter 1.5.22

This commit is contained in:
Geno 2020-11-19 23:12:30 +01:00
parent ee24c9e112
commit 5eb3e702ed
38 changed files with 626 additions and 193 deletions

View File

@ -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.5.21" /> <link rel="stylesheet" href="css/gueststyle.css?v=1.5.22" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css?v=1.5.21" /> <link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css?v=1.5.22" />
<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>
@ -105,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">&nbsp;&nbsp;OrderSprinter</div> <div class="ui-block-a">&nbsp;&nbsp;OrderSprinter</div>
<div class="ui-block-b grid_right" id="versioninfo">1.5.21&nbsp;&nbsp;</div> <div class="ui-block-b grid_right" id="versioninfo">1.5.22&nbsp;&nbsp;</div>
</div><!-- /grid-a --> </div><!-- /grid-a -->
</div> </div>
</div> </div>

View File

@ -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.5.21">'; echo '<link rel="stylesheet" type="text/css" href="css/gueststyle.css?v=1.5.22">';
echo "</head>"; echo "</head>";
echo "<body><div class=surround>"; echo "<body><div class=surround>";
echo "<span class=headerline>Installation OrderSprinter-Gastsystem 1.5.21</span><br><br>"; echo "<span class=headerline>Installation OrderSprinter-Gastsystem 1.5.22</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>";

View File

@ -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.5.21"); Database::setVersion($pdo,$prefix,"1.5.22");
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.

View File

@ -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.5.21"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.22">
<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" />
@ -13,8 +13,8 @@
<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-2.0.3.min.js"></script> <script src="php/3rdparty/jquery-2.0.3.min.js"></script>
<script src="php/3rdparty/jquery.mobile-1.4.0.min.js"></script> <script src="php/3rdparty/jquery.mobile-1.4.0.min.js"></script>
<script src="utilities.js?v=1.5.21"></script> <script src="utilities.js?v=1.5.22"></script>
<script src="kitchenbar.js?v=1.5.21"></script> <script src="kitchenbar.js?v=1.5.22"></script>
<style> <style>
#tableWithEntriesToCook,#tableWithCookedEntries,#headertableToCook #tableWithEntriesToCook,#tableWithCookedEntries,#headertableToCook

View File

@ -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.5.21"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.22">
<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" />

View File

@ -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.5.21"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.22">
<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" />
@ -86,7 +86,7 @@ var FEED_EMPTY_MSG = ["Nachrichtenfeld ist leer.","Message box is empty.","No ha
var FEED_MAYBE_ANSWER = ["Eine Antwort des Entwicklers kann nicht garantiert werden! Informationen über den verwendeten Internetbrowser wird an den Entwickler gesendet, damit mögliche Fragen oder Probleme leichter identifiziert werden können.", var FEED_MAYBE_ANSWER = ["Eine Antwort des Entwicklers kann nicht garantiert werden! Informationen über den verwendeten Internetbrowser wird an den Entwickler gesendet, damit mögliche Fragen oder Probleme leichter identifiziert werden können.",
"An answer of the developer cannot be guaranteed. Information about the used browser will always be transmitted to the developer so that questions and problems can answered more easily.", "An answer of the developer cannot be guaranteed. Information about the used browser will always be transmitted to the developer so that questions and problems can answered more easily.",
"Una respuesta del programador no se puede ser garantizado. Informaciones sobre el browser usado siempre esta enviado al programador para que él pueda apoyar más facilmente en caso de problemas o preguntas."]; "Una respuesta del programador no se puede ser garantizado. Informaciones sobre el browser usado siempre esta enviado al programador para que él pueda apoyar más facilmente en caso de problemas o preguntas."];
var FEED_SEND = ["Absenden","Send","Enviar"]; var FEED_SEND = ["Senden","Send","Enviar"];
var FEED_PHONE = ["Telefon:","Phone:","Telefono:"]; var FEED_PHONE = ["Telefon:","Phone:","Telefono:"];
var lang = 0; var lang = 0;
@ -100,6 +100,7 @@ function insertGeneralConfigItems(configResult) {
var values = configResult.msg; var values = configResult.msg;
setLanguage(values.userlanguage); setLanguage(values.userlanguage);
binding(); binding();
isUserAlreadyLoggedIn();
} else { } else {
$("#allpagecontent").hide(); $("#allpagecontent").hide();
setTimeout(function(){document.location.href = "index.html"},250); // not logged in setTimeout(function(){document.location.href = "index.html"},250); // not logged in
@ -137,7 +138,7 @@ function setLanguage(language) {
$("#transferpart").trigger("create"); $("#transferpart").trigger("create");
var msghtml = '<label for="content">' + FEED_MSG[lang] + '</label>' var msghtml = '<label for="content">' + FEED_MSG[lang] + '</label>'
+ '<textarea cols="40" rows="8" name="content" id="content" data-theme="c"></textarea>'; + '<textarea cols="40" rows="8" name="content" id="content" data-theme="c" style="background-color:white;"></textarea>';
$("#msgpart").html(msghtml); $("#msgpart").html(msghtml);
$("#msgpart").trigger("create"); $("#msgpart").trigger("create");
@ -147,7 +148,7 @@ function setLanguage(language) {
$("#sendtxt").html(FEED_SEND[lang]); $("#sendtxt").html(FEED_SEND[lang]);
var phonehtml = '<label for="tel">' + FEED_PHONE[lang] + '</label>' var phonehtml = '<label for="tel">' + FEED_PHONE[lang] + '</label>'
+ '<input type="text" id="tel" value="" data-mini="true" placeholder="0123-456789" data-theme="e"/>'; + '<input type="text" id="tel" value="" data-mini="true" placeholder="0123-456789" data-theme="e" style="background-color:white;"/>';
$("#phonepart").html(phonehtml); $("#phonepart").html(phonehtml);
$("#phonepart").trigger("create"); $("#phonepart").trigger("create");
} }
@ -180,6 +181,34 @@ function binding() {
doAjax("POST","php/contenthandler.php?module=feedback&command=sendMail",data,mailWasSent,"Fehler Nachrichtenversand",true); doAjax("POST","php/contenthandler.php?module=feedback&command=sendMail",data,mailWasSent,"Fehler Nachrichtenversand",true);
}); });
$("#senderrorlog").off("click").on("click", function (e) {
e.stopImmediatePropagation();
e.preventDefault();
var errorLog = $("#errorlogtextarea").val();
var contactInfo = $("#contactinfo").val();
var remark = $("#remark").val();
var data = {
errorlog: errorLog,
contactinfo: contactInfo,
remark: remark
};
doAjax("POST","php/contenthandler.php?module=feedback&command=sendErrorLog",data,errorLogSent,"Fehler Versand des error.oog",true);
});
}
function errorLogSent(answer) {
if (answer.status != "OK") {
alert ("Versand ist fehlgeschlagen: " + answer.msg);
} else {
alert ("Fehlerreport wurde übermittelt.");
$("#errorlogtextarea").val("");
$("#contactinfo").val("");
$("#remark").val("");
}
} }
function mailWasSent(jsonText) { function mailWasSent(jsonText) {
@ -204,6 +233,36 @@ $(document).on("pageinit", "#feedback-page", function () {
getGeneralConfigItems(); getGeneralConfigItems();
}); });
function isUserAlreadyLoggedIn() {
doAjax("POST","php/contenthandler.php?module=admin&command=isUserAlreadyLoggedIn",null,showLoggedInView,"login status unclear");
}
function showLoggedInView(jsonContent) {
if (jsonContent == "YES") {
// no login mask!
$("#errorlogarea").show();
$("#infoarea").hide();
requestErrorlogData();
} else {
// user needs to log in!
$("#errorlogarea").hide();
$("#infoarea").show();
}
}
function requestErrorlogData() {
doAjax("GET", "php/contenthandler.php?module=feedback&command=getErrorLog", null, insertErrorlog, "Fehler Errorlog",true);
}
function insertErrorlog(answer) {
if (answer.status != "OK") {
$("#errorlogarea").hide();
$("#errormsgforerrorlog").html(answer.msg);
$("#errormsgforerrorlog").show();
}
$("#errorlogtextarea").val(answer.msg.log);
}
</script> </script>
<!--first page --> <!--first page -->
@ -220,8 +279,14 @@ $(document).on("pageinit", "#feedback-page", function () {
</div> </div>
</div> </div>
<div data-role="content" id="allpagecontent"> <div data-role="content" id="allpagecontent">
<p><span id="feedbackinfotxt">Diese Seite dient zur Übermittlung von Feedback an den Entwickler. Die Email wird das Mailkonto
des Betreibers versendet.</span></p> <p /><span id="feedbackinfotxt">Diese Seite dient zur Übermittlung von Feedback an den Entwickler. Die Email wird das Mailkonto
des Betreibers versendet.</span>
<p>
<div data-role="collapsible" data-content-theme="c" data-collapsed="false" data-theme="e" id="generalfeedbackmask">
<h2>Feedback</h2>
<form> <form>
<div class="ui-field-contain" id="rolepart"> <div class="ui-field-contain" id="rolepart">
</div> <!-- ui-field-contain --> </div> <!-- ui-field-contain -->
@ -234,7 +299,7 @@ $(document).on("pageinit", "#feedback-page", function () {
<div class="ui-field-contain"> <div class="ui-field-contain">
<label for="emailaddr">Email:</label> <label for="emailaddr">Email:</label>
<input type="text" id="emailaddr" value="" data-mini="true" placeholder="Email-Adresse" data-theme="e" /> <input type="text" id="emailaddr" value="" data-mini="true" placeholder="Email-Adresse" data-theme="e" style="background-color:white;"/>
</div> <!-- ui-field-contain --> </div> <!-- ui-field-contain -->
<div class="ui-field-contain" id="phonepart"> <div class="ui-field-contain" id="phonepart">
@ -248,8 +313,31 @@ $(document).on("pageinit", "#feedback-page", function () {
kann nicht garantiert werden! Informationen über den verwendeten Internetbrowser wird an den Entwickler gesendet, damit mögliche Fragen kann nicht garantiert werden! Informationen über den verwendeten Internetbrowser wird an den Entwickler gesendet, damit mögliche Fragen
oder Probleme leichter identifiziert werden können.</span></p> oder Probleme leichter identifiziert werden können.</span></p>
<button type="submit" data-theme="f" data-icon="check" id="sendMail"><span id="sendtxt">Absenden</span></button> <button type="submit" data-theme="f" data-icon="check" id="sendMail"><span id="sendtxt">Senden</span></button>
</form> </form>
</div> <!--generalfeedback -->
<div data-role="collapsible" data-content-theme="c" data-collapsed="false" data-theme="e" id="errorlogmask">
<H2>Error-Log</H2>
<p><span id="errormsgforerrorlog" style="display:none;"></span>
<form id="errorlogarea" style="display:none;">
<textarea id="errorlogtextarea" style="background-color:#dddddd;" readonly>Content</textarea>
<input id="contactinfo" type="text" placeholder="Kontaktinformation, falls Rückmeldung gewünscht" style="background:white;"/>
<input id="remark" type="text" placeholder="Bemerkung" style="background:white;"/>
<p><i>Wenn Sie auf den Senden-Button drücken, so wird das obige Error.log an den Webserver des Anbieters (www.ordersprinter.de) inklusive der in der Verwaltungsansicht eingetragenen Betriebsinformation und der verwendeten PHP- und OrderSprinter-Version übertragen. Diese Information wird zum Zwecke der Problemlösung bis zu 4 Wochen auf dem Server des Anbieters gespeichert!</i>
<p><i>Wenn Sie eine Kontaktaufnahme seitens des Anbieters wünschen, geben Sie bitte oben eine entsprechende Kontaktinformation an.</i>
<p><input id="senderrorlog" type="submit" value="Senden" data-theme="f" />
</form>
<div id="infoarea" style="display:none;">
User not logged in...
</div>
</div>
</div> </div>
<div data-role="footer" data-theme="b" id="thefooterr" style="background-color:black;"> <div data-role="footer" data-theme="b" id="thefooterr" style="background-color:black;">
<div class="ui-grid-a"> <div class="ui-grid-a">

View File

@ -2,15 +2,15 @@
<head> <head>
<title>OrderSprinter Startseite</title> <title>OrderSprinter Startseite</title>
<meta http-equiv=“cache-control“ content=“no-cache“> <meta http-equiv="cache-control" content="no-cache">
<meta http-equiv=“pragma“ content=“no-cache“> <meta http-equiv="pragma" content="no-cache">
<meta http-equiv=“expires“ content=“0″> <meta http-equiv="expires" content="0">
<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.5.21"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.22">
<link rel="stylesheet" type="text/css" href="css/numfield.css?v=1.5.21"> <link rel="stylesheet" type="text/css" href="css/numfield.css?v=1.5.22">
<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" />
@ -28,6 +28,8 @@ var I_TIMEDIFF_NO_ADMIN = ["Zeit am Server und am Endgerät unterscheiden sich.
"Time of server and end device differ. Please log in as admin and synchronize times!", "Time of server and end device differ. Please log in as admin and synchronize times!",
"Tiempo en el servidor y su maquina no son iguales. Log in como administrador y corregir el tiempo!"]; "Tiempo en el servidor y su maquina no son iguales. Log in como administrador y corregir el tiempo!"];
var companyInfo = "";
function fillUserList(userinfo) { function fillUserList(userinfo) {
var text = '<div class="ui-field-contain">'; var text = '<div class="ui-field-contain">';
text += '<select name="userlistselection" id="userlistselection" data-theme="f">'; text += '<select name="userlistselection" id="userlistselection" data-theme="f">';
@ -150,6 +152,7 @@ function binding() {
$('#loginmask h2').off("click").on("click", function (e) { $('#loginmask h2').off("click").on("click", function (e) {
e.stopImmediatePropagation(); e.stopImmediatePropagation();
e.preventDefault(); e.preventDefault();
alert(companyInfo);
}); });
$('#logoutarea h2').off("click").on("click", function (e) { $('#logoutarea h2').off("click").on("click", function (e) {
e.stopImmediatePropagation(); e.stopImmediatePropagation();
@ -170,7 +173,6 @@ function binding() {
doLogout(); doLogout();
}); });
$(".numfield td").off("click").on("click", function (e) { $(".numfield td").off("click").on("click", function (e) {
e.stopImmediatePropagation(); e.stopImmediatePropagation();
e.preventDefault(); e.preventDefault();
@ -229,7 +231,16 @@ 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.5.21"},500); setTimeout(function(){document.location.href = "install.html?v=1.5.22"},500);
}
}
function askForCompanyInfo() {
doAjax("GET", "php/contenthandler.php?module=admin&command=askforcompanyinfo", null, handleCompanyInfo, null);
}
function handleCompanyInfo(answer) {
if (answer.status == "OK") {
companyInfo = answer.msg;
} }
} }
@ -239,6 +250,7 @@ function useInstallation() {
askAndFillUserList(); askAndFillUserList();
isUserAlreadyLoggedIn(); isUserAlreadyLoggedIn();
binding(); binding();
askForCompanyInfo();
} }
$(document).on("pageinit", "#index-page", function () { $(document).on("pageinit", "#index-page", function () {
@ -264,7 +276,7 @@ $(document).on("pageinit", "#index-page", function () {
<div data-role="collapsible" data-content-theme="c" data-collapsed="false" data-theme="e" id="loginmask"> <div data-role="collapsible" data-content-theme="c" data-collapsed="false" data-theme="e" id="loginmask">
<H2>Logindaten</H2> <H2>Anmelden</H2>
<form method="post"> <form method="post">
<table border=0> <table border=0>

View File

@ -909,7 +909,7 @@ El servicio web OrderSprinter no requiere una conexión a Internet. Sin embargo,
<tr id=updateline> <tr id=updateline>
<td>&nbsp;</td> <td>&nbsp;</td>
<td align=center> <td align=center>
<button id="updatebtn">Update -> 1.5.21</button> <button id="updatebtn">Update -> 1.5.22</button>
<span id="updateinprogresstxt" style="display:none;">Update... bitte warten.</span> <span id="updateinprogresstxt" style="display:none;">Update... bitte warten.</span>
</td> </td>
<td>&nbsp;</td> <td>&nbsp;</td>

View File

@ -389,7 +389,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.5.21"; $installerVersion = "1.5.22";
$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']);

View File

@ -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.5.21"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.22">
<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" />
@ -13,8 +13,8 @@
<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-2.0.3.min.js"></script> <script src="php/3rdparty/jquery-2.0.3.min.js"></script>
<script src="php/3rdparty/jquery.mobile-1.4.0.min.js"></script> <script src="php/3rdparty/jquery.mobile-1.4.0.min.js"></script>
<script src="utilities.js?v=1.5.21"></script> <script src="utilities.js?v=1.5.22"></script>
<script src="kitchenbar.js?v=1.5.21"></script> <script src="kitchenbar.js?v=1.5.22"></script>
<style> <style>
#tableWithEntriesToCook,#tableWithCookedEntries,#headertableToCook #tableWithEntriesToCook,#tableWithCookedEntries,#headertableToCook

View File

@ -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.5.21"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.22">
<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" />
@ -13,10 +13,10 @@
<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>
<script src="php/3rdparty/jquery.mobile-1.4.5.min.js"></script> <script src="php/3rdparty/jquery.mobile-1.4.5.min.js"></script>
<script src="utilities.js?v=1.5.21"></script> <script src="utilities.js?v=1.5.22"></script>
<script src="elements/tablemap.js?v=1.5.21"></script> <script src="elements/tablemap.js?v=1.5.22"></script>
<script src="elements/roommap.js?v=1.5.21"></script> <script src="elements/roommap.js?v=1.5.22"></script>
<script src="elements/groundplan.js?v=1.5.21"></script> <script src="elements/groundplan.js?v=1.5.22"></script>
<link href="php/3rdparty/hayageek_uploadfile.css" rel="stylesheet"> <link href="php/3rdparty/hayageek_uploadfile.css" rel="stylesheet">
<script src="php/3rdparty/hayageek_jquery_uploadfile.js"></script> <script src="php/3rdparty/hayageek_jquery_uploadfile.js"></script>
@ -304,6 +304,7 @@ var MAN_DISCOUNT_SECTION_TXT = ["Rabatteinstellungen in Bestellansicht:","Discou
var MAN_TIMETRACKING = ["Zeiterfassung:","Time tracking:","Tiempos de los empleados:"]; var MAN_TIMETRACKING = ["Zeiterfassung:","Time tracking:","Tiempos de los empleados:"];
var MAN_SUMUPFORCARD = ["SumUp für Kartenzahlung","SumUp for card payment","SumUp para pago con tarjeta"]; var MAN_SUMUPFORCARD = ["SumUp für Kartenzahlung","SumUp for card payment","SumUp para pago con tarjeta"];
var MAN_PRINTCASH = ["Drucke Barein-/auslage","Print cash operation","Imprimir entradas"]; var MAN_PRINTCASH = ["Drucke Barein-/auslage","Print cash operation","Imprimir entradas"];
var MAN_SHOW_ERRORLOG = ["Zugriff auf Webserver error.log","Access to webserver error.log","Leer webserver error.log"];
var MAN_SUMUP = ["SumUp-Anbindung","Connection to SumUp","SumUp"]; var MAN_SUMUP = ["SumUp-Anbindung","Connection to SumUp","SumUp"];
var MAN_SUMUPFAILURETEXT = ["Stornotext bei fehlgeschlagener Kartenzahlung","Text in report for failured card payment","Texto en el informe para el pago con tarjeta de crédito fallido"]; var MAN_SUMUPFAILURETEXT = ["Stornotext bei fehlgeschlagener Kartenzahlung","Text in report for failured card payment","Texto en el informe para el pago con tarjeta de crédito fallido"];
var MAN_MEMORYLIMIT = ["PHP Memory Limit (MB)","PHP Memory Limit (MB)","PHP Memory Limit (MB)"]; var MAN_MEMORYLIMIT = ["PHP Memory Limit (MB)","PHP Memory Limit (MB)","PHP Memory Limit (MB)"];
@ -478,7 +479,7 @@ var MAN_UPDATE_BTN_CLICK = ["Das Update startet und kann einige Minuten dauern.
var MAN_PLEASE_WAIT = ["Die Erstellung von Umsatzreports kann mehrere Minuten dauern. Bitte haben Sie nach dem Anklicken eines Umsatzexportbuttons etwas Geduld.","The creation of sales reports may take several minutes. Please be patient after clicking on a report button.","La creación de informes de ventas puede tardar varios minutos. Por favor, tenga paciencia después de hacer clic en un botón de ventas."]; var MAN_PLEASE_WAIT = ["Die Erstellung von Umsatzreports kann mehrere Minuten dauern. Bitte haben Sie nach dem Anklicken eines Umsatzexportbuttons etwas Geduld.","The creation of sales reports may take several minutes. Please be patient after clicking on a report button.","La creación de informes de ventas puede tardar varios minutos. Por favor, tenga paciencia después de hacer clic en un botón de ventas."];
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, 1,1,0,0, 0,0,0, 0,0,0,1,1, 0,1,0,1,1, 1,2,0, 0,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, 1,1,0,0, 0,0,0, 0,0,0,1,1, 0,1,0,1,1, 1,2,0, 0,0,1];
var numberOfClosings = 0; var numberOfClosings = 0;
@ -629,6 +630,7 @@ var generalValuesSettings = [
["appid","App-Id","i",0], ["appid","App-Id","i",0],
["sumupfailuretext",MAN_SUMUPFAILURETEXT[lang],"i",0,""], ["sumupfailuretext",MAN_SUMUPFAILURETEXT[lang],"i",0,""],
["printcash",MAN_PRINTCASH[lang],"s",64], ["printcash",MAN_PRINTCASH[lang],"s",64],
["showerrorlog",MAN_SHOW_ERRORLOG[lang],"s",65]
]; ];
var predef = ""; var predef = "";
@ -1004,6 +1006,7 @@ function insertGeneralConfigItems(configResult) {
$("#partOfSumupforcard").html(createYesNo("sumupforcard",MAN_SUMUPFORCARD, values.sumupforcard)); $("#partOfSumupforcard").html(createYesNo("sumupforcard",MAN_SUMUPFORCARD, values.sumupforcard));
$("#partOfPrintcash").html(createYesNo("printcash",MAN_PRINTCASH, values.printcash)); $("#partOfPrintcash").html(createYesNo("printcash",MAN_PRINTCASH, values.printcash));
$("#partOfShowerrorlog").html(createYesNo("showerrorlog",MAN_SHOW_ERRORLOG, values.showerrorlog));
var language = values.billlanguage; var language = values.billlanguage;
generalVals[2] = language; generalVals[2] = language;
@ -1101,6 +1104,7 @@ function insertGeneralConfigItems(configResult) {
generalVals[62] = values.usebarcode; generalVals[62] = values.usebarcode;
generalVals[63] = values.sumupforcard; generalVals[63] = values.sumupforcard;
generalVals[64] = values.printcash; generalVals[64] = values.printcash;
generalVals[65] = values.showerrorlog;
defaulttmp = values.defaulttmp; defaulttmp = values.defaulttmp;
@ -1562,7 +1566,7 @@ function initRestoreFileUpload() {
} else { } else {
alert("Import war erfolgreich."); alert("Import war erfolgreich.");
setTimeout(function(){ setTimeout(function(){
document.location.href = "index.html?v=1.5.21"; document.location.href = "index.html?v=1.5.22";
},250); },250);
} }
}, },
@ -2130,7 +2134,7 @@ function updateOneSingleFile() {
setTimeout(function(){ setTimeout(function(){
$("#sliderarea").hide(); $("#sliderarea").hide();
var millis=getMillis(); var millis=getMillis();
document.location.href = "install.html?v=1.5.21&mode=onlyupdate&n=" + millis; document.location.href = "install.html?v=1.5.22&mode=onlyupdate&n=" + millis;
},250); },250);
} }
} }
@ -4034,6 +4038,8 @@ $(document).on("pageinit", "#admin-page", function () {
<input type="text" value="" data-mini="true" placeholder="" id="updateurl" data-theme="c" class="genConfigEl"/> <input type="text" value="" data-mini="true" placeholder="" id="updateurl" data-theme="c" class="genConfigEl"/>
</div> </div>
<div id="partOfShowerrorlog"></div>
<div class="grouparea"> <div class="grouparea">
<div data-role="fieldcontain"> <div data-role="fieldcontain">
<label for="tmpdir"><span id="tmpdirtxt">PHP-Tmp:</span></label> <label for="tmpdir"><span id="tmpdirtxt">PHP-Tmp:</span></label>

File diff suppressed because one or more lines are too long

View File

@ -107,7 +107,8 @@ class 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) "getDailycode" => array("loggedin" => 1, "isadmin" => 0, "rights" => null),
"askforcompanyinfo" => array("loggedin" => 0, "isadmin" => 0, "rights" => null)
); );
@ -392,6 +393,8 @@ class Admin {
$this->getdashreports(); $this->getdashreports();
} else if ($command == 'getDailycode') { } else if ($command == 'getDailycode') {
$this->getDailycode(); $this->getDailycode();
} else if ($command == 'askforcompanyinfo') {
self::askforcompanyinfo();
} }
else { else {
echo "Command not supported."; echo "Command not supported.";
@ -1212,7 +1215,8 @@ class Admin {
array("appid",'',true), array("appid",'',true),
array("sumupfailuretext","",false), array("sumupfailuretext","",false),
array("printcash",0,false) array("printcash",0,false),
array("showerrorlog",1,false)
); );
if (is_null($pdo)) { if (is_null($pdo)) {
@ -1407,7 +1411,7 @@ class Admin {
$view = "preferences.html"; $view = "preferences.html";
} }
echo json_encode($view . "?v=1.5.21"); echo json_encode($view . "?v=1.5.22");
} }
} }
@ -1623,31 +1627,31 @@ 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.5.21"); } if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waitertxt[$lang], "link" => "waiter.html?v=1.5.22"); }
} else { } else {
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waiterdesktxt[$lang], "link" => "waiterdesktop.php?v=1.5.21"); } if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waiterdesktxt[$lang], "link" => "waiterdesktop.php?v=1.5.22"); }
} }
if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.5.21"); } if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.5.22"); }
if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.5.21"); } if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.5.22"); }
if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.5.21"); } if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.5.22"); }
if ($_SESSION['modus'] == 0) { if ($_SESSION['modus'] == 0) {
if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html?v=1.5.21"); } if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html?v=1.5.22"); }
} }
if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.5.21"); } if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.5.22"); }
if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.5.21"); } if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.5.22"); }
if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.5.21"); } if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.5.22"); }
if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.5.21"); } if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.5.22"); }
if ($_SESSION['right_tasks'] || $_SESSION['right_tasksmanagement']) { $mainMenu[] = array("name" => $taskstxt[$lang], "link" => "tasks.html?v=1.5.21"); } if ($_SESSION['right_tasks'] || $_SESSION['right_tasksmanagement']) { $mainMenu[] = array("name" => $taskstxt[$lang], "link" => "tasks.html?v=1.5.22"); }
if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=1.5.21"); } if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=1.5.22"); }
if ($_SESSION['right_customers']) { $mainMenu[] = array("name" => $customerstxt[$lang], "link" => "customers.html?v=1.5.21"); } if ($_SESSION['right_customers']) { $mainMenu[] = array("name" => $customerstxt[$lang], "link" => "customers.html?v=1.5.22"); }
if ($_SESSION['right_pickups']) { $mainMenu[] = array("name" => $pickupstxt[$lang], "link" => "pickups.html?v=1.5.21"); } if ($_SESSION['right_pickups']) { $mainMenu[] = array("name" => $pickupstxt[$lang], "link" => "pickups.html?v=1.5.22"); }
if ($_SESSION['right_dash']) { $mainMenu[] = array("name" => $dashtxt[$lang], "link" => "dash.php?v=1.5.21"); } if ($_SESSION['right_dash']) { $mainMenu[] = array("name" => $dashtxt[$lang], "link" => "dash.php?v=1.5.22"); }
if ($_SESSION['right_manager'] || $_SESSION['is_admin'] || $_SESSION['right_closing']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=1.5.21"); } if ($_SESSION['right_manager'] || $_SESSION['is_admin'] || $_SESSION['right_closing']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=1.5.22"); }
$mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.5.21"); $mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.5.22");
if ($_SESSION['right_timetracking'] || $_SESSION['right_timemanager']) { $mainMenu[] = array("name" => $timetrackingtxt[$lang], "link" => "timetracking.html?v=1.5.21"); } if ($_SESSION['right_timetracking'] || $_SESSION['right_timemanager']) { $mainMenu[] = array("name" => $timetrackingtxt[$lang], "link" => "timetracking.html?v=1.5.22"); }
$mainMenu[] = array("name" => "Hilfe", "link" => "help.php?v=1.5.21"); $mainMenu[] = array("name" => "Hilfe", "link" => "help.php?v=1.5.22");
$mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.5.21"); $mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.5.22");
} }
$mainMenu[] = array("name" => $logout[$lang], "link" => "logout.php"); $mainMenu[] = array("name" => $logout[$lang], "link" => "logout.php");
@ -1751,6 +1755,8 @@ class Admin {
} }
} }
private function getDbStat() { private function getDbStat() {
try { try {
$pdo = DbUtils::openDbAndReturnPdoStatic(); $pdo = DbUtils::openDbAndReturnPdoStatic();
@ -2251,6 +2257,7 @@ class Admin {
"sumupfailuretext" => array("dbcol" => "sumupfailuretext","checknum" => 0), "sumupfailuretext" => array("dbcol" => "sumupfailuretext","checknum" => 0),
"printcash" => array("dbcol" => "printcash","checknum" => 0), "printcash" => array("dbcol" => "printcash","checknum" => 0),
"showerrorlog" => array("dbcol" => "showerrorlog","checknum" => 0)
); );
$problem = false; $problem = false;
foreach ($changedValues as $aChangeSet) { foreach ($changedValues as $aChangeSet) {
@ -3473,4 +3480,14 @@ class Admin {
$stmt->execute($params); $stmt->execute($params);
} }
} }
private static function askforcompanyinfo() {
try {
$pdo = DbUtils::openDbAndReturnPdoStatic();
$companyInfo = CommonUtils::getConfigValue($pdo, 'companyinfo', '');
echo json_encode(array("status" => "OK","msg" => $companyInfo));
} catch (Exception $ex) {
echo json_encode(array("status" => "ERROR","msg" => $ex->getMessage()));
}
}
} }

View File

@ -1162,6 +1162,7 @@ class Bill {
$this->t['State'][$l], $this->t['State'][$l],
'Produkt', 'Produkt',
'Produkt-ID', 'Produkt-ID',
'Barcode',
$this->t['PayWay'][$l], $this->t['PayWay'][$l],
$this->t['reason'][$l], $this->t['reason'][$l],
'Abrechnungsbenutzer', 'Abrechnungsbenutzer',
@ -1191,6 +1192,7 @@ class Bill {
B.status as status, B.status as status,
productname, productname,
productid, productid,
IFNULL((SELECT barcode from %products% PR WHERE PR.id=productid),'') as barcode,
P.$payment_col as payment, P.$payment_col as payment,
IFNULL(B.reason,'') as reason, IFNULL(B.reason,'') as reason,
U.username,U.id as userid,closingid,C.closingdate as closingdate, IFNULL(C.remark,'') as remark U.username,U.id as userid,closingid,C.closingdate as closingdate, IFNULL(C.remark,'') as remark
@ -1212,6 +1214,7 @@ class Bill {
'd' as status, 'd' as status,
productname, productname,
productid, productid,
IFNULL((SELECT barcode from %products% PR WHERE PR.id=productid),'') as barcode,
'' as payment, '' as payment,
'' as reason, '' as reason,
'' as username,'' as userid, '' as username,'' as userid,
@ -1229,7 +1232,9 @@ class Bill {
'' as reference, '' as reference,
status, status,
'Einlage' as productname, 'Einlage' as productname,
'' as productid,'Barzahlung' as payment, IFNULL(B.reason,'') as reason, U.username, U.id as userid,closingid,C.closingdate as closingdate,IFNULL(C.remark,'') as remark '' as productid,
'' as barcode,
'Barzahlung' as payment, IFNULL(B.reason,'') as reason, U.username, U.id as userid,closingid,C.closingdate as closingdate,IFNULL(C.remark,'') as remark
FROM %bill% B,%user% U,%closing% C WHERE B.status='c' AND B.closingid is not null AND B.userid=U.id AND B.closingid=C.id FROM %bill% B,%user% U,%closing% C WHERE B.status='c' AND B.closingid is not null AND B.userid=U.id AND B.closingid=C.id
AND B.billdate >= ? AND B.billdate <= ? AND B.billdate >= ? AND B.billdate <= ?
ORDER BY ORDER BY
@ -1276,6 +1281,7 @@ class Bill {
$cat, $cat,
$z['productname'], $z['productname'],
$z['productid'], $z['productid'],
$z['barcode'],
$z['payment'], $z['payment'],
$z['reason'], $z['reason'],
$z['username'],$z['userid'], $z['username'],$z['userid'],

View File

@ -853,7 +853,7 @@ class Customers {
$txt = "<head>"; $txt = "<head>";
$txt .= "<title>" . self::$CUS_OVERVIEW[$lang] . "</title>"; $txt .= "<title>" . self::$CUS_OVERVIEW[$lang] . "</title>";
$txt .= '<meta http-equiv="content-type" content="text/html; charset=utf-8">'; $txt .= '<meta http-equiv="content-type" content="text/html; charset=utf-8">';
$txt .= '<link rel="stylesheet" type="text/css" href="../css/guestreport.css?v=1.5.21">'; $txt .= '<link rel="stylesheet" type="text/css" href="../css/guestreport.css?v=1.5.22">';
$txt .= "</head>"; $txt .= "</head>";
return $txt; return $txt;
} }

View File

@ -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.5.21"; $version = "1.5.22";
$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 {

View File

@ -9,10 +9,23 @@ class Feedback {
} }
function handleCommand($command) { function handleCommand($command) {
if ($command == 'sendMail') { if (!$this->isUserAlreadyLoggedInForPhp()) {
$this->sendMail($_POST['role'],$_POST['topic'],$_POST['email'],$_POST['tel'],$_POST['allowSendRights'],$_POST['content']); echo json_encode(array("status" => "ERROR","msg" => "Fehler: Benutzer nicht eingeloggt!"));
return;
} }
else {
if ($command == 'sendMail') {
$pdo = DbUtils::openDbAndReturnPdoStatic();
$this->sendMail($pdo,$_POST['role'],$_POST['topic'],$_POST['email'],$_POST['tel'],$_POST['allowSendRights'],$_POST['content']);
} else if ($command == 'getErrorLog') {
$pdo = DbUtils::openDbAndReturnPdoStatic();
$errorlog = $this->getErrorLog($pdo);
echo json_encode($errorlog);
} else if ($command == 'sendErrorLog') {
$pdo = DbUtils::openDbAndReturnPdoStatic();
$answer = self::sendErrorLog($pdo,$_POST['errorlog'],$_POST['contactinfo'],$_POST['remark']);
echo $answer;
} else {
echo "Kommando nicht unterstuetzt."; echo "Kommando nicht unterstuetzt.";
} }
} }
@ -28,20 +41,6 @@ class Feedback {
} }
} }
private function getGeneralItemFromDb($field) {
$pdo = $this->dbutils->openDbAndReturnPdo();
$aValue="";
$sql = "SELECT setting FROM %config% where name='$field'";
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
$stmt->execute();
$row =$stmt->fetchObject();
if ($row != null) {
$aValue = $row->setting;
}
return $aValue;
}
function spamcheck($field) { function spamcheck($field) {
// Sanitize e-mail address // Sanitize e-mail address
$field=filter_var($field, FILTER_SANITIZE_EMAIL); $field=filter_var($field, FILTER_SANITIZE_EMAIL);
@ -63,9 +62,7 @@ class Feedback {
return 0; return 0;
} }
} }
function getdbinfo() { function getdbinfo($pdo) {
$pdo = $this->dbutils->openDbAndReturnPdo();
$info = "\n\nWaiting print jobs:\n"; $info = "\n\nWaiting print jobs:\n";
// workprintjobswaiting // workprintjobswaiting
$foodjobs = $this->sqlresult($pdo,"select count(id) as number from %printjobs% where type=1","number"); $foodjobs = $this->sqlresult($pdo,"select count(id) as number from %printjobs% where type=1","number");
@ -99,12 +96,11 @@ class Feedback {
return $dbInfo; return $dbInfo;
} }
function sendMail($role,$topic,$email,$tel,$allowSendRights,$content) { function sendMail($pdo,$role,$topic,$email,$tel,$allowSendRights,$content) {
$rights = "Keine Rechteinformation"; $rights = "Keine Rechteinformation";
$version = $this->getGeneralItemFromDb('version'); $version = CommonUtils::getConfigValue($pdo, 'version', '');
if ($this->isUserAlreadyLoggedInForPhp()) {
if ($allowSendRights) { if ($allowSendRights) {
$rights = "UID=" . $_SESSION['userid'] . "\n"; $rights = "UID=" . $_SESSION['userid'] . "\n";
$rights .= "UN=" . $_SESSION['currentuser'] . "\n"; $rights .= "UN=" . $_SESSION['currentuser'] . "\n";
@ -114,20 +110,15 @@ class Feedback {
$rights .= " RB=" . ($_SESSION['right_bill'] ? "1" : "0") . "\n"; $rights .= " RB=" . ($_SESSION['right_bill'] ? "1" : "0") . "\n";
$rights .= " RProd = " . ($_SESSION['right_products'] ? "1" : "0") . "\n"; $rights .= " RProd = " . ($_SESSION['right_products'] ? "1" : "0") . "\n";
$rights .= " RM=" . ($_SESSION['right_manager'] ? "1" : "0"); $rights .= " RM=" . ($_SESSION['right_manager'] ? "1" : "0");
$rights .= $this->getdbinfo(); $rights .= $this->getdbinfo($pdo);
} }
$server = $_SERVER['HTTP_USER_AGENT']; $server = $_SERVER['HTTP_USER_AGENT'];
$msg = "\nEmail:$email\nTel.:$tel\nNachricht:$content\nRolle:$role\nRechte:$rights\nServer:$server\n\nVersion:$version\n"; $msg = "\nEmail:$email\nTel.:$tel\nNachricht:$content\nRolle:$role\nRechte:$rights\nServer:$server\n\nVersion:$version\n";
$pdo = DbUtils::openDbAndReturnPdoStatic();
$version = CommonUtils::getConfigValue($pdo, 'version', 'no-version'); $version = CommonUtils::getConfigValue($pdo, 'version', 'no-version');
$ok = $this->sendFeedbackToServer($topic, $msg, $version); $ok = $this->sendFeedbackToServer($topic, $msg, $version);
echo json_encode($ok); echo json_encode($ok);
} else {
echo json_encode(array("status" => "ERROR","msg" => "Fehler: Benutzer nicht eingeloggt!"));
}
} }
function sendFeedbackToServer($topic, $msg, $version) { function sendFeedbackToServer($topic, $msg, $version) {
@ -166,4 +157,70 @@ class Feedback {
} }
} }
private function getErrorLog($pdo) {
$showErrorLog = CommonUtils::getConfigValue($pdo, "showerrorlog", 0);
if ($showErrorLog != 1) {
return array("status" => "ERROR", "msg" => "Benutzer dürfen entsprechend der eingestellten Konfiguration nicht auf das Error.log des Webservers zugreifen.");
}
$batchFile = "";
if (stripos(PHP_OS, 'win') === 0) {
$batchFile = "errorlog_windows.bat";
} elseif (stripos(PHP_OS, 'linux') === 0) {
$batchFile = "errorlog_linux.sh";
}
if ($batchFile == "") {
return array("status" => "ERROR", "msg" => "Betriebssystem nicht erkannt oder nicht unterstützt: " . PHP_OS);
}
$batchOutput = shell_exec("utilities/$batchFile");
if ($batchOutput == "") {
return array("status" => "ERROR", "msg" => "Error.log leer oder keine Lesezugriff.");
}
$maxSize = 20 * 1024;
if (strlen($batchOutput) > $maxSize) {
$batchOutput = substr($batchOutput, 0-$maxSize);
}
$companyinfo = CommonUtils::getConfigValue($pdo, "companyinfo", "");
$ret = array("log" => $batchOutput, "companyinfo" => $companyinfo);
return array("status" => "OK", "msg" => $ret);
}
private static function sendErrorLog($pdo, $errorlog, $contactinfo, $remark) {
$companyInfo = CommonUtils::getConfigValue($pdo, 'companyinfo', '');
$version = CommonUtils::getConfigValue($pdo, 'version', '');
$phpversion = phpversion();
$arr = array(
"errorlog" => $errorlog,
"contactinfo" => $contactinfo,
"remark" => $remark,
"companyInfo" => $companyInfo,
"version" => $version,
"phpversion" => $phpversion);
$url = "http://www.ordersprinter.de/debug/save.php?cmd=saveerrorlog";
$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);
return $ret;
}
} }

View File

@ -76,6 +76,8 @@ class QueueContent {
$this->getRecords($pdo,$_GET["tableid"]); $this->getRecords($pdo,$_GET["tableid"]);
} else if ($command == 'getAllTableRecords') { } else if ($command == 'getAllTableRecords') {
$this->getAllTableRecords(); $this->getAllTableRecords();
} else if ($command == 'getAllOrders') {
$this->getAllOrders();
} else if ($command == 'kitchenToCook') { } else if ($command == 'kitchenToCook') {
$this->kitchenToCook(); $this->kitchenToCook();
} else if ($command == 'declareProductBeCookingOrCooked') { } else if ($command == 'declareProductBeCookingOrCooked') {
@ -885,6 +887,41 @@ class QueueContent {
} }
} }
function getAllOrders() {
if (!($this->userrights->hasCurrentUserRight('right_statistics')) ) {
echo json_encode(array("status" => "ERROR","msg" => "Benutzerrechte nicht ausreichend"));
return false;
}
$pdo = DbUtils::openDbAndReturnPdoStatic();
$sql = "SELECT count(Q.id) as countid,productid,price,productname,ordertime,username,IFNULL(toremove,0) as toremove,IF(billid is null,0,1) as ispaid,IFNULL(tableno,'To-Go') as tablename ";
$sql .= " FROM %queue% Q LEFT JOIN %resttables% R ON Q.tablenr=R.id LEFT JOIN %user% U ON Q.orderuser=U.id WHERE isclosed is null ";
$sql .= " group by ordertime,productname,productid,price,toremove,ispaid,tablename,username ORDER BY ordertime,tablename,ispaid";
$allorders = CommonUtils::fetchSqlAll($pdo, $sql);
$sql = "SELECT IFNULL(SUM(price),'0.00') as sumprice FROM %queue% Q WHERE isclosed is null AND toremove=?";
$sumAllRes = CommonUtils::fetchSqlAll($pdo, $sql,array(0));
$sumAll = $sumAllRes[0]["sumprice"];
$sql = "SELECT IFNULL(SUM(price),'0.00') as sumprice FROM %queue% Q WHERE isclosed is null AND toremove=? AND billid is null";
$sumUnpaidRes = CommonUtils::fetchSqlAll($pdo, $sql,array(0));
$sumUnpaid = $sumUnpaidRes[0]["sumprice"];
$sql = "SELECT IFNULL(SUM(price),'0.00') as sumprice FROM %queue% Q WHERE isclosed is null AND toremove=? AND billid is not null";
$sumPaidRes = CommonUtils::fetchSqlAll($pdo, $sql,array(0));
$sumPaid = $sumPaidRes[0]["sumprice"];
$sql = "SELECT IFNULL(SUM(price),'0.00') as sumprice FROM %queue% Q WHERE isclosed is null AND toremove=? AND billid is null";
$sumCancelledRes = CommonUtils::fetchSqlAll($pdo, $sql,array(1));
$sumCancelled = $sumCancelledRes[0]["sumprice"];
$result = array("list" => $allorders,
"sumall" => $sumAll,
"sumunpaid" => $sumUnpaid,
"sumpaid" => $sumPaid,
"sumcancelled" => $sumCancelled);
echo json_encode(array("status" => "OK","msg" => $result));
}
function getAllTableRecords() { function getAllTableRecords() {
if (!($this->userrights->hasCurrentUserRight('right_statistics')) ) { if (!($this->userrights->hasCurrentUserRight('right_statistics')) ) {
echo json_encode(array("status" => "ERROR","msg" => "Benutzerrechte nicht ausreichend")); echo json_encode(array("status" => "ERROR","msg" => "Benutzerrechte nicht ausreichend"));

View File

@ -40,4 +40,3 @@ class EntryList {
return $out; return $out;
} }
} }
?>

View File

@ -99,14 +99,12 @@ class TypeAndProductFileManager {
private function findNextIdOfProdType($pdo) { private function findNextIdOfProdType($pdo) {
$index = 1; $index = 1;
$sql = "SELECT id FROM %prodtype% ORDER BY id DESC LIMIT 1"; $sql = "SELECT MAX(id) as maxid FROM %prodtype%";
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql)); $res = CommonUtils::fetchSqlAll($pdo, $sql);
$stmt->execute(); $this->nextIdOfProdType = 1;
$row =$stmt->fetchObject(); if (count($res) > 0) {
if ($row != null) { $this->nextIdOfProdType = intval($res[0]["maxid"]) + 1;
$index = intval($row->id) +1;
} }
$this->nextIdOfProdType = $index;
} }
public static function removeExtras($pdo) { public static function removeExtras($pdo) {
@ -343,6 +341,8 @@ class TypeAndProductFileManager {
$changedProdIds = array(); $changedProdIds = array();
$prodIdSet = array();
for ($i=0;$i < $leafArray->size(); $i++) { for ($i=0;$i < $leafArray->size(); $i++) {
$theLeafEntry = $leafArray->get($i); $theLeafEntry = $leafArray->get($i);
$product = new ProductEntry(); $product = new ProductEntry();
@ -368,6 +368,11 @@ class TypeAndProductFileManager {
$shortName = $product->getShortName(); $shortName = $product->getShortName();
$longName = $product->getLongName(); $longName = $product->getLongName();
$prodid = $product->getProdId(); $prodid = $product->getProdId();
if (array_key_exists($prodid, $prodIdSet)) {
$prodid = null;
} else {
$prodIdSet[$prodid] = $product;
}
$available = $product->getAvailable(); $available = $product->getAvailable();
$favorite = 0; $favorite = 0;
$prodimageid = $product->getProdImageId(); $prodimageid = $product->getProdImageId();
@ -501,7 +506,7 @@ class TypeAndProductFileManager {
} }
// now look on the first depth level (0). This level has // now look on the first depth level (0). This level has
// to be treated individually as staring point because later // to be treated individually as starting point because later
// on it will be iterated recursively // on it will be iterated recursively
// look at all elements at depth level 0 // look at all elements at depth level 0
@ -515,14 +520,6 @@ class TypeAndProductFileManager {
} }
} }
//Debug ausgabe
for ($i=0;$i<$this->entries->size();$i++) {
$anEntry = $this->entries->get($i);
$theId = $anEntry->getId();
$theName = $anEntry->getName();
$theRef = $anEntry->getReference();
}
$this->sortOutLeafs(); $this->sortOutLeafs();
$ret = $this->fillProdTypeDbTable($pdo); $ret = $this->fillProdTypeDbTable($pdo);

View File

@ -0,0 +1,23 @@
#!/bin/bash
FILE1="/var/log/apache2/error.log"
FILE2="/var/log/httpd/error.log"
FILE3="/var/log/httpd-error.log"
if [ -f $FILE1 ]; then
cat $FILE1
exit
fi
if [ -f $FILE2 ]; then
cat $FILE2
exit
fi
if [ -f $FILE3 ]; then
cat $FILE3
exit
fi
echo "Datei error.log nicht gefunden oder Datei nicht lesbar vom Webserver."
exit 1

View File

@ -0,0 +1,13 @@
@echo off
if exist C:\xampp\apache\logs\error.log (
type C:\xampp\apache\logs\error.log
exit 0
)
if exist D:\xampp\apache\logs\error.log (
type D:\xampp\apache\logs\error.log
exit 0
)
echo "Datei error.log nicht gefunden oder Datei nicht lesbar vom Webserver."
exit 1

View File

@ -1160,6 +1160,15 @@ class Version {
} }
} }
public static function upd_1521_1522($pdo, $prefix, $dbname) {
try {
self::insertOrUpdateConfigItem($pdo, 'showerrorlog', '1');
return array(true);
} catch (PDOException $e) {
return array(false,$e);
}
}
public static $updateOrder = array( public static $updateOrder = array(
"1.3.0" => array("upd_1300_1301","1.3.1"), "1.3.0" => array("upd_1300_1301","1.3.1"),
"1.3.1" => array("upd_1301_1302","1.3.2"), "1.3.1" => array("upd_1301_1302","1.3.2"),
@ -1228,7 +1237,8 @@ class Version {
"1.5.17" => array("upd_1517_1518","1.5.18"), "1.5.17" => array("upd_1517_1518","1.5.18"),
"1.5.18" => array("upd_1518_1519","1.5.19"), "1.5.18" => array("upd_1518_1519","1.5.19"),
"1.5.19" => array("upd_1519_1520","1.5.20"), "1.5.19" => array("upd_1519_1520","1.5.20"),
"1.5.20" => array("upd_1520_1521","1.5.21") "1.5.20" => array("upd_1520_1521","1.5.21"),
"1.5.21" => array("upd_1521_1522","1.5.22")
); );
public static function runUpdateProcess($pdo,$prefix, $dbname, $untilVersion,$checkValidVersion) { public static function runUpdateProcess($pdo,$prefix, $dbname, $untilVersion,$checkValidVersion) {

View File

@ -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.5.21"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.22">
<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" />
@ -13,7 +13,7 @@
<script src="php/3rdparty/jquery-1.11.3.min.js"></script> <script src="php/3rdparty/jquery-1.11.3.min.js"></script>
<script src="php/3rdparty/jquery.mobile-1.4.5.min.js"></script> <script src="php/3rdparty/jquery.mobile-1.4.5.min.js"></script>
<script src="utilities.js?v=1.5.21"></script> <script src="utilities.js?v=1.5.22"></script>
<link rel="stylesheet" href="php/3rdparty/jqueryui1-11-4/jquery-ui.min.css" /> <link rel="stylesheet" href="php/3rdparty/jqueryui1-11-4/jquery-ui.min.css" />
<script src="php/3rdparty/jqueryui1-11-4/jquery-ui.min.js"></script> <script src="php/3rdparty/jqueryui1-11-4/jquery-ui.min.js"></script>

View File

@ -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.5.21"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.22">
<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" />

View File

@ -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.5.21"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.22">
<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" />
@ -15,8 +15,8 @@
<script src="php/3rdparty/jquery-2.0.3.min.js"></script> <script src="php/3rdparty/jquery-2.0.3.min.js"></script>
<script src="php/3rdparty/jquery.mobile-1.4.0.min.js"></script> <script src="php/3rdparty/jquery.mobile-1.4.0.min.js"></script>
<script src="utilities.js"></script> <script src="utilities.js"></script>
<script src="elements/product.js?v=1.5.21"></script> <script src="elements/product.js?v=1.5.22"></script>
<script src="elements/extra.js?v=1.5.21"></script> <script src="elements/extra.js?v=1.5.22"></script>
<link href="php/3rdparty/hayageek_uploadfile.css" rel="stylesheet"> <link href="php/3rdparty/hayageek_uploadfile.css" rel="stylesheet">
<script src="php/3rdparty/hayageek_jquery_uploadfile.js"></script> <script src="php/3rdparty/hayageek_jquery_uploadfile.js"></script>
</head> </head>

View File

@ -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">
<meta name="author" content="Stefan Pichel"> <meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.21"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.22">
<link rel="stylesheet" href="css/ospage.css" /> <link rel="stylesheet" href="css/ospage.css" />
<link rel="stylesheet" href="css/tablepanel.css" /> <link rel="stylesheet" href="css/tablepanel.css" />

View File

@ -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.5.21"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.22">
<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" />

View File

@ -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.5.21"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.22">
<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" />
@ -27,6 +27,8 @@ var REP_TABLE_REPORTS = ["Tischprotokolle","Table reports","Records of tables","
var REP_TABLE_REPORTS_INFO = ["In diesem Bereich werden alle Buchungen, Umbuchungen und Stornierungen für alle Tische seit der letzten Tageserfassung angezeigt.", var REP_TABLE_REPORTS_INFO = ["In diesem Bereich werden alle Buchungen, Umbuchungen und Stornierungen für alle Tische seit der letzten Tageserfassung angezeigt.",
"This area displays all postings, transfers, and cancellations for all tables since the last closing.", "This area displays all postings, transfers, and cancellations for all tables since the last closing.",
"Esta área visualiza todas las contabilizaciones, traslados y anulaciones de todas las tablas desde la última cerra de día."]; "Esta área visualiza todas las contabilizaciones, traslados y anulaciones de todas las tablas desde la última cerra de día."];
var REP_ORDER_REPORTS = ["Aktuelle Bestellungen","Current orders","Ordenes de momento"];
var REP_ORDER_REPORTS_INFO = ["In diesem Bereich werden alle Bestellungen seit der letzten Tageserfassung aufgeführt.","In this area yu can see all orders since the last closing.","En esta area puede ver todas las ordenes desde la última cerrada"];
var REP_USER = ["Benutzer","User","Usario"]; var REP_USER = ["Benutzer","User","Usario"];
var REP_USER_TXT = ["Diese Übersicht umfasst den derzeitigen Brutto-Kassenbestand pro Kasse inkl. aller Zahlungswege und Ein-/Auslagen.", var REP_USER_TXT = ["Diese Übersicht umfasst den derzeitigen Brutto-Kassenbestand pro Kasse inkl. aller Zahlungswege und Ein-/Auslagen.",
"This overview contains the current sum of all paydesks including all payment types and cash inserts/extracs.", "This overview contains the current sum of all paydesks including all payment types and cash inserts/extracs.",
@ -76,6 +78,10 @@ var REP_RECORD_ACTION = [
var REP_NO_ENTRIES = ["Keine Einträge","No entries","Ningún data"]; var REP_NO_ENTRIES = ["Keine Einträge","No entries","Ningún data"];
var lang = 0; var lang = 0;
var allorders = [];
var filterOnlyUnpaidOrdersSelection = 0;
var filterCancelledOrders = 0;
var currency = "";
function setLanguage(language) { function setLanguage(language) {
lang = language; lang = language;
@ -114,17 +120,176 @@ function setLanguage(language) {
REP_USER_TXT[lang], REP_USER_TXT[lang],
"center",15,10,75); "center",15,10,75);
var htmlTableReports = createStub("table_reports_section",REP_TABLE_REPORTS[lang],REP_TABLE_REPORTS_INFO[lang]); var htmlTableReports = createStub("table_reports_section",REP_TABLE_REPORTS[lang],REP_TABLE_REPORTS_INFO[lang],"","");
$("#content").html(htmlToday + htmlYesterday + htmlThisMonth + htmlLastMonth + htmlProds + htmlRatings + htmlUserSumsPart + htmlTableReports); var search = '<p><input id="searchfieldorders" style="background-color:white;color:black;" placeholder="Suche" />';
var selBoxForOrdersPaid = "<div id='selBoxForOrdersFilter'>" + createSelBoxForOrderFilter() + "</div>";
var selBoxForOrdersCancelled = "<div id='selBoxForOrdersCancelled'>" + createSelBoxForCancelledFilter() + "</div>";
var updateBtn = "<button id='updateordersbtn' data-theme='f'>Aktualisieren</button>";
var htmlOrderReports = createStub("order_reports_section",REP_ORDER_REPORTS[lang],REP_ORDER_REPORTS_INFO[lang],search + selBoxForOrdersPaid + selBoxForOrdersCancelled,updateBtn);
$("#content").html(htmlToday + htmlYesterday + htmlThisMonth + htmlLastMonth + htmlProds + htmlRatings + htmlUserSumsPart + htmlTableReports + htmlOrderReports);
$("#content").trigger("create"); $("#content").trigger("create");
bindExpandTableRecordsArea(); bindExpandAreas();
bindUpdateBtns();
bindSelBoxChange();
} }
function bindExpandTableRecordsArea() { function createSelBoxForOrderFilter() {
var sel = "<select data-theme='f' id='showOnlyUnpaidOrders'>";
if (filterOnlyUnpaidOrdersSelection == 0) {
sel += "<option value='0' selected>Nur unbezahlte Bestellungen</option>";
} else {
sel += "<option value='0'>Nur unbezahlte Bestellungen</option>";
}
if (filterOnlyUnpaidOrdersSelection == 1) {
sel += "<option value='1' selected>Alle Bestellungen</option>";
} else {
sel += "<option value='1'>Alle Bestellungen</option>";
}
sel += "</select>";
return sel;
}
function createSelBoxForCancelledFilter() {
var sel = "<select data-theme='f' id='filterForCancelledOrders'>";
if (filterCancelledOrders == 0) {
sel += "<option value='0' selected>Stornostatus ignorieren</option>";
} else {
sel += "<option value='0'>Stornostatus ignorieren</option>";
}
if (filterCancelledOrders == 1) {
sel += "<option value='1' selected>Nur unstornierte Produkte</option>";
} else {
sel += "<option value='1'>Nur unstornierte Produkte</option>";
}
if (filterCancelledOrders == 2) {
sel += "<option value='2' selected>Nur stornierte Produkte</option>";
} else {
sel += "<option value='2'>Nur stornierte Produkte</option>";
}
sel += "</select>";
return sel;
}
function bindExpandAreas() {
$("#table_reports_section").off("collapsibleexpand").on("collapsibleexpand", function (e) { $("#table_reports_section").off("collapsibleexpand").on("collapsibleexpand", function (e) {
doAjax("GET", "php/contenthandler.php?module=queue&command=getAllTableRecords", null, fillTableRecords, "Fehler keine Tischprotokolle"); doAjax("GET", "php/contenthandler.php?module=queue&command=getAllTableRecords", null, fillTableRecords, "Fehler keine Tischprotokolle");
}); });
$("#order_reports_section").off("collapsibleexpand").on("collapsibleexpand", function (e) {
requestAllOrders();
});
$("#searchfieldorders").off("keyup").on("keyup", function (e) {
displayAllOrdersDueToFilter();
});
}
function bindUpdateBtns() {
$("#updateordersbtn").off("click").on("click", function (e) {
e.stopImmediatePropagation();
e.preventDefault();
requestAllOrders();
});
}
function requestAllOrders() {
doAjax("GET", "php/contenthandler.php?module=queue&command=getAllOrders", null, fillOrdersArea, "Fehler keine Bestellprotokolle");
}
function bindSelBoxChange() {
$("#showOnlyUnpaidOrders").off("change").on("change", function (e) {
e.stopImmediatePropagation();
e.preventDefault();
filterOnlyUnpaidOrdersSelection = $("#showOnlyUnpaidOrders").val();
$("#selBoxForOrdersFilter").html(createSelBoxForOrderFilter());
$("#selBoxForOrdersFilter").trigger("create");
displayAllOrdersDueToFilter();
bindSelBoxChange();
});
// filterCancelledOrders
$("#filterForCancelledOrders").off("change").on("change", function (e) {
e.stopImmediatePropagation();
e.preventDefault();
filterCancelledOrders = $("#filterForCancelledOrders").val();
$("#selBoxForOrdersCancelled").html(createSelBoxForCancelledFilter());
$("#selBoxForOrdersCancelled").trigger("create");
displayAllOrdersDueToFilter();
bindSelBoxChange();
});
}
function fillOrdersArea(answer) {
if (answer.status == "OK") {
allorders = answer.msg;
displayAllOrdersDueToFilter();
}
}
function displayAllOrdersDueToFilter() {
var decpoint = $("#info-page").data("decpoint");
var filterText = $("#searchfieldorders").val().trim().toLowerCase();
var txt = "<table class='reporttable'>";
txt += "<tr><th>Anzahl<th>Produkt<th>Information</tr>";
allorders.list.forEach(function(entry) {
var countid = toHtml(entry.countid);
var productname = toHtml(entry.productname);
var ordertime = toHtml(entry.ordertime);
var username = toHtml(entry.username);
var ispaid = entry.ispaid;
var tablename = toHtml(entry.tablename);
var toremove = entry.toremove;
var price = toHtml(entry.price);
var priceStr = price.replace(".",decpoint) + " " + currency;
var show = true;
if (filterText != "") {
if ((productname.toLowerCase().indexOf(filterText) == -1) &&
(username.toLowerCase().indexOf(filterText) == -1) &&
(tablename.toLowerCase().indexOf(filterText) == -1)) {
show = false;
}
}
if ((filterOnlyUnpaidOrdersSelection == 0) && (ispaid == 1)) {
show = false;
}
if ((filterCancelledOrders == 1) && (toremove == 1)) {
show = false;
}
if ((filterCancelledOrders == 2) && (toremove == 0)) {
show = false;
}
if (show) {
txt += '<tr><td>' + countid + "<td>" + productname + "<td>";
txt += ordertime + "<br>";
txt += username + "<br>";
txt += priceStr + "<br>";
txt += (ispaid == 1 ? "bezahlt<br>" : "noch unbezahlt<br>");
txt += tablename;
if (toremove == 1) {
txt += "<br>(storniert)";
}
txt += "</tr>";
}
});
txt += "</table>";
var sumall = allorders.sumall.replace(".",decpoint) + " " + currency;
var sumunpaid = allorders.sumunpaid.replace(".",decpoint) + " " + currency;
var sumpaid = allorders.sumpaid.replace(".",decpoint) + " " + currency;
var sumcancelled = allorders.sumcancelled.replace(".",decpoint) + " " + currency;
txt += "<p><table class='reporttable'>";
txt += "<tr><th>Summe<th>Betrag</tr>";
txt += "<tr><td>Unbezahlt<td>" + sumunpaid + "</tr>";
txt += "<tr><td>Bezahlt<td>" + sumpaid + "</tr>";
txt += "<tr><td>Bezahlt und unbezahlt<td>" + sumall + "</tr>";
txt += "<tr><td>Stornierungen<td>" + sumcancelled + "</tr>";
txt += "</table>";
$("#content_order_reports_section").html(txt);
} }
function fillTableRecords(answer) { function fillTableRecords(answer) {
@ -229,12 +394,14 @@ function setLanguage(language) {
return html; return html;
} }
function createStub(id,aName,infoText) { function createStub(id,aName,infoText,additionalFirstElement,additionalLastEl) {
var collapse_elem = '<div id="' + id + '" data-role="collapsible" data-content-theme="e" data-collapsed="true" data-theme="c">'; var collapse_elem = '<div id="' + id + '" data-role="collapsible" data-content-theme="e" data-collapsed="true" data-theme="c">';
var header = '<h3>'+aName + '</h3><p><i>' + infoText + '</i></p><p>'; var header = '<h3>'+aName + '</h3><p><i>' + infoText + '</i></p><p>';
var content = '<div id="content_' + id + '"><img id="progressimginpopup" src="php/3rdparty/images/ajax-loader.gif" /></div>';
var html = collapse_elem + header + content + "</p></div>"; var content = additionalFirstElement + '<div id="content_' + id + '">';
content += '<p /><img id="progressimginpopup" src="php/3rdparty/images/ajax-loader.gif" /></div>';
var html = collapse_elem + header + content + additionalLastEl + "</p></div>";
return html; return html;
} }
@ -289,6 +456,7 @@ function setLanguage(language) {
if (configResult.status == "OK") { if (configResult.status == "OK") {
var values = configResult.msg; var values = configResult.msg;
var decpoint = values.decpoint; var decpoint = values.decpoint;
currency = values.currency;
$("#info-page").data("decpoint",values.decpoint); $("#info-page").data("decpoint",values.decpoint);
setLanguage(values.userlanguage); setLanguage(values.userlanguage);
getStats(); getStats();

View File

@ -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.5.21"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.22">
<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" />

View File

@ -30,7 +30,7 @@ var SUM_REASON = ["Grund","Reason","Razón"];
var SUM_CANCEL_ITEM = ["Stornierung","Cancellation","Revocación"]; var SUM_CANCEL_ITEM = ["Stornierung","Cancellation","Revocación"];
var SUM_CANCELLATION_OK = ["Die Zahlung wurde in OrderSprinter storniert.","The payment was cancelled in OrderSprinter.","El pago se canceló en OrderSprinter."]; var SUM_CANCELLATION_OK = ["Die Zahlung wurde in OrderSprinter storniert.","The payment was cancelled in OrderSprinter.","El pago se canceló en OrderSprinter."];
var nextpage = "paydesk.html?version=1.5.21"; var nextpage = "paydesk.html?version=1.5.22";
var lang; var lang;
@ -84,10 +84,10 @@ function setLanguage(language) {
if (nextPage == "p") { if (nextPage == "p") {
$("#nextpagebtntxt").html(SUM_TO_PAYMENT[lang]); $("#nextpagebtntxt").html(SUM_TO_PAYMENT[lang]);
nextpage = "paydesk.html?t=" + tableid + "&version=1.5.21"; nextpage = "paydesk.html?t=" + tableid + "&version=1.5.22";
} else { } else {
$("#nextpagebtntxt").html(SUM_TO_ORDER[lang]); $("#nextpagebtntxt").html(SUM_TO_ORDER[lang]);
nextpage = "waiter.html?version=1.5.21"; nextpage = "waiter.html?version=1.5.22";
} }
var txt = "<table class='viewtable'>"; var txt = "<table class='viewtable'>";

View File

@ -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.5.21"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.22">
<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" />

View File

@ -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.5.21"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.22">
<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" />
@ -13,7 +13,7 @@
<script src="php/3rdparty/jquery-1.11.3.min.js"></script> <script src="php/3rdparty/jquery-1.11.3.min.js"></script>
<script src="php/3rdparty/jquery.mobile-1.4.5.min.js"></script> <script src="php/3rdparty/jquery.mobile-1.4.5.min.js"></script>
<script src="utilities.js?v=1.5.21"></script> <script src="utilities.js?v=1.5.22"></script>
<link rel="stylesheet" href="php/3rdparty/jqueryui1-11-4/jquery-ui.min.css" /> <link rel="stylesheet" href="php/3rdparty/jqueryui1-11-4/jquery-ui.min.css" />
<script src="php/3rdparty/jqueryui1-11-4/jquery-ui.min.js"></script> <script src="php/3rdparty/jqueryui1-11-4/jquery-ui.min.js"></script>

View File

@ -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.5.21"> <link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.5.22">
<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" />

View File

@ -117,7 +117,7 @@ function doAjax(getOrPost, url, data, functionToCallIfSuccess, errorMsg, doAsync
alert("Kommunikation zum Server ist unterbrochen!"); alert("Kommunikation zum Server ist unterbrochen!");
} else { } else {
var errorMsgTxt = errorMsg + error + " (" + url + ")"; var errorMsgTxt = errorMsg + error + " (" + url + ")";
alert("Kommunikationsfehler zum Server: " + errorMsgTxt); alert("Kommunikationsfehler zum Server: " + errorMsgTxt + " - In der Feedbackansicht lässt sich ein Fehlerprotokoll an den Anbieter übermitteln.");
doAjax("POST", "php/debug.php?n=" + n, debugData, null, true); doAjax("POST", "php/debug.php?n=" + n, debugData, null, true);
} }
} }
@ -155,7 +155,7 @@ function doAjaxAsync(getOrPost, url, data, functionToCallIfSuccess) {
alert("Kommunikation zum Server ist unterbrochen!"); alert("Kommunikation zum Server ist unterbrochen!");
} else { } else {
var errorMsgTxt = errorMsg + error + " (" + url + ")"; var errorMsgTxt = errorMsg + error + " (" + url + ")";
alert("Kommunikationsfehler zum Server: " + errorMsgTxt); alert("Kommunikationsfehler zum Server: " + errorMsgTxt + " - In der Feedbackansicht lässt sich ein Fehlerprotokoll an den Anbieter übermitteln.");
doAjax("POST", "php/debug.php?n=" + n, debugData, null, true); doAjax("POST", "php/debug.php?n=" + n, debugData, null, true);
} }
} }
@ -179,7 +179,7 @@ function doAjaxTransmitData(getOrPost,url,data,functionToCallIfSuccess,errorMsg,
error: function(xhr,status,error ) { error: function(xhr,status,error ) {
if (errorMsg != null) { if (errorMsg != null) {
var errorMsgTxt = errorMsg + ", Status: " + status + ", Error:" + error + ", Msg: " + xhr.responseText + " (" + url + ")"; var errorMsgTxt = errorMsg + ", Status: " + status + ", Error:" + error + ", Msg: " + xhr.responseText + " (" + url + ")";
alert( "Kommunikationsfehler zum Server: " + errorMsgTxt); alert( "Kommunikationsfehler zum Server: " + errorMsgTxt + " - In der Feedbackansicht lässt sich ein Fehlerprotokoll an den Anbieter übermitteln.");
} }
} }
}); });

File diff suppressed because one or more lines are too long