OrderSprinter 1.4.0

This commit is contained in:
Geno 2020-11-19 23:10:06 +01:00
parent ea4347ebe3
commit 73883ee35b
256 changed files with 4730 additions and 297 deletions

View File

@ -0,0 +1,55 @@
.installfield {
width:100%;
font-size: 20px;
font-weight: bold;
color: black;
padding: 10px;
background-color: white;
}
.installbtn {
width:100%;
background-color: greenyellow;
color:black;
font-size: 20px;
font-weight: bold;
padding: 10px;
margin-top: 10px;
}
.surround {
border: 20px solid green;
border-radius: 5px;
padding: 40px;
background-color: graytext;
}
#warningdiv {
border: 20px solid black;
border-radius: 5px;
padding: 40px;
background-color: red;
color: white;
margin: 30px;
}
.headerline {
text-align: center;
font-size: 30px;
font-weight: bold;
padding: 40px;
}
.grid_right {
text-align :right;
font-style: italic;
}
.whiteinput[type=text] {
color: black;
background-color: white;
}
#timecounter {
text-align: right;
font-style: italic;
}

119
gastsystem/index.php Normal file
View File

@ -0,0 +1,119 @@
<html>
<head>
<title>OrderSprinter Gastsystem</title>
<meta http-equiv=“cache-control“ content=“no-cache“>
<meta http-equiv=“pragma“ content=“no-cache“>
<meta http-equiv=“expires“ content=“0″>
<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" href="css/gueststyle.css?v=1.4.0" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css?v=1.4.0" />
<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>
<script src="php/3rdparty/jquery.mobile-1.4.5.min.js"></script>
<script src="js/utilities.js"></script>
</head>
<body>
<style>
</style>
<script src="js/ordering.js"></script>
<!--first page -->
<div data-role="page" id="guest-page">
<div data-role="header" data-theme="b" data-position="fixed">
<h1><span id="roomtableheader2">OrderSprinter Gastsystem</span></h1>
</div>
<div data-role="content">
<div id="warningdiv" style="display:none;">
ACHTUNG: Eine Kommunikation mit dem Kernsystem ist derzeit nicht aktiv. Bitte weisen Sie das Bedienpersonal darauf hin oder geben die Bestellung beim Kellner auf.
</div>
<div data-role="collapsible" data-content-theme="c" data-collapsed="false" data-theme="e" id="tableselection" style="display:none;" class="notcollapsible">
<H2>Tischauswahl</H2>
<p>Bitte wählen Sie den Tisch aus:
<div id="tableselectionbox"></div>
</div>
<div data-role="collapsible" data-content-theme="c" data-collapsed="false" data-theme="e" id="tablecodediv" style="display:none;" class="notcollapsible">
<H2>Tisch-Code</H2>
<p>Bitte geben Sie hier den Tisch-Code ein:
<p><input class="whiteinput" type="text" id="tablecodefield" /><br>
<p>Bitte geben Sie hier die Tageslosung ein:
<p><input class="whiteinput" type="text" id="dailycodefield" /><br>
<div class="ui-grid-a">
<div class="ui-block-a"><button type="submit" data-theme="d" data-icon="back" id="codebackbtn">Zurück</button></div>
<div class="ui-block-b"><button type="submit" data-theme="f" data-icon="check" id="submitcodesbtn">Weiter</button></div>
</div><!-- /grid-a -->
</div>
<div data-role="collapsible" data-content-theme="c" data-collapsed="false" data-theme="e" id="productsdiv" style="display:none;" class="notcollapsible">
<H2>Auswahl der Speise oder des Getränks</H2>
<p>Bitte wähle Sie die Gruppe bzw. die Speise oder das Getränk aus:
<div id="typesdiv"></div>
<div id="prodsdiv"></div>
<p><button type="submit" data-theme="d" data-icon="back" id="prodbackbtn">Zurück</button></div>
</div>
<div data-role="collapsible" data-content-theme="c" data-collapsed="false" data-theme="e" id="prodconfirmdiv" style="display:none;" class="notcollapsible">
<H2>Bestätigung</H2>
<p>Soll das ausgewählt Produkt <b><span id="selectedprod"></span></b> bestellt werden?
<div class="ui-grid-a">
<div class="ui-block-a"><button type="submit" data-theme="d" data-icon="back" id="prodconfirmbackbtn">Zurück</button></div>
<div class="ui-block-b"><button type="submit" data-theme="f" data-icon="check" id="prodconfirmbtn">JA</button></div>
</div><!-- /grid-a -->
</div>
<div data-role="collapsible" data-content-theme="c" data-collapsed="false" data-theme="e" id="askformorediv" style="display:none;" class="notcollapsible">
<H2>Bestellvorgang</H2>
<p>Sollen noch weitere Speisen oder Getränke bestellt werden?
<div class="ui-grid-a">
<div class="ui-block-a"><button type="submit" data-theme="d" data-icon="back" id="askformorenobtn">Nein</button></div>
<div class="ui-block-b"><button type="submit" data-theme="f" data-icon="check" id="askformoreyesbtn">Ja</button></div>
</div><!-- /grid-a -->
</div>
<div id="timecounter"></div>
</div>
<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.4.0&nbsp;&nbsp;</div>
</div><!-- /grid-a -->
</div>
</div>
<!-- Dialog page -->
<div data-role="dialog" id="sure" data-title="Entfernen?">
<div data-role="content">
<h3 class="sure-1">?</h3>
<p class="sure-2">?</p>
<a href="#" class="sure-do" data-role="button" data-theme="b" data-rel="back">Ja</a>
<a href="#" data-role="button" data-theme="c" data-rel="back">Nein</a>
</div>
</div>
</body>
</html>

100
gastsystem/install.php Normal file
View File

@ -0,0 +1,100 @@
<?php
require_once 'php/dbutils.php';
require_once 'php/config.php';
class Installer {
private static function dropTable($pdo,$tablename) {
try {
$sql = "DROP TABLE $tablename";
DbUtils::execSql($pdo, $sql, null);
} catch (Exception $e) {
// nothing - table not present or whatever...
}
}
private static function createSystemTable($pdo)
{
self::dropTable($pdo, "%ossystem%");
self::dropTable($pdo, "%gueststatus%");
self::dropTable($pdo, "%queue%");
$sql = "
CREATE TABLE `%ossystem%` (
id INT (10) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
item VARCHAR(20) NOT NULL,
value MEDIUMTEXT NULL
) CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE = InnoDb ;
";
DbUtils::execSql($pdo, $sql, null);
$sql = "INSERT INTO %ossystem% (item,value) VALUES(?,?)";
DbUtils::execSql($pdo, $sql, array('resttables',''));
DbUtils::execSql($pdo, $sql, array('timezone',''));
DbUtils::execSql($pdo, $sql, array('dailycode',''));
DbUtils::execSql($pdo, $sql, array('types',''));
DbUtils::execSql($pdo, $sql, array('products',''));
DbUtils::execSql($pdo, $sql, array('currency',''));
DbUtils::execSql($pdo, $sql, array('decpoint',''));
$sql = "
CREATE TABLE `%gueststatus%` (
id INT (10) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
item VARCHAR(20) NOT NULL,
date VARCHAR(100) NULL
) CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE = InnoDb ;
";
DbUtils::execSql($pdo, $sql, null);
$sql = "INSERT INTO %gueststatus% (item,date) VALUES(?,?)";
DbUtils::execSql($pdo, $sql, array('lastosaccess',null));
$sql = "
CREATE TABLE `%queue%` (
id INT (10) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
date DATETIME NULL,
tableid VARCHAR(10) NOT NULL,
prodid VARCHAR(20) NOT NULL,
tablecode VARCHAR(100) NOT NULL,
dailycode VARCHAR(100) NOT NULL
) CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE = InnoDb ;
";
DbUtils::execSql($pdo, $sql, null);
}
public static function install($code) {
if ($code != CODE) {
return array("status" => "ERROR", "msg" => "Falscher Installationscode!");
}
try {
$pdo = DbUtils::openDbAndReturnPdoStatic();
self::createSystemTable($pdo);
return array("status" => "OK");
} catch (Exception $ex) {
return array("status" => "ERROR", "msg" => $ex->getMessage());
}
}
}
if (isset($_POST['code'])) {
$code = $_POST['code'];
$status = Installer::install($code);
if ($status["status"] != "OK") {
echo("Ein Fehler ist aufgetreten: " . $status["msg"]);
} else {
echo("Installation war erfolgreich! Bitte install.php l&ouml;schen!!! Anschließend kamn die Applikation ohne den Zusatz 'install.php' aufgerufen werden.");
}
} else {
echo "<html>";
echo "<head><title>Installation Gastsystem</title>";
echo '<link rel="stylesheet" type="text/css" href="css/gueststyle.css?v=1.4.0">';
echo "</head>";
echo "<body><div class=surround>";
echo "<span class=headerline>Installation OrderSprinter-Gastsystem 1.4.0</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>";
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
function doAjax(a,b,e,d,c,f){if(typeof f==="undefined"){f=false}$.ajax({type:a,url:b,dataType:"json",data:e,async:f,success:function(g){if(d!=null){d(g)}},error:function(k,g,h){if(b!="php/debug.php"){var i={cmd:b,fct:d.name,xhr:k.responseText,errormsg:c,status:g};if(c!=null){var j=c+h+" ("+b+")";alert("Kommunikationsfehler zum Server: "+j)}}}})};

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 219 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 227 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 244 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 243 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 149 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 149 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 307 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 314 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 233 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 240 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 143 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 250 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 251 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 207 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 213 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 177 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 184 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 196 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 204 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 316 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 212 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 210 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 185 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 249 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 253 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 299 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 308 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 233 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 243 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 302 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 242 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 246 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 250 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 251 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 245 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 247 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 204 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 207 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 226 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 227 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 242 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 241 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 270 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 274 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 292 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 302 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 243 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 253 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 295 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 301 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 324 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 321 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 231 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 239 B

Some files were not shown because too many files have changed in this diff Show More