OrderSprinter 1.3.8
This commit is contained in:
parent
82309eed7e
commit
619fc68a10
Binary file not shown.
|
@ -85,7 +85,7 @@ class Installer {
|
|||
}
|
||||
Database::dropTables($pdo);
|
||||
Database::createEmptyTables($pdo, $prefix);
|
||||
Database::setVersion($pdo,$prefix,"1.3.7");
|
||||
Database::setVersion($pdo,$prefix,"1.3.8");
|
||||
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.
|
@ -5,9 +5,9 @@
|
|||
<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.3.7">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.8">
|
||||
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
||||
<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" />
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
<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.3.7">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.8">
|
||||
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
||||
<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" />
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v={VERSION}">
|
||||
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
||||
<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" />
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
<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.3.7">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.8">
|
||||
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
||||
<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" />
|
||||
|
|
|
@ -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.3.7">
|
||||
<link rel="stylesheet" type="text/css" href="css/numfield.css?v=1.3.7">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.8">
|
||||
<link rel="stylesheet" type="text/css" href="css/numfield.css?v=1.3.8">
|
||||
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/jquery.mobile.icons.min.css" />
|
||||
|
@ -203,7 +203,7 @@ function handleResultOfInstallCheck(is_installed) {
|
|||
if (is_installed == "Yes") {
|
||||
useInstallation();
|
||||
} else {
|
||||
setTimeout(function(){document.location.href = "install.html?v=1.3.7"},500);
|
||||
setTimeout(function(){document.location.href = "install.html?v=1.3.8"},500);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -47,7 +47,8 @@ var NOTWRITEABLE = ["Nicht beschreibbar","No write access","Imposible sobrescrib
|
|||
var WORKING = ["Arbeitet...","Working...","Trabajando..."];
|
||||
var DB_SETTING_WRONG = ["Datenbank-Angaben falsch","Data base values wrong","Datos de la base de datos falsos"];
|
||||
var ERROR = ["Installation/Update nicht erfolgreich: ", "Install/Update not performed: ", "Problema con el update/instal: "];
|
||||
var UPDATE_OK = ["Update erfolgreich! Bitte install-Verzeichnis löschen.","Update successful! Please remove install directory.","Update completo. Esta recomendado removar el fichero 'install'"]
|
||||
var UPDATE_OK = ["Update erfolgreich! Bitte install-Verzeichnis löschen.","Update successful! Please remove install directory.","Update completo. Esta recomendado removar el fichero 'install'"];
|
||||
var AUTO_UPDATE_OK = ["Update erfolgreich! Bitte vergessen Sie nicht, auch den Printserver zu updaten, wenn Sie dessen neuen Funktionen nutzen möchten.","Update successful! Please do not forget to update the printservers if you want to use its new features.","Update completo. No olvide el printserver si quiere usa sus funciones nuevas."];
|
||||
|
||||
var SAMPLE_HEADLINE = ["Sie können die Datenbank mit Beispieldaten füllen. Diese können später beliebig wieder in der Verwaltungs- und Angebotsansicht verändert werden.",
|
||||
"You can fill the data base with sample data. The content can later be changed in the manager and product view.",
|
||||
|
@ -104,6 +105,7 @@ var NOT_ALL_PHP_OK = ["Die Installation kann trotzdem fortgesetzt werden. Bitte
|
|||
var lang = 0;
|
||||
var workflow = 1;
|
||||
var timezone = "Europe/Berlin";
|
||||
var doOnlyUpdate = false;
|
||||
|
||||
function setLanguage(langIndex) {
|
||||
lang = langIndex;
|
||||
|
@ -289,7 +291,8 @@ function startupdateajax(cmd) {
|
|||
db: $("#db_name").val(),
|
||||
user: $("#dbuser").val(),
|
||||
password: $("#dbpass").val(),
|
||||
prefix: $("#table_prefix").val()
|
||||
prefix: $("#table_prefix").val(),
|
||||
autoupdate: (doOnlyUpdate ? 1 : 0)
|
||||
}
|
||||
doAjax("POST",
|
||||
"install/installer.php?command=" + cmd,
|
||||
|
@ -358,9 +361,17 @@ function startinstall() {
|
|||
}
|
||||
|
||||
function resultOfUpdate(jsonAnswer) {
|
||||
$("#updateinprogresstxt").hide();
|
||||
if (jsonAnswer == "OK") {
|
||||
if (!doOnlyUpdate) {
|
||||
// REM* update the normal way
|
||||
alert(UPDATE_OK[lang]);
|
||||
setTimeout(function(){document.location.href = "index.html"},500);
|
||||
} else {
|
||||
// REM* auto update
|
||||
alert(AUTO_UPDATE_OK[lang]);
|
||||
}
|
||||
|
||||
setTimeout(function(){document.location.href = "index.html";},500);
|
||||
} else {
|
||||
alert(ERROR[lang] + jsonAnswer);
|
||||
}
|
||||
|
@ -553,6 +564,17 @@ function insertTimeZones(zones) {
|
|||
$("#zoneselection").html(options);
|
||||
}
|
||||
|
||||
function checkDoOnlyUpdate() {
|
||||
var urlsuffix = location.search;
|
||||
var suffices = urlsuffix.split('&');
|
||||
for(var i=0;i<suffices.length;i++) {
|
||||
if ((suffices[i] == 'mode=onlyupdate') || (suffices[i] == '?mode=onlyupdate')) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
setLanguage(0);
|
||||
binding();
|
||||
|
@ -561,15 +583,7 @@ $(document).ready(function() {
|
|||
|
||||
getTimeZones();
|
||||
|
||||
var urlsuffix = location.search;
|
||||
var suffices = urlsuffix.split('&');
|
||||
var doOnlyUpdate = false;
|
||||
for(var i=0;i<suffices.length;i++) {
|
||||
if ((suffices[i] == 'mode=onlyupdate') || (suffices[i] == '?mode=onlyupdate')) {
|
||||
doOnlyUpdate = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
doOnlyUpdate = checkDoOnlyUpdate();
|
||||
|
||||
if (doOnlyUpdate) {
|
||||
$("#languagesettings").hide();
|
||||
|
@ -586,7 +600,9 @@ $(document).ready(function() {
|
|||
$("#dbpass").prop('disabled', true);
|
||||
$("#table_prefix").prop('disabled', true);
|
||||
|
||||
$("#updatebtn").height("70px");
|
||||
$("#updatebtn").hide();
|
||||
$("#updateinprogresstxt").show();
|
||||
startupdateajax("update");
|
||||
|
||||
} else {
|
||||
$("#languagesettings").show();
|
||||
|
@ -709,7 +725,8 @@ $(document).ready(function() {
|
|||
<tr id=updateline>
|
||||
<td> </td>
|
||||
<td align=center>
|
||||
<button id="updatebtn">Update -> 1.3.7</button>
|
||||
<button id="updatebtn">Update -> 1.3.8</button>
|
||||
<span id="updateinprogresstxt" style="display:none;">Update... bitte warten.</span>
|
||||
</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
|
|
|
@ -1959,6 +1959,43 @@ return false;
|
|||
}
|
||||
}
|
||||
|
||||
function updateUserTable1307_1308($prefix, $version, $dbname) {
|
||||
$pdo = $this->pdo;
|
||||
try {
|
||||
if ($version != "1.3.7") {
|
||||
$ret = $this->updateUserTable1306_1307($prefix, $version, $dbname);
|
||||
if (!$ret) {
|
||||
echo "Version update v1.3.6 to 1.3.7 not successful.";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
DbUtils::overrulePrefix($prefix);
|
||||
|
||||
$sql = "SHOW COLUMNS FROM %user% LIKE 'mobiletheme'";
|
||||
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
||||
$stmt->execute();
|
||||
$result = $stmt->fetchAll();
|
||||
if (count($result) == 0) {
|
||||
$sql = "ALTER TABLE %user% ADD mobiletheme INT(2) NULL AFTER language";
|
||||
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
||||
$stmt->execute();
|
||||
}
|
||||
|
||||
$sql = "INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL,?,?)";
|
||||
$stmt = $pdo->prepare($this->basedb->resolveTablenamesInSqlString($sql));
|
||||
$stmt->execute(array('discountname1',''));
|
||||
$stmt->execute(array('discountname2',''));
|
||||
$stmt->execute(array('discountname3',''));
|
||||
|
||||
$this->updateVersion($pdo, '1.3.8');
|
||||
return true;
|
||||
} catch (PDOException $e) {
|
||||
echo "Error in v1.3.7 to 1.3.8: $e";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function setVersion($prefix,$theVersion) {
|
||||
$pdo = $this->pdo;
|
||||
|
@ -2085,7 +2122,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.7')");
|
||||
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'version', '1.3.8')");
|
||||
$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')");
|
||||
|
@ -2133,6 +2170,10 @@ $this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VAL
|
|||
$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 , 'returntoorder', '1')");
|
||||
|
||||
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'discountname1', '')");
|
||||
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'discountname2', '')");
|
||||
$this->basedb->doSQL($pdo,"INSERT INTO `%config%` (`id` , `name`, `setting`) VALUES (NULL , 'discountname3', '')");
|
||||
|
||||
// prepare for later inconsistency check if version is obsolete
|
||||
date_default_timezone_set($timezone);
|
||||
$installDate = date('Y-m-d H:i:s');
|
||||
|
@ -2469,7 +2510,7 @@ $zones[] = $timezone_identifiers[$i];
|
|||
}
|
||||
echo json_encode($zones);
|
||||
} else if ($command == 'update') {
|
||||
$installerVersion = "1.3.7";
|
||||
$installerVersion = "1.3.8";
|
||||
|
||||
$admin = new InstallAdmin();
|
||||
$pdo = $admin->openDbAndReturnPdo($_POST['host'],$_POST['db'],$_POST['user'],$_POST['password']);
|
||||
|
@ -2499,7 +2540,7 @@ $supportedVersions = array("1.0.22","1.0.23","1.0.24","1.0.25","1.0.26","1.0.27"
|
|||
"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.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.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"
|
||||
);
|
||||
|
||||
if (!in_array($version, $supportedVersions)) {
|
||||
|
@ -2507,13 +2548,27 @@ echo json_encode("Quellversion nicht unterstützt");
|
|||
return;
|
||||
}
|
||||
|
||||
$ret = $admin->updateUserTable1306_1307($_POST['prefix'], $version, $_POST['db']);
|
||||
$ret = $admin->updateUserTable1307_1308($_POST['prefix'], $version, $_POST['db']);
|
||||
|
||||
if(session_id() == '') {
|
||||
session_start();
|
||||
}
|
||||
session_destroy();
|
||||
|
||||
$autoupdate = $_POST["autoupdate"];
|
||||
try {
|
||||
if ($autoupdate == 1) {
|
||||
unlink("../install/installer.php");
|
||||
if (file_exists("../install/phpinfo.php")) {
|
||||
unlink("../install/phpinfo.php");
|
||||
}
|
||||
rmdir("../install");
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
echo json_encode("Install-Verzeichnis lässt sich nicht löschen: ". $e->getMessage());
|
||||
return;
|
||||
}
|
||||
|
||||
if ($ret) {
|
||||
$admin->writeConfigFile($_POST['host'],$_POST['db'],$_POST['user'],$_POST['password'],$_POST['prefix']);
|
||||
echo json_encode("OK");
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
<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.3.7">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.8">
|
||||
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
||||
<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" />
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
<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.3.7">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.8">
|
||||
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
||||
<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" />
|
||||
|
@ -270,6 +270,9 @@ var MAN_SMTPUSER = ["SMTP-Benutzername","SMTP User name","SMTP usario"];
|
|||
var MAN_SMTPPASS = ["SMTP-Passwort","SMTP password","SMTP contraseña"];
|
||||
var MAN_SMTPSECURE = ["SMTP-Protokoll","SMTP Protocol","SMTP Seguridad"];
|
||||
var MAN_SMTPPORT = ["SMTP-Port","SMTP Port","SMTP Port"];
|
||||
var MAN_DISCOUNTNAME1 = ["Bezeichnung Rabatt 1","Name of discount 1","Nombre del descuento 1"];
|
||||
var MAN_DISCOUNTNAME2 = ["Bezeichnung Rabatt 2","Name of discount 2","Nombre del descuento 2"];
|
||||
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_HS3REFRESH = ["HS/3 Updateinterval (Sek.)","HS/3 Update interval (sec.)","HS/3 Update Interval (sec)"];
|
||||
|
@ -343,7 +346,6 @@ var MAN_DEL_HINT = ["Zum Löschen anklicken","Click to delete","Click para remov
|
|||
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 det 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."]
|
||||
var MAN_DO_UPDATESTEP = ["Die Dateien wurden hochgeladen. Es findet eine Weiterleitung auf die Installationsseite statt. Klicken Sie dort auf den Update-Button!","The files have been uploaded. You will be forwarded to the install page. Please click on the update button there!","Los ficheros estan aquí ahora. La página de install es el proximo paso donde puedes click on el boton 'update'!"];
|
||||
|
||||
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];
|
||||
|
@ -414,6 +416,10 @@ var generalValuesSettings = [
|
|||
["hsoutfile",MAN_HSOUTFILE[lang],"i",0],
|
||||
["hscurrency",MAN_HSCURRENCY[lang],"i",0],
|
||||
|
||||
["discountname1",MAN_DISCOUNTNAME1[lang],"i",0,""],
|
||||
["discountname2",MAN_DISCOUNTNAME2[lang],"i",0,""],
|
||||
["discountname3",MAN_DISCOUNTNAME3[lang],"i",0,""],
|
||||
|
||||
["memorylimit",MAN_MEMORYLIMIT[lang],"i",0,""],
|
||||
["updateurl",MAN_UPDATEURL[lang],"i",0,""],
|
||||
["hs3refresh",MAN_HS3REFRESH[lang],"i",0,""]
|
||||
|
@ -469,6 +475,10 @@ function setLanguage(l) {
|
|||
$("#smtppasstxt").html(MAN_SMTPPASS[l]);
|
||||
$("#smtpporttxt").html(MAN_SMTPPORT[l]);
|
||||
|
||||
$("#discountname1txt").html(MAN_DISCOUNTNAME1[l]);
|
||||
$("#discountname2txt").html(MAN_DISCOUNTNAME2[l]);
|
||||
$("#discountname3txt").html(MAN_DISCOUNTNAME3[l]);
|
||||
|
||||
$("#memorylimittxt").html(MAN_MEMORYLIMIT[l]);
|
||||
$("#updateurltxt").html(MAN_UPDATEURL[l]);
|
||||
$("#hs3refreshtxt").html(MAN_HS3REFRESH[l]);
|
||||
|
@ -715,6 +725,10 @@ function insertGeneralConfigItems(configResult) {
|
|||
$("#partOfSmtpsecure").html(createSMTPSecure(values.smtpsecure));
|
||||
$("#smtpport").val(values.smtpport);
|
||||
|
||||
$("#discountname1").val(values.discountname1);
|
||||
$("#discountname2").val(values.discountname2);
|
||||
$("#discountname3").val(values.discountname3);
|
||||
|
||||
$("#memorylimit").val(values.memorylimit);
|
||||
$("#updateurl").val(values.updateurl);
|
||||
$("#hs3refresh").val(values.hs3refresh);
|
||||
|
@ -820,7 +834,7 @@ function createDiscountPart(label,nameOnGui,generalValIndex) {
|
|||
var html = '<div class="ui-field-contain">';
|
||||
html += '<label for="' + label + '">' + nameOnGui[lang] + ':</label>';
|
||||
html += '<select name="' + label + '" id="' + label + '" data-theme="e">';
|
||||
for($i=10;$i<=100;$i+=10) {
|
||||
for($i=5;$i<=100;$i+=5) {
|
||||
html += '<option value="' + $i + '"' + isSelectedOption($i,generalVals[generalValIndex]) + '>' + $i + '</option>';
|
||||
}
|
||||
html += '</select></div>';
|
||||
|
@ -1368,7 +1382,7 @@ function binding() {
|
|||
if (availVersion == version) {
|
||||
alert("Update not possible (versions do not differ): " + version);
|
||||
} else {
|
||||
doAjax("GET","php/contenthandler.php?module=updater&command=updatecheck",null,handleUpdateCheckResult,"Skriptproblem");
|
||||
doAjax("GET","php/updatehandler.php?command=updatecheck",null,handleUpdateCheckResult,"Skriptproblem");
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -1454,7 +1468,7 @@ function getVersionInfoForUpdate() {
|
|||
n: getMillis()
|
||||
};
|
||||
|
||||
doAjax("GET","php/contenthandler.php?module=updater&command=getAvailableVersion",data,insertAvailableUpdateVersion,null,true);
|
||||
doAjax("GET","php/updatehandler.php?command=getAvailableVersion",data,insertAvailableUpdateVersion,null,true);
|
||||
}
|
||||
|
||||
function insertAvailableUpdateVersion(answer) {
|
||||
|
@ -1490,15 +1504,15 @@ function handleUpdateCheckResult(answer) {
|
|||
millis: getMillis(),
|
||||
totalLines: totalLines
|
||||
};
|
||||
doAjax("GET","php/contenthandler.php?module=updater&command=replace",data,handleUpdateReplace,"Replace problem",null,false);
|
||||
doAjax("GET","php/updatehandler.php?command=replace",data,handleUpdateReplace,"Replace problem",null,false);
|
||||
}
|
||||
|
||||
$("#sliderarea").hide();
|
||||
|
||||
alert(MAN_DO_UPDATESTEP[lang]);
|
||||
|
||||
var millis=getMillis();
|
||||
setTimeout(function(){document.location.href = "install.html?v=1.3.7&mode=onlyupdate&n=" + millis},250);
|
||||
setTimeout(function(){
|
||||
document.location.href = "install.html?v=1.3.8&mode=onlyupdate&n=" + millis;
|
||||
},250);
|
||||
}
|
||||
|
||||
function handleUpdateReplace(answer) {
|
||||
|
@ -1510,7 +1524,7 @@ function handleUpdateReplace(answer) {
|
|||
var index = parseInt(answer.msg.index) + 1;
|
||||
var file = answer.msg.file;
|
||||
var totalLines = parseInt(answer.msg.totalLines);
|
||||
var porc = index * 100 / totalLines;
|
||||
var porc = Math.round(index * 100 / totalLines);
|
||||
|
||||
$("#updatestatus").html(porc + "% (" + toHtml(file) + ")");
|
||||
$("#updateslider").val(porc);
|
||||
|
@ -2826,6 +2840,19 @@ $(document).on("pageinit", "#admin-page", function () {
|
|||
<div id="partOfDiscount2"></div>
|
||||
<div id="partOfDiscount3"></div>
|
||||
|
||||
<div data-role="fieldcontain">
|
||||
<label for="discountname1"><span id="discountname1txt">Rabattname 1:</span></label>
|
||||
<input type="text" value="" data-mini="true" placeholder="256" id="discountname1" data-theme="c" class="genConfigEl"/>
|
||||
</div>
|
||||
<div data-role="fieldcontain">
|
||||
<label for="discountname2"><span id="discountname2txt">Rabattname 2:</span></label>
|
||||
<input type="text" value="" data-mini="true" placeholder="256" id="discountname2" data-theme="c" class="genConfigEl"/>
|
||||
</div>
|
||||
<div data-role="fieldcontain">
|
||||
<label for="discountname3"><span id="discountname3txt">Rabattname 3:</span></label>
|
||||
<input type="text" value="" data-mini="true" placeholder="256" id="discountname3" data-theme="c" class="genConfigEl"/>
|
||||
</div>
|
||||
|
||||
<div id="partOfHotelInterface"></div>
|
||||
<div id="hs3area">
|
||||
<div data-role="fieldcontain">
|
||||
|
|
|
@ -5,8 +5,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.3.7">
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.8">
|
||||
<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" />
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -67,16 +67,19 @@ class Admin {
|
|||
"setOrderVolume" => array("loggedin" => 1, "isadmin" => 0, "rights" => null),
|
||||
"setPreferTableMap" => array("loggedin" => 1, "isadmin" => 0, "rights" => null),
|
||||
"setKeepTypeLevel" => array("loggedin" => 1, "isadmin" => 0, "rights" => null),
|
||||
"setMobileTheme" => array("loggedin" => 1, "isadmin" => 0, "rights" => null),
|
||||
"setApplyExtrasBtnPos" => array("loggedin" => 1, "isadmin" => 0, "rights" => null),
|
||||
"getOrderVolume" => array("loggedin" => 1, "isadmin" => 0, "rights" => null),
|
||||
"getButtonSizes" => array("loggedin" => 1, "isadmin" => 0, "rights" => null),
|
||||
"getPreferTableMap" => array("loggedin" => 1, "isadmin" => 0, "rights" => null),
|
||||
"getKeepTypeLevel" => array("loggedin" => 1, "isadmin" => 0, "rights" => null),
|
||||
"getMobileTheme" => array("loggedin" => 1, "isadmin" => 0, "rights" => null),
|
||||
"getApplyExtrasBtnPos" => array("loggedin" => 1, "isadmin" => 0, "rights" => null),
|
||||
"isInstalled" => array("loggedin" => 0, "isadmin" => 0, "rights" => null),
|
||||
|
||||
"isPrinterServerActive" => array("loggedin" => 1, "isadmin" => 0, "rights" => null),
|
||||
"getWaiterMessage" => array("loggedin" => 1, "isadmin" => 0, "rights" => null)
|
||||
"getWaiterMessage" => array("loggedin" => 1, "isadmin" => 0, "rights" => null),
|
||||
"getmobilecss" => array("loggedin" => 0, "isadmin" => 0, "rights" => null)
|
||||
);
|
||||
|
||||
|
||||
|
@ -240,6 +243,10 @@ class Admin {
|
|||
if ($this->isUserAlreadyLoggedInForPhp()) {
|
||||
$this->setKeepTypeLevel($_POST['keeptypelevel']);
|
||||
}
|
||||
} else if ($command == 'setMobileTheme') {
|
||||
if ($this->isUserAlreadyLoggedInForPhp()) {
|
||||
$this->setMobileTheme($_POST['mobiletheme']);
|
||||
}
|
||||
} else if ($command == 'setApplyExtrasBtnPos') {
|
||||
if ($this->isUserAlreadyLoggedInForPhp()) {
|
||||
$this->setExtrasApplyBtnPos($_POST['applyextrasbtnpos']);
|
||||
|
@ -260,6 +267,12 @@ class Admin {
|
|||
if ($this->isUserAlreadyLoggedInForPhp()) {
|
||||
$this->getKeepTypeLevel();
|
||||
}
|
||||
} else if ($command == 'getmobilecss') {
|
||||
$this->getmobilecss();
|
||||
} else if ($command == 'getMobileTheme') {
|
||||
if ($this->isUserAlreadyLoggedInForPhp()) {
|
||||
$this->getMobileTheme();
|
||||
}
|
||||
} else if ($command == 'getApplyExtrasBtnPos') {
|
||||
if ($this->isUserAlreadyLoggedInForPhp()) {
|
||||
$this->getApplyExtrasBtnPos();
|
||||
|
@ -606,6 +619,30 @@ class Admin {
|
|||
self::getUserValue('keeptypelevel',1);
|
||||
}
|
||||
|
||||
function getmobilecss() {
|
||||
$cssFile = "orderstyle.min.css";
|
||||
if (isset($_SESSION['userid'])) {
|
||||
$userid = $_SESSION['userid'];
|
||||
$pdo = DbUtils::openDbAndReturnPdoStatic();
|
||||
$sql = "SELECT mobiletheme FROM %user% WHERE id=?";
|
||||
$mobileTheme = CommonUtils::getRowSqlObject($pdo, $sql, array($userid));
|
||||
$cssFile = "orderstyle.min.css";
|
||||
if ($mobileTheme->mobiletheme == 1) {
|
||||
$cssFile = "orderstyle-pale.min.css";
|
||||
}
|
||||
}
|
||||
|
||||
$file = "3rdparty/orderstyle/$cssFile";
|
||||
|
||||
header('Content-type: text/css');
|
||||
|
||||
readfile($file);
|
||||
}
|
||||
|
||||
function getMobileTheme() {
|
||||
self::getUserValue('mobiletheme', 0);
|
||||
}
|
||||
|
||||
function getApplyExtrasBtnPos() {
|
||||
self::getUserValue('extrasapplybtnpos', 1);
|
||||
}
|
||||
|
@ -635,6 +672,9 @@ class Admin {
|
|||
function setKeepTypeLevel($preferValue) {
|
||||
self::setUserValue('keeptypelevel',$preferValue);
|
||||
}
|
||||
function setMobileTheme($preferValue) {
|
||||
self::setUserValue('mobiletheme', $preferValue);
|
||||
}
|
||||
function setExtrasApplyBtnPos($preferValue) {
|
||||
self::setUserValue('extrasapplybtnpos',$preferValue);
|
||||
}
|
||||
|
@ -717,7 +757,7 @@ class Admin {
|
|||
return;
|
||||
}
|
||||
|
||||
$configItems = join(",",array("'decpoint'","'version'","'cancelunpaidcode'","'tax'","'togotax'","'taxaustrianormal'","'taxaustriaerm1'","'taxaustriaerm2'","'taxaustriaspecial'","'currency'","'workflowconfig'","'prominentsearch'","'discount1'","'discount2'","'discount3'","'waitergopayprint'","'cashenabled'","'returntoorder'","'restaurantmode'"));
|
||||
$configItems = join(",",array("'decpoint'","'version'","'cancelunpaidcode'","'tax'","'togotax'","'taxaustrianormal'","'taxaustriaerm1'","'taxaustriaerm2'","'taxaustriaspecial'","'currency'","'workflowconfig'","'prominentsearch'","'discount1'","'discount2'","'discount3'","'discountname1'","'discountname2'","'discountname3'","'waitergopayprint'","'cashenabled'","'returntoorder'","'restaurantmode'"));
|
||||
$sql = "select name,setting FROM %config% WHERE name in ($configItems)";
|
||||
$stmt = $pdo->prepare(DbUtils::substTableAlias($sql));
|
||||
$stmt->execute();
|
||||
|
@ -829,6 +869,10 @@ class Admin {
|
|||
$smtpport = CommonUtils::getConfigValue($pdo,"smtpport","");
|
||||
}
|
||||
|
||||
$discountname1 = trim(CommonUtils::getConfigValue($pdo, "discountname1", ''));
|
||||
$discountname2 = trim(CommonUtils::getConfigValue($pdo, "discountname2", ''));
|
||||
$discountname3 = trim(CommonUtils::getConfigValue($pdo, "discountname3", ''));
|
||||
|
||||
$memorylimit = CommonUtils::getConfigValue($pdo,"memorylimit",256);
|
||||
$updateurl = CommonUtils::getConfigValue($pdo,"updateurl","");
|
||||
$hs3refresh = CommonUtils::getConfigValue($pdo, "hs3refresh", 60);
|
||||
|
@ -867,7 +911,8 @@ class Admin {
|
|||
"austria" => $austria, "digigopaysetready" => $digigopaysetready, "waitergopayprint" => $waitergopayprint, "oneprodworkreceipts" => $oneprodworkreceipts,
|
||||
"digiprintwork" => $digiprintwork, "memorylimit" => $memorylimit, "updateurl" => $updateurl, "hs3refresh" => $hs3refresh,
|
||||
"paydeskid" => $paydeskid, "aeskey" => $aeskey, "certificatesn" => $certificatesn, "rksvserver" => $rksvserver, "addreceipttoprinter" => $addreceipttoprinter,
|
||||
"printandqueuejobs" => $printandqueuejobs, "cashenabled" => $cashenabled, "returntoorder" => $returntoorder, "beepcooked" => $beepcooked,"restaurantmode" => $restaurantmode
|
||||
"printandqueuejobs" => $printandqueuejobs, "cashenabled" => $cashenabled, "returntoorder" => $returntoorder, "beepcooked" => $beepcooked,"restaurantmode" => $restaurantmode,
|
||||
"discountname1" => $discountname1,"discountname2" => $discountname2,"discountname3" => $discountname3
|
||||
);
|
||||
|
||||
if ($forHtml) {
|
||||
|
@ -957,7 +1002,7 @@ class Admin {
|
|||
$view = "preferences.html";
|
||||
}
|
||||
|
||||
echo json_encode($view . "?v=1.3.7");
|
||||
echo json_encode($view . "?v=1.3.8");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1159,25 +1204,25 @@ 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.3.7"); };
|
||||
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waitertxt[$lang], "link" => "waiter.html?v=1.3.8"); };
|
||||
} else {
|
||||
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waiterdesktxt[$lang], "link" => "waiterdesktop.php?v=1.3.7"); };
|
||||
if ($_SESSION['right_waiter']) { $mainMenu[] = array("name" => $waiterdesktxt[$lang], "link" => "waiterdesktop.php?v=1.3.8"); };
|
||||
}
|
||||
if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.3.7"); };
|
||||
if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.3.7"); };
|
||||
if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.3.7"); };
|
||||
if ($_SESSION['right_kitchen']) { $mainMenu[] = array("name" => $kitchentxt[$lang], "link" => "kitchen.html?v=1.3.8"); };
|
||||
if ($_SESSION['right_bar']) { $mainMenu[] = array("name" => "Bar", "link" => "bar.html?v=1.3.8"); };
|
||||
if ($_SESSION['right_supply']) { $mainMenu[] = array("name" => $supplytxt[$lang], "link" => "supplydesk.html?v=1.3.8"); };
|
||||
if ($_SESSION['modus'] == 0) {
|
||||
if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html?v=1.3.7"); };
|
||||
if ($_SESSION['right_paydesk']) { $mainMenu[] = array("name" => $paydesktxt[$lang], "link" => "paydesk.html?v=1.3.8"); };
|
||||
}
|
||||
if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.3.7"); };
|
||||
if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.3.7"); };
|
||||
if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.3.7"); };
|
||||
if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.3.7"); };
|
||||
if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=1.3.7"); };
|
||||
if ($_SESSION['right_customers']) { $mainMenu[] = array("name" => $customerstxt[$lang], "link" => "customers.html?v=1.3.7"); };
|
||||
if ($_SESSION['right_manager'] || $_SESSION['is_admin'] || $_SESSION['right_closing']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=1.3.7"); };
|
||||
$mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.3.7");
|
||||
$mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.3.7");
|
||||
if ($_SESSION['right_statistics']) { $mainMenu[] = array("name" => $stattxt[$lang], "link" => "reports.html?v=1.3.8"); };
|
||||
if ($_SESSION['right_bill']) { $mainMenu[] = array("name" => $bontxt[$lang], "link" => "bill.html?v=1.3.8"); };
|
||||
if ($_SESSION['right_products']) { $mainMenu[] = array("name" => $prodtxt[$lang], "link" => "products.html?v=1.3.8"); };
|
||||
if ($_SESSION['right_reservation']) { $mainMenu[] = array("name" => $restxt[$lang], "link" => "reservation.html?v=1.3.8"); };
|
||||
if ($_SESSION['right_rating']) { $mainMenu[] = array("name" => $ratingtxt[$lang], "link" => "rating.html?v=1.3.8"); };
|
||||
if ($_SESSION['right_customers']) { $mainMenu[] = array("name" => $customerstxt[$lang], "link" => "customers.html?v=1.3.8"); };
|
||||
if ($_SESSION['right_manager'] || $_SESSION['is_admin'] || $_SESSION['right_closing']) { $mainMenu[] = array("name" => $admintxt[$lang], "link" => "manager.html?v=1.3.8"); };
|
||||
$mainMenu[] = array("name" => $settingtxt[$lang], "link" => "preferences.html?v=1.3.8");
|
||||
$mainMenu[] = array("name" => "Feedback", "link" => "feedback.html?v=1.3.8");
|
||||
}
|
||||
|
||||
$mainMenu[] = array("name" => $logout[$lang], "link" => "logout.php");
|
||||
|
@ -1185,7 +1230,7 @@ class Admin {
|
|||
|
||||
$waiterMessage = $this->getMessage(null, "waitermessage");
|
||||
}
|
||||
$mainMenuAndVersion = array ("version" => "OrderSprinter 1.3.7",
|
||||
$mainMenuAndVersion = array ("version" => "OrderSprinter 1.3.8",
|
||||
"user" => $currentUser,
|
||||
"menu" => $mainMenu,
|
||||
"waitermessage" => $waiterMessage,
|
||||
|
@ -1470,6 +1515,10 @@ class Admin {
|
|||
"smtpsecure" => array("dbcol" => "smtpsecure","checknum" => 1),
|
||||
"smtpport" => array("dbcol" => "smtpport","checknum" => 0),
|
||||
|
||||
"discountname1" => array("dbcol" => "discountname1","checknum" => 0),
|
||||
"discountname2" => array("dbcol" => "discountname2","checknum" => 0),
|
||||
"discountname3" => array("dbcol" => "discountname3","checknum" => 0),
|
||||
|
||||
"memorylimit" => array("dbcol" => "memorylimit","checknum" => 0),
|
||||
"updateurl" => array("dbcol" => "updateurl","checknum" => 0),
|
||||
"hs3refresh" => array("dbcol" => "hs3refresh","checknum" => 0),
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
<?php
|
||||
|
||||
require_once ('dbutils.php');
|
||||
require_once ('commonutils.php');
|
||||
require_once ('updater.php');
|
||||
|
||||
$command = $_GET["command"];
|
||||
|
||||
$updater = new Updater();
|
||||
$updater->handleCommand($command);
|
||||
|
||||
?>
|
|
@ -31,7 +31,6 @@ class Updater {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
private static function getFile($url,$file,$asArray = false,$timeout = 200) {
|
||||
$ctx = stream_context_create(array('http' =>
|
||||
array(
|
||||
|
@ -39,6 +38,40 @@ class Updater {
|
|||
)
|
||||
));
|
||||
|
||||
$url = $url . "/downloader.php?file=" . $file;
|
||||
|
||||
try {
|
||||
$infoFile = file_get_contents($url, false, $ctx);
|
||||
$test = substr($infoFile, 1,50);
|
||||
if ($infoFile != FALSE) {
|
||||
if ($asArray) {
|
||||
$retArr = array();
|
||||
$lines = explode("\n", $infoFile);
|
||||
|
||||
foreach($lines as $aLine) {
|
||||
$l = trim($aLine);
|
||||
if ($l != '') {
|
||||
$retArr[] = $l;
|
||||
}
|
||||
}
|
||||
return array("status" => "OK","msg" => $retArr);
|
||||
} else {
|
||||
return array("status" => "OK","msg" => $infoFile);
|
||||
}
|
||||
} else {
|
||||
return array("status" => "ERROR","msg" => "File to replace not found ($url)");
|
||||
}
|
||||
} catch (Exception $ex) {
|
||||
return array("status" => "ERROR","msg" => $ex->getMessage());
|
||||
}
|
||||
}
|
||||
private static function getInfoFile($url,$file,$asArray = false,$timeout = 200) {
|
||||
$ctx = stream_context_create(array('http' =>
|
||||
array(
|
||||
'timeout' => $timeout, // seconds
|
||||
)
|
||||
));
|
||||
|
||||
$url = $url . "/" . $file;
|
||||
|
||||
try {
|
||||
|
@ -69,7 +102,7 @@ class Updater {
|
|||
return array("status" => "OK","msg" => $infoFile);
|
||||
}
|
||||
} else {
|
||||
return array("status" => "ERROR","msg" => "Info file not found");
|
||||
return array("status" => "ERROR","msg" => "File to replace not found ($url)");
|
||||
}
|
||||
} catch (Exception $ex) {
|
||||
return array("status" => "ERROR","msg" => $ex->getMessage());
|
||||
|
@ -77,7 +110,7 @@ class Updater {
|
|||
}
|
||||
private static function getAvailableVersion($pdo) {
|
||||
$url = CommonUtils::getConfigValue($pdo, "updateurl", '');
|
||||
$infoFile = self::getFile($url,'updateinfo.txt',true,3);
|
||||
$infoFile = self::getInfoFile($url,'updateinfo.txt',true,3);
|
||||
if ($infoFile["status"] != "OK") {
|
||||
return array("status" => "ERROR","msg" => "could not get info file: " . $infoFile["msg"],"url" => $url);
|
||||
}
|
||||
|
@ -92,6 +125,19 @@ class Updater {
|
|||
|
||||
|
||||
private static function doCheck($lineArr) {
|
||||
if (!is_writable("..")) {
|
||||
return array("status" => "ERROR","msg" => "Root directory not writable. But this is necessary to create and delete install directory.");
|
||||
}
|
||||
if (!file_exists("../install")) {
|
||||
if (!mkdir('../install', 0777)) {
|
||||
return array("status" => "ERROR","msg" => "Install directory could not be created.");
|
||||
}
|
||||
} else {
|
||||
if (!is_writable("../install")) {
|
||||
return array("status" => "ERROR","msg" => "Cannot write into install directory.");
|
||||
}
|
||||
}
|
||||
|
||||
if (count($lineArr) < 2) {
|
||||
return array("status" => "OK","msg" => '');
|
||||
}
|
||||
|
@ -130,7 +176,7 @@ class Updater {
|
|||
public static function updatecheck($pdo) {
|
||||
$url = CommonUtils::getConfigValue($pdo, "updateurl", '');
|
||||
|
||||
$infoFile = self::getFile($url,'updateinfo.txt',true,3);
|
||||
$infoFile = self::getInfoFile($url,'updateinfo.txt',true,3);
|
||||
if ($infoFile["status"] != "OK") {
|
||||
return array("status" => "ERROR","msg" => "could not get info file: " . $infoFile["msg"]);
|
||||
}
|
||||
|
@ -148,9 +194,9 @@ class Updater {
|
|||
|
||||
public static function replace($pdo,$fileindex,$totallines) {
|
||||
$url = CommonUtils::getConfigValue($pdo, "updateurl", '');
|
||||
$infoFile = self::getFile($url,'updateinfo.txt',true,3);
|
||||
$infoFile = self::getInfoFile($url,'updateinfo.txt',true,3);
|
||||
if ($infoFile["status"] != "OK") {
|
||||
return array("status" => "ERROR","msg" => "could not get info file: " . $infoFile["msg"]);
|
||||
return array("status" => "ERROR","msg" => "could not get file: " . $infoFile["msg"]);
|
||||
}
|
||||
$lineArr = $infoFile["msg"];
|
||||
|
||||
|
@ -160,7 +206,11 @@ class Updater {
|
|||
if (trim($fileToRead) != '') {
|
||||
$targetFile = "../" . $fileToRead;
|
||||
$fileContent = self::getFile($url, $fileToRead);
|
||||
if ($fileContent["status"] == "OK") {
|
||||
file_put_contents($targetFile, $fileContent["msg"]);
|
||||
} else {
|
||||
return array("status" => "ERROR","msg" => "$targetFile cannot be fetched from update server.");
|
||||
}
|
||||
}
|
||||
} catch (Exception $ex) {
|
||||
return array("status" => "ERROR","msg" => $ex->getMessage());
|
||||
|
|
|
@ -208,6 +208,7 @@ class Basedb {
|
|||
`lastmodule` VARCHAR ( 30 ) NULL,
|
||||
`ordervolume` INT (2) NULL,
|
||||
`language` INT (2) NULL,
|
||||
`mobiletheme` INT(2) NULL,
|
||||
`receiptprinter` INT (1) NULL,
|
||||
`roombtnsize` INT(1) NULL,
|
||||
`tablebtnsize` INT(1) NULL,
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
<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.3.7">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.8">
|
||||
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
||||
<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" />
|
||||
|
@ -61,6 +61,14 @@ var PREF_APPLY_EXTRAS_OPTION_TOP = ["Listenanfang","Start of list","Al inicio de
|
|||
var PREF_APPLY_EXTRAS_OPTION_BOTTOM = ["Listenende","End of list","Al final de la lista"];
|
||||
var PREF_APPLY_EXTRAS_OPTION_BOTH = ["Listenanfang und -ende","Start and end of list","Al inicio y final de la lista"];
|
||||
|
||||
var PREF_THEME_TITEL = ["Design","Appearance","Design"];
|
||||
var PREF_THEME = ["Mobil-Ansicht","Mobile view","Vista movíl"];
|
||||
var PREF_THEME_COLORFUL = ["bunt","colorful","colorido"];
|
||||
var PREF_THEME_PALE = ["blass","pale","pálido"];
|
||||
var PREF_THEME_HINT = ["Bitte beachten: Möglicherweise wirkt eine Änderung erst, wenn die jeweilige Ansicht im Internetbrowser erneut geladen wird (Reload-Button).",
|
||||
"It may be necessary to press the reload button of a view to get the changed design to be applied.",
|
||||
"Quizás es necesario reload las paginas despues de un cambio."];
|
||||
|
||||
var l=0;
|
||||
|
||||
function doAjaxPasswordChange(oldPass,newPass,errorMsg) {
|
||||
|
@ -88,6 +96,10 @@ function insertGeneralConfigItems(configResult) {
|
|||
}
|
||||
}
|
||||
|
||||
function reloadPageWithTimeout() {
|
||||
setTimeout(function(){document.location.href = "preferences.html"},250);
|
||||
}
|
||||
|
||||
function createLanguagePart(language) {
|
||||
var html = '<div class="ui-field-contain">';
|
||||
html += '<label for="language">' + PREF_LANGUAGE[language] + ':</label>';
|
||||
|
@ -177,6 +189,9 @@ function setLanguage(lang) {
|
|||
$("#preferktltxt").html(PREF_KTL_TITEL[lang]);
|
||||
$("#preferktldesc").html(PREF_KTL_DESC[lang]);
|
||||
|
||||
$("#preferthemetxt").html(PREF_THEME_TITEL[lang]);
|
||||
$("#preferthemehint").html(PREF_THEME_HINT[lang]);
|
||||
|
||||
initializeMainMenu("#modulemenu");
|
||||
binding();
|
||||
}
|
||||
|
@ -213,6 +228,9 @@ function setKeepTypeLevel() {
|
|||
doAjax("GET","php/contenthandler.php?module=admin&command=getKeepTypeLevel",null,fillKeepTypeLevel,"Keine Information über Bevorzugung Bestellnavigation");
|
||||
}
|
||||
|
||||
function setMobileTheme() {
|
||||
doAjax("GET","php/contenthandler.php?module=admin&command=getMobileTheme",null,fillMobileTheme,null);
|
||||
}
|
||||
function setApplyBtnPos() {
|
||||
doAjax("GET","php/contenthandler.php?module=admin&command=getApplyExtrasBtnPos",null,fillExtrasApplyBtnPosPart,"Keine Information über Position Extra-Anwenden-Button");
|
||||
}
|
||||
|
@ -260,6 +278,18 @@ function createPreferKTLPart(prefervalue,label,labeltxt) {
|
|||
return html;
|
||||
}
|
||||
|
||||
function createPreferMobileThemePart(prefervalue,label,labeltxt) {
|
||||
var html = '<div class="ui-field-contain">';
|
||||
html += '<label for="' + label + '"><span id="' + label + 'txt">' + labeltxt + '</span> :</label>';
|
||||
html += '<select name="' + label + '" id="' + label + '" data-theme="e">';
|
||||
|
||||
html += '<option value="0"' + isSelected(0,prefervalue) + '>' + PREF_THEME_COLORFUL[l] + '</option>';
|
||||
html += '<option value="1"' + isSelected(1,prefervalue) + '>' + PREF_THEME_PALE[l] + '</option>';
|
||||
|
||||
html += '</select></div>';
|
||||
return html;
|
||||
}
|
||||
|
||||
function createPreferExtrasApplyBtnPosPart(prefervalue,label,labeltxt) {
|
||||
var html = '<div class="ui-field-contain">';
|
||||
html += '<label for="' + label + '"><span id="' + label + 'txt">' + labeltxt + '</span> :</label>';
|
||||
|
@ -290,6 +320,10 @@ function fillKeepTypeLevel(preferKeepTypeLevel) {
|
|||
$("#preferktlpartbox").trigger("create");
|
||||
}
|
||||
|
||||
function fillMobileTheme(mobileTheme) {
|
||||
$("#preferthemebtnpart").html(createPreferMobileThemePart(mobileTheme, "preferthemelabel", PREF_THEME[l]));
|
||||
$("#preferthemepartbox").trigger("create");
|
||||
}
|
||||
function fillExtrasApplyBtnPosPart(applyPos) {
|
||||
$("#preferapplypospart").html(createPreferExtrasApplyBtnPosPart(applyPos, "preferapplyposlabel", PREF_APPLY_EXTRA_POS[l]));
|
||||
$("#preferktlpartbox").trigger("create");
|
||||
|
@ -375,6 +409,15 @@ function binding() {
|
|||
doAjax("POST","php/contenthandler.php?module=admin&command=setKeepTypeLevel",{keeptypelevel:newVal},handleGeneralAnswer,"Keep Type Level");
|
||||
binding();
|
||||
});
|
||||
|
||||
$("#preferthemelabel").off('change').on('change', function(e) {
|
||||
var newVal = $("#preferthemelabel").find(":selected").val();
|
||||
$("#preferthemebtnpart").html(createPreferMobileThemePart(newVal, "preferthemelabel", PREF_THEME[l]));
|
||||
$("#preferthemepartbox").trigger("create");
|
||||
doAjax("POST","php/contenthandler.php?module=admin&command=setMobileTheme",{mobiletheme:newVal},reloadPageWithTimeout,"Mobile Theme");
|
||||
binding();
|
||||
});
|
||||
|
||||
$("#preferapplyposlabel").off('change').on('change', function(e) {
|
||||
var newVal = $("#preferapplyposlabel").find(":selected").val();
|
||||
$("#preferapplypospart").html(createPreferExtrasApplyBtnPosPart(newVal, "preferapplyposlabel", PREF_APPLY_EXTRA_POS[l]));
|
||||
|
@ -393,6 +436,7 @@ $(document).on("pageinit", "#pref-page", function () {
|
|||
setButtonSizes();
|
||||
setPreferTablemap();
|
||||
setKeepTypeLevel();
|
||||
setMobileTheme();
|
||||
setApplyBtnPos();
|
||||
binding();
|
||||
});
|
||||
|
@ -460,6 +504,13 @@ $(document).on("pageinit", "#pref-page", function () {
|
|||
<div id="preferapplypospart"></div>
|
||||
</div>
|
||||
|
||||
<div id="preferthemepartbox" data-role="collapsible" data-collapsed="false" data-theme="e" data-content-theme="c" class="noprint">
|
||||
<h3><span id="preferthemetxt">Mobil-Design</span></h3>
|
||||
<p><div id="preferthemebtnpart"></div>
|
||||
<div id="preferapplythemepart"></div>
|
||||
<div id="preferthemehint">Reload nach einer Änderung drücken!</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div data-role="footer" data-theme="b" id="thefooterr">
|
||||
<div class="ui-grid-a">
|
||||
|
|
|
@ -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.3.7">
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.8">
|
||||
<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" />
|
||||
|
|
|
@ -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.3.7">
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.8">
|
||||
<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" />
|
||||
|
|
|
@ -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.3.7">
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.8">
|
||||
<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" />
|
||||
|
|
|
@ -5,8 +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.3.7">
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.8">
|
||||
<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" />
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
<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.3.7">
|
||||
<link rel="stylesheet" type="text/css" href="css/bestformat.css?v=1.3.8">
|
||||
|
||||
<link rel="stylesheet" href="php/3rdparty/orderstyle/orderstyle.min.css" />
|
||||
<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" />
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue