";
@@ -213,18 +224,31 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo "
\n";
echo "
";
diff --git a/app/contacts/contact_import.php b/app/contacts/contact_import.php
index a7a5c75227..0ff4030058 100644
--- a/app/contacts/contact_import.php
+++ b/app/contacts/contact_import.php
@@ -34,7 +34,13 @@ else {
exit;
}
-//built in str_getcsv requires PHP 5.3 or higher, this function can be used to reproduct the functionality but requirs PHP 5.1.0 or higher
+//add multi-lingual support
+ require_once "app_languages.php";
+ foreach($text as $key => $value) {
+ $text[$key] = $value[$_SESSION['domain']['language']['code']];
+ }
+
+//built in str_getcsv requires PHP 5.3 or higher, this function can be used to reproduct the functionality but requirs PHP 5.1.0 or higher
if(!function_exists('str_getcsv')) {
function str_getcsv($input, $delimiter = ",", $enclosure = '"', $escape = "\\") {
$fp = fopen("php://memory", 'r+');
@@ -296,14 +302,14 @@ else {
echo "
\n";
echo "
\n";
@@ -311,10 +317,10 @@ else {
//show the results
echo "
\n";
echo "\n";
- echo " Name \n";
- echo " Organization \n";
- echo " Email \n";
- echo " URL \n";
+ echo " ".$text['label-contact_name']." \n";
+ echo " ".$text['label-contact_organization']." \n";
+ echo " ".$text['label-contact_email']." \n";
+ echo " ".$text['label-contact_url']." \n";
echo " \n";
foreach($results as $row) {
echo "\n";
@@ -354,11 +360,11 @@ else {
echo "";
@@ -370,7 +376,7 @@ else {
echo " \n";
echo "\n";
- echo " Delimiter:\n";
+ echo " ".$text['label-import_delimiter'].":\n";
echo " \n";
echo "\n";
echo " \n";
@@ -378,13 +384,13 @@ else {
echo " | \n";
echo " \n";
echo " \n";
- echo "Select the delimiter.\n";
+ echo $text['description-import_delimiter']."\n";
echo " \n";
echo " \n";
echo "\n";
echo "\n";
- echo " Enclosure:\n";
+ echo " ".$text['label-import_enclosure'].":\n";
echo " \n";
echo "\n";
echo " \n";
@@ -392,13 +398,13 @@ else {
echo " \n";
echo " \n";
echo " \n";
- echo "Select the enclosure.\n";
+ echo $text['description-import_enclosure']."\n";
echo " \n";
echo " \n";
echo "\n";
echo "\n";
- echo " File to upload:\n";
+ echo " ".$text['label-import_file_upload'].":\n";
echo " \n";
echo "\n";
echo " \n";
@@ -413,7 +419,7 @@ else {
echo " \n";
echo " \n";
echo " \n";
- echo " \n";
+ echo " \n";
echo " \n";
echo " \n";
echo "
\n";
diff --git a/app/contacts/contact_notes.php b/app/contacts/contact_notes.php
index 2ff8da16f3..fccc9c5118 100644
--- a/app/contacts/contact_notes.php
+++ b/app/contacts/contact_notes.php
@@ -33,7 +33,8 @@ else {
echo "access denied";
exit;
}
-require_once "includes/header.php";
+
+//require_once "includes/header.php";
require_once "includes/paging.php";
//get variables used to control the order
@@ -41,28 +42,18 @@ require_once "includes/paging.php";
$order = $_GET["order"];
//set defaults
- if (strlen($order_by) == 0) {
+ if (strlen($order_by) == 0) {
$order_by = 'last_mod_date';
$order = 'desc';
}
//show the content
- //echo "
";
- //echo "
\n";
- //echo "\n";
- //echo " \n";
- //echo " ";
echo "\n";
echo "\n";
- echo "Notes \n";
+ echo "".$text['label-contact_notes']." \n";
echo " \n";
echo " \n";
- //echo "\n";
- //echo "\n";
- //echo " List of notes for the contact. \n";
- //echo " \n";
- //echo " \n";
echo "
\n";
//prepare to page the results
@@ -86,9 +77,9 @@ require_once "includes/paging.php";
$rows_per_page = 10;
$param = "";
$page = $_GET['page'];
- if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; }
- list($paging_controls, $rows_per_page, $var_3) = paging($num_rows, $param, $rows_per_page);
- $offset = $rows_per_page * $page;
+ if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; }
+ list($paging_controls, $rows_per_page, $var_3) = paging($num_rows, $param, $rows_per_page);
+ $offset = $rows_per_page * $page;
//get the contact list
$sql = "select * from v_contact_notes ";
@@ -117,7 +108,7 @@ require_once "includes/paging.php";
echo " \n";
echo "\n";
echo " \n";
- echo " $v_link_label_add \n";
+ echo " $v_link_label_add \n";
echo " \n";
echo " \n";
}
@@ -134,7 +125,7 @@ require_once "includes/paging.php";
//echo "Modified Date ".$row['last_mod_date']." \n";
//echo "Modified By ".$row['last_mod_user']." \n";
echo "\n";
- echo " $v_link_label_add \n";
+ echo " $v_link_label_add \n";
echo " \n";
echo " \n";
@@ -143,8 +134,8 @@ require_once "includes/paging.php";
//echo " ".$row['last_mod_date']." \n";
//echo " ".$row['last_mod_user']." \n";
echo " \n";
- echo " $v_link_label_edit \n";
- echo " $v_link_label_delete \n";
+ echo " $v_link_label_edit \n";
+ echo " $v_link_label_delete \n";
echo " \n";
echo " \n";
@@ -164,7 +155,7 @@ require_once "includes/paging.php";
echo " \n";
echo " $paging_controls \n";
echo " \n";
- echo " $v_link_label_add \n";
+ echo " $v_link_label_add \n";
echo " \n";
echo " \n";
echo "
\n";
@@ -174,12 +165,4 @@ require_once "includes/paging.php";
echo "";
echo "
";
- //echo "";
- //echo "";
- //echo "";
- //echo "
";
- //echo "
";
-
-//include the footer
- //require_once "includes/footer.php";
?>
\ No newline at end of file
diff --git a/app/contacts/contact_notes_delete.php b/app/contacts/contact_notes_delete.php
index 308731e642..b07ceaeb56 100644
--- a/app/contacts/contact_notes_delete.php
+++ b/app/contacts/contact_notes_delete.php
@@ -34,6 +34,12 @@ else {
exit;
}
+//add multi-lingual support
+ require_once "app_languages.php";
+ foreach($text as $key => $value) {
+ $text[$key] = $value[$_SESSION['domain']['language']['code']];
+ }
+
if (count($_GET)>0) {
$id = check_str($_GET["id"]);
$contact_uuid = check_str($_GET["contact_uuid"]);
@@ -52,7 +58,7 @@ if (strlen($id)>0) {
require_once "includes/header.php";
echo "
\n";
echo "
\n";
-echo "Delete Complete\n";
+echo $text['message-delete']."\n";
echo "
\n";
require_once "includes/footer.php";
return;
diff --git a/app/contacts/contact_notes_edit.php b/app/contacts/contact_notes_edit.php
index f155db0ac0..cdbaa7600a 100644
--- a/app/contacts/contact_notes_edit.php
+++ b/app/contacts/contact_notes_edit.php
@@ -34,6 +34,12 @@ else {
exit;
}
+//add multi-lingual support
+ require_once "app_languages.php";
+ foreach($text as $key => $value) {
+ $text[$key] = $value[$_SESSION['domain']['language']['code']];
+ }
+
//action add or update
if (isset($_REQUEST["id"])) {
$action = "update";
@@ -62,10 +68,10 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
}
//check for all required data
- //if (strlen($contact_note) == 0) { $msg .= "Please provide: Notes
\n"; }
- //if (strlen($domain_uuid) == 0) { $msg .= "Please provide: domain_uuid
\n"; }
- //if (strlen($last_mod_date) == 0) { $msg .= "Please provide: Last Modified Date
\n"; }
- //if (strlen($last_mod_user) == 0) { $msg .= "Please provide: Last Modified By
\n"; }
+ //if (strlen($contact_note) == 0) { $msg .= $text['message-required'].$text['label-contact_note']."
\n"; }
+ //if (strlen($domain_uuid) == 0) { $msg .= $text['message-required']."domain_uuid
\n"; }
+ //if (strlen($last_mod_date) == 0) { $msg .= $text['message-required']."Last Modified Date
\n"; }
+ //if (strlen($last_mod_user) == 0) { $msg .= $text['message-required']."Last Modified By
\n"; }
if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
require_once "includes/header.php";
require_once "includes/persistformvar.php";
@@ -107,7 +113,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
require_once "includes/header.php";
echo "
\n";
echo "
\n";
- echo "Add Complete\n";
+ echo $text['message-add']."\n";
echo "
\n";
require_once "includes/footer.php";
return;
@@ -127,12 +133,12 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
require_once "includes/header.php";
echo "
\n";
echo "
\n";
- echo "Update Complete\n";
+ echo $text['message-update']."\n";
echo "
\n";
require_once "includes/footer.php";
return;
} //if ($action == "update")
- } //if ($_POST["persistformvar"] != "true")
+ } //if ($_POST["persistformvar"] != "true")
} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0)
//pre-populate the form
@@ -156,6 +162,12 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
//show the header
require_once "includes/header.php";
+ if ($action == "update") {
+ $page["title"] = $text['title-contact_notes-edit'];
+ }
+ else if ($action == "add") {
+ $page["title"] = $text['title-contact_notes-add'];
+ }
//show the content
echo "
";
@@ -170,17 +182,16 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo "
";
diff --git a/app/contacts/contact_phones.php b/app/contacts/contact_phones.php
index 0f6c5c16d8..e07c65f98a 100644
--- a/app/contacts/contact_phones.php
+++ b/app/contacts/contact_phones.php
@@ -33,7 +33,8 @@ else {
echo "access denied";
exit;
}
-require_once "includes/header.php";
+
+//require_once "includes/header.php";
require_once "includes/paging.php";
//get variables used to control the order
@@ -56,22 +57,12 @@ require_once "includes/paging.php";
echo "\n";
//show the content
- //echo "
";
- //echo "
\n";
- //echo "\n";
- //echo " \n";
- //echo " ";
echo "\n";
echo "\n";
- echo "Phone Numbers \n";
+ echo "".$text['label-phone_numbers']." \n";
echo " \n";
echo " \n";
- //echo "\n";
- //echo "\n";
- //echo " List of phone numbers for the contact. \n";
- //echo " \n";
- //echo " \n";
echo "
\n";
//prepare to page the results
@@ -95,9 +86,9 @@ require_once "includes/paging.php";
$rows_per_page = 10;
$param = "";
$page = $_GET['page'];
- if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; }
- list($paging_controls, $rows_per_page, $var_3) = paging($num_rows, $param, $rows_per_page);
- $offset = $rows_per_page * $page;
+ if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; }
+ list($paging_controls, $rows_per_page, $var_3) = paging($num_rows, $param, $rows_per_page);
+ $offset = $rows_per_page * $page;
//get the contact list
$sql = "select * from v_contact_phones ";
@@ -118,12 +109,12 @@ require_once "includes/paging.php";
echo "\n";
echo "
\n";
echo "\n";
- echo th_order_by('phone_type', 'Type', $order_by, $order);
- echo th_order_by('phone_number', 'Numbers', $order_by, $order);
- echo "Tools \n";
- echo th_order_by('phone_description', 'Description', $order_by, $order);
+ echo th_order_by('phone_type', $text['label-phone_type'], $order_by, $order);
+ echo th_order_by('phone_number', $text['label-phone_number'], $order_by, $order);
+ echo "".$text['label-phone_tools']." \n";
+ echo th_order_by('phone_description', $text['label-phone_description'], $order_by, $order);
echo "\n";
- echo " $v_link_label_add \n";
+ echo " $v_link_label_add \n";
echo " \n";
echo " \n";
if ($result_count > 0) {
@@ -135,15 +126,15 @@ require_once "includes/paging.php";
echo " ".format_phone($row['phone_number'])." \n";
echo " \n";
echo " \n";
- echo " Call \n";
+ echo " ".$text['label-phone_call']." \n";
echo " \n";
echo " CDR \n";
echo " \n";
echo " \n";
echo " ".$row['phone_description']." \n";
echo " \n";
- echo " $v_link_label_edit \n";
- echo " $v_link_label_delete \n";
+ echo " $v_link_label_edit \n";
+ echo " $v_link_label_delete \n";
echo " \n";
echo " \n";
if ($c==0) { $c=1; } else { $c=0; }
@@ -158,7 +149,7 @@ require_once "includes/paging.php";
echo " \n";
echo " $paging_controls \n";
echo " \n";
- echo " $v_link_label_add \n";
+ echo " $v_link_label_add \n";
echo " \n";
echo " \n";
echo "
\n";
@@ -168,12 +159,4 @@ require_once "includes/paging.php";
echo "
";
echo "
";
- //echo "";
- //echo "";
- //echo "";
- //echo "
";
- //echo "
";
-
-//include the footer
- //require_once "includes/footer.php";
?>
\ No newline at end of file
diff --git a/app/contacts/contact_phones_delete.php b/app/contacts/contact_phones_delete.php
index fe8dadf675..57b5474f13 100644
--- a/app/contacts/contact_phones_delete.php
+++ b/app/contacts/contact_phones_delete.php
@@ -34,6 +34,12 @@ else {
exit;
}
+//add multi-lingual support
+ require_once "app_languages.php";
+ foreach($text as $key => $value) {
+ $text[$key] = $value[$_SESSION['domain']['language']['code']];
+ }
+
if (count($_GET)>0) {
$id = check_str($_GET["id"]);
$contact_uuid = check_str($_GET["contact_uuid"]);
@@ -52,7 +58,7 @@ if (strlen($id)>0) {
require_once "includes/header.php";
echo "
\n";
echo "
\n";
-echo "Delete Complete\n";
+echo $text['message-delete']."\n";
echo "
\n";
require_once "includes/footer.php";
diff --git a/app/contacts/contact_phones_edit.php b/app/contacts/contact_phones_edit.php
index bcf6540aa4..aaf956f598 100644
--- a/app/contacts/contact_phones_edit.php
+++ b/app/contacts/contact_phones_edit.php
@@ -34,6 +34,12 @@ else {
exit;
}
+//add multi-lingual support
+ require_once "app_languages.php";
+ foreach($text as $key => $value) {
+ $text[$key] = $value[$_SESSION['domain']['language']['code']];
+ }
+
//action add or update
if (isset($_REQUEST["id"])) {
$action = "update";
@@ -66,9 +72,8 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
}
//check for all required data
- //if (strlen($domain_uuid) == 0) { $msg .= "Please provide: domain_uuid
\n"; }
- //if (strlen($phone_type) == 0) { $msg .= "Please provide: Telephone Type.
\n"; }
- //if (strlen($phone_number) == 0) { $msg .= "Please provide: Telephone Number
\n"; }
+ //if (strlen($phone_type) == 0) { $msg .= $text['message-required'].$text['label-phone_type']."
\n"; }
+ //if (strlen($phone_number) == 0) { $msg .= $text['message-required'].$text['label-phone_number']."
\n"; }
if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
require_once "includes/header.php";
require_once "includes/persistformvar.php";
@@ -112,7 +117,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
require_once "includes/header.php";
echo "
\n";
echo "
\n";
- echo "Add Complete\n";
+ echo $text['message-add']."\n";
echo "
\n";
require_once "includes/footer.php";
return;
@@ -133,12 +138,12 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
require_once "includes/header.php";
echo "
\n";
echo "
\n";
- echo "Update Complete\n";
+ echo $text['message-update']."\n";
echo "
\n";
require_once "includes/footer.php";
return;
} //if ($action == "update")
- } //if ($_POST["persistformvar"] != "true")
+ } //if ($_POST["persistformvar"] != "true")
} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0)
//pre-populate the form
@@ -161,6 +166,12 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
//show the header
require_once "includes/header.php";
+ if ($action == "update") {
+ $page["title"] = $text['title-contact_phones-edit'];
+ }
+ else if ($action == "add") {
+ $page["title"] = $text['title-contact_phones-add'];
+ }
//show the content
echo "
";
@@ -173,18 +184,24 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo "
\n";
echo "
";
diff --git a/app/contacts/contacts.php b/app/contacts/contacts.php
index 209167f407..4b3318eb14 100644
--- a/app/contacts/contacts.php
+++ b/app/contacts/contacts.php
@@ -33,7 +33,16 @@ else {
echo "access denied";
exit;
}
+
+//add multi-lingual support
+ require_once "app_languages.php";
+ foreach($text as $key => $value) {
+ $text[$key] = $value[$_SESSION['domain']['language']['code']];
+ }
+
require_once "includes/header.php";
+$page["title"] = $text['title-contacts'];
+
require_once "includes/paging.php";
//get the search criteria
@@ -53,18 +62,18 @@ require_once "includes/paging.php";
echo "
\n";
echo " \n";
- echo " Contacts \n";
- echo " The contact is a list of individuals and organizations.\n";
+ echo " ".$text['header-contacts']." \n";
+ echo " ".$text['description-contacts']."\n";
echo " \n";
echo " \n";
echo " \n";
echo " \n";
if (permission_exists('contacts_add')) {
echo " \n";
- echo " \n";
+ echo " \n";
echo " \n";
}
echo " \n";
@@ -124,9 +133,9 @@ require_once "includes/paging.php";
$rows_per_page = 150;
$param = "";
$page = $_GET['page'];
- if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; }
- list($paging_controls, $rows_per_page, $var_3) = paging($num_rows, $param, $rows_per_page);
- $offset = $rows_per_page * $page;
+ if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; }
+ list($paging_controls, $rows_per_page, $var_3) = paging($num_rows, $param, $rows_per_page);
+ $offset = $rows_per_page * $page;
//get the list
$sql = "select * from v_contacts ";
@@ -177,20 +186,20 @@ require_once "includes/paging.php";
echo "\n";
echo "
\n";
echo "\n";
- echo th_order_by('contact_type', 'Type', $order_by, $order);
- echo th_order_by('contact_organization', 'Organization', $order_by, $order);
- echo th_order_by('contact_name_given', 'First Name', $order_by, $order);
- echo th_order_by('contact_name_family', 'Last Name', $order_by, $order);
- echo th_order_by('contact_nickname', 'Nickname', $order_by, $order);
- echo th_order_by('contact_title', 'Title', $order_by, $order);
- //echo th_order_by('contact_category', 'Category', $order_by, $order);
- echo th_order_by('contact_role', 'Role', $order_by, $order);
- //echo th_order_by('contact_email', 'Email', $order_by, $order);
- //echo th_order_by('contact_url', 'URL', $order_by, $order);
- //echo th_order_by('contact_time_zone', 'Time Zone', $order_by, $order);
- //echo th_order_by('contact_note', 'Notes', $order_by, $order);
+ echo th_order_by('contact_type', $text['label-contact_type'], $order_by, $order);
+ echo th_order_by('contact_organization', $text['label-contact_organization'], $order_by, $order);
+ echo th_order_by('contact_name_given', $text['label-contact_name_given'], $order_by, $order);
+ echo th_order_by('contact_name_family', $text['label-contact_name_family'], $order_by, $order);
+ echo th_order_by('contact_nickname', $text['label-contact_nickname'], $order_by, $order);
+ echo th_order_by('contact_title', $text['label-contact_title'], $order_by, $order);
+ //echo th_order_by('contact_category', $text['label-contact_category'], $order_by, $order);
+ echo th_order_by('contact_role', $text['label-contact_role'], $order_by, $order);
+ //echo th_order_by('contact_email', $text['label-contact_email'], $order_by, $order);
+ //echo th_order_by('contact_url', $text['label-contact_url'], $order_by, $order);
+ //echo th_order_by('contact_time_zone', $text['label-contact_time_zone'], $order_by, $order);
+ //echo th_order_by('contact_note', $text['label-contact_note'], $order_by, $order);
echo "\n";
- echo " $v_link_label_add \n";
+ echo " $v_link_label_add \n";
echo " \n";
echo " \n";
@@ -210,8 +219,8 @@ require_once "includes/paging.php";
//echo " ".$row['contact_time_zone']." \n";
//echo " ".$row['contact_note']." \n";
echo " \n";
- echo " $v_link_label_edit \n";
- echo " $v_link_label_delete \n";
+ echo " $v_link_label_edit \n";
+ echo " $v_link_label_delete \n";
echo " \n";
echo " \n";
if ($c==0) { $c=1; } else { $c=0; }
@@ -226,7 +235,7 @@ require_once "includes/paging.php";
echo " \n";
echo " $paging_controls \n";
echo " \n";
- echo " $v_link_label_add \n";
+ echo " $v_link_label_add \n";
echo " \n";
echo " \n";
echo "
\n";
diff --git a/app/contacts/contacts_delete.php b/app/contacts/contacts_delete.php
index 560abdd98a..2807677dc6 100644
--- a/app/contacts/contacts_delete.php
+++ b/app/contacts/contacts_delete.php
@@ -34,6 +34,12 @@ else {
exit;
}
+//add multi-lingual support
+ require_once "app_languages.php";
+ foreach($text as $key => $value) {
+ $text[$key] = $value[$_SESSION['domain']['language']['code']];
+ }
+
if (count($_GET)>0) {
$id = check_str($_GET["id"]);
}
@@ -78,7 +84,7 @@ if (strlen($id)>0) {
require_once "includes/header.php";
echo "
\n";
echo "
\n";
- echo "Delete Complete\n";
+ echo $text['message-delete']."\n";
echo "
\n";
require_once "includes/footer.php";
return;
diff --git a/app/contacts/contacts_edit.php b/app/contacts/contacts_edit.php
index 2668bbc09b..f139c89eb4 100644
--- a/app/contacts/contacts_edit.php
+++ b/app/contacts/contacts_edit.php
@@ -34,6 +34,12 @@ else {
exit;
}
+//add multi-lingual support
+ require_once "app_languages.php";
+ foreach($text as $key => $value) {
+ $text[$key] = $value[$_SESSION['domain']['language']['code']];
+ }
+
//action add or update
if (isset($_REQUEST["id"])) {
$action = "update";
@@ -67,18 +73,17 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
}
//check for all required data
- //if (strlen($domain_uuid) == 0) { $msg .= "Please provide: domain_uuid
\n"; }
- //if (strlen($contact_type) == 0) { $msg .= "Please provide: Type
\n"; }
- //if (strlen($contact_organization) == 0) { $msg .= "Please provide: Organization
\n"; }
- //if (strlen($contact_name_given) == 0) { $msg .= "Please provide: First Name
\n"; }
- //if (strlen($contact_name_family) == 0) { $msg .= "Please provide: Last Name
\n"; }
- //if (strlen($contact_nickname) == 0) { $msg .= "Please provide: Nickname
\n"; }
- //if (strlen($contact_title) == 0) { $msg .= "Please provide: Title
\n"; }
- //if (strlen($contact_role) == 0) { $msg .= "Please provide: Role
\n"; }
- //if (strlen($contact_email) == 0) { $msg .= "Please provide: Email
\n"; }
- //if (strlen($contact_url) == 0) { $msg .= "Please provide: URL
\n"; }
- //if (strlen($contact_time_zone) == 0) { $msg .= "Please provide: Time Zone
\n"; }
- //if (strlen($contact_note) == 0) { $msg .= "Please provide: Notes
\n"; }
+ //if (strlen($contact_type) == 0) { $msg .= $text['message-required'].$text['label-contact_type']."
\n"; }
+ //if (strlen($contact_organization) == 0) { $msg .= $text['message-required'].$text['label-contact_organization']."
\n"; }
+ //if (strlen($contact_name_given) == 0) { $msg .= $text['message-required'].$text['label-contact_name_given']."
\n"; }
+ //if (strlen($contact_name_family) == 0) { $msg .= $text['message-required'].$text['label-contact_name_family']."
\n"; }
+ //if (strlen($contact_nickname) == 0) { $msg .= $text['message-required'].$text['label-contact_nickname']."
\n"; }
+ //if (strlen($contact_title) == 0) { $msg .= $text['message-required'].$text['label-contact_title']."
\n"; }
+ //if (strlen($contact_role) == 0) { $msg .= $text['message-required'].$text['label-contact_role']."
\n"; }
+ //if (strlen($contact_email) == 0) { $msg .= $text['message-required'].$text['label-contact_email']."
\n"; }
+ //if (strlen($contact_url) == 0) { $msg .= $text['message-required'].$text['label-contact_url']."
\n"; }
+ //if (strlen($contact_time_zone) == 0) { $msg .= $text['message-required'].$text['label-contact_time_zone']."
\n"; }
+ //if (strlen($contact_note) == 0) { $msg .= $text['message-required'].$text['label-contact_note']."
\n"; }
if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
require_once "includes/header.php";
require_once "includes/persistformvar.php";
@@ -136,7 +141,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
require_once "includes/header.php";
echo "
\n";
echo "
\n";
- echo "Add Complete\n";
+ echo $text['message-add']."\n";
echo "
\n";
require_once "includes/footer.php";
return;
@@ -164,12 +169,12 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
require_once "includes/header.php";
echo "
\n";
echo "
\n";
- echo "Update Complete\n";
+ echo $text['message-update']."\n";
echo "
\n";
require_once "includes/footer.php";
return;
} //if ($action == "update")
- } //if ($_POST["persistformvar"] != "true")
+ } //if ($_POST["persistformvar"] != "true")
} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0)
//pre-populate the form
@@ -201,6 +206,13 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
//show the header
require_once "includes/header.php";
+ if ($action == "update") {
+ $page["title"] = $text['title-contact-edit'];
+ }
+ else if ($action == "add") {
+ $page["title"] = $text['title-contact-add'];
+ }
+
//show the content
echo "
";
@@ -212,19 +224,30 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo "
\n";
echo "
\n";
@@ -235,23 +258,18 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo "