Multilinquified Contacts app (sans <select> options). Hid QR Code and vCard buttons on Contact Add page.

This commit is contained in:
Nate Jones
2013-05-10 00:40:24 +00:00
parent d02dbddf8b
commit c0bb5b6153
14 changed files with 733 additions and 308 deletions

View File

@@ -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 "<table width=\"100%\" border=\"0\" cellpadding=\"5\" cellspacing=\"0\">\n";
echo " <tr>\n";
echo " <td align=\"left\" valign=\"top\"><strong>Contacts</strong><br>\n";
echo " The contact is a list of individuals and organizations.\n";
echo " <td align=\"left\" valign=\"top\"><strong>".$text['header-contacts']."</strong><br>\n";
echo " ".$text['description-contacts']."\n";
echo " </td>\n";
echo " <td align=\"right\" valign=\"top\">\n";
echo " <form method=\"GET\" name=\"frm_search\" action=\"\">\n";
echo " <input class=\"formfld\" type=\"text\" name=\"search_all\" value=\"$search_all\">\n";
echo " <input class=\"btn\" type=\"submit\" name=\"submit\" value=\"Search All\">\n";
echo " <input class=\"btn\" type=\"submit\" name=\"submit\" value=\"".$text['button-search']."\">\n";
echo " </form>\n";
echo " </td>\n";
if (permission_exists('contacts_add')) {
echo " <td align=\"right\" valign=\"top\" width=\"50px\">\n";
echo " <input type='button' class='btn' name='' alt='back' onclick=\"window.location='contact_import.php'\" value='Import'>\n";
echo " <input type='button' class='btn' name='' alt='back' onclick=\"window.location='contact_import.php'\" value='".$text['button-import']."'>\n";
echo " </td>\n";
}
echo " </tr>\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 "<div align='center'>\n";
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo "<tr>\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 "<td align='right' width='42'>\n";
echo " <a href='contacts_edit.php' alt='add'>$v_link_label_add</a>\n";
echo " <a href='contacts_edit.php' alt='".$text['button-add']."'>$v_link_label_add</a>\n";
echo "</td>\n";
echo "<tr>\n";
@@ -210,8 +219,8 @@ require_once "includes/paging.php";
//echo " <td valign='top' class='".$row_style[$c]."'>".$row['contact_time_zone']."&nbsp;</td>\n";
//echo " <td valign='top' class='".$row_style[$c]."'>".$row['contact_note']."&nbsp;</td>\n";
echo " <td valign='top' align='right'>\n";
echo " <a href='contacts_edit.php?id=".$row['contact_uuid']."&query_string=".urlencode($_SERVER["QUERY_STRING"])."' alt='edit'>$v_link_label_edit</a>\n";
echo " <a href='contacts_delete.php?id=".$row['contact_uuid']."' alt='delete' onclick=\"return confirm('Do you really want to delete this?')\">$v_link_label_delete</a>\n";
echo " <a href='contacts_edit.php?id=".$row['contact_uuid']."&query_string=".urlencode($_SERVER["QUERY_STRING"])."' alt='".$text['button-edit']."'>$v_link_label_edit</a>\n";
echo " <a href='contacts_delete.php?id=".$row['contact_uuid']."' alt='".$text['button-delete']."' onclick=\"return confirm('".$text['confirm-delete']."')\">$v_link_label_delete</a>\n";
echo " </td>\n";
echo "</tr>\n";
if ($c==0) { $c=1; } else { $c=0; }
@@ -226,7 +235,7 @@ require_once "includes/paging.php";
echo " <td width='33.3%' nowrap>&nbsp;</td>\n";
echo " <td width='33.3%' align='center' nowrap>$paging_controls</td>\n";
echo " <td width='33.3%' align='right'>\n";
echo " <a href='contacts_edit.php' alt='add'>$v_link_label_add</a>\n";
echo " <a href='contacts_edit.php' alt='".$text['button-add']."'>$v_link_label_add</a>\n";
echo " </td>\n";
echo " </tr>\n";
echo " </table>\n";