diff --git a/interface/lib/app.inc.php b/interface/lib/app.inc.php index c2cffa4a2112f72916a19d9fc60843d6bbcc2d8a..70d1c7407b237380f7a4f16f7b8d9b866bedacdf 100644 --- a/interface/lib/app.inc.php +++ b/interface/lib/app.inc.php @@ -168,6 +168,7 @@ class app { $this->tpl->setVar('logo', ' '); } $this->tpl->setVar('app_title',$conf["app_title"]); + $this->tpl->setVar('delete_confirmation',$this->lng('delete_confirmation')); } diff --git a/interface/lib/classes/tform_actions.inc.php b/interface/lib/classes/tform_actions.inc.php index 76525678097ae0b963ea08296d056c03cd397b67..e4a508e67f2a9d849d3619ab1d57676a8aed8cc1 100644 --- a/interface/lib/classes/tform_actions.inc.php +++ b/interface/lib/classes/tform_actions.inc.php @@ -113,12 +113,12 @@ class tform_actions { foreach($this->plugins as $plugin) { $plugin->onInsert(); } - - $this->onAfterUpdate(); + + $this->onAfterUpdate(); if($_REQUEST["next_tab"] == '') { $list_name = $_SESSION["s"]["form"]["return_to"]; - if($list_name != '' && $_SESSION["s"]["list"][$list_name]["parent_id"] != $this->id && $_SESSION["s"]["list"][$list_name]["parent_name"] != $app->tform->formDef["name"]) { + if($list_name != '' && $_SESSION["s"]["list"][$list_name]["parent_id"] != $this->id && $_SESSION["s"]["list"][$list_name]["parent_name"] != $app->tform->formDef["name"]) { $redirect = "Location: ".$_SESSION["s"]["list"][$list_name]["parent_script"]."?id=".$_SESSION["s"]["list"][$list_name]["parent_id"]."&next_tab=".$_SESSION["s"]["list"][$list_name]["parent_tab"]; $_SESSION["s"]["form"]["return_to"] = ''; session_write_close(); @@ -153,12 +153,12 @@ class tform_actions { foreach($this->plugins as $plugin) { $plugin->onInsert(); } - - $this->onAfterInsert(); + + $this->onAfterInsert(); if($_REQUEST["next_tab"] == '') { $list_name = $_SESSION["s"]["form"]["return_to"]; - if($list_name != '' && $_SESSION["s"]["list"][$list_name]["parent_id"] != $this->id && $_SESSION["s"]["list"][$list_name]["parent_name"] != $app->tform->formDef["name"]) { + if($list_name != '' && $_SESSION["s"]["list"][$list_name]["parent_id"] != $this->id && $_SESSION["s"]["list"][$list_name]["parent_name"] != $app->tform->formDef["name"]) { $redirect = "Location: ".$_SESSION["s"]["list"][$list_name]["parent_script"]."?id=".$_SESSION["s"]["list"][$list_name]["parent_id"]."&next_tab=".$_SESSION["s"]["list"][$list_name]["parent_tab"]; $_SESSION["s"]["form"]["return_to"] = ''; session_write_close(); @@ -174,15 +174,15 @@ class tform_actions { $this->onError(); } } - - function onAfterUpdate() { - global $app, $conf; - } - - function onAfterInsert() { - global $app, $conf; - } - + + function onAfterUpdate() { + global $app, $conf; + } + + function onAfterInsert() { + global $app, $conf; + } + /** * Function called on data insert or update error @@ -218,7 +218,7 @@ class tform_actions { // checking permissions if($app->tform->formDef['auth'] == 'yes') { - if($app->tform->checkPerm($this->id,'d') == false) die("Deletion denied.<br>\r\n"); + if($app->tform->checkPerm($this->id,'d') == false) $app->error($app->lng('error_no_delete_permission')); } $record_old = $app->db->queryOneRecord("SELECT * FROM ".$liste["table"]." WHERE ".$liste["table_idx"]." = ".$this->id); @@ -250,7 +250,7 @@ class tform_actions { //header("Location: ".$liste["file"]."?PHPSESSID=".$_SESSION["s"]["id"]); $list_name = $_SESSION["s"]["form"]["return_to"]; - if($list_name != '' && $_SESSION["s"]["list"][$list_name]["parent_id"] != $this->id && $_SESSION["s"]["list"][$list_name]["parent_name"] != $app->tform->formDef["name"]) { + if($list_name != '' && $_SESSION["s"]["list"][$list_name]["parent_id"] != $this->id && $_SESSION["s"]["list"][$list_name]["parent_name"] != $app->tform->formDef["name"]) { $redirect = "Location: ".$_SESSION["s"]["list"][$list_name]["parent_script"]."?id=".$_SESSION["s"]["list"][$list_name]["parent_id"]."&next_tab=".$_SESSION["s"]["list"][$list_name]["parent_tab"]; $_SESSION["s"]["form"]["return_to"] = ''; session_write_close(); @@ -326,7 +326,7 @@ class tform_actions { } else { $sql = "SELECT * FROM ".$app->tform->formDef['db_table']." WHERE ".$app->tform->formDef['db_table_idx']." = ".$this->id." AND ".$app->tform->getAuthSQL('u'); } - if(!$record = $app->db->queryOneRecord($sql)) die("You dont have the permission to view this record or this record does not exist."); + if(!$record = $app->db->queryOneRecord($sql)) $app->error($app->lng('error_no_view_permission')); } else { $record = $app->tform->encode($_POST,$this->active_tab); } diff --git a/interface/lib/lang/de.lng b/interface/lib/lang/de.lng index fadb7e64b3751ccb8d7b7379d9db4d958f980ce8..db49eeae2cacbcf8f68a6b0377e24b9c66e7999e 100644 --- a/interface/lib/lang/de.lng +++ b/interface/lib/lang/de.lng @@ -8,7 +8,14 @@ $wb[303] = ' '; // Satz für englische Reiterkarten $wb[304] = ' Dieses Formular dient zum Anlegen eines englischsprachigen Eintrags zusätzlich zu Ihrem deutschen Eintrag. Bitte vervollständigen Sie die Daten, soweit erforderlich, in Englisch - die Inhalte aus den Drop-Down-Menüs werden automatisch übersetzt:'; +$wb[1001] = 'Der Benutzername und das Passwort dürfen nicht leer sein!'; +$wb[1002] = 'Der Benutzername und/oder das Passwort sind nicht korrekt!'; +$wb[1003] = 'Der Benutzername ist deaktiviert!'; +$wb['delete_confirmation'] = 'Wollen Sie den Datensatz wirklich löschen?'; +$wb['error_no_view_permission'] = 'Sie haben nicht die Berechtigung, den Datensatz zu lesen, oder der Datensatz existiert nicht!'; +$wb['error_no_delete_permission'] = 'Sie haben nicht die Berechtigung, den Datensatz zu löschen!'; -?> + +?> \ No newline at end of file diff --git a/interface/lib/lang/en.lng b/interface/lib/lang/en.lng index 22b0edb396458cbab15eb8381e65c0dc9ae2b2ef..b862b60a92a14e2f5211f677293e9a8b21573dbc 100644 --- a/interface/lib/lang/en.lng +++ b/interface/lib/lang/en.lng @@ -1,7 +1,16 @@ -<?php - -// Globale Error Messages -$wb[301] = 'Module not permitted for the current user.'; -$wb[302] = 'Module invalid.'; - -?> +<?php + +// Globale Error Messages +$wb[301] = 'Module not permitted for the current user.'; +$wb[302] = 'Module invalid.'; + +$wb[1001] = 'The username and password must not be empty!'; +$wb[1002] = 'The username and/or password are not correct!'; +$wb[1003] = 'The username is deactivated!'; + +$wb['delete_confirmation'] = 'Do you really want to delete this record?'; + +$wb['error_no_view_permission'] = 'You don\'t have the permission to view this record or this record does not exist!'; +$wb['error_no_delete_permission'] = 'You don\'t have the permission to delete this record!'; + +?> \ No newline at end of file diff --git a/interface/lib/lang/fr.lng b/interface/lib/lang/fr.lng index d4652727206d210a8768b06352dea89e42d29569..998a0829053857bc00742724ffa60a09b2914b78 100644 --- a/interface/lib/lang/fr.lng +++ b/interface/lib/lang/fr.lng @@ -1,7 +1,16 @@ -<?php - -// Messages d'erreur Globaux -$wb[301] = 'Module interdit pour l'utilisateur courant.'; -$wb[302] = 'Module invalide.'; - -?> +<?php + +// Messages d'erreur Globaux +$wb[301] = 'Module interdit pour l'utilisateur courant.'; +$wb[302] = 'Module invalide.'; + +$wb[1001] = 'The username and password must not be empty!'; +$wb[1002] = 'The username and/or password are not correct!'; +$wb[1003] = 'The username is deactivated!'; + +$wb['delete_confirmation'] = 'Do you really want to delete this record?'; + +$wb['error_no_view_permission'] = 'You don\'t have the permission to view this record or this record does not exist!'; +$wb['error_no_delete_permission'] = 'You don\'t have the permission to delete this record!'; + +?> \ No newline at end of file diff --git a/interface/lib/lang/se.lng b/interface/lib/lang/se.lng index 041b51fd990ec6fa57725c771ccfa610d8eb9990..1b2c740470040c26a9828ef66c75e054b74208e2 100644 --- a/interface/lib/lang/se.lng +++ b/interface/lib/lang/se.lng @@ -1,7 +1,16 @@ -<?php - -// Globale Error Messages -$wb[301] = 'Modulen är ej tillåten för nuvarande användare.'; -$wb[302] = 'Modulen är ogiltig.'; - -?> +<?php + +// Globale Error Messages +$wb[301] = 'Modulen är ej tillåten för nuvarande användare.'; +$wb[302] = 'Modulen är ogiltig.'; + +$wb[1001] = 'The username and password must not be empty!'; +$wb[1002] = 'The username and/or password are not correct!'; +$wb[1003] = 'The username is deactivated!'; + +$wb['delete_confirmation'] = 'Do you really want to delete this record?'; + +$wb['error_no_view_permission'] = 'You don\'t have the permission to view this record or this record does not exist!'; +$wb['error_no_delete_permission'] = 'You don\'t have the permission to delete this record!'; + +?> \ No newline at end of file diff --git a/interface/web/dns/lib/lang/de.lng b/interface/web/dns/lib/lang/de.lng new file mode 100644 index 0000000000000000000000000000000000000000..f5c590d0ebdf1eabca051ca0d8894cf066d07905 --- /dev/null +++ b/interface/web/dns/lib/lang/de.lng @@ -0,0 +1,7 @@ +<?php + +$wb["Yes"] = 'Ja'; +$wb["No"] = 'Nein'; +$wb["error_no_permission"] = 'Sie haben nicht die Berechtigung, den Vorgang durchzuführen!'; + +?> \ No newline at end of file diff --git a/interface/web/dns/lib/lang/de_rr.lng b/interface/web/dns/lib/lang/de_rr.lng new file mode 100644 index 0000000000000000000000000000000000000000..75e378d4ac4536899d1136eb1f16f9cb662b39b2 --- /dev/null +++ b/interface/web/dns/lib/lang/de_rr.lng @@ -0,0 +1,42 @@ +<?php +$wb["zone_txt"] = 'Zone'; +$wb["name_txt"] = 'Name'; +$wb["type_txt"] = 'Typ'; +$wb["data_txt"] = 'Daten'; +$wb["aux_txt"] = 'Priorität'; +$wb["ttl_txt"] = 'TTL'; +$wb["weight_txt"] = 'Gewicht'; +$wb["port_txt"] = 'Port'; +$wb["rp_mbox_txt"] = 'RP Mailbox'; +$wb["rp_txtref_txt"] = 'RP TXTREF'; +$wb["srv_target_txt"] = 'SRV TARGET'; +$wb["zone_origin_txt"] = 'Zonen-Ursprung'; +$wb["ns_txt"] = 'Nameserver'; +$wb["mbox_txt"] = 'Admin-Email'; +$wb["btn_save_txt"] = 'Speichern'; +$wb["btn_cancel_txt"] = 'Abbrechen'; +$wb["rr_data_error_empty"] = 'Das Daten-Feld darf nicht leer sein!'; +$wb["rr_aux_error_noint"] = 'Priorität muß ein Integer sein!'; +$wb["rr_ttl_error_notpositive"] = 'Die TTL muß positiv sein!'; +$wb["error_ptr"] = 'muß einen Fully Qualified Domain Name beinhalten, der mit einem Punkt endet!'; +$wb["error_hinfo"] = 'muß den CPU-Typ beinhalten, dann ein Leerzeichen, dann den Betriebssystem-Typ!'; +$wb["error_aaaa"] = 'muß eine gültige IPv6-Adresse beinhalten!'; +$wb["error_a"] = 'muß eine gültige IP-Adresse beinhalten!'; +$wb["error_must_be_integer"] = 'muß ein Integer sein!'; +$wb["error_must_not_be_greater_than_2147483647"] = 'darf nicht größer sein als 2147483647!'; +$wb["error_must_be_positive"] = 'muß positiv sein!'; +$wb["error_must_not_be_negative"] = 'darf nicht negativ sein!'; +$wb["error_255_characters"] = 'beinhaltet mehr als 255 Zeichen!'; +$wb["error_63_characters"] = 'beinhaltet einen Teil mit mehr als 63 Zeichen!'; +$wb["error_invalid_characters"] = 'beinhaltet einen Teil mit ungültigen Zeichen!'; +$wb["error_hyphen_begin"] = 'beinhaltet einen Teil, der mit einem Bindestrich beginnt!'; +$wb["error_hyphen_end"] = 'beinhaltet einen Teil, der mit einem Bindestrich endet!'; +$wb["error_wildcard_non_initial_part"] = 'beinhaltet einen Platzhalter in einem Teil, der nicht am Anfang steht!'; +$wb["error_wildcard_mix"] = 'beinhaltet einen Teil, wo ein Platzhalter mit anderen Zeichen vermischt wird!'; +$wb["error_no_wildcard_allowed"] = 'darf keine Platzhalter beinhalten!'; +$wb["error_out_of_zone"] = 'ist nicht Teil der Zone!'; +$wb["error_invalid_rp"] = 'hat ein ungültiges Format. Das korrekte Format ist die <i>mbox</i> (eine DNS-kodierte Email-Adresse), dann ein Leerzeichen, dann der <i>txtref</i>, der entweder einen Host für den TXT-Lookup oder einen Punkt beinhalten muß!'; +$wb["error_invalid_srv"] = 'hat ein ungültiges Format. Das korrekte Format is das <i>Gewicht</i> (0-65535), dann ein Leerzeichen, dann der <i>Port</i> (0-65535), dann ein Leerzeichen, dann das <i>Ziel</i>!'; +$wb["error_srv_out_of_range"] = 'für den SRV-Eintrag liegt nicht innerhalb der zulässigen Grenzen!'; +$wb["error_no_permission"] = 'Sie haben nicht die Berechtigung, diesen Vorgang durchzuführen!'; +?> \ No newline at end of file diff --git a/interface/web/dns/lib/lang/de_rr_list.lng b/interface/web/dns/lib/lang/de_rr_list.lng new file mode 100644 index 0000000000000000000000000000000000000000..fe3554705a33f195d518aa9665663827bb82ef38 --- /dev/null +++ b/interface/web/dns/lib/lang/de_rr_list.lng @@ -0,0 +1,16 @@ +<?php +$wb["list_head_txt"] = 'Einträge'; +$wb["name_txt"] = 'Name'; +$wb["type_txt"] = 'Typ'; +$wb["data_txt"] = 'Daten'; +$wb["aux_txt"] = 'Priorität'; +$wb["ttl_txt"] = 'TTL'; +$wb["page_txt"] = 'Seite'; +$wb["page_of_txt"] = 'von'; +$wb["page_next_txt"] = 'Weiter'; +$wb["page_back_txt"] = 'Zurück'; +$wb["delete_txt"] = 'Löschen'; +$wb["filter_txt"] = 'Filter'; +$wb["add_new_record_txt"] = 'Neuen Eintrag erstellen'; +$wb['delete_confirmation'] = 'Wollen Sie den Datensatz wirklich löschen?'; +?> \ No newline at end of file diff --git a/interface/web/dns/lib/lang/de_soa.lng b/interface/web/dns/lib/lang/de_soa.lng new file mode 100644 index 0000000000000000000000000000000000000000..9920b11bb1d114f86afe8203e90833ef5af46a2d --- /dev/null +++ b/interface/web/dns/lib/lang/de_soa.lng @@ -0,0 +1,49 @@ +<?php +$wb["origin_txt"] = 'Ursprung'; +$wb["ns_txt"] = 'Nameserver'; +$wb["mbox_txt"] = 'Admin-Email'; +$wb["serial_txt"] = 'Seriennr.'; +$wb["refresh_txt"] = 'Refresh'; +$wb["retry_txt"] = 'Retry'; +$wb["expire_txt"] = 'Expire'; +$wb["minimum_txt"] = 'Minimum TTL'; +$wb["ttl_txt"] = 'TTL'; +$wb["active_txt"] = 'Aktiv'; +$wb["xfer_txt"] = 'Zonen-Transfers'; +$wb["name_txt"] = 'Name'; +$wb["data_txt"] = 'Daten'; +$wb["rp_mbox_txt"] = 'RP Mailbox'; +$wb["rp_txtref_txt"] = 'RP TXTREF'; +$wb["srv_target_txt"] = 'SRV TARGET'; +$wb["zone_origin_txt"] = 'Zonen-Ursprung'; +$wb["yes_txt"] = 'Ja'; +$wb["no_txt"] = 'Nein'; +$wb["btn_save_txt"] = 'Speichern'; +$wb["btn_cancel_txt"] = 'Abbrechen'; +$wb["soa_error_empty"] = 'Der Ursprung darf nicht leer sein!'; +$wb["soa_error_unique"] = 'Dieser Ursprung existiert schon. Der Ursprung darf nur einmalig vorkommen!'; +$wb["ns_error_empty"] = 'Der Nameserver darf nicht leer sein!'; +$wb["mbox_error_empty"] = 'Die Admin-Emailadresse darf nicht leer sein!'; +$wb["serial_error_notpositive"] = 'Die Seriennr. muß positiv sein!'; +$wb["refresh_error_notpositive"] = 'Der Refresh muß positiv sein!'; +$wb["retry_error_notpositive"] = 'Der Retry muß positiv sein!'; +$wb["expire_error_notpositive"] = 'Der Expire muß positiv sein!'; +$wb["minimum_error_notpositive"] = 'Die Minimum TTL muß positiv sein!'; +$wb["ttl_error_notpositive"] = 'Die TTL muß positiv sein!'; +$wb["error_empty"] = 'darf nicht leer sein!'; +$wb["error_dot"] = 'muß mit einem Punkt enden!'; +$wb["error_must_be_integer"] = 'muß ein Integer sein!'; +$wb["error_must_not_be_greater_than_2147483647"] = 'darf nicht größer sein als 2147483647!'; +$wb["error_must_be_positive"] = 'muß positiv sein!'; +$wb["error_must_not_be_negative"] = 'darf nicht negativ sein!'; +$wb["error_255_characters"] = 'beinhaltet mehr als 255 Zeichen!'; +$wb["error_63_characters"] = 'beinhaltet einen Teil mit mehr als 63 Zeichen!'; +$wb["error_invalid_characters"] = 'beinhaltet einen Teil mit ungültigen Zeichen!'; +$wb["error_hyphen_begin"] = 'beinhaltet einen Teil, der mit einem Bindestrich beginnt!'; +$wb["error_hyphen_end"] = 'beinhaltet einen Teil, der mit einem Bindestrich endet!'; +$wb["error_wildcard_non_initial_part"] = 'beinhaltet einen Platzhalter in einem Teil, der nicht am Anfang steht!'; +$wb["error_wildcard_mix"] = 'beinhaltet einen Teil, wo ein Platzhalter mit anderen Zeichen vermischt wird!'; +$wb["error_no_wildcard_allowed"] = 'darf keine Platzhalter beinhalten!'; +$wb["error_out_of_zone"] = 'ist nicht Teil der Zone!'; +$wb["error_no_permission"] = 'Sie haben nicht die Berechtigung, diesen Vorgang durchzuführen!'; +?> \ No newline at end of file diff --git a/interface/web/dns/lib/lang/de_soa_list.lng b/interface/web/dns/lib/lang/de_soa_list.lng new file mode 100644 index 0000000000000000000000000000000000000000..e07b8cd8385b1ec54f037d0a85c6c7caf0517d30 --- /dev/null +++ b/interface/web/dns/lib/lang/de_soa_list.lng @@ -0,0 +1,23 @@ +<?php +$wb["list_head_txt"] = 'Zonen (SOA)'; +$wb["origin_txt"] = 'Ursprung'; +$wb["ns_txt"] = 'Nameserver'; +$wb["mbox_txt"] = 'Admin-Email'; +$wb["serial_txt"] = 'Seriennr.'; +$wb["refresh_txt"] = 'Refresh'; +$wb["retry_txt"] = 'Retry'; +$wb["expire_txt"] = 'Expire'; +$wb["minimum_txt"] = 'Minimum TTL'; +$wb["ttl_txt"] = 'TTL'; +$wb["active_txt"] = 'Aktiv'; +$wb["xfer_txt"] = 'Zonen-Transfer'; +$wb["page_txt"] = 'Seite'; +$wb["page_of_txt"] = 'von'; +$wb["page_next_txt"] = 'Weiter'; +$wb["page_back_txt"] = 'Zurück'; +$wb["delete_txt"] = 'Löschen'; +$wb["filter_txt"] = 'Filter'; +$wb["Yes"] = 'Ja'; +$wb["No"] = 'Nein'; +$wb["add_new_record_txt"] = 'Neue Zone erstellen'; +?> \ No newline at end of file diff --git a/interface/web/dns/lib/lang/en.lng b/interface/web/dns/lib/lang/en.lng index fb1fbff0200c78c5ca529118b4e809620931df69..f47d5ebc09eab09e5b4c8383c6f34f61c16f2edf 100644 --- a/interface/web/dns/lib/lang/en.lng +++ b/interface/web/dns/lib/lang/en.lng @@ -2,5 +2,6 @@ $wb["Yes"] = 'Yes'; $wb["No"] = 'No'; +$wb["error_no_permission"] = 'You do not have the right permissions to perform the action!'; ?> \ No newline at end of file diff --git a/interface/web/dns/lib/lang/en_rr.lng b/interface/web/dns/lib/lang/en_rr.lng index eba01c373c5681f8185bc2940b34597de421ed99..8e5cf830996bc93623e2f66084e633349e2b20fc 100644 --- a/interface/web/dns/lib/lang/en_rr.lng +++ b/interface/web/dns/lib/lang/en_rr.lng @@ -36,7 +36,7 @@ $wb["error_wildcard_mix"] = 'contains a part mixing a wildcard character with ot $wb["error_no_wildcard_allowed"] = 'must not contain wildcards!'; $wb["error_out_of_zone"] = 'is out of zone!'; $wb["error_invalid_rp"] = 'has invalid format. The correct format is the <i>mbox</i> (a DNS-encoded email address), then a space, then the <i>txtref</i>, which should contain either a host for TXT lookup or a dot!'; -$wb["error_invalid_srv"] = 'has invalid format. The correct format is the <i>weight</i> (0-65535), then a space, then the <i>port</i> (0-65535), then a space, then the <i>target</i>!'; +$wb["error_invalid_srv"] = 'has invalid format. The correct format is the <i>weight</i> (0-65535), then a space, then the <i>port</i> (0-65535), then a space, then the <i>target</i>!'; $wb["error_srv_out_of_range"] = 'for SRV record is out of range!'; $wb["error_no_permission"] = 'You do not have the right permissions to perform the action!'; ?> \ No newline at end of file diff --git a/interface/web/dns/lib/lang/en_rr_list.lng b/interface/web/dns/lib/lang/en_rr_list.lng index cfd6e864c69e38c1d528ba1b7f2f1f9df49bef63..9a6f6d290775cc4cc3483c1f3fa46de6126a761c 100644 --- a/interface/web/dns/lib/lang/en_rr_list.lng +++ b/interface/web/dns/lib/lang/en_rr_list.lng @@ -12,4 +12,5 @@ $wb["page_back_txt"] = 'Back'; $wb["delete_txt"] = 'Delete'; $wb["filter_txt"] = 'Filter'; $wb["add_new_record_txt"] = 'Add New Record'; +$wb['delete_confirmation'] = 'Do you really want to delete this record?'; ?> \ No newline at end of file diff --git a/interface/web/dns/lib/lang/fr.lng b/interface/web/dns/lib/lang/fr.lng new file mode 100644 index 0000000000000000000000000000000000000000..f47d5ebc09eab09e5b4c8383c6f34f61c16f2edf --- /dev/null +++ b/interface/web/dns/lib/lang/fr.lng @@ -0,0 +1,7 @@ +<?php + +$wb["Yes"] = 'Yes'; +$wb["No"] = 'No'; +$wb["error_no_permission"] = 'You do not have the right permissions to perform the action!'; + +?> \ No newline at end of file diff --git a/interface/web/dns/lib/lang/fr_rr.lng b/interface/web/dns/lib/lang/fr_rr.lng new file mode 100644 index 0000000000000000000000000000000000000000..8e5cf830996bc93623e2f66084e633349e2b20fc --- /dev/null +++ b/interface/web/dns/lib/lang/fr_rr.lng @@ -0,0 +1,42 @@ +<?php +$wb["zone_txt"] = 'Zone'; +$wb["name_txt"] = 'Name'; +$wb["type_txt"] = 'Type'; +$wb["data_txt"] = 'Data'; +$wb["aux_txt"] = 'Preference/Priority'; +$wb["ttl_txt"] = 'TTL'; +$wb["weight_txt"] = 'Weight'; +$wb["port_txt"] = 'Port'; +$wb["rp_mbox_txt"] = 'RP Mailbox'; +$wb["rp_txtref_txt"] = 'RP TXTREF'; +$wb["srv_target_txt"] = 'SRV TARGET'; +$wb["zone_origin_txt"] = 'Zone Origin'; +$wb["ns_txt"] = 'Name Server'; +$wb["mbox_txt"] = 'Admin Email'; +$wb["btn_save_txt"] = 'Save'; +$wb["btn_cancel_txt"] = 'Cancel'; +$wb["rr_data_error_empty"] = 'The data field must not be empty!'; +$wb["rr_aux_error_noint"] = 'Preference/priority must be an integer!'; +$wb["rr_ttl_error_notpositive"] = 'The TTL must be positive!'; +$wb["error_ptr"] = 'must contain a fully qualified domain name, ending with a dot!'; +$wb["error_hinfo"] = 'must contain the CPU type, then a space, then the OS type!'; +$wb["error_aaaa"] = 'must contain a valid IPv6 address!'; +$wb["error_a"] = 'must contain a valid IP address!'; +$wb["error_must_be_integer"] = 'must be an integer!'; +$wb["error_must_not_be_greater_than_2147483647"] = 'must not be greater than 2147483647!'; +$wb["error_must_be_positive"] = 'must be positive!'; +$wb["error_must_not_be_negative"] = 'must not be negative!'; +$wb["error_255_characters"] = 'contains more than 255 characters!'; +$wb["error_63_characters"] = 'contains a part with more than 63 characters!'; +$wb["error_invalid_characters"] = 'contains a part with invalid characters!'; +$wb["error_hyphen_begin"] = 'contains a part that begins with a hyphen!'; +$wb["error_hyphen_end"] = 'contains a part that ends with a hyphen!'; +$wb["error_wildcard_non_initial_part"] = 'contains a wildcard in a non-initial part!'; +$wb["error_wildcard_mix"] = 'contains a part mixing a wildcard character with other data!'; +$wb["error_no_wildcard_allowed"] = 'must not contain wildcards!'; +$wb["error_out_of_zone"] = 'is out of zone!'; +$wb["error_invalid_rp"] = 'has invalid format. The correct format is the <i>mbox</i> (a DNS-encoded email address), then a space, then the <i>txtref</i>, which should contain either a host for TXT lookup or a dot!'; +$wb["error_invalid_srv"] = 'has invalid format. The correct format is the <i>weight</i> (0-65535), then a space, then the <i>port</i> (0-65535), then a space, then the <i>target</i>!'; +$wb["error_srv_out_of_range"] = 'for SRV record is out of range!'; +$wb["error_no_permission"] = 'You do not have the right permissions to perform the action!'; +?> \ No newline at end of file diff --git a/interface/web/dns/lib/lang/fr_rr_list.lng b/interface/web/dns/lib/lang/fr_rr_list.lng new file mode 100644 index 0000000000000000000000000000000000000000..9a6f6d290775cc4cc3483c1f3fa46de6126a761c --- /dev/null +++ b/interface/web/dns/lib/lang/fr_rr_list.lng @@ -0,0 +1,16 @@ +<?php +$wb["list_head_txt"] = 'Records'; +$wb["name_txt"] = 'Name'; +$wb["type_txt"] = 'Type'; +$wb["data_txt"] = 'Data'; +$wb["aux_txt"] = 'Preference/Priority'; +$wb["ttl_txt"] = 'TTL'; +$wb["page_txt"] = 'Page'; +$wb["page_of_txt"] = 'of'; +$wb["page_next_txt"] = 'Next'; +$wb["page_back_txt"] = 'Back'; +$wb["delete_txt"] = 'Delete'; +$wb["filter_txt"] = 'Filter'; +$wb["add_new_record_txt"] = 'Add New Record'; +$wb['delete_confirmation'] = 'Do you really want to delete this record?'; +?> \ No newline at end of file diff --git a/interface/web/dns/lib/lang/fr_soa.lng b/interface/web/dns/lib/lang/fr_soa.lng new file mode 100644 index 0000000000000000000000000000000000000000..d7e118bfe8eaa1166f56bb2ff230f88f7f1ac0ec --- /dev/null +++ b/interface/web/dns/lib/lang/fr_soa.lng @@ -0,0 +1,49 @@ +<?php +$wb["origin_txt"] = 'Origin'; +$wb["ns_txt"] = 'Name Server'; +$wb["mbox_txt"] = 'Admin Email'; +$wb["serial_txt"] = 'Serial No.'; +$wb["refresh_txt"] = 'Refresh'; +$wb["retry_txt"] = 'Retry'; +$wb["expire_txt"] = 'Expire'; +$wb["minimum_txt"] = 'Minimum TTL'; +$wb["ttl_txt"] = 'TTL'; +$wb["active_txt"] = 'Active'; +$wb["xfer_txt"] = 'Zone Transfers'; +$wb["name_txt"] = 'Name'; +$wb["data_txt"] = 'Data'; +$wb["rp_mbox_txt"] = 'RP Mailbox'; +$wb["rp_txtref_txt"] = 'RP TXTREF'; +$wb["srv_target_txt"] = 'SRV TARGET'; +$wb["zone_origin_txt"] = 'Zone Origin'; +$wb["yes_txt"] = 'Yes'; +$wb["no_txt"] = 'No'; +$wb["btn_save_txt"] = 'Save'; +$wb["btn_cancel_txt"] = 'Cancel'; +$wb["soa_error_empty"] = 'The origin must not be empty!'; +$wb["soa_error_unique"] = 'This origin does already exist! The origin must be unique!'; +$wb["ns_error_empty"] = 'The name server must not be empty!'; +$wb["mbox_error_empty"] = 'The admin email address must not be empty!'; +$wb["serial_error_notpositive"] = 'The serial no. must be positive!'; +$wb["refresh_error_notpositive"] = 'The refresh must be positive!'; +$wb["retry_error_notpositive"] = 'The retry must be positive!'; +$wb["expire_error_notpositive"] = 'The expire must be positive!'; +$wb["minimum_error_notpositive"] = 'The minimum TTL must be positive!'; +$wb["ttl_error_notpositive"] = 'The TTL must be positive!'; +$wb["error_empty"] = 'must not be empty!'; +$wb["error_dot"] = 'must end with a dot!'; +$wb["error_must_be_integer"] = 'must be an integer!'; +$wb["error_must_not_be_greater_than_2147483647"] = 'must not be greater than 2147483647!'; +$wb["error_must_be_positive"] = 'must be positive!'; +$wb["error_must_not_be_negative"] = 'must not be negative!'; +$wb["error_255_characters"] = 'contains more than 255 characters!'; +$wb["error_63_characters"] = 'contains a part with more than 63 characters!'; +$wb["error_invalid_characters"] = 'contains a part with invalid characters!'; +$wb["error_hyphen_begin"] = 'contains a part that begins with a hyphen!'; +$wb["error_hyphen_end"] = 'contains a part that ends with a hyphen!'; +$wb["error_wildcard_non_initial_part"] = 'contains a wildcard in a non-initial part!'; +$wb["error_wildcard_mix"] = 'contains a part mixing a wildcard character with other data!'; +$wb["error_no_wildcard_allowed"] = 'must not contain wildcards!'; +$wb["error_out_of_zone"] = 'is out of zone!'; +$wb["error_no_permission"] = 'You do not have the right permissions to perform the action!'; +?> \ No newline at end of file diff --git a/interface/web/dns/lib/lang/fr_soa_list.lng b/interface/web/dns/lib/lang/fr_soa_list.lng new file mode 100644 index 0000000000000000000000000000000000000000..d5ea1d761d3ef9dbf95ac80d1f12177254b84f50 --- /dev/null +++ b/interface/web/dns/lib/lang/fr_soa_list.lng @@ -0,0 +1,23 @@ +<?php +$wb["list_head_txt"] = 'Zones (SOA)'; +$wb["origin_txt"] = 'Origin'; +$wb["ns_txt"] = 'Name Server'; +$wb["mbox_txt"] = 'Admin Email'; +$wb["serial_txt"] = 'Serial No.'; +$wb["refresh_txt"] = 'Refresh'; +$wb["retry_txt"] = 'Retry'; +$wb["expire_txt"] = 'Expire'; +$wb["minimum_txt"] = 'Minimum TTL'; +$wb["ttl_txt"] = 'TTL'; +$wb["active_txt"] = 'Active'; +$wb["xfer_txt"] = 'Zone Transfer'; +$wb["page_txt"] = 'Page'; +$wb["page_of_txt"] = 'of'; +$wb["page_next_txt"] = 'Next'; +$wb["page_back_txt"] = 'Back'; +$wb["delete_txt"] = 'Delete'; +$wb["filter_txt"] = 'Filter'; +$wb["Yes"] = 'Yes'; +$wb["No"] = 'No'; +$wb["add_new_record_txt"] = 'Add New Zone'; +?> \ No newline at end of file diff --git a/interface/web/dns/lib/lang/se.lng b/interface/web/dns/lib/lang/se.lng new file mode 100644 index 0000000000000000000000000000000000000000..f47d5ebc09eab09e5b4c8383c6f34f61c16f2edf --- /dev/null +++ b/interface/web/dns/lib/lang/se.lng @@ -0,0 +1,7 @@ +<?php + +$wb["Yes"] = 'Yes'; +$wb["No"] = 'No'; +$wb["error_no_permission"] = 'You do not have the right permissions to perform the action!'; + +?> \ No newline at end of file diff --git a/interface/web/dns/lib/lang/se_rr.lng b/interface/web/dns/lib/lang/se_rr.lng index e19c10a83d80c7027846a11dc16239b30e19d6b9..073f2c32035218f31550e8383ee87d1525cf3419 100644 --- a/interface/web/dns/lib/lang/se_rr.lng +++ b/interface/web/dns/lib/lang/se_rr.lng @@ -36,7 +36,7 @@ $wb["error_wildcard_mix"] = 'inneh $wb["error_no_wildcard_allowed"] = 'får inte innehålla jokertecken!'; $wb["error_out_of_zone"] = 'är utanför zonen!'; $wb["error_invalid_rp"] = 'har felaktigt format. Det korrekta formatet är <i>mbox</i> (en DNS-kodad epost adress), ett mellanslag, sedan <i>txtref</i>, vilket borde innehålla antingen en värd för TXT uppsökning eller en punkt!'; -$wb["error_invalid_srv"] = 'har felaktigt format. Det korrekta formatet är <i>viktning</i> (0-65535), ett mellanslag, sedan <i>port</i> (0-65535), ett mellanslag, efter dete <i>target</i>!'; +$wb["error_invalid_srv"] = 'har felaktigt format. Det korrekta formatet är <i>viktning</i> (0-65535), ett mellanslag, sedan <i>port</i> (0-65535), ett mellanslag, efter dete <i>target</i>!'; $wb["error_srv_out_of_range"] = 'för SRV inlägget är utanför gränserna!'; $wb["error_no_permission"] = 'Du har ej behörighet att utföra denna åtgärd!'; ?> \ No newline at end of file diff --git a/interface/web/dns/rr_del.php b/interface/web/dns/rr_del.php index 0f207e66699550f9f2b1a37afde0fee4a9bd3a53..81e4bcdebf4413778a85c21eed8720d5c7f33af8 100644 --- a/interface/web/dns/rr_del.php +++ b/interface/web/dns/rr_del.php @@ -57,7 +57,7 @@ class page_action extends tform_actions { global $app, $conf; $app->uses('tform'); - if(!$rr = $app->db->queryOneRecord("SELECT * FROM rr WHERE id = ".$_REQUEST['id']." AND ".$app->tform->getAuthSQL('d'))) $app->error($app->tform->wordbook['error_no_permission']); + if(!$rr = $app->db->queryOneRecord("SELECT * FROM rr WHERE id = ".$_REQUEST['id']." AND ".$app->tform->getAuthSQL('d'))) $app->error($app->lng('error_no_permission')); //$rr = $app->db->queryOneRecord("SELECT * FROM rr WHERE id = ".$_REQUEST['id']); $zone_id = $rr['zone']; @@ -102,7 +102,7 @@ class page_action extends tform_actions { } else { $other_ptr_soa_rr_data = $other_rr['name'].(trim($other_rr['name']) == '' ? '' : '.').$other_soa['origin']; } - $app->db->query("INSERT INTO rr (zone, name, type, data, aux, ttl) VALUES ('".$ptr_soa_exist['id']."', '".$d."', 'PTR', '".$other_ptr_soa_rr_data."', '0', '".$conf['default_ttl']."')"); + $app->db->query("INSERT INTO rr (zone, name, type, data, aux, ttl, sys_userid, sys_groupid, sys_perm_user, sys_perm_group, sys_perm_other) VALUES ('".$ptr_soa_exist['id']."', '".$d."', 'PTR', '".$other_ptr_soa_rr_data."', '0', '".$conf['default_ttl']."', '".$_SESSION['s']['user']['sys_userid']."', '".$_SESSION['s']['user']['sys_groupid']."', '".$_SESSION['s']['user']['sys_perm_user']."', '".$_SESSION['s']['user']['sys_perm_group']."', '".$_SESSION['s']['user']['sys_perm_other']."')"); } // if no more records exist for the ptr_soa, delete it diff --git a/interface/web/dns/rr_edit.php b/interface/web/dns/rr_edit.php index 8cd4dad9f9f0a0e4b1e75ec69aba6d46c90b2dea..3b08dd10111ca6301f1a5e25d31e1a719e379b87 100644 --- a/interface/web/dns/rr_edit.php +++ b/interface/web/dns/rr_edit.php @@ -100,13 +100,13 @@ class page_action extends tform_actions { } if(!$ptr_soa_exist = $app->db->queryOneRecord("SELECT * FROM soa WHERE origin = '".$ptr_soa."'")){ - $app->db->query("INSERT INTO soa (origin, ns, mbox, serial, refresh, retry, expire, minimum, ttl, active) VALUES ('".$ptr_soa."', '".trim($conf['default_ns'])."', '".trim($conf['default_mbox'])."', '".date("Ymd").'01'."', '".$conf['default_refresh']."', '".$conf['default_retry']."', '".$conf['default_expire']."', '".$conf['default_minimum_ttl']."', '".$conf['default_ttl']."', 'Y')"); + $app->db->query("INSERT INTO soa (origin, ns, mbox, serial, refresh, retry, expire, minimum, ttl, active, sys_userid, sys_groupid, sys_perm_user, sys_perm_group, sys_perm_other) VALUES ('".$ptr_soa."', '".trim($conf['default_ns'])."', '".trim($conf['default_mbox'])."', '".date("Ymd").'01'."', '".$conf['default_refresh']."', '".$conf['default_retry']."', '".$conf['default_expire']."', '".$conf['default_minimum_ttl']."', '".$conf['default_ttl']."', 'Y', '".$_SESSION['s']['user']['sys_userid']."', '".$_SESSION['s']['user']['sys_groupid']."', '".$_SESSION['s']['user']['sys_perm_user']."', '".$_SESSION['s']['user']['sys_perm_group']."', '".$_SESSION['s']['user']['sys_perm_other']."')"); $ptr_soa_id = $app->db->insertID(); - $app->db->query("INSERT INTO rr (zone, name, type, data, aux, ttl) VALUES ('".$ptr_soa_id."', '".$d."', 'PTR', '".$ptr_soa_rr_data."', '0', '".$conf['default_ttl']."')"); + $app->db->query("INSERT INTO rr (zone, name, type, data, aux, ttl, sys_userid, sys_groupid, sys_perm_user, sys_perm_group, sys_perm_other) VALUES ('".$ptr_soa_id."', '".$d."', 'PTR', '".$ptr_soa_rr_data."', '0', '".$conf['default_ttl']."', '".$_SESSION['s']['user']['sys_userid']."', '".$_SESSION['s']['user']['sys_groupid']."', '".$_SESSION['s']['user']['sys_perm_user']."', '".$_SESSION['s']['user']['sys_perm_group']."', '".$_SESSION['s']['user']['sys_perm_other']."')"); } else { if($ptr_soa_exist['active'] != 'Y') $app->db->query("UPDATE soa SET active = 'Y' WHERE id = ".$ptr_soa_exist['id']); if(!$ptr_soa_rr_exist = $app->db->queryOneRecord("SELECT * FROM rr WHERE zone = '".$ptr_soa_exist['id']."' AND name = '".$d."' AND type = 'PTR'")){ - $app->db->query("INSERT INTO rr (zone, name, type, data, aux, ttl) VALUES ('".$ptr_soa_exist['id']."', '".$d."', 'PTR', '".$ptr_soa_rr_data."', '0', '".$conf['default_ttl']."')"); + $app->db->query("INSERT INTO rr (zone, name, type, data, aux, ttl, sys_userid, sys_groupid, sys_perm_user, sys_perm_group, sys_perm_other) VALUES ('".$ptr_soa_exist['id']."', '".$d."', 'PTR', '".$ptr_soa_rr_data."', '0', '".$conf['default_ttl']."', '".$_SESSION['s']['user']['sys_userid']."', '".$_SESSION['s']['user']['sys_groupid']."', '".$_SESSION['s']['user']['sys_perm_user']."', '".$_SESSION['s']['user']['sys_perm_group']."', '".$_SESSION['s']['user']['sys_perm_other']."')"); // increase serial of PTR SOA if(!in_array($ptr_soa_exist['id'], $increased_serials)){ $ptr_soa_new_serial = $app->validate_dns->increase_serial($ptr_soa_exist['serial']); diff --git a/interface/web/dns/soa_del.php b/interface/web/dns/soa_del.php index e29a5a35a097ea242ac7f4d4583360b7fa0e2ea7..3d88ab085147c61f60bb52bafc39e9667f73d81c 100644 --- a/interface/web/dns/soa_del.php +++ b/interface/web/dns/soa_del.php @@ -83,7 +83,7 @@ class page_action extends tform_actions { } else { $other_ptr_soa_rr_data = $other_rr['name'].(trim($other_rr['name']) == '' ? '' : '.').$other_soa['origin']; } - $app->db->query("INSERT INTO rr (zone, name, type, data, aux, ttl) VALUES ('".$ptr_soa_exist['id']."', '".$d."', 'PTR', '".$other_ptr_soa_rr_data."', '0', '".$conf['default_ttl']."')"); + $app->db->query("INSERT INTO rr (zone, name, type, data, aux, ttl, sys_userid, sys_groupid, sys_perm_user, sys_perm_group, sys_perm_other) VALUES ('".$ptr_soa_exist['id']."', '".$d."', 'PTR', '".$other_ptr_soa_rr_data."', '0', '".$conf['default_ttl']."', '".$_SESSION['s']['user']['sys_userid']."', '".$_SESSION['s']['user']['sys_groupid']."', '".$_SESSION['s']['user']['sys_perm_user']."', '".$_SESSION['s']['user']['sys_perm_group']."', '".$_SESSION['s']['user']['sys_perm_other']."')"); } // if no more records exist for the ptr_soa, delete it diff --git a/interface/web/dns/soa_edit.php b/interface/web/dns/soa_edit.php index e38109f6f5b14086f5cf873ffebe90811cf610bb..ba9cf9f57bda3f6d1bfe737c6caf92b085b74043 100644 --- a/interface/web/dns/soa_edit.php +++ b/interface/web/dns/soa_edit.php @@ -195,13 +195,13 @@ class page_action extends tform_actions { } if(!$ptr_soa_exist = $app->db->queryOneRecord("SELECT * FROM soa WHERE origin = '".$ptr_soa."'")){ - $app->db->query("INSERT INTO soa (origin, ns, mbox, serial, refresh, retry, expire, minimum, ttl, active) VALUES ('".$ptr_soa."', '".trim($conf['default_ns'])."', '".trim($conf['default_mbox'])."', '".date("Ymd").'01'."', '".$conf['default_refresh']."', '".$conf['default_retry']."', '".$conf['default_expire']."', '".$conf['default_minimum_ttl']."', '".$conf['default_ttl']."', 'Y')"); + $app->db->query("INSERT INTO soa (origin, ns, mbox, serial, refresh, retry, expire, minimum, ttl, active, sys_userid, sys_groupid, sys_perm_user, sys_perm_group, sys_perm_other) VALUES ('".$ptr_soa."', '".trim($conf['default_ns'])."', '".trim($conf['default_mbox'])."', '".date("Ymd").'01'."', '".$conf['default_refresh']."', '".$conf['default_retry']."', '".$conf['default_expire']."', '".$conf['default_minimum_ttl']."', '".$conf['default_ttl']."', 'Y', '".$_SESSION['s']['user']['sys_userid']."', '".$_SESSION['s']['user']['sys_groupid']."', '".$_SESSION['s']['user']['sys_perm_user']."', '".$_SESSION['s']['user']['sys_perm_group']."', '".$_SESSION['s']['user']['sys_perm_other']."')"); $ptr_soa_id = $app->db->insertID(); - $app->db->query("INSERT INTO rr (zone, name, type, data, aux, ttl) VALUES ('".$ptr_soa_id."', '".$d."', 'PTR', '".$ptr_soa_rr_data."', '0', '".$conf['default_ttl']."')"); + $app->db->query("INSERT INTO rr (zone, name, type, data, aux, ttl, sys_userid, sys_groupid, sys_perm_user, sys_perm_group, sys_perm_other) VALUES ('".$ptr_soa_id."', '".$d."', 'PTR', '".$ptr_soa_rr_data."', '0', '".$conf['default_ttl']."', '".$_SESSION['s']['user']['sys_userid']."', '".$_SESSION['s']['user']['sys_groupid']."', '".$_SESSION['s']['user']['sys_perm_user']."', '".$_SESSION['s']['user']['sys_perm_group']."', '".$_SESSION['s']['user']['sys_perm_other']."')"); } else { if($ptr_soa_exist['active'] != 'Y') $app->db->query("UPDATE soa SET active = 'Y' WHERE id = ".$ptr_soa_exist['id']); if(!$ptr_soa_rr_exist = $app->db->queryOneRecord("SELECT * FROM rr WHERE zone = '".$ptr_soa_exist['id']."' AND name = '".$d."' AND type = 'PTR'")){ - $app->db->query("INSERT INTO rr (zone, name, type, data, aux, ttl) VALUES ('".$ptr_soa_exist['id']."', '".$d."', 'PTR', '".$ptr_soa_rr_data."', '0', '".$conf['default_ttl']."')"); + $app->db->query("INSERT INTO rr (zone, name, type, data, aux, ttl, sys_userid, sys_groupid, sys_perm_user, sys_perm_group, sys_perm_other) VALUES ('".$ptr_soa_exist['id']."', '".$d."', 'PTR', '".$ptr_soa_rr_data."', '0', '".$conf['default_ttl']."', '".$_SESSION['s']['user']['sys_userid']."', '".$_SESSION['s']['user']['sys_groupid']."', '".$_SESSION['s']['user']['sys_perm_user']."', '".$_SESSION['s']['user']['sys_perm_group']."', '".$_SESSION['s']['user']['sys_perm_other']."')"); // increase serial of PTR SOA if(!in_array($ptr_soa_exist['id'], $increased_serials)){ $ptr_soa_new_serial = $app->validate_dns->increase_serial($ptr_soa_exist['serial']); diff --git a/interface/web/dns/templates/rr_list.htm b/interface/web/dns/templates/rr_list.htm index fe6ac79923a0ba22dd325072b1a172338d0d8e66..21571450e504c48fbd7d29e49c89d2680fa021dc 100644 --- a/interface/web/dns/templates/rr_list.htm +++ b/interface/web/dns/templates/rr_list.htm @@ -2,7 +2,7 @@ <!-- function del_record(link) { - if(window.confirm("Wollen Sie den Datensatz löschen?")) { + if(window.confirm("<tmpl_var name='delete_confirmation'>")) { location.href = link; } } diff --git a/interface/web/login/index.php b/interface/web/login/index.php index 805f7f2925012ff47cdfdacc9b96bc6a55ba118c..d1e5e1075cc433d3b4fbae8faa486589a06f09d8 100644 --- a/interface/web/login/index.php +++ b/interface/web/login/index.php @@ -1,77 +1,84 @@ -<?php -/* -Copyright (c) 2005, Till Brehm, projektfarm Gmbh -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of ISPConfig nor the names of its contributors - may be used to endorse or promote products derived from this software without - specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY -OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -require_once('../../lib/config.inc.php'); -require_once('../../lib/app.inc.php'); - -$app->uses('tpl'); -$app->tpl->newTemplate("form.tpl.htm"); - -// Login Formular wurde abgesandt -if(count($_POST) > 0) { - - // importiere Variablen - $username = $app->db->quote($_POST["username"]); - $passwort = $app->db->quote($_POST["passwort"]); - - if($username != '' and $passwort != '') { - $sql = "SELECT * FROM sys_user WHERE USERNAME = '$username' and ( PASSWORT = '".md5($passwort)."' or PASSWORT = password('$passwort') )"; - if($user = $app->db->queryOneRecord($sql)) { - if($user["active"] == 1) { - $user = $app->db->toLower($user); - $_SESSION = array(); - $_SESSION["s"]["user"] = $user; - $_SESSION["s"]["user"]["theme"] = $user["app_theme"]; - $_SESSION["s"]["language"] = $user["language"]; - - $site = $app->db->queryOneRecord("SELECT * FROM mb_sites WHERE name = '".$user["site_preset"]."'"); - $_SESSION["s"]["site"] = $site; - - header("Location: ../capp.php?mod=".$user["startmodule"]."&phpsessid=".$_SESSION["s"]["id"]); - exit; - } else { - $error = $app->lng(1003); - } - } else { - // Username oder Passwort falsch - $error = $app->lng(1002); - if($app->db->errorMessage != '') $error .= "<br>".$app->db->errorMessage != ''; - } - } else { - // Username oder Passwort leer - $error = $app->lng(1001); - } -} - -$app->tpl->setVar('error',$error); -$app->tpl->setInclude('content_tpl','templates/index.htm'); -$app->tpl_defaults(); -$app->tpl->pparse(); - +<?php +/* +Copyright (c) 2005, Till Brehm, projektfarm Gmbh +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of ISPConfig nor the names of its contributors + may be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +require_once('../../lib/config.inc.php'); +require_once('../../lib/app.inc.php'); + +$app->uses('tpl'); +$app->tpl->newTemplate("form.tpl.htm"); + +// Login Formular wurde abgesandt +if(count($_POST) > 0) { + + // importiere Variablen + $username = $app->db->quote($_POST["username"]); + $passwort = $app->db->quote($_POST["passwort"]); + + if($username != '' and $passwort != '') { + $sql = "SELECT * FROM sys_user WHERE USERNAME = '$username' and ( PASSWORT = '".md5($passwort)."' or PASSWORT = password('$passwort') )"; + if($user = $app->db->queryOneRecord($sql)) { + if($user["active"] == 1) { + $user = $app->db->toLower($user); + $_SESSION = array(); + $_SESSION["s"]["user"] = $user; + $_SESSION["s"]["user"]["theme"] = $user["app_theme"]; + $_SESSION["s"]["language"] = $user["language"]; + + $site = $app->db->queryOneRecord("SELECT * FROM mb_sites WHERE name = '".$user["site_preset"]."'"); + $_SESSION["s"]["site"] = $site; + + header("Location: ../capp.php?mod=".$user["startmodule"]."&phpsessid=".$_SESSION["s"]["id"]); + exit; + } else { + $error = $app->lng(1003); + } + } else { + // Username oder Passwort falsch + $error = $app->lng(1002); + if($app->db->errorMessage != '') $error .= "<br>".$app->db->errorMessage != ''; + } + } else { + // Username oder Passwort leer + $error = $app->lng(1001); + } +} +if($error != ''){ + $error = '<table width="100%" border="0" cellspacing="0" cellpadding="2"> +<tr> +<td class="error"><b>Error:</b><br>'.$error.'</td> +</tr> +</table>'; +} + +$app->tpl->setVar('error',$error); +$app->tpl->setInclude('content_tpl','templates/index.htm'); +$app->tpl_defaults(); +$app->tpl->pparse(); + ?> \ No newline at end of file diff --git a/interface/web/themes/default/templates/form.tpl.htm b/interface/web/themes/default/templates/form.tpl.htm index 12daa1f3ebf9adf6b459f032fc025c8a491e47f8..ebb2e146486e130380942aebba5b4e82c0e39315 100644 --- a/interface/web/themes/default/templates/form.tpl.htm +++ b/interface/web/themes/default/templates/form.tpl.htm @@ -8,8 +8,8 @@ <!-- function del_record(link) { - if(window.confirm("Wollen Sie den Datensatz löschen?")) { - location.href = link; + if(window.confirm("<tmpl_var name='delete_confirmation'>")) { + location.href = link; } } @@ -22,4 +22,4 @@ function del_record(link) { <tmpl_dyninclude name="content_tpl"> </form> </body> -</html> +</html> \ No newline at end of file