OrderSprinter 1.6.5

This commit is contained in:
Geno 2020-11-19 23:14:07 +01:00
parent fcf86bd41e
commit b2556cb4f7
42 changed files with 550 additions and 272 deletions

View File

@ -9,8 +9,8 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel">
<link rel="stylesheet" href="css/gueststyle.css?v=1.6.4" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css?v=1.6.4" />
<link rel="stylesheet" href="css/gueststyle.css?v=1.6.5" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css?v=1.6.5" />
<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" />
<script src="php/3rdparty/jquery-1.11.3.min.js"></script>
@ -115,7 +115,7 @@
<div data-role="footer" data-theme="b" id="thefooter1">
<div class="ui-grid-a">
<div class="ui-block-a">&nbsp;&nbsp;OrderSprinter</div>
<div class="ui-block-b grid_right" id="versioninfo">1.6.4&nbsp;&nbsp;</div>
<div class="ui-block-b grid_right" id="versioninfo">1.6.5&nbsp;&nbsp;</div>
</div><!-- /grid-a -->
</div>
</div>

View File

@ -114,10 +114,10 @@ if (isset($_POST['code'])) {
} else {
echo "<html>";
echo "<head><title>Installation Gastsystem</title>";
echo '<link rel="stylesheet" type="text/css" href="css/gueststyle.css?v=1.6.4">';
echo '<link rel="stylesheet" type="text/css" href="css/gueststyle.css?v=1.6.5">';
echo "</head>";
echo "<body><div class=surround>";
echo "<span class=headerline>Installation OrderSprinter-Gastsystem 1.6.4</span><br><br>";
echo "<span class=headerline>Installation OrderSprinter-Gastsystem 1.6.5</span><br><br>";
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 "</form></div></html>";

View File

@ -85,7 +85,7 @@ class Installer {
}
Database::dropTables($pdo);
Database::createEmptyTables($pdo, $prefix);
Database::setVersion($pdo,$prefix,"1.6.4");
Database::setVersion($pdo,$prefix,"1.6.5");
Database::setAccessPassword($pdo,$prefix,$adminpass);
Database::setRefreshRate($pdo,$prefix,"5"); // default: 5 times per hour
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 name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.6.4">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.6.5">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<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" />
<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="utilities.js?v=1.6.4"></script>
<script src="kitchenbar.js?v=1.6.4"></script>
<script src="utilities.js?v=1.6.5"></script>
<script src="kitchenbar.js?v=1.6.5"></script>
<style>
#tableWithEntriesToCook,#tableWithCookedEntries,#headertableToCook

View File

@ -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.6.4">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.6.5">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
@ -21,7 +21,7 @@
<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-i18n.min.js"></script>
<script src="utilities.js?v=1.6.4"></script>
<script src="utilities.js?v=1.6.5"></script>
<script src="receiptutils.js"></script>
<script>

View File

@ -0,0 +1 @@
div.daypicker{position:relative;width:300px;border:3px solid #73ad21;z-index:2;display:none}.viewdatemonthtable{width:300px;background-color:black;color:white;vertical-align:middle}.viewdatemonthtable td.monthdec,.viewdatemonthtable td.monthinc{background-color:#ddd;font-weight:bold;color:black}.viewdatemonthtable tr.center{text-align:center}.viewdatemonthtable tr.dateselection{background-color:#666;height:40px}.viewdatemonthtable td.selectableday{border:1px solid #aaa;width:30px;height:30px}.viewdatemonthtable td.thismonth{background-color:white;color:black}.viewdatemonthtable td.othermonth{background-color:#bbb;color:black;font-style:italic}.viewdatemonthtable td.today{background-color:lightgreen;color:black;border:2px solid green}.viewdatemonthtable td.blocked{background-color:red !important;color:black !important}

View File

@ -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.6.4">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.6.5">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
@ -23,8 +23,8 @@
<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-i18n.min.js"></script>
<script src="utilities.js?v=1.6.4"></script>
<script src="elements/customers.js"></script>
<script src="utilities.js?v=1.6.5"></script>
<script src="elements/customers.js?v=1.6.5"></script>
</head>
<body>
@ -48,7 +48,9 @@ var CUS_ACTION_FAILED = ["Aktion fehlgeschlagen","Action failed","Error"];
var CUS_ALREADY_CUS_NAME = ["Der Kunde wurde angelegt. Allerdings gab es bereits %number% Kunden mit dem Namen.",
"The customer is created, although there have been already %number% customers with this name",
"El cliente esta creado aunque había sido ya %number% clientes con este nombre."];
var CUS_SEARCH_LABEL = ["Suche:","Search:","Buscar:"];
var CUS_SEARCH_LABEL = ["Name/Email:","Name/Email:","Nombre/Email:"];
var CUS_SEARCH_REMARK = ["Bemerkung:","Remark:","Comentario:"];
var CUS_SEARCH_ADDRESS = ["Adresse:","Address:","Dirección:"];
var CUS_APPLY = ["Anwenden","Apply","Aplicar"];
var CUS_DEL = ["Löschen","Delete","Removar"];
var CUS_DEL_TEXT = ["Diesen Gast unwiederbringlich aus der Datenbank löschen?","Delete this guest irretrievably from the data base?","Removar este cliente?"];
@ -88,6 +90,12 @@ var CUS_PLACEHOLDER_HINT = ["Im Text können die Platzhalter {NAME}, {ANREDE}, {
"En el texto se puede usar {NAME}, {ANREDE}, {GRUSS} para sustituir nombre, encabezamiento o abrazo."];
var CUS_GUEST_ACT_ALL = ["Aktionen für alle Gäste","Actions on all guests","Acciones para todos los huespedes"];
var CUS_CLOSED = ["abgeschlossen","closed","cerrado"];
var CUS_FILTER = ["Kundenlisten filtern","Filter customers","Filter"];
var CUS_CUSLIST_SECTION_TXT = ["Gästeliste","List of customers","Huespedes"];
var CUS_ACTIONS_FILTERLIST_TXT = ["Aktionen für gefilterte Kundenliste","Actions on filtered list","Acciones para lista"];
var CUS_ASSIGN = ["Zuweisen","Assign","Asignar"];
var CUS_UNASSIGN = ["Aus Gruppe entfernen","Remove from group","Removar del grupo"];
var CUS_ASSIGN_TO_NEW_GROUP = ["Zuweisen zu neuer Gruppe","Assign to new group","Asignar a grupo nuevo"];
var l = 0;
@ -106,12 +114,20 @@ function setLanguage(language) {
$("#newcusroomlabel").html(CUS_ROOM_LABEL[l]);
$("#newcustomerbtn").html(CUS_NEW_CUS_BTN[l]);
$("#customersearchlabel").html(CUS_SEARCH_LABEL[l]);
$("#customersearchremarklabel").html(CUS_SEARCH_REMARK[l]);
$("#customersearchaddresslabel").html(CUS_SEARCH_ADDRESS[l]);
$("#newguestheader").html(CUS_NEW_CUS_HEADER[l]);
$("#customerdatetxt").html(CUS_DATE[l]);
$("#customeropenbillstxt").html(CUS_FILTER_OPEN_BILLS[l]);
$("#customerlog").html(CUS_LOGBTN[l]);
$("#reportbills").html(CUS_REPORT[l]);
$("#guestoverviewdiv").html(CUS_GUEST_ACT_ALL[l]);
$("#filtertxt").html(CUS_FILTER[l]);
$("#listofcustomerssectiontxt").html(CUS_CUSLIST_SECTION_TXT[l]);
$("#filteredlistactionsdiv").html(CUS_ACTIONS_FILTERLIST_TXT[l]);
$("#assfilteredlisttxt").html(CUS_ASSIGN[l]);
$("#removefromgroupbtntxt").html(CUS_UNASSIGN[l]);
$("#assignfilteredllisttonewgrptxt").html(CUS_ASSIGN_TO_NEW_GROUP[l]);
}
$(document).on("pageinit", "#info-page", function () {
@ -144,22 +160,53 @@ $(document).on("pageinit", "#info-page", function () {
<div id="customersarea" style="display:none;">
<form>
<div class="ui-field-contain">
<label id="customersearchlabel" for="customersearch">Suche:</label>
<input id='customersearch' type="text" value="" data-mini="true" placeholder="Name / Email" class="whiteinput" />
</div>
<div data-role="collapsible" data-theme="e" data-content-theme="c" data-collapsed="true">
<h3><span id="filtertxt">Filterung</span></h3>
<p /><form>
<div class="ui-field-contain">
<label id="customersearchlabel" for="customersearch">Suche:</label>
<input id='customersearch' type="text" value="" data-mini="true" placeholder="Name / Email" class="whiteinput" />
</div>
<div class="ui-field-contain">
<label id="customersearchremarklabel" for="customersearchremark">Bem.:</label>
<input id='customersearchremark' type="text" value="" data-mini="true" placeholder="Bemerkung" class="whiteinput" />
</div>
<div class="ui-field-contain">
<label id="customersearchaddresslabel" for="customersearchremark">Adr.:</label>
<input id='customersearchaddress' type="text" value="" data-mini="true" placeholder="Adresse" class="whiteinput" />
</div>
<div class="ui-field-contain">
<label for="customeropenbills"><span id=customeropenbillstxt>Nur mit offenen Rechnungen</span>: </label>
<input data-role="date" data-inline="true" type="checkbox" id="customeropenbills" data-theme="a">
</div>
<div class="ui-field-contain">
<label for="customerdate"><span id=customerdatetxt>Datum</span>: </label>
<input data-role="date" data-inline="true" type="text" id="customerdate" data-theme="a">
</div>
</form>
<div class="ui-field-contain">
<label for="customeropenbills"><span id=customeropenbillstxt>Nur mit offenen Rechnungen</span>: </label>
<input data-role="date" data-inline="true" type="checkbox" id="customeropenbills" data-theme="a">
</div>
<div class="ui-field-contain">
<label for="customerdate"><span id=customerdatetxt>Datum</span>: </label>
<input data-role="date" data-inline="true" type="text" id="customerdate" data-theme="a">
</div>
</form>
</div> <!-- collapsible for filter -->
<div id="logarea">
<div data-role="collapsible" data-theme="e" data-content-theme="c">
<h3><span id='guestoverviewdiv'>Gast-Aktionen</span></h3>
<p><button type="submit" data-theme="f" class="" data-icon="check" id="customerlog">Rechnungsprotokoll</button>
<p><button type="submit" data-theme="f" class="" data-icon="check" id="reportbills">Report</button>
<p><div id='payalldiv'></div>
</div>
</div>
<div id="actionsonfilterarea">
<div data-role="collapsible" data-theme="e" data-content-theme="c">
<h3><span id='filteredlistactionsdiv'>Filter Gast-Aktionen</span></h3>
<p /><div id="grpassdiv"></div>
<p /><button type="submit" data-theme="f" class="" data-icon="plus" id="newgrpforassbtn"><span id='assignfilteredllisttonewgrptxt'>Neu</span></button>
<button type="submit" data-theme="f" class="" data-icon="plus" id="existentgrpforassbtn"><span id='assfilteredlisttxt'>Zuweisen</span></button>
<button type="submit" data-theme="d" class="" data-icon="plus" id="removefromgroupbtn"><span id='removefromgroupbtntxt'>Entf.</span></button>
</div>
</div>
<div data-role="collapsible" id="newcustomerdiv" data-theme="d" data-content-theme="d">
<h3><span id="newguestheader">Neuer Kunde</span></h3>
<p>
@ -228,16 +275,10 @@ $(document).on("pageinit", "#info-page", function () {
</form>
</div>
<p><b><span id="listofcustomerssectiontxt">Kunden</span>:</b>
<div id="customersearchresult"></div>
<div id="logarea">
<div data-role="collapsible" data-theme="e" data-content-theme="c">
<h3><span id='guestoverviewdiv'>Gast-Aktionen</span></h3>
<p><button type="submit" data-theme="f" class="" data-icon="check" id="customerlog">Rechnungsprotokoll</button>
<p><button type="submit" data-theme="f" class="" data-icon="check" id="reportbills">Report</button>
<p><div id='payalldiv'></div>
</div>
</div>
</div>
<div id="groupsarea" style="display:none;">

View File

@ -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">
<meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.6.4">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.6.5">
<link rel="stylesheet" href="css/ospage.css" />
@ -17,7 +17,7 @@
<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="utilities.js?v=1.6.4"></script>
<script src="utilities.js?v=1.6.5"></script>
<script src="receiptutils.js"></script>
<script src="elements/dash.js"></script>
<script src="php/3rdparty/Chart.bundle.min.js"></script>

File diff suppressed because one or more lines are too long

View File

@ -163,7 +163,7 @@ function Groundplan() {
$("#createtableqrcodesbtn").off("click").on("click", function (e) {
e.stopImmediatePropagation();
e.preventDefault();
window.open("php/contenthandler.php?module=roomtables&command=tableqrcodes&v=1.6.4",'_blank');
window.open("php/contenthandler.php?module=roomtables&command=tableqrcodes&v=1.6.5",'_blank');
});
this.bindRoomChanges();

File diff suppressed because one or more lines are too long

View File

@ -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.6.4">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.6.5">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
@ -12,7 +12,7 @@
<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.mobile-1.4.0.min.js"></script>
<script src="utilities.js?v=1.6.4"></script>
<script src="utilities.js?v=1.6.5"></script>
<script src="kitchenbar.js"></script>
<style>

View File

@ -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.6.4">
<link rel="stylesheet" type="text/css" href="css/numfield.css?v=1.6.4">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.6.5">
<link rel="stylesheet" type="text/css" href="css/numfield.css?v=1.6.5">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
@ -18,7 +18,7 @@
<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.mobile-1.4.0.min.js"></script>
<script src="utilities.js?v=1.6.4"></script>
<script src="utilities.js?v=1.6.5"></script>
</head>
<body>

BIN
webapp/img/caution.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

View File

@ -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.6.4">
<link rel="stylesheet" type="text/css" href="css/numfield.css?v=1.6.4">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.6.5">
<link rel="stylesheet" type="text/css" href="css/numfield.css?v=1.6.5">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
@ -18,7 +18,7 @@
<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.mobile-1.4.0.min.js"></script>
<script src="utilities.js?v=1.6.4"></script>
<script src="utilities.js?v=1.6.5"></script>
</head>
<body>
@ -132,7 +132,7 @@ function displayLoginOrLogoutMask(jsonContent) {
// user needs to log in!
$("#passwordfield").val("");
$("#logoutarea").hide();
setTimeout(function(){document.location.href = "index.html?v=1.6.4"},250);
setTimeout(function(){document.location.href = "index.html?v=1.6.5"},250);
}
}
@ -232,7 +232,7 @@ function handleResultOfInstallCheck(is_installed) {
if (is_installed == "Yes") {
useInstallation();
} else {
setTimeout(function(){document.location.href = "install.html?v=1.6.4"},500);
setTimeout(function(){document.location.href = "install.html?v=1.6.5"},500);
}
}
@ -295,11 +295,11 @@ $(document).on("pageinit", "#index-page", function () {
<div data-role="content">
<p><div id="toplogolocation" style="text-align: center;display:none;"><img src="php/contenthandler.php?module=printqueue&command=getLogoAsPngWithAlphaChannel&v=1.6.4&style=always" style="max-height:150px;"/></div>
<p><div id="toplogolocation" style="text-align: center;display:none;"><img src="php/contenthandler.php?module=printqueue&command=getLogoAsPngWithAlphaChannel&v=1.6.5&style=always" style="max-height:150px;"/></div>
<div data-role="collapsible" data-content-theme="c" data-collapsed="false" data-theme="e" id="loginmask">
<H2>Anmelden</H2>
<p><div id="middlelogolocation" style="text-align: left;padding-left: 80px;padding-right:80px;display:none;"><img src="php/contenthandler.php?module=printqueue&command=getLogoAsPngWithAlphaChannel&v=1.6.4&style=always" style="max-height:150px;"/></div>
<p><div id="middlelogolocation" style="text-align: left;padding-left: 80px;padding-right:80px;display:none;"><img src="php/contenthandler.php?module=printqueue&command=getLogoAsPngWithAlphaChannel&v=1.6.5&style=always" style="max-height:150px;"/></div>
<form method="post">
<table border=0>

View File

@ -915,7 +915,7 @@ El servicio web OrderSprinter no requiere una conexión a Internet. Sin embargo,
<tr id=updateline>
<td>&nbsp;</td>
<td align=center>
<button id="updatebtn">Update -> 1.6.4</button>
<button id="updatebtn">Update -> 1.6.5</button>
<span id="updateinprogresstxt" style="display:none;"><img id="installprogressindicator" src="php/3rdparty/images/ajax-loader.gif" alt="Progress indication" style="display:none;"/> Update... bitte warten.</span>
</td>
<td>&nbsp;</td>

View File

@ -455,7 +455,7 @@ return;
}
set_time_limit(60*30);
$installerVersion = "1.6.4";
$installerVersion = "1.6.5";
$admin = new InstallAdmin();
$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 name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.6.4">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.6.5">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<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" />
<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="utilities.js?v=1.6.4"></script>
<script src="kitchenbar.js?v=1.6.4"></script>
<script src="utilities.js?v=1.6.5"></script>
<script src="kitchenbar.js?v=1.6.5"></script>
<style>
#tableWithEntriesToCook,#tableWithCookedEntries,#headertableToCook

View File

@ -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.6.4">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.6.5">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<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" />
<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="utilities.js?v=1.6.4"></script>
<script src="elements/tablemap.js?v=1.6.4"></script>
<script src="elements/roommap.js?v=1.6.4"></script>
<script src="elements/groundplan.js?v=1.6.4"></script>
<script src="utilities.js?v=1.6.5"></script>
<script src="elements/tablemap.js?v=1.6.5"></script>
<script src="elements/roommap.js?v=1.6.5"></script>
<script src="elements/groundplan.js?v=1.6.5"></script>
<link href="php/3rdparty/hayageek_uploadfile.css" rel="stylesheet">
<script src="php/3rdparty/hayageek_jquery_uploadfile.js"></script>
@ -119,6 +119,7 @@ var MAN_CSV_EXP_RECEIPTS = ["CSV-Export Bons","CSV export of Receipts","Grabar t
var MAN_XLSX_EXP_RECEIPTS = ["... Excel","... Excel","... Excel"];
var MAN_CSV_EXP_ALL = ["CSV-Export komplett","CSV export all","Grabar todo en CSV"];
var MAN_PRINTVERB = ["Drucken","Print","Imprimir"];
var MAN_DELETE = ["Löschen","Delete","Removar"];
var MAN_PRINT_ALL = ["Drucken Komplettbericht","Print all","Imprimir todo"];
var MAN_PRINT_RECEIPT = ["Drucken Zusammenfassung auf Bon","Print summary on receipt","Imprimir resumen en tique"];
var MAN_CLOS_HTML = ["Tageserfassung über Html-Vorlage","Closing formatted by html template","Resumen en tique por html template"];
@ -434,6 +435,7 @@ var MAN_HSINFILE = ["HS/3 Datei HS3CASH.IN","HS/3 file HS3CASH.IN","HS/3 file HS
var MAN_HSOUTFILE = ["HS/3 Datei HS3CASH.OUT","HS/3 file HS3CASH.OUT","HS/3 file HS3CASH.OUT"];
var MAN_HSCURRENCY = ["HS/3 Währungsangabe","HS/3 Currency","HS/3 Moneda"];
var MAN_DEL_HINT = ["Zum Löschen anklicken","Click to delete","Click para removar"];
var MAN_OPEN_AND_DEL_HINT = ["Zum Ansehen und/oder Löschen jeweiligen Eintrag anklicken","To open and/or delete click on entry","Click para abrir y/o removar"];
var MAN_FONTSIZE_HINT = ["Die Schriftgröße hat nur Einfluss, wenn kein eigenes Layout festgelegt wurde.","The font size only effects receipts if they do not use a specified layout.","El valor sólo funciona si no se usa un layout individual."];
var MAN_INIT_AUSTRIA = ["Erstelle Startbeleg (Österreich)","Create initial receipt (Austria)","Crear tiquet inicial (Austria)"];
var MAN_GOLIVE_WAIT_HINT = ["Bitte beachten Sie, dass diese Aktion auf langsamen Servern mehrere Minuten dauern kann. Schließen Sie diesen Dialog und warten Sie auf die Meldung, dass der Vorgang abgeschlossen wurde.","Please be aware that this action may take a while on slow servers. Please close this dialog and wait for the message that the process has completed.","Esta acción puede durar unos minutos. Por favor confirme este dialogo y espere por el mensaje que la acción esta completada."]
@ -1724,7 +1726,7 @@ function initRestoreFileUpload() {
} else {
alert("Import war erfolgreich.");
setTimeout(function(){
document.location.href = "index.html?v=1.6.4";
document.location.href = "index.html?v=1.6.5";
},250);
}
},
@ -2207,38 +2209,38 @@ function binding() {
$("#backup_btn").off("click").on("click", function (e) {
e.stopImmediatePropagation();
e.preventDefault();
window.location.href = "php/contenthandler.php?module=admin&command=backup&type=configuration&v=1.6.4";
window.location.href = "php/contenthandler.php?module=admin&command=backup&type=configuration&v=1.6.5";
});
$("#backup_btnall").off("click").on("click", function (e) {
e.stopImmediatePropagation();
e.preventDefault();
window.location.href = "php/contenthandler.php?module=admin&command=backup&type=all&v=1.6.4";
window.location.href = "php/contenthandler.php?module=admin&command=backup&type=all&v=1.6.5";
});
$("#backup_btnalllogs").off("click").on("click", function (e) {
e.stopImmediatePropagation();
e.preventDefault();
window.location.href = "php/contenthandler.php?module=admin&command=backup&type=alllogs&v=1.6.4";
window.location.href = "php/contenthandler.php?module=admin&command=backup&type=alllogs&v=1.6.5";
});
$("#backup_btnftpall").off("click").on("click", function (e) {
e.stopImmediatePropagation();
e.preventDefault();
showProgressPopup();
doAjax("GET","php/contenthandler.php?module=admin&command=ftpbackup&type=all&v=1.6.4",null,handleFtpResult,null);
doAjax("GET","php/contenthandler.php?module=admin&command=ftpbackup&type=all&v=1.6.5",null,handleFtpResult,null);
});
$("#backup_debugdata").off("click").on("click", function (e) {
e.stopImmediatePropagation();
e.preventDefault();
window.open("php/contenthandler.php?module=admin&command=backup&type=debugdata&v=1.6.4",'_blank');
window.open("php/contenthandler.php?module=admin&command=backup&type=debugdata&v=1.6.5",'_blank');
});
$("#backupguests_btn").off("click").on("click", function (e) {
e.stopImmediatePropagation();
e.preventDefault();
window.location.href = "php/contenthandler.php?module=admin&command=backup&type=confandguests&v=1.6.4";
window.location.href = "php/contenthandler.php?module=admin&command=backup&type=confandguests&v=1.6.5";
});
$("#golive").off("click").on("click", function (e) {
@ -2411,7 +2413,7 @@ function updateOneSingleFile() {
setTimeout(function(){
$("#sliderarea").hide();
var millis=getMillis();
document.location.href = "install.html?v=1.6.4&mode=onlyupdate&n=" + millis;
document.location.href = "install.html?v=1.6.5&mode=onlyupdate&n=" + millis;
},250);
}
}
@ -3619,7 +3621,7 @@ function handleGoLive(answer) {
}
function renderSingleWorkReceipt(job) {
function renderSingleWorkReceipt(job,allowreprint,allowdelete) {
var headertxt = job.workid + " - " + job.time + " - " + job.table;
var txt = '<h3>' + headertxt + '</h3><p />';
var prods = job.products;
@ -3633,7 +3635,12 @@ function renderSingleWorkReceipt(job) {
});
}
});
txt += '<button class="reprintworkreceiptbtn" type="submit" data-theme="f" data-icon="check" id="reprintworkreceiptbtn_' + job.workid + '">' + MAN_PRINTVERB[lang] + '</button>';
if (allowreprint) {
txt += '<button class="reprintworkreceiptbtn" type="submit" data-theme="f" data-icon="check" id="reprintworkreceiptbtn_' + job.workid + '">' + MAN_PRINTVERB[lang] + '</button>';
}
if (allowdelete) {
txt += '<button type="submit" data-theme="d" class="spooledprintjob" data-icon="delete" id="spooledJob_' + job.workid + '">' + MAN_DELETE[lang] + '</button>';
}
return txt;
}
@ -3643,7 +3650,7 @@ function renderPrintedWorkReceipts(jobs) {
var aJob = jobs[i];
txt += '<p />';
txt += '<div data-role="collapsible" data-collapsed="true" data-theme="e" data-content-theme="a" class="noprint" >';
txt += renderSingleWorkReceipt(aJob);
txt += renderSingleWorkReceipt(aJob,true,false);
txt += '</div>';
}
return txt;
@ -3654,6 +3661,14 @@ function createSpooledPrintJobButton(id,text) {
return txt;
}
function createSpooledPrintWorkJobButton(aJob) {
var txt = '<p />';
txt += '<div data-role="collapsible" data-collapsed="true" data-theme="e" data-content-theme="a" class="noprint" >';
txt += renderSingleWorkReceipt(aJob.content,false,true);
txt += '</div>';
return txt;
}
function createSpooledRecPrintButtons(jobs) {
var currency = $("#admin-page").data("currency");
var decpoint = $("#admin-page").data("decpoint");
@ -3681,11 +3696,10 @@ function createSpooledWorkPrintButtons(jobs) {
var txt = '';
for (var i=0;i<jobs.length;i++) {
var aJob = jobs[i];
//txt += createPrintJobButton('spooledJob_' + aJob.id,MAN_TABLE_TXT[lang] + ": " + aJob.tablename + (aJob.id + ": " + aJob.billdate + " - " + aJob.brutto.replace(".", decpoint)));
txt += createSpooledPrintJobButton('spooledJob_' + aJob.id,aJob.content.table);
txt += createSpooledPrintWorkJobButton(aJob);
}
if (jobs.length > 0) {
txt += "<i>(" + MAN_DEL_HINT[lang] + ")</i>";
txt += "<i>(" + MAN_OPEN_AND_DEL_HINT[lang] + ")</i>";
}
return txt;
}

File diff suppressed because one or more lines are too long

View File

@ -1443,7 +1443,7 @@ class Admin {
$view = "preferences.html";
}
echo json_encode($view . "?v=1.6.4");
echo json_encode($view . "?v=1.6.5");
}
}
@ -1664,31 +1664,31 @@ 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.6.4"); }
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waitertxt[$lang], "link" => "waiter.html?v=1.6.5"); }
} else {
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waiterdesktxt[$lang], "link" => "waiterdesktop.php?v=1.6.4"); }
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waiterdesktxt[$lang], "link" => "waiterdesktop.php?v=1.6.5"); }
}
if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.6.4"); }
if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.6.4"); }
if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.6.4"); }
if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.6.5"); }
if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.6.5"); }
if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.6.5"); }
if ($_SESSION['modus'] == 0) {
if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html?v=1.6.4"); }
if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html?v=1.6.5"); }
}
if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.6.4"); }
if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.6.4"); }
if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.6.4"); }
if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.6.4"); }
if ($_SESSION['right_tasks'] || $_SESSION['right_tasksmanagement']) { $mainMenu[] = array("name" => $taskstxt[$lang], "link" => "tasks.html?v=1.6.4"); }
if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=1.6.4"); }
if ($_SESSION['right_customers']) { $mainMenu[] = array("name" => $customerstxt[$lang], "link" => "customers.html?v=1.6.4"); }
if ($_SESSION['right_pickups']) { $mainMenu[] = array("name" => $pickupstxt[$lang], "link" => "pickups.html?v=1.6.4"); }
if ($_SESSION['right_dash']) { $mainMenu[] = array("name" => $dashtxt[$lang], "link" => "dash.php?v=1.6.4"); }
if ($_SESSION['right_manager'] || $_SESSION['is_admin'] || $_SESSION['right_closing']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=1.6.4"); }
$mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.6.4");
if ($_SESSION['right_timetracking'] || $_SESSION['right_timemanager']) { $mainMenu[] = array("name" => $timetrackingtxt[$lang], "link" => "timetracking.html?v=1.6.4"); }
if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.6.5"); }
if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.6.5"); }
if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.6.5"); }
if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.6.5"); }
if ($_SESSION['right_tasks'] || $_SESSION['right_tasksmanagement']) { $mainMenu[] = array("name" => $taskstxt[$lang], "link" => "tasks.html?v=1.6.5"); }
if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=1.6.5"); }
if ($_SESSION['right_customers']) { $mainMenu[] = array("name" => $customerstxt[$lang], "link" => "customers.html?v=1.6.5"); }
if ($_SESSION['right_pickups']) { $mainMenu[] = array("name" => $pickupstxt[$lang], "link" => "pickups.html?v=1.6.5"); }
if ($_SESSION['right_dash']) { $mainMenu[] = array("name" => $dashtxt[$lang], "link" => "dash.php?v=1.6.5"); }
if ($_SESSION['right_manager'] || $_SESSION['is_admin'] || $_SESSION['right_closing']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=1.6.5"); }
$mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.6.5");
if ($_SESSION['right_timetracking'] || $_SESSION['right_timemanager']) { $mainMenu[] = array("name" => $timetrackingtxt[$lang], "link" => "timetracking.html?v=1.6.5"); }
$mainMenu[] = array("name" => "Hilfe", "link" => "help.php?v=1.6.4");
$mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.6.4");
$mainMenu[] = array("name" => "Hilfe", "link" => "help.php?v=1.6.5");
$mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.6.5");
}
$mainMenu[] = array("name" => $logout[$lang], "link" => "logout.php");

View File

@ -34,7 +34,10 @@ class Customers {
"getPaymentsForGuest" => array("loggedin" => 1, "isadmin" => 0, "rights" => array("customers")),
"reportbills" => array("loggedin" => 1, "isadmin" => 0, "rights" => array("customers")),
"reportcustomerbills" => array("loggedin" => 1, "isadmin" => 0, "rights" => array("customers")),
"payallguests" => array("loggedin" => 1, "isadmin" => 0, "rights" => array("customers"))
"payallguests" => array("loggedin" => 1, "isadmin" => 0, "rights" => array("customers")),
"assigncustomerstogroup" => array("loggedin" => 1, "isadmin" => 0, "rights" => array("customers")),
"assigncustomerstonewgroup" => array("loggedin" => 1, "isadmin" => 0, "rights" => array("customers")),
"removefromgroup" => array("loggedin" => 1, "isadmin" => 0, "rights" => array("customers"))
);
public static $CANCEL = 0;
@ -130,7 +133,7 @@ class Customers {
} else if ($command == 'changeCustomer') {
echo json_encode($this->changeCustomer($pdo,$_POST["id"],$_POST['name'],$_POST['email'],$_POST['addr'],$_POST['remark'],$_POST['phone'],$_POST['mobil'],$_POST['www'],$_POST['hello'],$_POST['regards'],$_POST["groups"]));
} else if ($command == 'getCustomers') {
echo json_encode(self::getCustomers($pdo,$_POST['search'],$_POST['date'],$_POST['onlyopenbills']));
echo json_encode(self::getCustomers($pdo,$_POST['search'],$_POST['remark'],$_POST['address'],$_POST['date'],$_POST['onlyopenbills']));
} else if ($command == 'createNewGroup') {
echo json_encode($this->createNewGroup($pdo,$_POST['name'],$_POST['remark']));
} else if ($command == 'getGroups') {
@ -167,6 +170,12 @@ class Customers {
self::exportLog($pdo);
} else if ($command == 'payallguests') {
echo json_encode(self::payallguests($pdo,$_POST['paymentid'],$_SESSION['userid']));
} else if ($command == 'assigncustomerstogroup') {
echo json_encode(self::assigncustomerstogroup($pdo,$_POST['customers'],$_POST['groupid']));
} else if ($command == 'assigncustomerstonewgroup') {
echo json_encode(self::assigncustomerstonewgroup($pdo,$_POST['customers'],$_POST['groupname']));
} else if ($command == 'removefromgroup') {
echo json_encode(self::removefromgroup($pdo,$_POST['customers'],$_POST['groupid']));
} else {
echo "Command not supported.";
}
@ -249,11 +258,12 @@ class Customers {
$sql = "SELECT count(id) as countid from `%groups%` WHERE name=?";
$row = CommonUtils::getRowSqlObject($pdo, $sql, array($name));
if ($row->countid > 0) {
return array("status" => "ERROR","msg" => "Group name already exists","code" => 1);
return array("status" => "ERROR","msg" => "Gruppenname existiert bereits","code" => 1);
}
$sql = "INSERT INTO `%groups%` (name,remark,created) VALUES(?,?,?)";
CommonUtils::execSql($pdo, $sql, array($name,$remark,$currentTime));
return array("status" => "OK");
$groupId = $pdo->lastInsertId();
return array("status" => "OK","groupid" => $groupId);
} catch (Exception $e) {
return array("status" => "ERROR","msg" => $e->getMessage(),"code" => 2);
}
@ -370,7 +380,7 @@ class Customers {
$pdo->beginTransaction();
$allGuestWithUnpaidBills = self::getCustomers($pdo, '', '', true);
$allGuestWithUnpaidBills = self::getCustomers($pdo, '', '', '', '', true);
foreach($allGuestWithUnpaidBills["msg"] as $g) {
$customerid = $g["id"];
$billsOfGuest = self::getUnpaidBills($pdo, $customerid)["msg"]["bills"];
@ -526,14 +536,17 @@ class Customers {
return true;
}
}
private static function getCustomers($pdo,$search,$date,$onlyOpenBills) {
private static function getCustomers($pdo,$search,$remark,$address,$date,$onlyOpenBills) {
$s = '%' . $search . '%';
$r = '%' . $remark . '%';
$a = '%' . $address . '%';
try {
$allcustomers = array();
$sql = "SELECT %customers%.id as id,name,email,address,remark,phone,mobil,www,IFNULL(hello,'') as hello,IFNULL(regards,'') as regards,DATE_FORMAT(created,'%e %b %Y - %k:%i') as created,DATE_FORMAT(lastmodified,'%e %b %Y - %k:%i') as lastmodified FROM %customers% WHERE (name like ?) OR (email like ?) ORDER BY name";
$sql = "SELECT %customers%.id as id,name,email,address,remark,phone,mobil,www,IFNULL(hello,'') as hello,IFNULL(regards,'') as regards,DATE_FORMAT(created,'%e %b %Y - %k:%i') as created,DATE_FORMAT(lastmodified,'%e %b %Y - %k:%i') as lastmodified ";
$sql .= "FROM %customers% WHERE ((name like ?) OR (email like ?)) AND (remark like ?) AND (address like ?) ORDER BY name";
$result = CommonUtils::fetchSqlAll($pdo, $sql, array($s,$s));
$result = CommonUtils::fetchSqlAll($pdo, $sql, array($s,$s,$r,$a));
foreach ($result as $aCustomer) {
if (!self::isCustomerPresent($pdo,$aCustomer["id"],$date)) {
@ -849,7 +862,7 @@ class Customers {
}
$lang = $_SESSION['language'];
$allGuestWithUnpaidBills = self::getCustomers($pdo, '', '', true);
$allGuestWithUnpaidBills = self::getCustomers($pdo, '', '', '', '', true);
if ($allGuestWithUnpaidBills["status"] != "OK") {
echo "Error: " . $allGuestWithUnpaidBills["msg"];
@ -878,7 +891,7 @@ class Customers {
$txt = "<head>";
$txt .= "<title>" . self::$CUS_OVERVIEW[$lang] . "</title>";
$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.6.4">';
$txt .= '<link rel="stylesheet" type="text/css" href="../css/guestreport.css?v=1.6.5">';
$txt .= "</head>";
return $txt;
}
@ -901,4 +914,42 @@ class Customers {
$txt .= "</div>";
return $txt;
}
private static function assigncustomerstogroup($pdo,$customers,$groupid) {
try {
foreach($customers as $aCusId) {
$sql = "SELECT count(id) as countid FROM %groupcustomer% WHERE customerid=? and groupid=?";
$res = CommonUtils::fetchSqlAll($pdo, $sql, array($aCusId,$groupid));
if ($res[0]["countid"] == 0) {
$sql = "INSERT INTO %groupcustomer% (customerid,groupid) VALUES(?,?)";
CommonUtils::execSql($pdo, $sql, array($aCusId,$groupid));
}
}
return array("status" => "OK");
} catch (Exception $ex) {
return array("status" => "ERROR","msg" => $ex->getMessage());
}
}
private static function removefromgroup($pdo,$customers,$groupid) {
try {
foreach($customers as $aCusId) {
$sql = "DELETE FROM %groupcustomer% WHERE customerid=? AND groupid=?";
CommonUtils::execSql($pdo, $sql, array($aCusId,$groupid));
}
return array("status" => "OK");
} catch (Exception $ex) {
return array("status" => "ERROR","msg" => $ex->getMessage());
}
}
private static function assigncustomerstonewgroup($pdo,$customers,$groupname) {
$result = self::createNewGroup($pdo,$groupname,'');
if ($result["status"] != "OK") {
return $result;
} else {
$groupid = $result["groupid"];
return self::assigncustomerstogroup($pdo, $customers, $groupid);
}
}
}

View File

@ -27,7 +27,7 @@ if (isset($_POST["cmd"])) {
if (strlen($status) > 150) {
$status = substr($status, 0,149);
}
$version = "1.6.4";
$version = "1.6.5";
$arr = array("cmd" => $cmd,"fct" => $fct, "xhr" => $xhr,"errormsg" => $errormsg,"status" => $status,"version" => $version,"phpversion" => $phpversion);
} else {

View File

@ -4,6 +4,9 @@ require_once ('utilities/Emailer.php');
class Reservation {
var $dbutils;
private static $RES_TYPE_NORMAL = 0;
private static $RES_TYPE_BLOCKDAY = 1;
function __construct() {
$this->dbutils = new DbUtils();
}
@ -12,21 +15,40 @@ class Reservation {
if (!$this->isUserAlreadyLoggedInForPhpAndMayReserve()) {
echo json_encode(array("status" => "ERROR", "code" => ERROR_RES_NOT_AUTHOTRIZED, "msg" => ERROR_RES_NOT_AUTHOTRIZED_MSG));
} else {
if ($command == 'createReservation') {
$this->createReservation($_POST['day'],$_POST['month'],$_POST['year'],$_POST['starthour'],$_POST['startmin'],$_POST['name'],$_POST['email'],$_POST['persons'],$_POST['durationhours'],$_POST['durationmins'],$_POST['phone'],$_POST['remark'],$_POST["tableid"]);
} else if ($command == 'getReservations') {
$this->getReservations($_GET['day'],$_GET['month'],$_GET['year']);
} else if ($command == 'changeReservation') {
$this->changeReservation($_POST['id'],$_POST['day'],$_POST['month'],$_POST['year'],$_POST['starthour'],$_POST['startmin'],$_POST['name'],$_POST['email'],$_POST['persons'],$_POST['durationhours'],$_POST['durationmins'],$_POST['phone'],$_POST['remark'],$_POST["tableid"]);
} else if ($command == 'delReservation') {
$this->delReservation($_POST['id']);
} else if ($command == 'emailConfirmReservation') {
$this->emailConfirmReservation($_POST['to'],$_POST['msg']);
} else if ($command == 'reservationsAsHtml') {
$this->reservationsAsHtml($_GET['day'],$_GET['month'],$_GET['year']);
}
else {
echo "Kommando nicht unterstuetzt.";
switch ($command) {
case 'createReservation':
$pdo = DbUtils::openDbAndReturnPdoStatic();
self::createReservation($pdo,$_POST['day'],$_POST['month'],$_POST['year'],$_POST['starthour'],$_POST['startmin'],$_POST['name'],$_POST['email'],$_POST['persons'],$_POST['durationhours'],$_POST['durationmins'],$_POST['phone'],$_POST['remark'],$_POST["tableid"],self::$RES_TYPE_NORMAL);
break;
case 'getReservations':
$this->getReservations($_GET['day'],$_GET['month'],$_GET['year']);
break;
case 'changeReservation':
$this->changeReservation($_POST['id'],$_POST['day'],$_POST['month'],$_POST['year'],$_POST['starthour'],$_POST['startmin'],$_POST['name'],$_POST['email'],$_POST['persons'],$_POST['durationhours'],$_POST['durationmins'],$_POST['phone'],$_POST['remark'],$_POST["tableid"]);
break;
case 'delReservation':
$this->delReservation($_POST['id']);
break;
case 'emailConfirmReservation':
$this->emailConfirmReservation($_POST['to'],$_POST['msg']);
break;
case 'reservationsAsHtml':
$this->reservationsAsHtml($_GET['day'],$_GET['month'],$_GET['year']);
break;
case 'blockday':
$pdo = DbUtils::openDbAndReturnPdoStatic();
self::blockday($pdo,$_POST["day"],$_POST["month"],$_POST["year"],$_POST["remark"]);
break;
case 'releaseday':
$pdo = DbUtils::openDbAndReturnPdoStatic();
self::releaseday($pdo,$_POST["day"],$_POST["month"],$_POST["year"]);
break;
case 'getfutureblocks':
$pdo = DbUtils::openDbAndReturnPdoStatic();
self::getFutureBlocks($pdo);
break;
default:
echo json_encode(array("status" => "OK","msg" => "Kommando nicht unterstuetzt."));
}
}
}
@ -42,36 +64,90 @@ class Reservation {
}
}
private function createReservation($day,$month,$year,$start,$startmin,$name,$email,$persons,$durationhours,$durationmins,$phone,$remark,$tableid) {
private static function blockday($pdo,$day,$month,$year,$remark) {
// REM* check, if there is already a block. In this case replace it
$sql = "SELECT id FROM %reservations% WHERE DATE(scheduledate)=? AND restype=?";
$resdate = new DateTime($year . '-' . $month . '-' . $day);
$resdateTxt = $resdate->format('Y-m-d');
$result = CommonUtils::fetchSqlAll($pdo, $sql, array($resdateTxt,self::$RES_TYPE_BLOCKDAY));
if (count($result) > 0) {
// REM* block entries found! User must delete it first!
echo json_encode(array("status" => "ERROR","msg" => "Der Tag wurde bereits geblockt"));
return;
}
return self::createReservation($pdo, $day, $month, $year, 0, 0, "", "", 0, 23, 59, "", $remark, null, self::$RES_TYPE_BLOCKDAY);
}
private static function releaseday($pdo,$day,$month,$year) {
try {
$sql = "DELETE FROM %reservations% WHERE DATE(scheduledate)=? AND restype=?";
$resdate = new DateTime($year . '-' . $month . '-' . $day);
$resdateTxt = $resdate->format('Y-m-d');
CommonUtils::execSql($pdo, $sql, array($resdateTxt,self::$RES_TYPE_BLOCKDAY));
echo json_encode(array("status" => "OK"));
} catch (Exception $ex) {
echo json_encode(array("status" => "ERROR","msg" => "Datenbank-Fehler: " . $ex->getMessage()));
}
}
// REM* get all days that are full-day blocked
private static function getFutureBlocks($pdo) {
try {
$sql = "SELECT id,DATE(scheduledate) as scheduledate,remark FROM %reservations% WHERE restype=? AND DATE(scheduledate) >= DATE_ADD(NOW(), INTERVAL -360 DAY) ORDER BY DATE(scheduledate)";
$result = CommonUtils::fetchSqlAll($pdo, $sql, array(self::$RES_TYPE_BLOCKDAY));
echo json_encode(array("status" => "OK","msg" => $result));
} catch (Exception $ex) {
echo json_encode(array("status" => "ERROR","msg" => "Datenbank-Fehler: " . $ex->getMessage()));
}
}
private static function isBookingAllowed($pdo,$day,$month,$year) {
$scheduledDate = "$year-$month-$day";
$sql = "SELECT id FROM %reservations% WHERE restype=? AND DATE(scheduledate) = ?";
$result = CommonUtils::fetchSqlAll($pdo, $sql, array(self::$RES_TYPE_BLOCKDAY,$scheduledDate));
if (count($result) > 0) {
return false;
} else {
return true;
}
}
private static function createReservation($pdo,$day,$month,$year,$start,$startmin,$name,$email,$persons,$durationhours,$durationmins,$phone,$remark,$tableid,$restype) {
// REM* check if booking is allowed
if (!self::isBookingAllowed($pdo, $day, $month, $year)) {
echo json_encode(array("status" => "ERROR","msg" => "Tag für weitere Buchungen gesperrt"));
return;
}
$userid = $_SESSION['userid'];
date_default_timezone_set(DbUtils::getTimeZone());
$currentTime = date('Y-m-d H:i:s');
$scheduledDate = "$year-$month-$day 00:00:00";
// REM* check if date is in the past
$resdate = new DateTime($year . '-' . $month . '-' . $day);
$curDate = new DateTime(date('Y-m-d'));
$interval = $curDate->diff($resdate);
$daysDiff = intval($interval->format('%R%a'));
if ($daysDiff < 0) {
echo json_encode(array("status" => "ERROR", "msg" => "Reservierungsdatum liegt in der Vergangenheit"));
return;
}
// REM* $resdate = new DateTime($year . '-' . $month . '-' . $day);
// REM* $curDate = new DateTime(date('Y-m-d'));
// REM* $interval = $curDate->diff($resdate);
// REM* $daysDiff = intval($interval->format('%R%a'));
// REM* if ($daysDiff < 0) {
// REM* echo json_encode(array("status" => "ERROR", "msg" => "Reservierungsdatum liegt in der Vergangenheit"));
// REM* return;
// REM* }
if ($tableid <= 0) {
$tableid = null;
}
$pdo = DbUtils::openDbAndReturnPdoStatic();
try {
$pdo->beginTransaction();
$sql = "INSERT INTO `%reservations%` (
`id` , `creator`,`creationdate`,`scheduledate`,`name`,`email`,`starttime`,`starttimemin`,`duration`,`durationmins`,`persons`,`phone`,`remark`,`tableid`)
`id` , `creator`,`creationdate`,`scheduledate`,`name`,`email`,`starttime`,`starttimemin`,`duration`,`durationmins`,`persons`,`phone`,`remark`,`tableid`,`restype`)
VALUES (
NULL , ?,?,?,?,?,?,?,?,?,?,?,?,?)";
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
$stmt->execute(array($userid,$currentTime,$scheduledDate,$name,$email,$start,$startmin,$durationhours,$durationmins,$persons,$phone,$remark,$tableid));
NULL , ?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
CommonUtils::execSql($pdo, $sql, array($userid,$currentTime,$scheduledDate,$name,$email,$start,$startmin,$durationhours,$durationmins,$persons,$phone,$remark,$tableid,$restype));
$pdo->commit();
echo json_encode(array("status" => "OK"));
}
@ -82,12 +158,17 @@ class Reservation {
}
private function changeReservation($id,$day,$month,$year,$startHour,$startMin,$name,$email,$persons,$durationHours,$durationMins,$phone,$remark,$tableid) {
// REM* check if booking is allowed
$pdo = DbUtils::openDbAndReturnPdoStatic();
if (!self::isBookingAllowed($pdo, $day, $month, $year)) {
echo json_encode(array("status" => "ERROR","msg" => "Tag für weitere Buchungen gesperrt"));
return;
}
$userid = $_SESSION['userid'];
date_default_timezone_set(DbUtils::getTimeZone());
$currentTime = date('Y-m-d H:i:s');
$scheduledDate = "$year-$month-$day 00:00:00";
$pdo = DbUtils::openDbAndReturnPdoStatic();
try {
$pdo->beginTransaction();
@ -155,7 +236,7 @@ class Reservation {
$txt = "<html><head>";
$txt .= "<title>Reservierungsübersicht</title>";
$txt .= '<meta http-equiv="content-type" content="text/html; charset=utf-8">';
$txt .= '<link rel="stylesheet" type="text/css" href="../css/bestformat.css?v=1.6.4">';
$txt .= '<link rel="stylesheet" type="text/css" href="../css/bestformat.css?v=1.6.5">';
$txt .= "</head>";
$txt .= "<body>";
$txt .= "<h1>Reservierungsübersicht für $day.$month.$year</h1><p>";
@ -189,7 +270,7 @@ class Reservation {
$sql .= "IF(tableid is null,'-1',(SELECT T.sorting as tablesorting FROM %room% RO,%resttables% T WHERE T.id=tableid AND T.roomid=RO.id)) as tablesorting, ";
$sql .= "IF(tableid is null,'',(SELECT T.tableno as tablename FROM %room% RO,%resttables% T WHERE T.id=tableid AND T.roomid=RO.id)) as tablename ";
$sql .= "FROM %reservations% R,%user% U ";
$sql .= "WHERE DATE(scheduledate)=? AND R.creator=U.id ";
$sql .= "WHERE DATE(scheduledate)=? AND R.creator=U.id AND restype='0'";
return $sql;
}
// REM* the end time may be in next day, and the minutes may also need an hiour to be increased
@ -211,7 +292,7 @@ class Reservation {
// REM* and now by table
$sql = "SELECT DISTINCT R.tableid as tableid,T.tableno as tablename,ROOM.id as roomid,ROOM.sorting as roomsorting,T.sorting as tablesorting FROM %reservations% R,%room% ROOM,%resttables% T ";
$sql .= " WHERE DATE(scheduledate)=? AND tableid is not null AND tableid >= '0' ";
$sql .= " WHERE restype='0' AND DATE(scheduledate)=? AND tableid is not null AND tableid >= '0' ";
$sql .= " AND R.tableid = T.id AND T.roomid=ROOM.id ";
$sql .= " ORDER BY ROOM.sorting,T.sorting ";
$day = sprintf("%02s", $day);
@ -224,7 +305,7 @@ class Reservation {
$sql = "SELECT R.id,U.username as creator,creationdate,scheduledate,YEAR(scheduledate) as year,MONTH(scheduledate) as month, DAY(scheduledate) as day,starttime as starthour,starttimemin as startmin,name as guest,email,persons,duration as durationhours,durationmins,$sqlEndTime,";
$sql .= " phone,remark,tableid,'" . $tableRes["roomid"] . "' as roomid ";
$sql .= "FROM %reservations% R,%user% U ";
$sql .= "WHERE DATE(scheduledate)=? AND R.creator=U.id AND tableid=? ";
$sql .= "WHERE restype='0' AND DATE(scheduledate)=? AND R.creator=U.id AND tableid=? ";
$sql .= "ORDER BY starttime";
$allResOfThatTable = CommonUtils::fetchSqlAll($pdo, $sql, array($scheduledDate,$tableRes["tableid"]));
$byTables[] = array("tableid" => $tableRes["tableid"],"tablename" => $tableRes["tablename"],"roomid" => $tableRes["roomid"], "reservations" => $allResOfThatTable);
@ -233,7 +314,7 @@ class Reservation {
$sql = "SELECT R.id,U.username as creator,creationdate,scheduledate,YEAR(scheduledate) as year,MONTH(scheduledate) as month, DAY(scheduledate) as day,starttime as starthour,starttimemin as startmin,name as guest,email,persons,duration as durationhours,durationmins,$sqlEndTime,";
$sql .= " phone,remark,'-1' as tableid,'-1' as roomid ";
$sql .= "FROM %reservations% R,%user% U ";
$sql .= "WHERE DATE(scheduledate)=? AND R.creator=U.id AND (tableid is null OR tableid='-1') ";
$sql .= "WHERE restype='0' AND DATE(scheduledate)=? AND R.creator=U.id AND (tableid is null OR tableid='-1') ";
$sql .= "ORDER BY starttime";
$allResOfUndefinedTable = CommonUtils::fetchSqlAll($pdo, $sql, array($scheduledDate));
if (count($allResOfUndefinedTable) > 0) {

View File

@ -598,7 +598,7 @@ class Roomtables {
$txt = "<html><head>";
$txt .= "<title>Tisch QR-Codes für die Gastbestellung</title>";
$txt .= '<meta http-equiv="content-type" content="text/html; charset=utf-8">';
$txt .= '<link rel="stylesheet" type="text/css" href="../css/bestformat.css?v=1.6.4">';
$txt .= '<link rel="stylesheet" type="text/css" href="../css/bestformat.css?v=1.6.5">';
$txt .= "</head>";
$txt .= "<body>";
$txt .= "<h1>Tisch QR-Codes für die Gastbestellung</h1><p>";

View File

@ -36,7 +36,7 @@ class OsQrcode {
readfile(__DIR__. '/../../img/oops.png');
return;
} else {
$text = $serverurl . "/nfclogin.php?a=" . $passhash . "_" . $userid . "v=1.6.4";
$text = $serverurl . "/nfclogin.php?a=" . $passhash . "_" . $userid . "v=1.6.5";
QRcode::png($text);
}
}

View File

@ -1329,6 +1329,17 @@ class Version {
return array(true);
}
public static function upd_1604_1605($pdo, $prefix, $dbname) {
try {
self::execSql($pdo, "ALTER TABLE %reservations% ADD restype INT(1) NULL DEFAULT '0' AFTER remark");
self::execSql($pdo, "UPDATE %reservations% SET restype='0'");
return array(true);
} catch (PDOException $e) {
return array(false,$e);
}
}
public static $updateOrder = array(
"1.3.0" => array("upd_1300_1301","1.3.1"),
"1.3.1" => array("upd_1301_1302","1.3.2"),
@ -1414,7 +1425,8 @@ class Version {
"1.6.0" => array("upd_1600_1601","1.6.1"),
"1.6.1" => array("upd_1601_1602","1.6.2"),
"1.6.2" => array("upd_1602_1603","1.6.3"),
"1.6.3" => array("upd_1603_1604","1.6.4")
"1.6.3" => array("upd_1603_1604","1.6.4"),
"1.6.4" => array("upd_1604_1605","1.6.5")
);
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 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.6.4">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.6.5">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<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.mobile-1.4.5.min.js"></script>
<script src="utilities.js?v=1.6.4"></script>
<script src="utilities.js?v=1.6.5"></script>
<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>

View File

@ -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.6.4">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.6.5">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
@ -13,7 +13,7 @@
<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.mobile-1.4.5.min.js"></script>
<script src="utilities.js?v=1.6.4"></script>
<script src="utilities.js?v=1.6.5"></script>
</head>

View File

@ -7,16 +7,16 @@
<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.6.4">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.6.5">
<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/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.mobile-1.4.0.min.js"></script>
<script src="utilities.js?v=1.6.4"></script>
<script src="elements/product.js?v=1.6.4"></script>
<script src="elements/extra.js?v=1.6.4"></script>
<script src="utilities.js?v=1.6.5"></script>
<script src="elements/product.js?v=1.6.5"></script>
<script src="elements/extra.js?v=1.6.5"></script>
<link href="php/3rdparty/hayageek_uploadfile.css" rel="stylesheet">
<script src="php/3rdparty/hayageek_jquery_uploadfile.js"></script>
</head>

View File

@ -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">
<meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.6.4">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.6.5">
<link rel="stylesheet" href="css/ospage.css" />
<link rel="stylesheet" href="css/tablepanel.css" />
@ -15,7 +15,7 @@
<script src="php/3rdparty/jquery-2.2.4.min.js"></script>
<script src="php/3rdparty/jqueryui1-12-0/jquery-ui.min.js"></script>
<script src="utilities.js?v=1.6.4"></script>
<script src="utilities.js?v=1.6.5"></script>
<script>

View File

@ -7,14 +7,14 @@
<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.6.4">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.6.5">
<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/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.mobile-1.4.0.min.js"></script>
<script src="utilities.js?v=1.6.4"></script>
<script src="utilities.js?v=1.6.5"></script>
</head>
<body>

View File

@ -7,14 +7,14 @@
<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.6.4">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.6.5">
<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/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.mobile-1.4.0.min.js"></script>
<script src="utilities.js?v=1.6.4"></script>
<script src="utilities.js?v=1.6.5"></script>
<script src="elements/rating.js"></script>
</head>

View File

@ -5,7 +5,8 @@
<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.6.4">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.6.5">
<link rel="stylesheet" type="text/css" href="css/osdatepicker.css?v=1.6.5">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
@ -13,16 +14,14 @@
<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="elements/tablemap.js"></script>
<script src="elements/reservation.js?v=1.6.4"></script>
<script src="elements/reservation.js?v=1.6.5"></script>
<script src="elements/osdatepicker.js?v=1.6.5"></script>
<script src="utilities.js?v=1.6.4"></script>
<script src="utilities.js?v=1.6.5"></script>
<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-i18n.min.js"></script>
<link rel="stylesheet" href="php/3rdparty/jquerymobiledatepicker/jquery.mobile.datepicker.css" />
<script src="php/3rdparty/jquerymobiledatepicker/jquery.mobile.datepicker.js"></script>
</head>
@ -32,7 +31,7 @@
@media print
{
#thefooter,#theheader,#modulemenu,#newresbox,#printsummary,#timeperiodsliderform {display: none;}
#thefooter,#theheader,#modulemenu,#newresbox,#printsummary,#timeperiodsliderform,#viewdatepart,#blockarea {display: none;}
}
.schbtn,.schtablebtn {
@ -59,7 +58,6 @@
<script>
var RES_TITLE = ["Reservierung","Reservation","Reserva"];
var RES_DATE = ["Datum","Date","Fecha"];
var RES_NEW = ["Neue Reservierung","New Reservation","Reserva nueva"];
var RES_STARTTIME = ["Start-Uhrzeit","Start time","Hora de Empieza"];
var RES_NO_PERSONS = ["Anzahl Gäste","Number of persons","Personas"];
@ -101,6 +99,10 @@ var RES_ROOM = ["Raum","Room","Habitación"];
var RES_TABLE = ["Tisch","Table","Mesa"];
var RES_HTMLREPORT = ["Übersicht","Overview","Lista en html"];
var RES_CREATED_OK = ["Reservierung angelegt","Reservation created","Reservación creado"];
var RES_BLOCK_DAY = ["Weitere Buchungen verbieten","Stop further bookings","Evitar más reservaciones"];
var RES_RELEASE_DAY = ["Buchungen wieder erlauben","Allow reservartions again","Permitir más reservaciones"];
var RES_BLOCK_AREA_TXT = ["Tag blocken oder entsperren","Block or release day","Derecho de hacer reservaciones"];
var RES_CAUTION_DAY_BLOCKED = ["Der Tag wurde für weitere Reservierungen gesperrt","This day was blocked for further reservations","Este día ha sido bloqueado para más reservaciones"];
var lang = (-1);
var reservationnote = "";
@ -111,11 +113,12 @@ var emailTemplate = "";
var filteredCustomers = [];
var tableoverview = [];
var resofselecteddate = [];
var viewdate = null;
var chgviewdate = null;
function setLanguage(language) {
lang = language;
$("#datetxt").html(RES_DATE[lang]);
$("#restitletxt").html(RES_TITLE[lang]);
$("#newtxt").html(RES_NEW[lang]);
$("#newresboxtxt").html(RES_NEW[lang]);
@ -139,7 +142,6 @@ function setLanguage(language) {
$("#cguestheadertxt").html(RES_GUEST_INFO_HEADER[lang]);
$("#cnewresboxtxt").html(RES_CHANGE_TITLE[lang]);
$("#reschangetitletxt").html(RES_CHANGE_TITLE[lang]);
$("#cdatetxt").html(RES_DATE[lang]);
$("#cstarttimetxt").html(RES_STARTTIME[lang]);
$("#cstarttimehourtxt").html(RES_HOUR[lang]);
$("#cpersonstxt").html(RES_NO_PERSONS[lang]);
@ -162,39 +164,31 @@ function setLanguage(language) {
$("#reshintchoosecustomer").html(RES_HINT_CUS_CHOOSE[lang]);
$("#resbytimesofdaytxt").html(RES_RES[lang]);
$("#blockdaybtn").html(RES_BLOCK_DAY[lang]);
$("#releasedaybtn").html(RES_RELEASE_DAY[lang]);
$("#blockareaheadertxt").html(RES_BLOCK_AREA_TXT[lang]);
$(".timeperiodslider").html(RES_TIME_PERIOD[lang]);
var langtxt = "de";
if (lang == 1) {
langtxt = "en";
} else if (lang == 2) {
langtxt = "es";
}
var currentYear = new Date().getFullYear();
var yearRangeTxt = (currentYear-1) + ":" + (currentYear+3);
$("#datepicker").datepicker($.datepicker.regional[langtxt]).datepicker("option", {
changeMonth: true,
changeYear: true,
yearRange: yearRangeTxt,
});
$('#datepicker').datepicker('setDate', new Date());
$("#cdatepicker").datepicker($.datepicker.regional[langtxt]).datepicker("option", {
changeMonth: true,
changeYear: true,
yearRange: yearRangeTxt,
});
$('#cdatepicker').datepicker('setDate', new Date());
getBlockedDays();
}
function initDatePickers(blockedDays) {
var date = new Date();
viewdate = new OsDatePicker();
viewdate.init("#viewdate","#viewdatemonth",lang,date.getDate(),date.getMonth(),date.getFullYear(),handleViewDateChange,blockedDays);
chgviewdate = new OsDatePicker();
chgviewdate.init("#chgviewdate","#chgviewdatemonth",lang,date.getDate(),date.getMonth(),date.getFullYear(),null,blockedDays);
$("#newresbox").show();
var blockStatusOfToday = viewdate.isTodayBlockedWithRemark();
doVisibilityOfBlockAreas(blockStatusOfToday.blocked,blockStatusOfToday.remark);
}
function getGeneralConfigItems() {
doAjax("GET", "php/contenthandler.php?module=admin&command=getGeneralConfigItems", null, insertGenConfigStartRest, "Fehler Konfigurationsdaten");
}
doAjax("GET", "php/contenthandler.php?module=admin&command=getGeneralConfigItems", null, insertGenConfigStartRest, "Fehler Konfigurationsdaten");
}
function insertGenConfigStartRest(configResult) {
if (configResult.status == "OK") {
@ -211,20 +205,36 @@ function insertGenConfigStartRest(configResult) {
}
emailTemplate = values.reservationnote;
} else {
setTimeout(function(){document.location.href = "index.html"},250); // not logged in
setTimeout(function(){document.location.href = "index.html";},250); // not logged in
$("#fullcontent").hide();
}
}
function handleDateChangeEvents() {
$("#datepicker").off("change").on("change", function (e) {
var date = $("#datepicker").datepicker("getDate");
$("#res-page").data("date",date);
displayTodaySchedule(date);
});
$("#cdatepicker").off("change").on("change", function (e) {
var date = $("#cdatepicker").datepicker("getDate");
});
function doVisibilityOfBlockAreas(isBlocked,blockRemark) {
if (isBlocked) {
$("#newresbox").hide();
$("#cautionarea").show();
var infoTxt = RES_CAUTION_DAY_BLOCKED[lang];
if ((blockRemark != null) && (blockRemark != "")) {
infoTxt += ": <b>" + blockRemark + "</b>";
} else {
infoTxt += "!";
}
$("#cautioninfo").html(infoTxt);
$("#blockpart").hide();
$("#releasepart").show();
} else {
$("#newresbox").show();
$("#cautionarea").hide();
$("#blockpart").show();
$("#releasepart").hide();
}
}
function handleViewDateChange(theNewDate,isBlocked,blockRemark) {
$("#res-page").data("date",theNewDate);
displayTodaySchedule(theNewDate);
doVisibilityOfBlockAreas(isBlocked,blockRemark);
}
function displayTodaySchedule(date) {
@ -251,17 +261,16 @@ function displaySpecificDateSchedule() {
}
}
var dateParts = datestamp.split("-");
var year = dateParts[0];
var month = dateParts[1];
var day = dateParts[2];
var year = parseInt(dateParts[0]);
var month = parseInt(dateParts[1]);
var day = parseInt(dateParts[2]);
var data = {
day: day,
month: month,
year: year
};
var theSelectedDate = new Date(year,month - 1,day);
$('#datepicker').datepicker('setDate', theSelectedDate);
$('#cdatepicker').datepicker('setDate', theSelectedDate);
getBlockedDays();
viewdate.setDate(new Date(year,month-1,day));
getReservationsOfDate(data);
} else {
displayTodaySchedule(new Date());
@ -272,9 +281,62 @@ function getReservationsOfDate(dateObj) {
doAjax("GET","php/contenthandler.php?module=reservation&command=getReservations",dateObj,insertReservations,"Reservierungsinfos");
}
function getDateFromViewDatePicker() {
var date = viewdate.getDate();
var data = {
day: date.getDate(),
month: date.getMonth() + 1,
year: date.getFullYear()
};
return data;
}
function getBlockedDays() {
doAjax("POST","php/contenthandler.php?module=reservation&command=getfutureblocks",null,handleGetBlockedDays,"GetBlockedDays",false);
}
function handleGetBlockedDays(answer) {
if (answer.status == "OK") {
initDatePickers(answer.msg);
} else {
alert("Fehler: " + answer.msg);
}
}
function bindBlockDayBtn() {
$("#blockdaybtn").off("click").on("click", function (e) {
e.stopImmediatePropagation();
e.preventDefault();
var data = getDateFromViewDatePicker();
data["remark"] = $("#blockremark").val();
viewdate.blockDayInHashmap(data.day,data.month-1,data.year,data["remark"]);
chgviewdate.blockDayInHashmap(data.day,data.month-1,data.year,data["remark"]);
doVisibilityOfBlockAreas(true,data["remark"]);
doAjax("POST","php/contenthandler.php?module=reservation&command=blockday",data,handleBlock,"Block Reservierung",true);
});
$("#releasedaybtn").off("click").on("click", function (e) {
e.stopImmediatePropagation();
e.preventDefault();
var data = getDateFromViewDatePicker();
viewdate.releaseDayInHashmap(data.day,data.month-1,data.year);
chgviewdate.releaseDayInHashmap(data.day,data.month-1,data.year);
doVisibilityOfBlockAreas(false,"");
doAjax("POST","php/contenthandler.php?module=reservation&command=releaseday",data,handleBlock,"Freigabe Reservierung",true);
});
}
function handleBlock(answer) {
if (answer.status != "OK") {
alert("Fehler: " + answer.msg);
} else {
$("#blockremark").val("");
}
}
function bindNewReservationBtn() {
$("#newbtn").off("click").on("click", function (e) {
var date = $("#datepicker").datepicker("getDate");
var date = viewdate.getDate();
var startTimeHour = $("#timefieldse").val();
var startTimeMin = $("#timefieldmin").val();
@ -340,7 +402,7 @@ function bindNewReservationBtn() {
function handleCreateNewReservation(answer) {
if (answer.status != "OK") {
alert("Fehler " + answer.code + ": " + answer.msg);
alert("Fehler: " + answer.msg);
return;
} else {
var emailToField = $("#emailtofield").val();
@ -401,7 +463,7 @@ function resetFields() {
function handleChangedReservation(answer) {
if (answer.status != "OK") {
alert("Fehler " + answer.code + ": " + answer.msg);
alert("Fehler " + ": " + answer.msg);
return;
} else {
setTimeout(function(){document.location.href = "reservation.html";},500);
@ -427,10 +489,13 @@ function getTableName(roomid,tableid) {
return tablename;
}
function updateTableOfReservationsByTables(reservations) {
var date = $('#datepicker').datepicker({ dateFormat: 'dd-mm-yy' }).val();
$("#dateofreservations").html(date);
var date = new Date();
if (viewdate != null) {
date = viewdate.getDate();
}
var dateAsText = date.getDate() + "." + (date.getMonth() +1 ) + "." + date.getFullYear();
$("#dateofreservations").html(dateAsText);
var restable = new ReservationsTable();
var startDisplayHour = $("#range-starthour").val();
@ -556,13 +621,13 @@ function bindCancelButtn() {
$("#cancelbtn").off("click").on("click", function (e) {
e.stopImmediatePropagation();
e.preventDefault();
var date = $("#datepicker").datepicker("getDate");
var date = viewdate.getDate();
var day = date.getDate();
var month = date.getMonth() + 1;
var year = date.getFullYear();
var dateStr = year + "-" + month + "-" + day;
setTimeout(function(){document.location.href = "reservation.html?v=1.6.4&date=" + dateStr;},500);
setTimeout(function(){document.location.href = "reservation.html?v=1.6.5&date=" + dateStr;},500);
});
}
@ -588,9 +653,7 @@ function openEditPageForRes(res) {
}
var changeDate = new Date(year, month, day, 0,0,0,0);
$('#cdatepicker').datepicker('setDate', changeDate);
handleDateChangeEvents();
chgviewdate.setDate(changeDate);
$("#ctimefieldse").val(startHour);
$("#ctimefieldmin").val(startMin);
@ -621,7 +684,7 @@ function bindHtmlReportButton() {
$("#htmlreportbtn").off("click").on("click", function (e) {
e.stopImmediatePropagation();
e.preventDefault();
var date = $("#datepicker").datepicker("getDate");
var date = viewdate.getDate();
var getParam = "day=" + date.getDate() + "&month=" + (date.getMonth() + 1) + "&year=" + date.getFullYear();
window.open("php/contenthandler.php?module=reservation&command=reservationsAsHtml&" + getParam,'_blank');
});
@ -676,8 +739,7 @@ function bindDlgChangeBtn() {
tableid = $("#ctableselect").val();
}
}
var date = $("#cdatepicker").datepicker("getDate");
var date = chgviewdate.getDate();
var id = $("#changeres-page").data("id");
@ -720,10 +782,10 @@ $(document).on("pageinit", "#res-page", function () {
$.ajaxSetup({ cache: false });
$("#res-page").data("date",new Date());
getGeneralConfigItems();
handleDateChangeEvents();
displaySpecificDateSchedule();
bindNewReservationBtn();
bindBlockDayBtn();
bindClickResItem();
bindCancelButtn();
@ -744,11 +806,12 @@ $(document).on("pageinit", "#res-page", function () {
$("#email").val("");
$("#telno").val("");
$("#remark").val("");
$("#blockremark").val("");
});
$(document).on("pagebeforeshow", "#changeres-page", function () {
if (lang < 0) {
setTimeout(function(){document.location.href = "reservation.html?"},500);
setTimeout(function(){document.location.href = "reservation.html?";},500);
} else {
$("#ctimefieldse").selectmenu().selectmenu('refresh', true);
$("#ctimefieldmin").selectmenu().selectmenu('refresh', true);
@ -834,7 +897,7 @@ function bindRoomSelect(roomsectionid,roomselectid,tablesectionid,tableselectid,
<div data-role="page" id="res-page" data-theme="c">
<div data-role="panel" id="modulepanel" data-position="right" data-display="overlay">
<ul data-role="listview" id="modulemenu" data-divider-theme="a" data-inset="true">
<li data-role="list-divider" data-theme="b" data-role="heading">Hauptmenü</li>
<li data-role="list-divider" data-theme="b" >Hauptmenü</li>
</ul>
</div><!-- /panel -->
<div data-role="header" data-theme="b" data-position="fixed" id="theheader" style="background-color:black;">
@ -845,11 +908,14 @@ function bindRoomSelect(roomsectionid,roomselectid,tablesectionid,tableselectid,
</div>
<div data-role="content" id="fullcontent">
<div data-role="fieldcontain">
<label for="datepicker"><span id=datetxt>Datum</span>: </label>
<input data-role="date" data-inline="true" type="text" id="datepicker" data-theme="d">
<div id="viewdatepart" data-role="fieldcontain" style="height:50px;" >
<input data-role="date" data-inline="true" type="text" id="viewdate" data-theme="d">
<div id="viewdatemonth" class="daypicker" >
Month Overlay
</div>
</div>
<div id="newresbox" data-role="collapsible" data-theme="c" data-content-theme="c" data-collapsed="true">
<div id="newresbox" data-role="collapsible" data-theme="c" data-content-theme="c" data-collapsed="true" style="display:none;">
<h3><span id="newresboxtxt">Neue Reservierung</span></h3>
<form>
@ -973,9 +1039,9 @@ function bindRoomSelect(roomsectionid,roomselectid,tablesectionid,tableselectid,
<div id=emailinfo style="text-align:center;"></div>
</div> <!-- newresbox -->
<div id="cautionarea" style="display:none;">
<img src="img/caution.png" style="height:50px;" /> <span id="cautioninfo">Achtung</span>
</div>
<br>
<div id="resoverview" data-role="collapsible" data-theme="c" data-content-theme="c" data-collapsed="false">
@ -986,7 +1052,7 @@ function bindRoomSelect(roomsectionid,roomselectid,tablesectionid,tableselectid,
<p><form>
<div data-role="rangeslider">
<label for="range-starthour"><span class="timeperiodslider">Zeitr.</span>:</label>
<input name="range-starthour" id="range-starthour" min="0" max="23" value="10" type="range">
<input name="range-starthour" id="range-starthour" min="0" max="23" value="9" type="range">
<label for="range-endhour"><span class="timeperiodslider">Zeitr.</span>:</label>
<input name="range-endhour" id="range-endhour" min="1" max="24" value="18" type="range">
</div>
@ -994,9 +1060,20 @@ function bindRoomSelect(roomsectionid,roomselectid,tablesectionid,tableselectid,
</div>
<p /><button type="submit" data-theme="f" data-icon="check" id="printsummary">Drucken</button></div>
<p /><button type="submit" data-theme="f" data-icon="check" id="printsummary">Drucken</button>
</div>
<div id="blockarea" data-role="collapsible" data-theme="c" data-content-theme="c" data-collapsed="true">
<h3><span id="blockareaheadertxt">Blocken</h3>
<div id="blockpart">
<input id="blockremark" type="text" placeholder="Bemerkung für Blocken" class="whiteinput" />
<p><button id="blockdaybtn" data-theme="b" ><span id="blockdaybtntxt">Block</span></button>
</div>
<div id="releasepart">
<button id="releasedaybtn" data-theme="f" ><span id="releasedaybtntxt">Freigabe</span></button>
</div>
</div>
</div> <!-- resbytimes -->
</div>
@ -1008,7 +1085,6 @@ function bindRoomSelect(roomsectionid,roomselectid,tablesectionid,tableselectid,
</div><!-- /grid-a -->
</div> <!-- footer -->
</div> <!-- first page -->
<div data-role="page" id="sentemail-page"> <!-- second page -->
<div data-role="header" data-theme="b" data-position="fixed" id="ctheheader">
@ -1047,14 +1123,16 @@ function bindRoomSelect(roomsectionid,roomselectid,tablesectionid,tableselectid,
<div data-role="fieldcontain">
<p><span id="clastcreatortxt">Letzte Änderung von</span>: <span id="clastcreator"></span></p>
<p><span id="clastchangetxt">zuletzt geändert</span>: <span id="clastchanged"></span></p>
<div id="chgviewdatepart" data-role="fieldcontain" style="height:50px;" >
<input data-role="date" data-inline="true" type="text" id="chgviewdate" data-theme="d">
<div id="chgviewdatemonth" class="daypicker" >
Month Overlay
</div>
</div>
<span id="cstarttimetxt" class="headerformat">Start-Uhrzeit</span>:
<div data-role="fieldcontain">
<label for="cdatepicker" ><span id=cdatetxt>Datum</span>: </label>
<input data-role="date" data-inline="true" type="text" id="cdatepicker" data-theme="d" >
</div>
<label for="ctimefieldse" ><span id="cstarttimehourtxt">Start-Uhrzeit</span>: </label>
<select name="ctimefieldse" id="ctimefieldse" data-theme="a" >
<option value="0">0</option>
@ -1159,13 +1237,12 @@ function bindRoomSelect(roomsectionid,roomselectid,tablesectionid,tableselectid,
<div id="ctablespecinfotablearea"></div>
</div>
<p>
<p />
<fieldset class="ui-grid-b" id="changecancelarea">
<div class="ui-block-a"><button type="submit" data-theme="d" class="cancelButton" data-icon="back" id="cancelbtn"><span id="canceltxt">Abbruch</span></button></div>
<div class="ui-block-b"><button type="submit" data-theme="f" class="applyButton" data-icon="check" id="changebtn"><span id="changedlgbtn">Ändern</span></button></div>
<div class="ui-block-c"><button type="submit" data-theme="b" class="applyButton" data-icon="delete" id="delbtn"><span id="deldlgbtn">Löschen</span></button></div>
</fieldset>
</p>
</form>
</div> <!-- newresbox -->

View File

@ -14,7 +14,7 @@
<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.mobile-1.4.0.min.js"></script>
<script src="utilities.js?v=1.6.4"></script>
<script src="utilities.js?v=1.6.5"></script>
</head>
<body>
@ -30,7 +30,7 @@ var SUM_REASON = ["Grund","Reason","Razó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 nextpage = "paydesk.html?version=1.6.4";
var nextpage = "paydesk.html?version=1.6.5";
var lang;
@ -84,10 +84,10 @@ function setLanguage(language) {
if (nextPage == "p") {
$("#nextpagebtntxt").html(SUM_TO_PAYMENT[lang]);
nextpage = "paydesk.html?t=" + tableid + "&version=1.6.4";
nextpage = "paydesk.html?t=" + tableid + "&version=1.6.5";
} else {
$("#nextpagebtntxt").html(SUM_TO_ORDER[lang]);
nextpage = "waiter.html?version=1.6.4";
nextpage = "waiter.html?version=1.6.5";
}
var txt = "<table class='viewtable'>";

View File

@ -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.6.4">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.6.5">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
@ -13,7 +13,7 @@
<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.mobile-1.4.0.min.js"></script>
<script src="utilities.js?v=1.6.4"></script>
<script src="utilities.js?v=1.6.5"></script>
<style>
#tableWithPreparedProds,#tableWithDeliveredEntries,#headertableToCook

View File

@ -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.6.4">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.6.5">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<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.mobile-1.4.5.min.js"></script>
<script src="utilities.js?v=1.6.4"></script>
<script src="utilities.js?v=1.6.5"></script>
<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>

View File

@ -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.6.4">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.6.5">
<link rel="stylesheet" href="php/contenthandler.php?module=admin&command=getmobilecss" />
<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.mobile-1.4.5.min.js"></script>
<script src="utilities.js?v=1.6.4"></script>
<script src="utilities.js?v=1.6.5"></script>
<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>

File diff suppressed because one or more lines are too long

View File

@ -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">
<meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.6.4">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.6.5">
<link rel="stylesheet" href="css/ospage.css" />
<link rel="stylesheet" href="css/tablepanel.css" />
@ -16,7 +16,7 @@
<link rel="stylesheet" href="css/extraspanel.css" />
<link rel="stylesheet" href="css/actpanel.css" />
<link rel="stylesheet" href="css/paypanel.css" />
<link rel="stylesheet" href="css/numfield.css?v=1.6.4" />
<link rel="stylesheet" href="css/numfield.css?v=1.6.5" />
<link rel="stylesheet" href="php/3rdparty/jqueryui1-12-0/jquery-ui.min.css" />
<script src="php/3rdparty/jquery-2.2.4.min.js"></script>