OrderSprinter 1.2.3
This commit is contained in:
parent
2eeba2d580
commit
e120d901e7
|
@ -5,7 +5,7 @@
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||||
<meta name="author" content="Stefan Pichel">
|
<meta name="author" content="Stefan Pichel">
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.2">
|
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.3">
|
||||||
|
|
||||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
||||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||||
|
@ -109,7 +109,7 @@ function initializeEverything() {
|
||||||
</ul>
|
</ul>
|
||||||
</div><!-- /panel -->
|
</div><!-- /panel -->
|
||||||
<div data-role="header" data-theme="b" data-position="fixed" id="headerline">
|
<div data-role="header" data-theme="b" data-position="fixed" id="headerline">
|
||||||
<h1>Bar</h1>
|
<h1>Bar <img src="img/printerstatus.png" class="printerstatus" style="display:none;" /></h1>
|
||||||
<div data-type="horizontal" style="top:0px;position:absolute;float:right;z-index:10;display:inline;" align="right" class="ui-btn-right">
|
<div data-type="horizontal" style="top:0px;position:absolute;float:right;z-index:10;display:inline;" align="right" class="ui-btn-right">
|
||||||
<a href="#" data-role="button" data-icon="arrow-d" data-ajax="false" id="menuswitch">Module</a>
|
<a href="#" data-role="button" data-icon="arrow-d" data-ajax="false" id="menuswitch">Module</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||||
<meta name="author" content="Stefan Pichel">
|
<meta name="author" content="Stefan Pichel">
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.2">
|
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.3">
|
||||||
|
|
||||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
||||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||||
|
@ -434,7 +434,7 @@ $(document).on("pageinit", "#bill-page", function () {
|
||||||
</ul>
|
</ul>
|
||||||
</div><!-- /panel -->
|
</div><!-- /panel -->
|
||||||
<div data-role="header" data-theme="b" data-position="fixed" id="theheader">
|
<div data-role="header" data-theme="b" data-position="fixed" id="theheader">
|
||||||
<h1><span id="billtitletxt">Kassenbons</span></h1>
|
<h1><span id="billtitletxt">Kassenbons</span> <img src="img/printerstatus.png" class="printerstatus" style="display:none;" /></h1>
|
||||||
<div data-type="horizontal" style="top:0px;position:absolute;float:right;z-index:10;display:inline;" align="right" class="ui-btn-right">
|
<div data-type="horizontal" style="top:0px;position:absolute;float:right;z-index:10;display:inline;" align="right" class="ui-btn-right">
|
||||||
<a href="#" data-role="button" data-icon="arrow-d" data-ajax="false" id="menuswitch"><span id="modulstxt2">Module</span></a>
|
<a href="#" data-role="button" data-icon="arrow-d" data-ajax="false" id="menuswitch"><span id="modulstxt2">Module</span></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -4,7 +4,7 @@
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.2">
|
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.3">
|
||||||
|
|
||||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
||||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 511 B |
|
@ -7,8 +7,8 @@
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||||
<meta name="author" content="Stefan Pichel">
|
<meta name="author" content="Stefan Pichel">
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.2">
|
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.3">
|
||||||
<link rel="stylesheet" type="text/css" href="css/numfield.css?v=1.2.2">
|
<link rel="stylesheet" type="text/css" href="css/numfield.css?v=1.2.3">
|
||||||
|
|
||||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
||||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||||
|
@ -225,7 +225,7 @@ $(document).on("pageinit", "#index-page", function () {
|
||||||
</ul>
|
</ul>
|
||||||
</div><!-- /panel -->
|
</div><!-- /panel -->
|
||||||
<div data-role="header" data-theme="b" data-position="fixed" id="theheader">
|
<div data-role="header" data-theme="b" data-position="fixed" id="theheader">
|
||||||
<h1>OrderSprinter</h1>
|
<h1>OrderSprinter <img src="img/printerstatus.png" class="printerstatus" style="display:none;" /></h1>
|
||||||
<div data-type="horizontal" style="top:0px;position:absolute;float:right;z-index:10;display:inline;" align="right" class="ui-btn-right">
|
<div data-type="horizontal" style="top:0px;position:absolute;float:right;z-index:10;display:inline;" align="right" class="ui-btn-right">
|
||||||
<a href="#" data-role="button" data-icon="arrow-d" data-ajax="false" id="menuswitch">Module</a>
|
<a href="#" data-role="button" data-icon="arrow-d" data-ajax="false" id="menuswitch">Module</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -679,7 +679,7 @@ $(document).ready(function() {
|
||||||
<tr id=updateline>
|
<tr id=updateline>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
<td align=center>
|
<td align=center>
|
||||||
<button id="updatebtn">Update -> 1.2.2</button>
|
<button id="updatebtn">Update -> 1.2.3</button>
|
||||||
</td>
|
</td>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -1285,6 +1285,25 @@ return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function updateUserTable1202_1203($prefix, $version, $dbname) {
|
||||||
|
$pdo = $this->pdo;
|
||||||
|
try {
|
||||||
|
if ($version != "1.2.2") {
|
||||||
|
$ret = $this->updateUserTable1201_1202($prefix, $version, $dbname);
|
||||||
|
if (!$ret) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
DbUtils::overrulePrefix($prefix);
|
||||||
|
|
||||||
|
$this->updateVersion($pdo, '1.2.3');
|
||||||
|
return true;
|
||||||
|
} catch (PDOException $e) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function setVersion($prefix,$theVersion) {
|
function setVersion($prefix,$theVersion) {
|
||||||
$pdo = $this->pdo;
|
$pdo = $this->pdo;
|
||||||
try {
|
try {
|
||||||
|
@ -1397,7 +1416,7 @@ $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VAL
|
||||||
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'billlanguage', $billlanguage)");
|
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'billlanguage', $billlanguage)");
|
||||||
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'currency', '$currency')");
|
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'currency', '$currency')");
|
||||||
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'receiptfontsize', '12')");
|
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'receiptfontsize', '12')");
|
||||||
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'version', '1.2.2')");
|
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'version', '1.2.3')");
|
||||||
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'paymentconfig', '0')");
|
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'paymentconfig', '0')");
|
||||||
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'remoteaccesscode', null)");
|
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'remoteaccesscode', null)");
|
||||||
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'decpoint', '$decpoint')");
|
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'decpoint', '$decpoint')");
|
||||||
|
@ -1762,7 +1781,7 @@ $zones[] = $timezone_identifiers[$i];
|
||||||
}
|
}
|
||||||
echo json_encode($zones);
|
echo json_encode($zones);
|
||||||
} else if ($command == 'update') {
|
} else if ($command == 'update') {
|
||||||
$installerVersion = "1.2.2";
|
$installerVersion = "1.2.3";
|
||||||
|
|
||||||
$admin = new InstallAdmin();
|
$admin = new InstallAdmin();
|
||||||
$pdo = $admin->openDbAndReturnPdo($_POST['host'],$_POST['db'],$_POST['user'],$_POST['password']);
|
$pdo = $admin->openDbAndReturnPdo($_POST['host'],$_POST['db'],$_POST['user'],$_POST['password']);
|
||||||
|
@ -1792,7 +1811,7 @@ $supportedVersions = array("1.0.22","1.0.23","1.0.24","1.0.25","1.0.26","1.0.27"
|
||||||
"1.0.40","1.0.41","1.0.42","1.0.43",
|
"1.0.40","1.0.41","1.0.42","1.0.43",
|
||||||
"1.1.0","1.1.1","1.1.2","1.1.3","1.1.4","1.1.5","1.1.6","1.1.7","1.1.8", "1.1.9","1.1.10","1.1.11","1.1.12","1.1.13","1.1.14","1.1.15","1.1.16","1.1.17",
|
"1.1.0","1.1.1","1.1.2","1.1.3","1.1.4","1.1.5","1.1.6","1.1.7","1.1.8", "1.1.9","1.1.10","1.1.11","1.1.12","1.1.13","1.1.14","1.1.15","1.1.16","1.1.17",
|
||||||
"1.1.18","1.1.19","1.1.20","1.1.21","1.1.22","1.1.23","1.1.24","1.1.25","1.1.26","1.1.27","1.1.28","1.1.29","1.1.30",
|
"1.1.18","1.1.19","1.1.20","1.1.21","1.1.22","1.1.23","1.1.24","1.1.25","1.1.26","1.1.27","1.1.28","1.1.29","1.1.30",
|
||||||
"1.2.0","1.2.1"
|
"1.2.0","1.2.1","1.2.2"
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!in_array($version, $supportedVersions)) {
|
if (!in_array($version, $supportedVersions)) {
|
||||||
|
@ -1800,7 +1819,7 @@ echo json_encode("Quellversion nicht unterstützt");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$ret = $admin->updateUserTable1201_1202($_POST['prefix'], $version, $_POST['db']);
|
$ret = $admin->updateUserTable1202_1203($_POST['prefix'], $version, $_POST['db']);
|
||||||
|
|
||||||
if(session_id() == '') {
|
if(session_id() == '') {
|
||||||
session_start();
|
session_start();
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||||
<meta name="author" content="Stefan Pichel">
|
<meta name="author" content="Stefan Pichel">
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.2">
|
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.3">
|
||||||
|
|
||||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
||||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||||
|
@ -111,7 +111,7 @@ function initializeEverything() {
|
||||||
</ul>
|
</ul>
|
||||||
</div><!-- /panel -->
|
</div><!-- /panel -->
|
||||||
<div data-role="header" data-theme="b" data-position="fixed" id="headerline">
|
<div data-role="header" data-theme="b" data-position="fixed" id="headerline">
|
||||||
<h1><span id="moduleheadline">Küche</span></h1>
|
<h1><span id="moduleheadline">Küche</span> <img src="img/printerstatus.png" class="printerstatus" style="display:none;" /></h1>
|
||||||
<div data-type="horizontal" style="top:0px;position:absolute;float:right;z-index:10;display:inline;" align="right" class="ui-btn-right">
|
<div data-type="horizontal" style="top:0px;position:absolute;float:right;z-index:10;display:inline;" align="right" class="ui-btn-right">
|
||||||
<a href="#" data-role="button" data-icon="arrow-d" data-ajax="false" id="menuswitch">Module</a>
|
<a href="#" data-role="button" data-icon="arrow-d" data-ajax="false" id="menuswitch">Module</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||||
<meta name="author" content="Stefan Pichel">
|
<meta name="author" content="Stefan Pichel">
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.2">
|
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.3">
|
||||||
|
|
||||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
||||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||||
|
@ -2194,7 +2194,7 @@ $(document).on("pageinit", "#admin-page", function () {
|
||||||
</div><!-- /panel -->
|
</div><!-- /panel -->
|
||||||
|
|
||||||
<div data-role="header" data-theme="b" data-position="fixed" id="theheader" class="noprint">
|
<div data-role="header" data-theme="b" data-position="fixed" id="theheader" class="noprint">
|
||||||
<h1>Administration</h1>
|
<h1>Administration <img src="img/printerstatus.png" class="printerstatus" style="display:none;" /></h1>
|
||||||
<div data-type="horizontal" style="top:0px;position:absolute;float:right;z-index:10;display:inline;" align="right" class="ui-btn-right">
|
<div data-type="horizontal" style="top:0px;position:absolute;float:right;z-index:10;display:inline;" align="right" class="ui-btn-right">
|
||||||
<a href="#" data-role="button" data-icon="arrow-d" data-ajax="false" id="menuswitch">Module</a>
|
<a href="#" data-role="button" data-icon="arrow-d" data-ajax="false" id="menuswitch">Module</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -69,7 +69,9 @@ class Admin {
|
||||||
"getPreferTableMap" => array("loggedin" => 1, "isadmin" => 0, "rights" => null),
|
"getPreferTableMap" => array("loggedin" => 1, "isadmin" => 0, "rights" => null),
|
||||||
"getKeepTypeLevel" => array("loggedin" => 1, "isadmin" => 0, "rights" => null),
|
"getKeepTypeLevel" => array("loggedin" => 1, "isadmin" => 0, "rights" => null),
|
||||||
"getApplyExtrasBtnPos" => array("loggedin" => 1, "isadmin" => 0, "rights" => null),
|
"getApplyExtrasBtnPos" => array("loggedin" => 1, "isadmin" => 0, "rights" => null),
|
||||||
"isInstalled" => array("loggedin" => 0, "isadmin" => 0, "rights" => null)
|
"isInstalled" => array("loggedin" => 0, "isadmin" => 0, "rights" => null),
|
||||||
|
|
||||||
|
"isPrinterServerActive" => array("loggedin" => 1, "isadmin" => 0, "rights" => null)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
@ -252,6 +254,8 @@ class Admin {
|
||||||
}
|
}
|
||||||
} else if ($command == 'isInstalled') {
|
} else if ($command == 'isInstalled') {
|
||||||
$this->isInstalled();
|
$this->isInstalled();
|
||||||
|
} else if ($command == 'isPrinterServerActive') {
|
||||||
|
$this->isPrinterServerActive();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo "Command not supported.";
|
echo "Command not supported.";
|
||||||
|
@ -274,6 +278,43 @@ class Admin {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function isPrinterServerActive() {
|
||||||
|
$TIMEOUT = 20;
|
||||||
|
$active = json_encode(array("status" => "OK","msg" => 1));
|
||||||
|
$notActive = json_encode(array("status" => "OK","msg" => 0));
|
||||||
|
// check printmode
|
||||||
|
$pdo = DbUtils::openDbAndReturnPdoStatic();
|
||||||
|
$printMode = $this->getValueFromConfigTable($pdo,'payprinttype');
|
||||||
|
if ($printMode != "s") {
|
||||||
|
echo $active;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql = "SELECT count(id) as countid FROM %work% WHERE item=?";
|
||||||
|
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
||||||
|
$stmt->execute(array('lastprtserveraccess'));
|
||||||
|
$row = $stmt->fetchObject();
|
||||||
|
if ($row->countid == 0) {
|
||||||
|
echo $notActive;
|
||||||
|
} else {
|
||||||
|
$sql = "SELECT value FROM %work% WHERE item=?";
|
||||||
|
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
||||||
|
$stmt->execute(array('lastprtserveraccess'));
|
||||||
|
$row = $stmt->fetchObject();
|
||||||
|
$lastaccess = $row->value;
|
||||||
|
|
||||||
|
date_default_timezone_set(DbUtils::getTimeZone());
|
||||||
|
$date = new DateTime();
|
||||||
|
$currentTimeStamp = $date->getTimestamp();
|
||||||
|
|
||||||
|
if (($currentTimeStamp - $lastaccess) > $TIMEOUT) {
|
||||||
|
echo $notActive;
|
||||||
|
} else {
|
||||||
|
echo $active;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function isUserAlreadyLoggedInForPhp() {
|
function isUserAlreadyLoggedInForPhp() {
|
||||||
if(session_id() == '') {
|
if(session_id() == '') {
|
||||||
session_start();
|
session_start();
|
||||||
|
@ -996,7 +1037,7 @@ class Admin {
|
||||||
$view = "preferences.html";
|
$view = "preferences.html";
|
||||||
}
|
}
|
||||||
|
|
||||||
echo json_encode($view . "?v=1.2.2");
|
echo json_encode($view . "?v=1.2.3");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1210,19 +1251,19 @@ class Admin {
|
||||||
$right_rating = $_SESSION['right_rating'];
|
$right_rating = $_SESSION['right_rating'];
|
||||||
|
|
||||||
if (!self::isOnlyRatingUser($rights, $right_rating, true)) {
|
if (!self::isOnlyRatingUser($rights, $right_rating, true)) {
|
||||||
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waitertxt[$lang], "link" => "waiter.html?v=1.2.2"); };
|
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waitertxt[$lang], "link" => "waiter.html?v=1.2.3"); };
|
||||||
if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.2.2"); };
|
if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.2.3"); };
|
||||||
if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.2.2"); };
|
if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.2.3"); };
|
||||||
if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.2.2"); };
|
if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.2.3"); };
|
||||||
if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html?v=1.2.2"); };
|
if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html?v=1.2.3"); };
|
||||||
if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.2.2"); };
|
if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.2.3"); };
|
||||||
if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.2.2"); };
|
if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.2.3"); };
|
||||||
if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.2.2"); };
|
if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.2.3"); };
|
||||||
if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.2.2"); };
|
if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.2.3"); };
|
||||||
if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=1.2.2"); };
|
if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=1.2.3"); };
|
||||||
if ($_SESSION['right_manager'] || $_SESSION['is_admin'] || $_SESSION['right_closing']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=1.2.2"); };
|
if ($_SESSION['right_manager'] || $_SESSION['is_admin'] || $_SESSION['right_closing']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=1.2.3"); };
|
||||||
$mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.2.2");
|
$mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.2.3");
|
||||||
$mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.2.2");
|
$mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.2.3");
|
||||||
}
|
}
|
||||||
|
|
||||||
$mainMenu[] = array("name" => $logout[$lang], "link" => "logout.php");
|
$mainMenu[] = array("name" => $logout[$lang], "link" => "logout.php");
|
||||||
|
@ -1231,7 +1272,7 @@ class Admin {
|
||||||
$waiterMessage = $this->getMessage(null, "waitermessage");
|
$waiterMessage = $this->getMessage(null, "waitermessage");
|
||||||
}
|
}
|
||||||
// CAUTION: change version also in config.txt!!!
|
// CAUTION: change version also in config.txt!!!
|
||||||
$mainMenuAndVersion = array ("version" => "OrderSprinter 1.2.2",
|
$mainMenuAndVersion = array ("version" => "OrderSprinter 1.2.3",
|
||||||
"user" => $currentUser,
|
"user" => $currentUser,
|
||||||
"menu" => $mainMenu,
|
"menu" => $mainMenu,
|
||||||
"waitermessage" => $waiterMessage,
|
"waitermessage" => $waiterMessage,
|
||||||
|
|
|
@ -74,6 +74,25 @@ class PrintQueue {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function saveLastPrintServerAccess($pdo) {
|
||||||
|
date_default_timezone_set(DbUtils::getTimeZone());
|
||||||
|
$date = new DateTime();
|
||||||
|
$unixTimeStamp = $date->getTimestamp();
|
||||||
|
$sql = "SELECT count(id) as countid FROM %work% WHERE item=?";
|
||||||
|
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
||||||
|
$stmt->execute(array('lastprtserveraccess'));
|
||||||
|
$row = $stmt->fetchObject();
|
||||||
|
if ($row->countid == 0) {
|
||||||
|
$sql = "INSERT INTO %work% (item,value,signature) VALUES(?,?,?)";
|
||||||
|
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
||||||
|
$stmt->execute(array('lastprtserveraccess',$unixTimeStamp,null));
|
||||||
|
} else {
|
||||||
|
$sql = "UPDATE %work% SET value=? WHERE item=?";
|
||||||
|
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
||||||
|
$stmt->execute(array($unixTimeStamp,'lastprtserveraccess'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function testConnection($md5pass) {
|
function testConnection($md5pass) {
|
||||||
header( "Expires: Mon, 20 Dec 1998 01:00:00 GMT" );
|
header( "Expires: Mon, 20 Dec 1998 01:00:00 GMT" );
|
||||||
header( "Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT" );
|
header( "Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT" );
|
||||||
|
@ -348,6 +367,7 @@ class PrintQueue {
|
||||||
if ($isCorrect) {
|
if ($isCorrect) {
|
||||||
ob_start();
|
ob_start();
|
||||||
$pdo = $this->dbutils->openDbAndReturnPdo();
|
$pdo = $this->dbutils->openDbAndReturnPdo();
|
||||||
|
$this->saveLastPrintServerAccess($pdo);
|
||||||
|
|
||||||
$closing = new Closing();
|
$closing = new Closing();
|
||||||
$sql = "SELECT id,content,type,printer FROM %printjobs% WHERE type=? ORDER BY id";
|
$sql = "SELECT id,content,type,printer FROM %printjobs% WHERE type=? ORDER BY id";
|
||||||
|
@ -387,6 +407,7 @@ class PrintQueue {
|
||||||
$printersArr = explode ( ',', $printers );
|
$printersArr = explode ( ',', $printers );
|
||||||
|
|
||||||
$pdo = $this->dbutils->openDbAndReturnPdo();
|
$pdo = $this->dbutils->openDbAndReturnPdo();
|
||||||
|
$this->saveLastPrintServerAccess($pdo);
|
||||||
|
|
||||||
$template = $this->getTemplate($pdo, "rectemplate");
|
$template = $this->getTemplate($pdo, "rectemplate");
|
||||||
|
|
||||||
|
@ -439,6 +460,7 @@ class PrintQueue {
|
||||||
|
|
||||||
if ($isCorrect) {
|
if ($isCorrect) {
|
||||||
$pdo = $this->dbutils->openDbAndReturnPdo();
|
$pdo = $this->dbutils->openDbAndReturnPdo();
|
||||||
|
$this->saveLastPrintServerAccess($pdo);
|
||||||
|
|
||||||
$bigFontWorkReceipt = $this->getBigFontWorkReceiptSetting($pdo);
|
$bigFontWorkReceipt = $this->getBigFontWorkReceiptSetting($pdo);
|
||||||
$templatekey = "foodtemplate";
|
$templatekey = "foodtemplate";
|
||||||
|
@ -480,8 +502,10 @@ class PrintQueue {
|
||||||
function deletePrintJob($pass,$id) {
|
function deletePrintJob($pass,$id) {
|
||||||
$isCorrect = $this->isPasswordCorrect($pass,false);
|
$isCorrect = $this->isPasswordCorrect($pass,false);
|
||||||
if ($isCorrect) {
|
if ($isCorrect) {
|
||||||
$sql = "DELETE FROM %printjobs% WHERE id=?";
|
|
||||||
$pdo = $this->dbutils->openDbAndReturnPdo();
|
$pdo = $this->dbutils->openDbAndReturnPdo();
|
||||||
|
$this->saveLastPrintServerAccess($pdo);
|
||||||
|
$sql = "DELETE FROM %printjobs% WHERE id=?";
|
||||||
|
|
||||||
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
|
$stmt = $pdo->prepare($this->dbutils->resolveTablenamesInSqlString($sql));
|
||||||
$stmt->execute(array($id));
|
$stmt->execute(array($id));
|
||||||
echo json_encode(array("status" => "OK", "code" => OK, "msg" => "Druckauftrag erfolgreich gelöscht."));
|
echo json_encode(array("status" => "OK", "code" => OK, "msg" => "Druckauftrag erfolgreich gelöscht."));
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||||
<meta name="author" content="Stefan Pichel">
|
<meta name="author" content="Stefan Pichel">
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.2">
|
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.3">
|
||||||
|
|
||||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
||||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||||
<meta name="author" content="Stefan Pichel">
|
<meta name="author" content="Stefan Pichel">
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.2">
|
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.3">
|
||||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
||||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||||
|
|
||||||
|
@ -900,7 +900,7 @@ function setLanguage(language) {
|
||||||
</ul>
|
</ul>
|
||||||
</div><!-- /panel -->
|
</div><!-- /panel -->
|
||||||
<div data-role="header" data-theme="b" data-position="fixed" id="theheader">
|
<div data-role="header" data-theme="b" data-position="fixed" id="theheader">
|
||||||
<h1><span id="prodtitletxt">Angebot</span></h1>
|
<h1><span id="prodtitletxt">Angebot</span> <img src="img/printerstatus.png" class="printerstatus" style="display:none;" /></h1>
|
||||||
<div data-type="horizontal" style="top:0px;position:absolute;float:right;z-index:10;display:inline;" align="right" class="ui-btn-right">
|
<div data-type="horizontal" style="top:0px;position:absolute;float:right;z-index:10;display:inline;" align="right" class="ui-btn-right">
|
||||||
<a href="#" data-role="button" data-icon="arrow-d" data-ajax="false" id="menuswitch">Module</a>
|
<a href="#" data-role="button" data-icon="arrow-d" data-ajax="false" id="menuswitch">Module</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||||
<meta name="author" content="Stefan Pichel">
|
<meta name="author" content="Stefan Pichel">
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.2">
|
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.3">
|
||||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
||||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||||
<meta name="author" content="Stefan Pichel">
|
<meta name="author" content="Stefan Pichel">
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.2">
|
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.3">
|
||||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
||||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||||
|
|
||||||
|
@ -224,7 +224,7 @@ function setLanguage(language) {
|
||||||
</ul>
|
</ul>
|
||||||
</div><!-- /panel -->
|
</div><!-- /panel -->
|
||||||
<div data-role="header" data-theme="b" data-position="fixed" id="theheader">
|
<div data-role="header" data-theme="b" data-position="fixed" id="theheader">
|
||||||
<h1><span id="reportttitletxt">Statistik</span></h1>
|
<h1><span id="reportttitletxt">Statistik</span> <img src="img/printerstatus.png" class="printerstatus" style="display:none;" /></h1>
|
||||||
<div data-type="horizontal" style="top:0px;position:absolute;float:right;z-index:10;display:inline;" align="right" class="ui-btn-right">
|
<div data-type="horizontal" style="top:0px;position:absolute;float:right;z-index:10;display:inline;" align="right" class="ui-btn-right">
|
||||||
<a href="#" data-role="button" data-icon="arrow-d" data-ajax="false" id="menuswitch">Module</a>
|
<a href="#" data-role="button" data-icon="arrow-d" data-ajax="false" id="menuswitch">Module</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||||
<meta name="author" content="Stefan Pichel">
|
<meta name="author" content="Stefan Pichel">
|
||||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.2">
|
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.3">
|
||||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
||||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||||
|
|
||||||
|
@ -547,7 +547,7 @@ $(document).on("pagebeforeshow", "#changeres-page", function () {
|
||||||
</ul>
|
</ul>
|
||||||
</div><!-- /panel -->
|
</div><!-- /panel -->
|
||||||
<div data-role="header" data-theme="b" data-position="fixed" id="theheader">
|
<div data-role="header" data-theme="b" data-position="fixed" id="theheader">
|
||||||
<h1><span id="restitletxt">Reservierung</span></h1>
|
<h1><span id="restitletxt">Reservierung</span> <img src="img/printerstatus.png" class="printerstatus" style="display:none;" /></h1>
|
||||||
<div data-type="horizontal" style="top:0px;position:absolute;float:right;z-index:10;display:inline;" align="right" class="ui-btn-right">
|
<div data-type="horizontal" style="top:0px;position:absolute;float:right;z-index:10;display:inline;" align="right" class="ui-btn-right">
|
||||||
<a href="#" data-role="button" data-icon="arrow-d" data-ajax="false" id="menuswitch"><span id="modulstxt2">Module</span></a>
|
<a href="#" data-role="button" data-icon="arrow-d" data-ajax="false" id="menuswitch"><span id="modulstxt2">Module</span></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||||
<meta name="author" content="Stefan Pichel">
|
<meta name="author" content="Stefan Pichel">
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.2">
|
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.2.3">
|
||||||
|
|
||||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
||||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||||
|
@ -273,7 +273,7 @@ function initializeEverything() {
|
||||||
</ul>
|
</ul>
|
||||||
</div><!-- /panel -->
|
</div><!-- /panel -->
|
||||||
<div data-role="header" data-theme="b" data-position="fixed">
|
<div data-role="header" data-theme="b" data-position="fixed">
|
||||||
<h1><span id="supplyheadline">Bereitstellung</span></h1>
|
<h1><span id="supplyheadline">Bereitstellung</span> <img src="img/printerstatus.png" class="printerstatus" style="display:none;" /></h1>
|
||||||
<div data-type="horizontal" style="top:0px;position:absolute;float:right;z-index:10;display:inline;" align="right" class="ui-btn-right">
|
<div data-type="horizontal" style="top:0px;position:absolute;float:right;z-index:10;display:inline;" align="right" class="ui-btn-right">
|
||||||
<a href="#" data-role="button" data-icon="arrow-d" data-ajax="false" id="menuswitch">Module</a>
|
<a href="#" data-role="button" data-icon="arrow-d" data-ajax="false" id="menuswitch">Module</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -36,6 +36,24 @@ function initializeMainMenu(menuid) {
|
||||||
doAjax("POST","php/contenthandler.php?module=admin&command=setLastModuleOfUser",
|
doAjax("POST","php/contenthandler.php?module=admin&command=setLastModuleOfUser",
|
||||||
{ view: view}, null, "Problem Benutzerdatenpflege");
|
{ view: view}, null, "Problem Benutzerdatenpflege");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
intervalGetPrinterStatus(5);
|
||||||
|
}
|
||||||
|
|
||||||
|
function intervalGetPrinterStatus(seconds) {
|
||||||
|
var fetchTimer = setInterval(function() {
|
||||||
|
doAjax("GET","php/contenthandler.php?module=admin&command=isPrinterServerActive",null,setPrinterStatus,null,true);
|
||||||
|
}, seconds * 1000);
|
||||||
|
}
|
||||||
|
|
||||||
|
function setPrinterStatus(answer) {
|
||||||
|
if (answer.status === "OK") {
|
||||||
|
if (answer.msg === 0) {
|
||||||
|
$(".printerstatus").show();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$(".printerstatus").hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
function hideMenu() {
|
function hideMenu() {
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue