731 lines
28 KiB
HTML
731 lines
28 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="author" content="Stefan Pichel">
|
|
<title>Setup</title>
|
|
<link rel="stylesheet" type="text/css" href="css/bestformat.css">
|
|
<script src="php/3rdparty/jquery-2.0.3.min.js"></script>
|
|
<script src="utilities.js"></script>
|
|
|
|
<script>
|
|
|
|
var CURRENCY = ["Währung","Currency","Moneda"];
|
|
var CATEGORY = ["Kategorie","Category","Categoría"];
|
|
var SETTING = ["Einstellung","Setting","Configuración"];
|
|
var VALUE = ["Wert","Value","Dato"];
|
|
var DB = ["Datenbank","Data base","Base de datos"];
|
|
var DBSERVER = ["Datenbank-Server:","Data base server:", "Servidor:"];
|
|
var DBNAME = ["Datenbank-Name:","Data base name:", "Nombre:"];
|
|
var DBUSER = ["Datenbank-Benutzer:","Data base user:", "Usario:"];
|
|
var DBPASSWORD = ["Datenbank-Passwort:","Data base password:", "Contraseña:"];
|
|
var PREFIX = ["Präfix für die Tabellen:","Table prefix:", "Prefijo de la tablas:"];
|
|
var TESTDB = ["Teste DB-Zugriff", "Test db access", "Probar acceso al base de datos"];
|
|
|
|
var TESTWRITEACCESS = ["Teste Schreibberechtigung", "Test write access", "Probar derecho de sobrescribir"];
|
|
var WRITEACCESS = ["Schreibberechtigung","Write access","Permiso de sobrescribir"];
|
|
var PHPDIR = ["php-Verzeichnis","php directory","fichero php"];
|
|
|
|
var APPLICATION = ["Applikation","Application", "Aplicación"];
|
|
var LANGUAGE = ["Applikationssprache:","Application language:", "Idioma de la aplicación:"];
|
|
var DECIMALPOINT = ["Dezimaltrennzeichen:","Decimal point:", "Punto decimal:"];
|
|
var ADMINPASS = ["Administrator-Passwort:","Administrator password:", "Contraseña del administrador:"];
|
|
var ADMINPASSREPEAT = ["Administrator-Passwort (Wdh.):","Administrator password (repetition):", "Contraseña del administrador (repitición):"];
|
|
|
|
var POINTCHAR = ["Punkt","Point","Punto"];
|
|
var COMMACHAR = ["Komma","Comma","Coma"];
|
|
|
|
var STARTINSTALL = ["Starte Installation","Start installation", "Initiar instalación"];
|
|
|
|
var GERMANLANG = ["Deutsch","German","Alemán"];
|
|
var ENGLISHLANG = ["Englisch","English","Inglés"];
|
|
var SPAINLANG = ["Spanisch","Spanish","Español"];
|
|
|
|
var WRONG = ["Fehlerhaft","False","Falso"];
|
|
var NOTWRITEABLE = ["Nicht beschreibbar","No write access","Imposible sobrescribir"];
|
|
|
|
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 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.",
|
|
"Puede insertar data de ejemplo, que por supuesto puede cambiar despues en la vista de administración y productos."];
|
|
|
|
var SAMPLE_TITLE = ["Leere Installation oder mit Musterinhalt füllen?","Empty data base or fill with sample content","Base de datos vacia o con contento de ejemplo?"];
|
|
var SAMPLE_WAITER_USER = ["Wenn Sie die 2. oder 3. Option auswählen, besitzen alle Benutzer das gleiche Passwort wie das des Admins, welches im Installationsschritt festgelegt wurde!",
|
|
"If you select the second or third option all users will have the same password as the admin user whose password you specified during the installation step.",
|
|
"Si ha decidido opción 2 o 3 cada usario tiene el mismo contraseña que el admin que ha specificado durante el paso de la instalación."];
|
|
var SAMPLE_EMPTY = ["leer<br>nur Admin-Benutzer","empty<br>only admin user","vacia<br>solo usuario <i>admin</i>"];
|
|
var SAMPLE_TABLE_USER = ["6 Tische<br>Beispielspeisekarte<br>Admin- und Kellner-Benutzer<br>Kassenbonlogo",
|
|
"6 tables<br>Sample menu<br>Admin and Waiter user<br>Sample receipt logo image",
|
|
"6 mesas<br>Menú de ejemplo<br>usuarios admin y camarero<br>Imagén para tiques"];
|
|
var SAMPLE_ROOM_TABLE_USER_ONLY_DIGI = ["2 Räume<br>je 6 Tische<br>grafische Tischauswahl<br>Beispielspeisekarte<br>Benutzer: Admin, Kellner, Chef<br>Kassenbonlogo",
|
|
"2 rooms<br>each with 6 tables<br>tablemap<br>Sample menu<br>Users: admin, waiter, manager<br>Sample receipt logo image",
|
|
"2 espacios<br>cada con 6 mesas<br>mapa de mesas<br>Menú de ejemplo<br>usuarios admin, camarero y jefe<br>Imagén para tiques"];
|
|
var SAMPLE_ROOM_TABLE_USER = ["2 Räume<br>je 6 Tische<br>grafische Tischauswahl<br>Beispielspeisekarte<br>Benutzer: Admin, Kellner,Koch,Chef<br>Kassenbonlogo",
|
|
"2 rooms<br>each with 6 tables<br>tablemap<br>Sample menu<br>Users: admin, waiter, cook, manager<br>Sample receipt logo image",
|
|
"2 espacios<br>cada con 6 mesas<br>mapa de mesas<br>Menú de ejemplo<br>usuarios admin, camarero, cocinero y jefe<br>Imagén para tiques"];
|
|
|
|
var WORKFLOW_HEADLINE = ["Traditioneller Arbeitsablauf über den Druck von Arbeitsbons oder digitaler Ablauf?" ,
|
|
"Traditional workflow with work receipts or digital workflow?",
|
|
"Modo de trabajar por tiques de trabajar o del modo digital?"];
|
|
var WORKFLOW_TABLE_TITLE = ["Auswahl Arbeitsablauf","Select work flow","Qué modo de trabajar?"];
|
|
var WORKFLOW_DIGITAL = ["<b>Digital:</b> Bestellungen durchlaufen Ansichten Küche, Bar, und Bereitstellung, wenn nicht produktspezifisch anders eingestellt.",
|
|
"<b>Digital:</b> Orders pass the views kitchen, bar, and supplydesk, if not configured differently for some products.",
|
|
"<b>Digital:</b> Ordenes pasan las vistas cocina, bar y productos preparados para todos los productos que no estan configurados diferentes."];
|
|
var WORKFLOW_WORKTICKETS = ["<b>Arbeitsbons:</b> Die Bestellung wird über Arbeitsbons abgewickelt.",
|
|
"<b>Work receipts:</b> Orders are handled by printing work receipts.",
|
|
"<b>Tiques de trabajar:</b> Ordenes va a ser imprimidos."];
|
|
var WORKFLOW_BOTH = ["<b>Arbeitsbons <u>und</u> Digital:</b> Der Kellner entscheidet selbst - von dieser Konfiguration wird abgeraten!",
|
|
"<b>Work receipts <u>and</u> digital workflow:</b> The waiter decides the workflow - this configuration is not recommended!",
|
|
"<b>Tiques de trabajar <u>y</u> modo digital:</b> El camarero decide que modo - esta configuración no esta recomendada!"];
|
|
var SEL_TIMEZONE = ["Zeitzone auswählen","Select time zone","Qué tiempo?"];
|
|
var IGNORE_TIMEZONE = ["Soll nur ein Versionsupdate vorgenommen werden, so ist diese Angabe irrelevant.",
|
|
"If you only intend to update the version this setting is of no interest.",
|
|
"Si sólo quiere update la versión la zone de tiempo no esta importante."];
|
|
var MISSING_PHP_EXTENSIONS = ["Diese PHP-Extensions sind nicht installiert und das kann zu Fehlfunktionen führen: ",
|
|
"These PHP extensions are not installed and this may result in malfunctions of the software: ",
|
|
"Estas extensiones no son instaladas y puede resultar en errores: "];
|
|
var EXECUTION_TOO_SHORT = ["Der Php-Wert <i>max_execution_time</i> sollte mindestens 300 (Sekunden) betragen, damit zeitintensive Backup/Restore-Funktionen möglich sind. Er beträgt im Moment: ",
|
|
"The PHP value <i>max_execution_time</i> should be 300 (seconds) at minimum to allow time-consuming backup/restore tasks. Currently the value is: ",
|
|
"Al valor <i>max_execution_time</i> debe ser 300 (secondos) al minimum para permitir backup/restore funcionality que necesity mucho tiempo. De momento ekl valor es: "];
|
|
var EXECUTION_TOO_SHORT_ADD = ["Auf schnellen Servern und bei guter Datenverbindung ist das jedoch kein Problem.",
|
|
"If the server has a good performance and the data uplink is good this value is ok.",
|
|
"Si el servidor trabaja rapidamente y si la velocidad del uplink es bueno, este valor es bueno."];
|
|
var SESSION_LIFETIME_TOO_SHORT = ["Die maximale Sessionlebenszeit <i>session.gc_maxlifetime</i> bestimmt die Dauer, die ein Benutzer eingeloggt sein darf. Ratsam sind 36000 Sekunden = 10 Stunden. Aktuell ist eingestellt: ",
|
|
"The maximal session lifetime <i>session.gc_maxlifetime</i> is the maximal duration that a user is allowed to log in. A value of 36000 seconds = 10 hours is recommended. Currently the value is: ",
|
|
"El session lifetime <i>session.gc_maxlifetime</i> es la duracion pata un usario de estar logged-in. Recommendado 36000 secondos = 10 horas. De momento el valor es: "];
|
|
var NOT_ALL_PHP_OK = ["Die Installation kann trotzdem fortgesetzt werden. Bitte beachten Sie die jedoch die obigen Hinweise!",
|
|
"You can continue the installation but please consider the notes!",
|
|
"Se puede continuar la instalación pero leer las recomendaciones!"];
|
|
|
|
var lang = 0;
|
|
var workflow = 1;
|
|
var timezone = "Europe/Berlin";
|
|
|
|
function setLanguage(langIndex) {
|
|
lang = langIndex;
|
|
|
|
$("#formid").data("lang",lang);
|
|
|
|
$("#currencytxt").html(CURRENCY[lang] + ": ");
|
|
$("#category").html(CATEGORY[lang]);
|
|
$("#setting").html(SETTING[lang]);
|
|
$("#value").html(VALUE[lang]);
|
|
$("#db").html(DB[lang]);
|
|
$("#dbserver").html(DBSERVER[lang]);
|
|
$("#dbname").html(DBNAME[lang]);
|
|
$("#dbusertxt").html(DBUSER[lang]);
|
|
$("#dbpassword").html(DBPASSWORD[lang]);
|
|
$("#prefix").html(PREFIX[lang]);
|
|
$("#testdb").html(TESTDB[lang]);
|
|
|
|
$("#writeaccess").html(WRITEACCESS[lang]);
|
|
$("#testwriteaccess").html(TESTWRITEACCESS[lang]);
|
|
$("#phpdir").html(PHPDIR[lang]);
|
|
|
|
$("#application").html(APPLICATION[lang]);
|
|
$("#language").html(LANGUAGE[lang]);
|
|
$("#decimalpoint").html(DECIMALPOINT[lang]);
|
|
|
|
$("#adminpassword").html(ADMINPASS[lang]);
|
|
$("#adminpasswordrepeat").html(ADMINPASSREPEAT[lang]);
|
|
$("#startinstall").html(STARTINSTALL[lang]);
|
|
|
|
$("#pointchar").html(POINTCHAR[lang]);
|
|
$("#commachar").html(COMMACHAR[lang]);
|
|
|
|
$("#germanlang").html(GERMANLANG[lang]);
|
|
$("#englishlang").html(ENGLISHLANG[lang]);
|
|
$("#spainlang").html(SPAINLANG[lang]);
|
|
|
|
$("#sampleheadline").html(SAMPLE_HEADLINE[lang]);
|
|
$("#samplesettingstitel").html(SAMPLE_TITLE[lang]);
|
|
$("#samplewaiterinfo").html(SAMPLE_WAITER_USER[lang]);
|
|
$("#sampleempty").html(SAMPLE_EMPTY[lang]);
|
|
$("#sampletableuser").html(SAMPLE_TABLE_USER[lang]);
|
|
$("#sampleroomtableuser").html(SAMPLE_ROOM_TABLE_USER[lang]);
|
|
|
|
$("#workflowheadline").html(WORKFLOW_HEADLINE[lang]);
|
|
$("#workflowtabletitle").html(WORKFLOW_TABLE_TITLE[lang]);
|
|
$("#workflowdigital").html(WORKFLOW_DIGITAL[lang]);
|
|
$("#workflowworkreceipts").html(WORKFLOW_WORKTICKETS[lang]);
|
|
$("#workflowworkboth").html(WORKFLOW_BOTH[lang]);
|
|
|
|
$("#timezoneheader").html(SEL_TIMEZONE[lang]);
|
|
$("#ignoretimezonehint").html(IGNORE_TIMEZONE[lang]);
|
|
|
|
checkWriteAccess();
|
|
testdb();
|
|
checkPhpStatus();
|
|
}
|
|
|
|
function testdb() {
|
|
var dbhost = $("#db_host").val();
|
|
var dbname = $("#db_name").val();
|
|
var dbuser = $("#dbuser").val();
|
|
var dbpass = $("#dbpass").val();
|
|
|
|
var data = {
|
|
host:dbhost,
|
|
dbname:dbname,
|
|
user:dbuser,
|
|
pass:dbpass
|
|
};
|
|
|
|
doAjaxSuppressError("POST",
|
|
"install/installer.php?command=testDbConnection",
|
|
data,answerOfTestDb,
|
|
"Kommunikation zum Server fehlerhaft");
|
|
}
|
|
|
|
function getDbVals() {
|
|
doAjax("GET",
|
|
"install/installer.php?command=getConfig",
|
|
null,fillDbVals,
|
|
"Kommunikation zum Server fehlerhaft");
|
|
}
|
|
|
|
function fillDbVals(dbVals) {
|
|
if (dbVals.status == "OK") {
|
|
var db = dbVals.result;
|
|
$("#db_host").val(db.host);
|
|
$("#db_name").val(db.db);
|
|
$("#dbuser").val(db.user);
|
|
$("#dbpass").val(db.password);
|
|
$("#table_prefix").val(db.tabprefix);
|
|
testdb();
|
|
}
|
|
}
|
|
|
|
function answerOfTestDb(jsonText) {
|
|
if (jsonText.toLowerCase() == 'error') {
|
|
var wrongtxt = WRONG[lang];
|
|
$("#testdbstatus").html("<b style='color:red;'>" + wrongtxt + "</b>");
|
|
$("#testdbstatus").data("status",false);
|
|
} else {
|
|
$("#testdbstatus").html("<b style='color:green;'>OK</b>");
|
|
$("#testdbstatus").data("status",true);
|
|
}
|
|
}
|
|
|
|
function checkWriteAccess() {
|
|
doAjax("GET",
|
|
"install/installer.php?command=checkWriteAccess",
|
|
null,
|
|
insertWriteAccessVals,
|
|
"Kommunikation mit Webserver fehlerhaft");
|
|
}
|
|
|
|
function checkPhpStatus() {
|
|
doAjax("GET",
|
|
"install/installer.php?command=checkPhpStatus",
|
|
null,
|
|
insertPhpStatus,
|
|
"Kommunikation mit Webserver fehlerhaft");
|
|
}
|
|
|
|
function insertBoolVal(id,boolval) {
|
|
var notwriteable = NOTWRITEABLE[lang];
|
|
if (boolval == 1) {
|
|
$(id).html("<b style='color:green;'>OK</b>");
|
|
$(id).data("status",true);
|
|
} else {
|
|
$(id).html("<b style='color:red;'>" + notwriteable + "</b>");
|
|
$(id).data("status",false);
|
|
}
|
|
}
|
|
|
|
function insertWriteAccessVals(writestatus) {
|
|
var wrongtxt = WRONG[lang];
|
|
|
|
insertBoolVal("#writeaccessconfigfolder",writestatus.configfolder);
|
|
insertBoolVal("#writeaccessconfigfile",writestatus.configfile);
|
|
|
|
if (
|
|
$("#writeaccessconfigfolder").data("status") &&
|
|
$("#writeaccessconfigfile").data("status")) {
|
|
|
|
$("#writestatus").html("<b style='color:green;'>OK</b>");
|
|
$("#writestatus").data("status",true);
|
|
} else {
|
|
$("#writestatus").html("<b style='color:red;'>" + wrongtxt + "</b>");
|
|
$("#writestatus").data("status",false);
|
|
}
|
|
}
|
|
|
|
function insertPhpStatus(phpStatus) {
|
|
var allOk = true;
|
|
var txt = "";
|
|
if (phpStatus.extensions_status == 0) {
|
|
txt += "<p>" + MISSING_PHP_EXTENSIONS[lang] + phpStatus.missing_extensions + "</p>";
|
|
allOk = false;
|
|
}
|
|
|
|
if (phpStatus.max_execution_status == 0) {
|
|
txt += "<p>" + EXECUTION_TOO_SHORT[lang] + phpStatus.max_execution_time + "<br>" + EXECUTION_TOO_SHORT_ADD[lang] + "</p>";
|
|
allOk = false;
|
|
}
|
|
|
|
if (phpStatus.session_lifetime_status == 0) {
|
|
txt += "<p>" + SESSION_LIFETIME_TOO_SHORT[lang] + phpStatus.session_gc_maxlifetime + "</p>";
|
|
allOk = false;
|
|
}
|
|
|
|
if (allOk) {
|
|
txt = "<span style='color:green;'>OK!</span>";
|
|
} else {
|
|
txt = "<span style='color:red;'>" + txt + "<p><i>" + NOT_ALL_PHP_OK[lang] + "</i></p></span>";
|
|
}
|
|
$("#phpstatusfield").html(txt);
|
|
}
|
|
|
|
function startupdateajax(cmd) {
|
|
if ( $("#testdbstatus").data("status")) {
|
|
var data = {
|
|
host: $("#db_host").val(),
|
|
db: $("#db_name").val(),
|
|
user: $("#dbuser").val(),
|
|
password: $("#dbpass").val(),
|
|
prefix: $("#table_prefix").val()
|
|
}
|
|
doAjax("POST",
|
|
"install/installer.php?command=" + cmd,
|
|
data,
|
|
resultOfUpdate,
|
|
"Fehler beim Versionsupdate");
|
|
} else {
|
|
alert(DB_SETTING_WRONG[lang]);
|
|
}
|
|
}
|
|
|
|
|
|
function startinstall() {
|
|
|
|
if ($("#adminpass").val().length == 0) {
|
|
alert("Administratorpasswort ist nicht gesetzt");
|
|
return;
|
|
}
|
|
|
|
if ($("#adminpass").val() != $("#adminpass2").val()) {
|
|
alert("Administratorpasswort uneinheitlich eingegeben");
|
|
return;
|
|
}
|
|
|
|
var currencytxt = (($("#currency")).val()).trim();
|
|
if (currencytxt.length == 0) {
|
|
alert("Währungstext ist nicht ausgefüllt.");
|
|
return;
|
|
}
|
|
|
|
if ( $("#testdbstatus").data("status") &&
|
|
$("#writestatus").data("status")
|
|
) {
|
|
// 0: German, 1: Englisch
|
|
var langid = $("#formid").data("lang");
|
|
|
|
// 0: Comma, 1: Point
|
|
var point = $("#point")[0].selectedIndex;
|
|
if (point == 0) {
|
|
point = ",";
|
|
} else {
|
|
point = ".";
|
|
}
|
|
var data = {
|
|
host: $("#db_host").val(),
|
|
db: $("#db_name").val(),
|
|
user: $("#dbuser").val(),
|
|
password: $("#dbpass").val(),
|
|
prefix: $("#table_prefix").val(),
|
|
adminpass: $("#adminpass").val(),
|
|
currency: currencytxt,
|
|
lang: langid,
|
|
point: point,
|
|
timezone:timezone
|
|
}
|
|
$("#progress").html("<b style='color:red;'>" + WORKING[langid] + "</b>");
|
|
//$("#startinstall").attr("disabled", "disabled");
|
|
doAjax("POST",
|
|
"install/installer.php?command=install",
|
|
data,
|
|
resultOfInstall,
|
|
"Fehler bei der Installation");
|
|
} else {
|
|
alert("Installation nicht möglich");
|
|
}
|
|
}
|
|
|
|
function resultOfUpdate(jsonAnswer) {
|
|
if (jsonAnswer == "OK") {
|
|
alert(UPDATE_OK[lang]);
|
|
setTimeout(function(){document.location.href = "index.html"},500);
|
|
} else {
|
|
alert(ERROR[lang] + jsonAnswer);
|
|
}
|
|
}
|
|
|
|
function resultOfSampleData(jsonAnswer) {
|
|
if (jsonAnswer == "OK") {
|
|
var langid = $("#formid").data("lang");
|
|
|
|
if (langid == 0) {
|
|
$("#progress").html("<b style='color:green;'>Abgeschlossen</b>");
|
|
alert("Die Installation ist nun abgeschlossen. Sie werden nun zur Einstiegsseite "
|
|
+ "umgeleitet. Wenn Sie sich mit dem soeben vergebenen Passwort einloggen "
|
|
+ "können, war die Installation erfolgreich. Löschen Sie in diesem Fall "
|
|
+ "das Verzeichnis 'install', damit die Installation nicht zu einem späteren "
|
|
+ "Zeitpunkt versehentlich überschrieben wird!");
|
|
window.location.href = "index.html";
|
|
} else if (langid == 1) {
|
|
$("#progress").html("<b style='color:green;'>Finished</b>");
|
|
alert("The installation is finished. You will be directed to the main page. If you can log "
|
|
+ "in with the admin password the installation was successful. Remove the install "
|
|
+ "directory to avoid a later change of the installation by accident");
|
|
window.location.href = "index.html";
|
|
} else if (langid == 2) {
|
|
$("#progress").html("<b style='color:green;'>Acabado</b>");
|
|
alert("La instalación esta completada. Vas a ser dirijido a la página principal. Si puedes"
|
|
+ " log in con la contraseña que has ponido en la página de instalación, la"
|
|
+ " instalación esta completada con éxito. Esta recomendado removar el fichero "
|
|
+ " 'install'");
|
|
window.location.href = "index.html";
|
|
}
|
|
} else {
|
|
alert(ERROR[lang] + jsonAnswer);
|
|
}
|
|
}
|
|
|
|
function resultOfInstall(jsonAnswer) {
|
|
if (jsonAnswer == "OK") {
|
|
$("#languagesettings").hide();
|
|
$("#timezones").hide();
|
|
$("#installsettings").hide();
|
|
$("#samplesettings").hide();
|
|
$("#workflowsettings").show();
|
|
} else {
|
|
alert(ERROR[lang] + jsonAnswer);
|
|
}
|
|
}
|
|
|
|
function binding() {
|
|
$("#testdb").off("click").on("click", function (e) {
|
|
e.stopImmediatePropagation();
|
|
e.preventDefault();
|
|
testdb();
|
|
});
|
|
|
|
checkWriteAccess();
|
|
|
|
$("#testwriteaccess").off("click").on("click", function (e) {
|
|
e.stopImmediatePropagation();
|
|
e.preventDefault();
|
|
checkWriteAccess();
|
|
});
|
|
|
|
$("#startinstall").off("click").on("click", function (e) {
|
|
e.stopImmediatePropagation();
|
|
e.preventDefault();
|
|
startinstall();
|
|
});
|
|
|
|
$(".germanflag").off("click").on("click", function (e) {
|
|
setSelectedLanguage(e,0);
|
|
});
|
|
|
|
$(".ukflag").off("click").on("click", function (e) {
|
|
setSelectedLanguage(e,1);
|
|
});
|
|
|
|
$(".spainflag").off("click").on("click", function (e) {
|
|
setSelectedLanguage(e,2);
|
|
});
|
|
|
|
$("#updatebtn").off("click").on("click", function(e) {
|
|
e.stopImmediatePropagation();
|
|
e.preventDefault();
|
|
startupdateajax("update");
|
|
});
|
|
|
|
$(".flags").hover(
|
|
function() { $(this).addClass("Hover"); },
|
|
function() { $(this).removeClass("Hover"); }
|
|
);
|
|
|
|
$("#sample_empty").off("click").on("click", function(e) {
|
|
insertSampleContent(e,1);
|
|
});
|
|
|
|
$("#sample_tables_user_menu").off("click").on("click", function(e) {
|
|
insertSampleContent(e,2);
|
|
});
|
|
|
|
$("#sample_rooms_tables_user_menu").off("click").on("click", function(e) {
|
|
insertSampleContent(e,3);
|
|
});
|
|
|
|
$("#workflow_digi_btn").off("click").on("click", function(e) {
|
|
setWorkflowMode(e,1);
|
|
});
|
|
$("#workflow_receipts_btn").off("click").on("click", function(e) {
|
|
$("#sampleroomtableuser").html(SAMPLE_ROOM_TABLE_USER_ONLY_DIGI[lang]);
|
|
setWorkflowMode(e,2);
|
|
});
|
|
$("#workflow_both_btn").off("click").on("click", function(e) {
|
|
setWorkflowMode(e,0);
|
|
});
|
|
|
|
$("#timezonebtn").off("click").on("click", function(e) {
|
|
e.stopImmediatePropagation();
|
|
e.preventDefault();
|
|
timezone = $("#zoneselection").find(":selected").text();
|
|
$("#timezones").hide();
|
|
$("#installsettings").show();
|
|
});
|
|
}
|
|
|
|
function setWorkflowMode(e,mode) {
|
|
e.stopImmediatePropagation();
|
|
e.preventDefault();
|
|
workflow = mode;
|
|
$("#languagesettings").hide();
|
|
$("#timezones").hide();
|
|
$("#installsettings").hide();
|
|
$("#samplesettings").show();
|
|
$("#workflowsettings").hide();
|
|
}
|
|
|
|
|
|
function insertSampleContent(e,level) {
|
|
e.stopImmediatePropagation();
|
|
e.preventDefault();
|
|
var langid = $("#formid").data("lang");
|
|
$("#samplesettings").html("<b style='color:red;'><center><br><br>" + WORKING[langid] + "</b></center>");
|
|
var data = {
|
|
host: $("#db_host").val(),
|
|
db: $("#db_name").val(),
|
|
user: $("#dbuser").val(),
|
|
password: $("#dbpass").val(),
|
|
prefix: $("#table_prefix").val(),
|
|
adminpass: $("#adminpass").val(),
|
|
lang: langid,
|
|
level:level,
|
|
workflow:workflow,
|
|
timezone:timezone
|
|
}
|
|
doAjax("POST",
|
|
"install/installer.php?command=insertsamplecontent",
|
|
data,
|
|
resultOfSampleData,
|
|
"Fehler bei der Installation");
|
|
}
|
|
|
|
function setSelectedLanguage(e,l) {
|
|
e.stopImmediatePropagation();
|
|
e.preventDefault();
|
|
setLanguage(l);
|
|
|
|
$("#languagesettings").hide();
|
|
$("#timezones").hide();
|
|
displayTimezones();
|
|
}
|
|
|
|
function displayTimezones() {
|
|
$("#languagesettings").hide();
|
|
$("#timezones").show();
|
|
}
|
|
|
|
function getTimeZones() {
|
|
doAjax("POST","install/installer.php?command=gettimezones",null,insertTimeZones,null);
|
|
}
|
|
|
|
function insertTimeZones(zones) {
|
|
var options = "";
|
|
for (var i=0;i<zones.length;i++) {
|
|
var aZone = zones[i];
|
|
if (aZone == "Europe/Berlin") {
|
|
options += "<option selected>" + aZone + "<option>";
|
|
} else {
|
|
options += "<option>" + aZone + "<option>";
|
|
}
|
|
}
|
|
$("#zoneselection").html(options);
|
|
}
|
|
|
|
$(document).ready(function() {
|
|
setLanguage(0);
|
|
binding();
|
|
getDbVals();
|
|
$("#startinstall").css({ width: '300px', 'padding-top': '10px', 'padding-bottom': '10px' });
|
|
|
|
getTimeZones();
|
|
$("#languagesettings").show();
|
|
$("#timezones").hide();
|
|
$("#installsettings").hide();
|
|
$("#samplesettings").hide();
|
|
$("#workflowsettings").hide();
|
|
});
|
|
|
|
</script>
|
|
|
|
<style>
|
|
img.Hover { border: 1px solid #000; }
|
|
|
|
</style>
|
|
|
|
</head>
|
|
<body style="background-color:SaddleBrown ;">
|
|
|
|
<center><img src=img/bannerwithphone.png width=800px></img></center>
|
|
|
|
<div id=languagesettings style="display:none;">
|
|
<br>
|
|
<br>
|
|
<center>
|
|
<table class="viewtable" id=langTable>
|
|
<tr><th>Sprache auswählen - Select language - Qué idioma?</tr>
|
|
<tr><td class="germanflag"><img class="flags" src=img/germanflag.png width=35px height=23px /> <span style="font-size:20px;">Deutsch</span></tr>
|
|
<tr><td class="ukflag"><img class="flags" src=img/ukflag.png width=35px height=23px /> <span style="font-size:20px;">English</span></tr>
|
|
<tr><td class="spainflag"><img class="flags" src=img/spainflag.png width=35px height=23px /> <span style="font-size:20px;">Español</span></tr>
|
|
</table>
|
|
</center>
|
|
</div>
|
|
|
|
<div id=timezones style="display:none;">
|
|
<br><br>
|
|
<center><form>
|
|
<table class="viewtable" id=langTable>
|
|
<tr><th colspan=2><span id=timezoneheader>Zeitzone</span></tr>
|
|
<tr><td><select id=zoneselection style="height:50px;font-family : monospace;font-size : 17pt;">
|
|
</select>
|
|
<td><input id="timezonebtn" type="submit" value="->" style="height:40px;background-color:green;"/>
|
|
</tr>
|
|
</table>
|
|
</form>
|
|
<br>
|
|
<div style="font-size:20px;color:white;">
|
|
(<span id=ignoretimezonehint>Uninteressant bei reinem Versionsupdate</span>)
|
|
</div>
|
|
</div>
|
|
|
|
<div id=installsettings style="display:none;">
|
|
<form id="formid">
|
|
<center>
|
|
<table border="0" cellpadding="5" cellspacing="0" class="viewtable">
|
|
<tr><th id="category" width=200px>Kategorie<th id="setting" width=200px;>Einstellung<th id="value" width=200px>Wert</tr>
|
|
<tr>
|
|
<td id="db" rowspan=7>Datenbank
|
|
<td id="dbserver" align="right">Datenbank-Server:</td>
|
|
<td><input id="db_host" type="text" size="30" maxlength="30" placeholder="localhost"></td>
|
|
</tr>
|
|
<tr>
|
|
<td id="dbname" align="right">Datenbank-Name:</td>
|
|
<td><input id="db_name" type="text" size="30" maxlength="30"></td>
|
|
<tr>
|
|
<tr>
|
|
<td id="dbusertxt" align="right">Datenbank-Benutzer:</td>
|
|
<td><input id="dbuser" type="text" size="30" maxlength="30"></td>
|
|
</tr>
|
|
<tr>
|
|
<td id="dbpassword" align="right">Datenbank-Passwort:</td>
|
|
<td><input id="dbpass" type="password" size="30" maxlength="30"></td>
|
|
</tr>
|
|
<tr>
|
|
<td id="prefix" align="right">Präfix für die Tabellen:</td>
|
|
<td><input id="table_prefix" type="text" size="30" maxlength="30"></td>
|
|
</tr>
|
|
<tr>
|
|
<td id=testdbbutton><button type="submit" id="testdb">Teste DB-Zugriff</button>
|
|
<td align=center id=testdbstatus>
|
|
</tr>
|
|
|
|
<tr><td id="writeaccess" rowspan=3>Schreibberechtigungen
|
|
<td id="phpdir" align="right">php-Verzeichnis
|
|
<td align=center id=writeaccessconfigfolder>
|
|
</tr>
|
|
<tr>
|
|
<td align="right">config.php
|
|
<td align=center id=writeaccessconfigfile>
|
|
</tr>
|
|
<tr>
|
|
<td><button type="submit" id="testwriteaccess" onclick="checkWriteAccess();">Teste Schreibberechtigungen</button>
|
|
<td align=center id=writestatus>
|
|
</tr>
|
|
<tr>
|
|
<td id="application" rowspan=4>Applikation
|
|
<td id="adminpassword" align="right">Administrator-Passwort:</td>
|
|
<td><input id="adminpass" type="password" size="30" maxlength="30" /></td>
|
|
</tr>
|
|
<tr>
|
|
<td id="adminpasswordrepeat" align="right">Administrator-Passwort (Wdh.):</td>
|
|
<td><input id="adminpass2" type="password" size="30" maxlength="30"></td>
|
|
</tr>
|
|
<tr>
|
|
<td id=currencytxt align="right">Währung:</td>
|
|
<td><input id="currency" value="Euro" size="30" maxlength="30"/></td>
|
|
</tr>
|
|
<tr>
|
|
<td id="decimalpoint" align="right">Dezimaltrennzeichen:</td>
|
|
<td><select name="point" id="point" size="1">
|
|
<option id="commachar" selected>Komma</option>
|
|
<option id="pointchar">Punkt</option>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>PHP-Status
|
|
<td id=phpstatusfield colspan=2>?
|
|
</tr>
|
|
<tr id=updateline>
|
|
<td> </td>
|
|
<td align=center>
|
|
<button id="updatebtn">Update -> 1.2.2</button>
|
|
</td>
|
|
<td> </td>
|
|
</tr>
|
|
<tr>
|
|
<td align=center colspan=2><button type="submit" id="startinstall" onclick="startinstall();">Starte Installation</button>
|
|
<td><div id=progress> </div>
|
|
</tr>
|
|
</table>
|
|
</center>
|
|
</form>
|
|
</div> <!-- installsettings -->
|
|
|
|
|
|
<div id="workflowsettings" style="display:none;">
|
|
<br><br>
|
|
<center>
|
|
<span id="workflowheadline" style="font-size:20px;color:white;">WorkflowTitel</span>
|
|
<br><br>
|
|
<table class="viewtable" id=startSettingsTable>
|
|
<tr><th><span id=workflowtabletitle>Start</span></tr>
|
|
<tr><td id="workflow_digi_btn"><span id="workflowdigital" style="font-size:20px;">digi</span></tr>
|
|
<tr><td id="workflow_receipts_btn"><span id="workflowworkreceipts" style="font-size:20px;">work receipts</span></tr>
|
|
<tr><td id="workflow_both_btn"><span id="workflowworkboth" style="font-size:20px;">both</span></tr>
|
|
</table>
|
|
<br>
|
|
</center>
|
|
</div> <!-- workflowsettings -->
|
|
|
|
<div id=samplesettings style="display:none;">
|
|
<br>
|
|
<br>
|
|
<center>
|
|
<span id="sampleheadline" style="font-size:20px;color:white;">Titel</span>
|
|
<br><br>
|
|
<table class="viewtable" id=startSettingsTable>
|
|
<tr><th><span id=samplesettingstitel>Start</span></tr>
|
|
<tr><td id="sample_empty"><span id="sampleempty" style="font-size:20px;">leer<br>nur Admin-Benutzer</span></tr>
|
|
<tr><td id="sample_tables_user_menu"><span id="sampletableuser" style="font-size:20px;">6 Tische<br>Beispielspeisekarte<br>Admin- und Kellner-Benutzer</span></tr>
|
|
<tr><td id="sample_rooms_tables_user_menu"><span id="sampleroomtableuser" style="font-size:20px;">2 Räume<br>je 6 Tischen<br>grafische Tischauswahl<br>Beispielspeisekarte<br>Admin- und Kellner-Benutzer</span></tr>
|
|
</table>
|
|
<br>
|
|
<span id="samplewaiterinfo" style="font-size:20px;color:white;" ></span>
|
|
</center>
|
|
</div> <!-- samplesettings -->
|
|
|
|
|
|
</body>
|
|
|
|
</html> |