OrderSprinter 1.1.10

This commit is contained in:
Geno 2020-11-19 22:54:12 +01:00
parent 5afff34e69
commit cdcb55771d
22 changed files with 70 additions and 54 deletions

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.1.9">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.1.10">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />

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.1.9">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.1.10">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />

View File

@ -25,9 +25,13 @@
# dabei ist der Kurzname nur in der Kellneransicht bei der Produktauswahl zu sehen,
# anschließend wird stets der Langname angezeigt.
# Nur Kurzname und Preis (A) sind erforderlich, die anderen Teile werden bei
# Auslassung automatisch gefüllt (Preis B=C=A und Langname = Kurzname)
# Die ID muss nicht angegeben werden, in dem Fall wird das Produkt als
# neu anzulegendes Produkt behandelt.
# Auslassung automatisch gefüllt (Preis B=C=A und Langname = Kurzname).
#
# Wurde dem Produkt bereits eine ID von OrderSprinter zugewiesen, wird diese angezeigt.
# So können spätere Produktänderungen vom OrderSprinter erkannt werden.
# Es ist wichtig, keine eigenen IDs zu vergeben, denn neue IDs werden stets vom
# OrderSprinter erzeugt!
#
# Wird ein Steuersatz angegeben, der für das Produkt vorgegeben sein soll, so
# müssen auch die Preise A und B angegeben werden.
#

View File

@ -12,6 +12,10 @@
# Auslassung automatisch gefüllt (Preis B=C=A und Langname = Kurzname)
# Wird ein Steuersatz angegeben, der für das Produkt vorgegeben sein soll, so
# müssen auch die Preise A und B angegeben werden.
# Wurde dem Produkt bereits eine ID von OrderSprinter zugewiesen, wird diese angezeigt.
# So können spätere Produktänderungen vom OrderSprinter erkannt werden.
# Es ist wichtig, keine eigenen IDs zu vergeben, denn neue IDs werden stets vom
# OrderSprinter erzeugt!
#
# Bei Kategorien:
# Das Gleichheitszeichen dient als Trenner zwischen Namen und weiteren Eigenschaften.

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.1.9">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.1.10">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />

View File

@ -7,8 +7,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.1.9">
<link rel="stylesheet" type="text/css" href="css/numfield.css?v=1.1.9">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.1.10">
<link rel="stylesheet" type="text/css" href="css/numfield.css?v=1.1.10">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
@ -110,7 +110,6 @@ function displayLoginOrLogoutMask(jsonContent) {
// user needs to log in!
$("#passwordfield").val("");
$("#logoutarea").hide();
$("#invalidusercredentials").popup( "open", {transition: 'flip'} );
}
}
@ -241,7 +240,9 @@ $(document).on("pageinit", "#index-page", function () {
<form method="post">
<table border=0>
<tr><td>Username: <td id="userlist"><tr>
<tr><td>Passwort: <td><input type="password" name="password" id="passwordfield"/><tr />
<tr><td>Passwort: <td><input type="password" name="password" id="passwordfield"/>
<!-- place for info -->
<tr />
</table>
@ -297,6 +298,8 @@ $(document).on("pageinit", "#index-page", function () {
</div>
<div id=demoarea></div>
<div data-role="footer" data-theme="b" id="thefooterr">
<div class="ui-grid-a">
<div class="ui-block-a userinfo" id="loggedinuser"></div>
@ -306,16 +309,6 @@ $(document).on("pageinit", "#index-page", function () {
</div>
<div data-role="popup" id="invalidusercredentials" name="invalidusercredentials" data-overlay-theme="a" style="max-width:70%;" class="ui-corner-all">
<div data-role="header" class="ui-corner-top">
<h1>Ungültiges Passwort</h1>
</div>
<a href="#" data-rel="back" data-role="button" data-theme="a" data-icon="delete" data-iconpos="notext" class="ui-btn-right"></a>
<div data-role="content" class="ui-corner-bottom ui-content">
<p>Bitte prüfen Sie, ob Sie den richtigen Benutzer ausgewählt und das Passwort korrekt eingegeben haben.</p>
</div>
</div> <!-- popup for failed password change -->
</div>
</body>

View File

@ -679,7 +679,7 @@ $(document).ready(function() {
<tr id=updateline>
<td>&nbsp;</td>
<td align=center>
<button id="updatebtn">Update -> 1.1.9</button>
<button id="updatebtn">Update -> 1.1.10</button>
</td>
<td>&nbsp;</td>
</tr>

View File

@ -754,6 +754,18 @@ return false;
}
}
function updateUserTable1109_1110($prefix,$version) {
$ret = true;
if ($version != "1.1.9") {
$ret = $this->updateUserTable1108_1109($prefix,$version);
if (!$ret) {
return false;
}
}
$ret &= $this->setVersion($prefix, '1.1.10');
return $ret;
}
function setVersion($prefix,$theVersion) {
$pdo = $this->pdo;
try {
@ -825,7 +837,7 @@ $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VAL
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'billlanguage', $billlanguage)");
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'currency', '$currency')");
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'receiptfontsize', '12')");
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'version', '1.1.9')");
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'version', '1.1.10')");
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'paymentconfig', '0')");
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'remoteaccesscode', null)");
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'decpoint', '$decpoint')");
@ -914,7 +926,7 @@ $right_manager,$right_reservation,$right_rating,$lang,$prefertablemap) {
$md5adminpass = md5($adminpass);
$pdo = $this->pdo;
$userInsertSql = "INSERT INTO `%user%` (`id` , `username` , `userpassword`, `is_admin`, `right_waiter`,`right_kitchen`,`right_bar`,`right_supply`,`right_paydesk`,`right_statistics`,`right_bill`,`right_products`,`right_changeprice`,`right_manager`,`right_reservation`,`right_rating`,`language`,`prefertablemap`,`keeptypelevel`,`active`) VALUES (NULL,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,'1')";
$userInsertSql = "INSERT INTO `%user%` (`id` , `username` , `userpassword`, `is_admin`, `right_waiter`,`right_kitchen`,`right_bar`,`right_supply`,`right_paydesk`,`right_statistics`,`right_bill`,`right_products`,`right_changeprice`,`right_manager`,`right_reservation`,`right_rating`,`language`,`prefertablemap`,`keeptypelevel`,`extrasapplybtnpos`,`active`) VALUES (NULL,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,'1','1')";
$stmt = $pdo->prepare(DbUtils::substTableAlias($userInsertSql));
$stmt->execute(array($username,$md5adminpass,$is_admin,$right_waiter,$right_kitchen,$right_bar,$right_supply,$right_paydesk,$right_statistics,$right_bill,$right_products,$right_changeprice,$right_manager,$right_reservation,$right_rating,$lang,$prefertablemap,1));
@ -1198,7 +1210,7 @@ return;
$supportedVersions = array("1.0.22","1.0.23","1.0.24","1.0.25","1.0.26","1.0.27","1.0.28","1.0.29",
"1.0.30","1.0.31","1.0.32","1.0.33","1.0.34","1.0.35","1.0.36","1.0.37","1.0.38","1.0.39",
"1.0.40",
"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.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"
);
if (!in_array($version, $supportedVersions)) {
@ -1206,7 +1218,7 @@ echo json_encode("Quellversion nicht unterstützt");
return;
}
$ret = $admin->updateUserTable1108_1109($_POST['prefix'], $version);
$ret = $admin->updateUserTable1109_1110($_POST['prefix'], $version);
if(session_id() == '') {
session_start();

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.1.9">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.1.10">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />

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.1.9">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.1.10">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />

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.1.9">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.1.10">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />

View File

@ -275,11 +275,14 @@ class Admin {
$result = $stmt->fetchAll();
$numberOfEntries = count($result);
if ($numberOfEntries == 1) {
$zeile = $result[0];
$pass_hash = $zeile['userpassword'];
if ($zeile['is_admin'] == 0) {
// authentication-check
}
// password_verify requires PHP > 5.5, so let's use MD5 instead
// (it is no banking software...)
if (md5($password) == $pass_hash) {
@ -1102,19 +1105,19 @@ class Admin {
$right_rating = $_SESSION['right_rating'];
if (!self::isOnlyRatingUser($rights, $right_rating, true)) {
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waitertxt[$lang], "link" => "waiter.html?v=1.1.9"); };
if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.1.9"); };
if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.1.9"); };
if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.1.9"); };
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waitertxt[$lang], "link" => "waiter.html?v=1.1.10"); };
if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.1.10"); };
if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.1.10"); };
if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.1.10"); };
if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html"); };
if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.1.9"); };
if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.1.9"); };
if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.1.9"); };
if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.1.9"); };
if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=1.1.9"); };
if ($_SESSION['right_manager'] || $_SESSION['is_admin']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=1.1.9"); };
$mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.1.9");
$mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.1.9");
if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.1.10"); };
if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.1.10"); };
if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.1.10"); };
if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.1.10"); };
if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=1.1.10"); };
if ($_SESSION['right_manager'] || $_SESSION['is_admin']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=1.1.10"); };
$mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.1.10");
$mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.1.10");
}
$mainMenu[] = array("name" => $logout[$lang], "link" => "logout.php");
@ -1123,7 +1126,7 @@ class Admin {
$waiterMessage = $this->getMessage(null, "waitermessage");
}
// CAUTION: change version also in config.txt!!!
$mainMenuAndVersion = array ("version" => "OrderSprinter 1.1.9",
$mainMenuAndVersion = array ("version" => "OrderSprinter 1.1.10",
"user" => $currentUser,
"menu" => $mainMenu,
"waitermessage" => $waiterMessage,
@ -1211,8 +1214,8 @@ class Admin {
} else {
// instead if password_hash (PHP > 5.5) use MD5...
$password_hash = md5($password);
$userInsertSql = "INSERT INTO `%user%` (`id` , `username` , `userpassword`, `is_admin`, `right_waiter`,`right_kitchen`,`right_bar`,`right_supply`,`right_paydesk`,`right_statistics`,`right_bill`,`right_products`,`right_reservation`,`right_rating`,`right_changeprice`,`right_manager`,`language`,`receiptprinter`,`prefertablemap`,`keeptypelevel`,`active`) VALUES (";
$userInsertSql .= " NULL, '$username', '$password_hash' , '$isAdmin', '$rWaiter', '$rKitchen', '$rBar', '$rSupply', '$rPayDesk', '$rStat', '$rBill', '$rProducts', '$rReservation', '$rRating', '$rChangeprice', '$rManager', '$lang','1','1','1','1')";
$userInsertSql = "INSERT INTO `%user%` (`id` , `username` , `userpassword`, `is_admin`, `right_waiter`,`right_kitchen`,`right_bar`,`right_supply`,`right_paydesk`,`right_statistics`,`right_bill`,`right_products`,`right_reservation`,`right_rating`,`right_changeprice`,`right_manager`,`language`,`receiptprinter`,`prefertablemap`,`keeptypelevel`,`extrasapplybtnpos`,`active`) VALUES (";
$userInsertSql .= " NULL, '$username', '$password_hash' , '$isAdmin', '$rWaiter', '$rKitchen', '$rBar', '$rSupply', '$rPayDesk', '$rStat', '$rBill', '$rProducts', '$rReservation', '$rRating', '$rChangeprice', '$rManager', '$lang','1','1','1','1','1')";
$dbresult = $this->dbutils->performSqlCommandRetLastId($userInsertSql);
$lastId = $dbresult['id'];
echo json_encode("OK");

View File

@ -198,7 +198,7 @@ array(
)
));
$newversionavailable = file_get_contents($url, false, $ctx);
$newversionavailable = @file_get_contents($url, false, $ctx);
// TODO: has to be forwarded to user to inform him
echo json_encode(array("status" => "OK", "msg" => $content));

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.1.9">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.1.10">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />

View File

@ -7,7 +7,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.1.9">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.1.10">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />

View File

@ -7,7 +7,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.1.9">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.1.10">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />

View File

@ -7,7 +7,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="author" content="Stefan Pichel">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.1.9">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.1.10">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />

View File

@ -5,7 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta 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.1.9">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.1.10">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />

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.1.9">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.1.10">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />

View File

@ -4,7 +4,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta 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.1.9">
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.1.10">
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />