Mutlilinguified Default Settings and Domain Settings.

This commit is contained in:
Nate Jones
2013-05-14 05:34:04 +00:00
parent 6eb013b611
commit a446a9aee1
11 changed files with 518 additions and 138 deletions
+20 -12
View File
@@ -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']];
}
//change the domain
if (strlen(check_str($_GET["domain_uuid"])) > 0 && check_str($_GET["domain_change"]) == "true") {
if (permission_exists('domain_select')) {
@@ -79,6 +85,8 @@ else {
//includes
require_once "includes/header.php";
$page["title"] = $text['title-domains'];
require_once "includes/paging.php";
//get variables used to control the order
@@ -94,12 +102,12 @@ else {
echo "<table width='100%' border='0'>\n";
echo " <tr>\n";
echo " <td width='50%' align='left' nowrap='nowrap'><b>Domains</b></td>\n";
echo " <td width='50%' align='left' nowrap='nowrap'><b>".$text['header-domains']."</b></td>\n";
echo " <td width='50%' align='right'>&nbsp;</td>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <td align='left' colspan='2'>\n";
echo " Control the list of domains to manage.<br /><br />\n";
echo " ".$text['description-domains']."<br /><br />\n";
echo " </td>\n";
echo " </tr>\n";
echo "</table>\n";
@@ -123,9 +131,9 @@ else {
$rows_per_page = 100;
$param = "";
$page = $_GET['page'];
if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; }
list($paging_controls, $rows_per_page, $var3) = 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, $var3) = paging($num_rows, $param, $rows_per_page);
$offset = $rows_per_page * $page;
//get the list
$sql = "select * from v_domains ";
@@ -133,7 +141,7 @@ else {
$sql .= "order by domain_name asc ";
}
else {
$sql .= "order by $order_by $order ";
$sql .= "order by $order_by $order ";
}
$sql .= " limit $rows_per_page offset $offset ";
$prep_statement = $db->prepare(check_sql($sql));
@@ -149,11 +157,11 @@ else {
echo "<div align='center'>\n";
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo "<tr>\n";
echo th_order_by('domain_name', 'Domain', $order_by, $order);
echo th_order_by('domain_description', 'Description', $order_by, $order);
echo th_order_by('domain_name', $text['label-domain'], $order_by, $order);
echo th_order_by('domain_description', $text['label-description'], $order_by, $order);
echo "<td align='right' width='42'>\n";
if (permission_exists('domain_add')) {
echo " <a href='domains_edit.php' alt='add'>$v_link_label_add</a>\n";
echo " <a href='domains_edit.php' alt='".$text['button-add']."'>$v_link_label_add</a>\n";
}
else {
echo " &nbsp;\n";
@@ -168,10 +176,10 @@ else {
echo " <td valign='top' class='".$row_style[$c]."'>".$row['domain_description']."&nbsp;</td>\n";
echo " <td valign='top' align='right'>\n";
if (permission_exists('domain_edit')) {
echo " <a href='domains_edit.php?id=".$row['domain_uuid']."' alt='edit'>$v_link_label_edit</a>\n";
echo " <a href='domains_edit.php?id=".$row['domain_uuid']."' alt='".$text['button-edit']."'>$v_link_label_edit</a>\n";
}
if (permission_exists('domain_delete')) {
echo " <a href='domains_delete.php?id=".$row['domain_uuid']."' alt='delete' onclick=\"return confirm('Do you really want to delete this?')\">$v_link_label_delete</a>\n";
echo " <a href='domains_delete.php?id=".$row['domain_uuid']."' alt='".$text['button-delete']."' onclick=\"return confirm('".$text['confirm-delete']."')\">$v_link_label_delete</a>\n";
}
echo " </td>\n";
echo "</tr>\n";
@@ -188,7 +196,7 @@ else {
echo " <td width='33.3%' align='center' nowrap>$paging_controls</td>\n";
echo " <td width='33.3%' align='right'>\n";
if (permission_exists('domain_add')) {
echo " <a href='domains_edit.php' alt='add'>$v_link_label_add</a>\n";
echo " <a href='domains_edit.php' alt='".$text['button-add']."'>$v_link_label_add</a>\n";
}
else {
echo " &nbsp;\n";