diff --git a/printserver/OrderSprinterPrintserver.exe b/printserver/OrderSprinterPrintserver.exe
index 2dd493c..3e5fa1a 100644
Binary files a/printserver/OrderSprinterPrintserver.exe and b/printserver/OrderSprinterPrintserver.exe differ
diff --git a/spider/install/installer.php b/spider/install/installer.php
index 8ba9b66..6e33af7 100644
--- a/spider/install/installer.php
+++ b/spider/install/installer.php
@@ -85,7 +85,7 @@ class Installer {
}
Database::dropTables($pdo);
Database::createEmptyTables($pdo, $prefix);
- Database::setVersion($pdo,$prefix,"1.3.21");
+ Database::setVersion($pdo,$prefix,"1.3.22");
Database::setAccessPassword($pdo,$prefix,$adminpass);
Database::setRefreshRate($pdo,$prefix,"5"); // default: 5 times per hour
return array("status" => "OK","msg" => "Installation successful");
diff --git a/webapp/OrderSprinterPrintserver.exe b/webapp/OrderSprinterPrintserver.exe
index 2dd493c..3e5fa1a 100644
Binary files a/webapp/OrderSprinterPrintserver.exe and b/webapp/OrderSprinterPrintserver.exe differ
diff --git a/webapp/bar.html b/webapp/bar.html
index b752462..d047211 100644
--- a/webapp/bar.html
+++ b/webapp/bar.html
@@ -5,7 +5,7 @@
-
+
diff --git a/webapp/bill.html b/webapp/bill.html
index 9c7b80c..11bb5d0 100644
--- a/webapp/bill.html
+++ b/webapp/bill.html
@@ -5,7 +5,7 @@
-
+
diff --git a/webapp/feedback.html b/webapp/feedback.html
index 11ee17e..4647f2d 100644
--- a/webapp/feedback.html
+++ b/webapp/feedback.html
@@ -4,7 +4,7 @@
-
+
diff --git a/webapp/index.html b/webapp/index.html
index 7da21e1..9c45a33 100644
--- a/webapp/index.html
+++ b/webapp/index.html
@@ -9,8 +9,8 @@
-
-
+
+
@@ -215,7 +215,7 @@ function handleResultOfInstallCheck(is_installed) {
if (is_installed == "Yes") {
useInstallation();
} else {
- setTimeout(function(){document.location.href = "install.html?v=1.3.21"},500);
+ setTimeout(function(){document.location.href = "install.html?v=1.3.22"},500);
}
}
diff --git a/webapp/install.html b/webapp/install.html
index a2cadac..8e44310 100644
--- a/webapp/install.html
+++ b/webapp/install.html
@@ -725,7 +725,7 @@ $(document).ready(function() {
|
-
+
Update... bitte warten.
|
|
diff --git a/webapp/install/installer.php b/webapp/install/installer.php
index 4543086..07536bb 100644
--- a/webapp/install/installer.php
+++ b/webapp/install/installer.php
@@ -64,7 +64,7 @@ return $pdo;
}
function checkPhpStatus() {
-$extensions = array("gd","mysqli","openssl","pdo_mysql","PDO","session","zlib","curl");
+$extensions = array("gd","mysqli","openssl","pdo_mysql","PDO","session","zlib","curl","zip","ftp");
$missing = array();
$extensions_status = 1;
@@ -2450,6 +2450,34 @@ return false;
}
+function updateUserTable1321_1322($prefix, $version, $dbname) {
+$pdo = $this->pdo;
+try {
+if ($version != "1.3.21") {
+$ret = $this->updateUserTable1320_1321($prefix, $version, $dbname);
+if (!$ret) {
+echo "Version update v1.3.20 to 1.3.21 not successful.";
+return false;
+}
+}
+
+DbUtils::overrulePrefix($prefix);
+
+$this->execSqlWithParam($pdo, "INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL,?,?)", array('tmpdir',''));
+$this->execSqlWithParam($pdo, "INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL,?,?)", array('ftphost',''));
+$this->execSqlWithParam($pdo, "INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL,?,?)", array('ftpuser',''));
+$this->execSqlWithParam($pdo, "INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL,?,?)", array('ftppass',''));
+
+$this->updateVersion($pdo, '1.3.22');
+
+return true;
+} catch (PDOException $e) {
+echo "Error in v1.3.21 to 1.3.22: $e";
+return false;
+}
+}
+
+
function setVersion($prefix,$theVersion) {
$pdo = $this->pdo;
try {
@@ -2576,7 +2604,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.3.21')");
+$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'version', '1.3.22')");
$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')");
@@ -2623,6 +2651,10 @@ $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VAL
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'hs3refresh', '60')");
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'memorylimit', '512')");
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'updateurl', 'http://www.ordersprinter.de/update')");
+$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'tmpdir', '')");
+$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'ftphost', '')");
+$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'ftpuser', '')");
+$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'ftppass', '')");
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'restaurantmode', '1')");
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'dblog', '1')");
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'priceinlist', '0')");
@@ -3016,7 +3048,7 @@ $zones[] = $timezone_identifiers[$i];
}
echo json_encode($zones);
} else if ($command == 'update') {
-$installerVersion = "1.3.21";
+$installerVersion = "1.3.22";
$admin = new InstallAdmin();
$pdo = $admin->openDbAndReturnPdo($_POST['host'],$_POST['db'],$_POST['user'],$_POST['password']);
@@ -3047,7 +3079,7 @@ $supportedVersions = array("1.0.22","1.0.23","1.0.24","1.0.25","1.0.26","1.0.27"
"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.2", "1.2.3", "1.2.4","1.2.5","1.2.6","1.2.7","1.2.8","1.2.9","1.2.10","1.2.11","1.2.12","1.2.13","1.2.14","1.2.15","1.2.16","1.2.17",
"1.2.18","1.2.19","1.2.20","1.2.21","1.2.22","1.3.0","1.3.1","1.3.2","1.3.3","1.3.4","1.3.5","1.3.6","1.3.7","1.3.8","1.3.9","1.3.10","1.3.11","1.3.12",
-"1.3.13","1.3.14","1.3.15","1.3.16","1.3.17","1.3.18","1.3.19","1.3.20"
+"1.3.13","1.3.14","1.3.15","1.3.16","1.3.17","1.3.18","1.3.19","1.3.20","1.3.21"
);
if (!in_array($version, $supportedVersions)) {
@@ -3055,7 +3087,7 @@ echo json_encode("Quellversion nicht unterstützt");
return;
}
-$ret = $admin->updateUserTable1320_1321($_POST['prefix'], $version, $_POST['db']);
+$ret = $admin->updateUserTable1321_1322($_POST['prefix'], $version, $_POST['db']);
if(session_id() == '') {
session_start();
diff --git a/webapp/kitchen.html b/webapp/kitchen.html
index 5db9e8c..4c8dff6 100644
--- a/webapp/kitchen.html
+++ b/webapp/kitchen.html
@@ -5,7 +5,7 @@
-
+
diff --git a/webapp/manager.html b/webapp/manager.html
index 4a8a4f6..09e83e6 100644
--- a/webapp/manager.html
+++ b/webapp/manager.html
@@ -5,7 +5,7 @@
-
+
@@ -204,6 +204,7 @@ var MAN_BAK_BTN = ["Sicherung (Konfiguration)","Backup (Configuration)","Exporta
var MAN_BAK_GUEST_BTN = ["Sicherung (Konfiguration + Gäste)","Backup (Configuration + guests)","Exportar (configuración y clientes)"];
var MAN_BAK_BTN_ALL = ["Sicherung (Alles ohne Logs)","Backup (all without logs)","Exportar (todo sin protocolo)"];
var MAN_BAK_BTN_ALL_LOGS = ["Sicherung (Alles mit Logs)","Backup (all with logs)","Exportar (todo y protocolo)"];
+var MAN_BAK_FTP_ALL = ["FTP-Sicherung (Alles ohne Logs)","Ftp backup (all without logs)","Ftp (todo sin protocolo)"];
var MAN_UPDATE_HEAD = ["Versionsupdate","Version update","Actualizar la versión"];
var MAN_CHECK_UPDATE_BTN = ["Update starten","Start update","Empezar actualizar"];
var MAN_UPDATE_HINT = ["Das Updaten über diesen Weg funktioniert nur, wenn die Dateien im Webverzeichnis beschreibbar sind und eine Verbindung zum OrderSprinter-Webserver besteht.",
@@ -283,6 +284,10 @@ var MAN_DISCOUNTNAME2 = ["Bezeichnung Rabatt 2","Name of discount 2","Nombre del
var MAN_DISCOUNTNAME3 = ["Bezeichnung Rabatt 3","Name of discount 3","Nombre del descuento 3"];
var MAN_MEMORYLIMIT = ["PHP Memory Limit (MB)","PHP Memory Limit (MB)","PHP Memory Limit (MB)"];
var MAN_UPDATEURL = ["Update-Server","Update server","Servidor de actualizar"];
+var MAN_TMPDIR = ["PHP-Temp-Verzeichnis","PHP temp directory","PHP Tmp"];
+var MAN_FTPHOST = ["Ftp-Server","Ftp server","Ftp servidor"];
+var MAN_FTPUSER = ["Ftp-Benutzername","Ftp user name","Ftp usario"];
+var MAN_FTPPASS = ["Ftp-Passwort","Ftp password","Ftp contraseña"];
var MAN_HS3REFRESH = ["HS/3 Updateinterval (Sek.)","HS/3 Update interval (sec.)","HS/3 Update Interval (sec)"];
var MAN_WEBIMPRESSUM = ["Webimpressum","Web company info","www café info"];
var MAN_TAX_ASSIGN = ["Umsatzsteuer-Zuweisung","Taxes assigment","Asignar impuestos"];
@@ -382,6 +387,9 @@ var MAN_DASHSLOT1 = ["Dashboard Slot 1","Dashboard Slot 1","Dashboard Slot 1"];
var MAN_DASHSLOT2 = ["Dashboard Slot 2","Dashboard Slot 2","Dashboard Slot 2"];
var MAN_DASHSLOT3 = ["Dashboard Slot 3","Dashboard Slot 3","Dashboard Slot 3"];
var MAN_CREATECLOS_TXT = ["Tageserfassung erstellen","Create closing","Crear cerramiento"];
+var MAN_TMPDIRHINT = ["Wird das PHP-Tmp-Verzeichnis angegeben, so können z.B. komprimierte Backups erstellt werden. In der Regel sollte der Default-Wert der PHP-Umgebung stimmen, aber einige Provider biegen den Pfad um, ohne die PHP-Konfiguration anzupassen!",
+ "If the PHP tmp directory is set it is possible to create compressed backups and more. Usually the default value of the PHP framework should fit, but sometimes the providers change the tmp directory without adapting the PHP framework!",
+"Si el tmp esta espcificado es posible crear backups comprimidos por ejemplo. Normalmente el valor default es corecto pero de vez en cuando los providers cambian el valor sin adaptar el PHP framework!"];
var lang = 0;
var generalVals = [12,2,0,3,0,1,1,0,0,1, 0,50,20,10,1,0,0,0,1,0,1,0,0,1,1, 1,1,1,1,1,1,1,1,1,1, 1,2,3, 1,0, 1,0];
@@ -393,6 +401,7 @@ var version = '';
var newerversionavailable = 0;
var adminIsLoggedIn = false;
var managerIsLoggedIn = false;
+var defaulttmp = '';
var generalValuesSettings = [
["usstval","MwSt","i",2,"Mehrwertsteuer ist kein Zahlenwert"],
@@ -476,6 +485,10 @@ var generalValuesSettings = [
["memorylimit",MAN_MEMORYLIMIT[lang],"i",0,""],
["updateurl",MAN_UPDATEURL[lang],"i",0,""],
+ ["tmpdir",MAN_TMPDIR[lang],"i",0,""],
+ ["ftphost",MAN_FTPHOST[lang],"i",0,""],
+ ["ftpuser",MAN_FTPUSER[lang],"i",0,""],
+ ["ftppass",MAN_FTPPASS[lang],"i",0,""],
["hs3refresh",MAN_HS3REFRESH[lang],"i",0,""],
["dashslot1",MAN_DASHSLOT1[lang],"s",35],
["dashslot2",MAN_DASHSLOT2[lang],"s",36],
@@ -547,6 +560,11 @@ function setLanguage(l) {
$("#memorylimittxt").html(MAN_MEMORYLIMIT[l]);
$("#updateurltxt").html(MAN_UPDATEURL[l]);
+ $("#tmpdirtxt").html(MAN_TMPDIR[l]);
+ $("#tmpdirhint").html(MAN_TMPDIRHINT[l]);
+ $("#ftphosttxt").html(MAN_FTPHOST[l]);
+ $("#ftpusertxt").html(MAN_FTPUSER[l]);
+ $("#ftppasstxt").html(MAN_FTPPASS[l]);
$("#hs3refreshtxt").html(MAN_HS3REFRESH[l]);
$("#paydeskidtxt").html(MAN_PAYDESKID[l]);
@@ -573,7 +591,8 @@ function setLanguage(l) {
$("#backupbtntxt").html(MAN_BAK_BTN[l]);
$("#backupguestsbtntxt").html(MAN_BAK_GUEST_BTN[l]);
$("#backupbtntxtall").html(MAN_BAK_BTN_ALL[l]);
- $("#backupbtntxtalllogs").html(MAN_BAK_BTN_ALL_LOGS[l])
+ $("#backupbtntxtalllogs").html(MAN_BAK_BTN_ALL_LOGS[l]);
+ $("#backupbtnftptxtall").html(MAN_BAK_FTP_ALL[l]);
$("#golivetxt").html(MAN_GO_LIVE[l]);
$("#shutdownbtntxt").html(MAN_SHUTDOWN[l]);
@@ -840,6 +859,8 @@ function insertGeneralConfigItems(configResult) {
generalVals[40] = values.dblog;
generalVals[41] = values.priceinlist;
+ defaulttmp = values.defaulttmp;
+
$("#smtphost").val(values.smtphost);
$("#partOfSmtpauth").html(createSMTPAuth(values.smtpauth));
$("#smtpuser").val(values.smtpuser);
@@ -854,6 +875,10 @@ function insertGeneralConfigItems(configResult) {
$("#memorylimit").val(values.memorylimit);
$("#updateurl").val(values.updateurl);
+ $("#tmpdir").val(values.tmpdir);
+ $("#ftphost").val(values.ftphost);
+ $("#ftpuser").val(values.ftpuser);
+ $("#ftppass").val(values.ftppass);
$("#hs3refresh").val(values.hs3refresh);
$("#paydeskid").val(values.paydeskid);
@@ -1177,7 +1202,7 @@ function initRestoreFileUpload() {
var settings = {
url: "php/contenthandler.php?module=admin&command=restore",
method: "POST",
- allowedTypes:"json",
+ allowedTypes:"json,zip",
fileName: "userfile",
multiple: false,
uploadQueueOrder: 'replace',
@@ -1192,7 +1217,7 @@ function initRestoreFileUpload() {
} else {
alert("Import war erfolgreich.");
setTimeout(function(){
- document.location.href = "index.html?v=1.3.21";
+ document.location.href = "index.html?v=1.3.22";
},250);
}
},
@@ -1570,6 +1595,12 @@ function binding() {
window.location.href = "php/contenthandler.php?module=admin&command=backup&type=alllogs";
});
+ $("#backup_btnftpall").off("click").on("click", function (e) {
+ e.stopImmediatePropagation();
+ e.preventDefault();
+ doAjax("GET","php/contenthandler.php?module=admin&command=ftpbackup&type=all",null,handleFtpResult,null);
+ });
+
$("#backupguests_btn").off("click").on("click", function (e) {
e.stopImmediatePropagation();
e.preventDefault();
@@ -1655,7 +1686,12 @@ function binding() {
doAjax("POST","php/contenthandler.php?module=admin&command=assignTaxes",data,confirmMsg,"Problem Steuersatzzuweisung");
});
-
+ $("#defaulttmpbtn").off("click").on("click", function (e) {
+ e.stopImmediatePropagation();
+ e.preventDefault();
+ $("#tmpdir").val(defaulttmp);
+ $("#tmpdir").data("changed",true);
+ });
bindSelectionsWithActions();
}
@@ -1682,6 +1718,14 @@ function insertAvailableUpdateVersion(answer) {
}
}
+function handleFtpResult(answer) {
+ if (answer.status != "OK") {
+ alert("Error: " + answer.msg);
+ return;
+ }
+ alert("Aktion durchgeführt");
+}
+
function handleUpdateCheckResult(answer) {
if (answer.status != "OK") {
alert("Error: " + answer.msg);
@@ -1713,9 +1757,9 @@ function handleUpdateCheckResult(answer) {
var millis=getMillis();
setTimeout(function(){
- document.location.href = "install.html?v=1.3.21&mode=onlyupdate&n=" + millis;
+ document.location.href = "install.html?v=1.3.22&mode=onlyupdate&n=" + millis;
},250);
- document.location.href = "install.html?v=1.3.21&mode=onlyupdate&n=" + millis;
+ document.location.href = "install.html?v=1.3.22&mode=onlyupdate&n=" + millis;
}
function handleUpdateReplace(answer) {
@@ -2545,7 +2589,7 @@ function createClosingPart (aText,id,totalsum,cashsum,usersums,taxessums,cashops
var receiverEmail = $("#receiveremail").val();
closingPart += '