From 1d3319e2b412c7f301146878700b9733cbc1bab0 Mon Sep 17 00:00:00 2001 From: ftimme <ft@falkotimme.com> Date: Wed, 21 Dec 2005 09:35:41 -0500 Subject: [PATCH] --- interface/lib/lang/fr.lng | 23 + interface/web/dns/lib/lang/de_rr_list.lng | 16 + interface/web/dns/lib/lang/fr.lng | 7 interface/web/dns/lib/lang/se_rr.lng | 2 interface/web/themes/default/templates/form.tpl.htm | 6 interface/web/login/index.php | 159 ++++++++------- interface/web/dns/lib/lang/de_rr.lng | 42 ++++ interface/web/dns/lib/lang/fr_soa_list.lng | 23 ++ interface/lib/classes/tform_actions.inc.php | 36 +- interface/web/dns/rr_del.php | 4 interface/web/dns/soa_del.php | 2 interface/web/dns/rr_edit.php | 6 interface/web/dns/lib/lang/fr_rr_list.lng | 16 + interface/lib/lang/de.lng | 11 interface/web/dns/lib/lang/fr_soa.lng | 49 ++++ interface/web/dns/lib/lang/en_rr.lng | 2 interface/web/dns/soa_edit.php | 6 interface/web/dns/lib/lang/de.lng | 7 interface/lib/lang/se.lng | 23 + interface/web/dns/lib/lang/en_rr_list.lng | 1 interface/web/dns/lib/lang/se.lng | 7 interface/web/dns/lib/lang/en.lng | 1 interface/lib/lang/en.lng | 23 + interface/web/dns/lib/lang/de_soa.lng | 49 ++++ interface/web/dns/templates/rr_list.htm | 2 interface/lib/app.inc.php | 1 interface/web/dns/lib/lang/fr_rr.lng | 42 ++++ interface/web/dns/lib/lang/de_soa_list.lng | 23 ++ 28 files changed, 457 insertions(+), 132 deletions(-) diff --git a/interface/lib/app.inc.php b/interface/lib/app.inc.php index c2cffa4..70d1c74 100644 --- a/interface/lib/app.inc.php +++ b/interface/lib/app.inc.php @@ -168,6 +168,7 @@ $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 7652567..e4a508e 100644 --- a/interface/lib/classes/tform_actions.inc.php +++ b/interface/lib/classes/tform_actions.inc.php @@ -113,12 +113,12 @@ 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 @@ 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 @@ $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 @@ // 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 @@ //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 @@ } 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 fadb7e6..db49eea 100644 --- a/interface/lib/lang/de.lng +++ b/interface/lib/lang/de.lng @@ -8,7 +8,14 @@ // 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 22b0edb..b862b60 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 d465272..998a082 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 041b51f..1b2c740 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 0000000..f5c590d --- /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 0000000..75e378d --- /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 0000000..fe35547 --- /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 0000000..9920b11 --- /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 0000000..e07b8cd --- /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 fb1fbff..f47d5eb 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 eba01c3..8e5cf83 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_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 cfd6e86..9a6f6d2 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["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 0000000..f47d5eb --- /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 0000000..8e5cf83 --- /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 0000000..9a6f6d2 --- /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 0000000..d7e118b --- /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 0000000..d5ea1d7 --- /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 0000000..f47d5eb --- /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 e19c10a..073f2c3 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_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 0f207e6..81e4bcd 100644 --- a/interface/web/dns/rr_del.php +++ b/interface/web/dns/rr_del.php @@ -57,7 +57,7 @@ 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 @@ } 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 8cd4dad..3b08dd1 100644 --- a/interface/web/dns/rr_edit.php +++ b/interface/web/dns/rr_edit.php @@ -100,13 +100,13 @@ } 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 e29a5a3..3d88ab0 100644 --- a/interface/web/dns/soa_del.php +++ b/interface/web/dns/soa_del.php @@ -83,7 +83,7 @@ } 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 e38109f..ba9cf9f 100644 --- a/interface/web/dns/soa_edit.php +++ b/interface/web/dns/soa_edit.php @@ -195,13 +195,13 @@ } 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 fe6ac79..2157145 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 805f7f2..d1e5e10 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 12daa1f..ebb2e14 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 @@ <tmpl_dyninclude name="content_tpl"> </form> </body> -</html> +</html> \ No newline at end of file -- Gitblit v1.9.1