Add links to certain column text in a list view.

Misc bug fixes.
This commit is contained in:
Nate Jones
2014-06-21 03:42:09 +00:00
parent d5a9796e0f
commit 632fd2cb39
28 changed files with 203 additions and 74 deletions

View File

@@ -38,7 +38,7 @@ else {
//add multi-lingual support
require_once "app_languages.php";
foreach($text as $key => $value) {
$text[$key] = $value[$_SESSION['domain']['language']['code']];
$text[$key] = $value[$_SESSION['domain']['language']['code']];
}
//add the includes
@@ -74,9 +74,9 @@ else {
$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;
$sql = "select * from v_call_broadcasts ";
$sql .= "where domain_uuid = '$domain_uuid' ";
@@ -99,9 +99,9 @@ else {
echo th_order_by('broadcast_concurrent_limit', $text['label-concurrent-limit'], $order_by, $order);
echo th_order_by('broadcast_description', $text['label-description'], $order_by, $order);
//echo th_order_by('recordingid', 'Recording', $order_by, $order);
echo "<td align='right' width='42'>\n";
echo "<td class='list_control_icons'>";
if (permission_exists('call_broadcast_add')) {
echo " <a href='call_broadcast_edit.php' alt='add'>$v_link_label_add</a>\n";
echo "<a href='call_broadcast_edit.php' alt='add'>$v_link_label_add</a>";
}
echo "</td>\n";
echo "<tr>\n";
@@ -109,16 +109,23 @@ else {
if ($result_count > 0) {
foreach($result as $row) {
echo "<tr >\n";
echo " <td valign='top' class='".$row_style[$c]."'>".$row['broadcast_name']."&nbsp;</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>";
if (permission_exists('call_broadcast_edit')) {
echo "<a href='call_broadcast_edit.php?id=".$row['call_broadcast_uuid']."'>".$row['broadcast_name']."</a>";
}
else {
echo $row['broadcast_name'];
}
echo " </td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".$row['broadcast_concurrent_limit']."&nbsp;</td>\n";
//echo " <td valign='top' class='".$row_style[$c]."'>".$row['recordingid']."</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".$row['broadcast_description']."&nbsp;</td>\n";
echo " <td valign='top' align='right'>\n";
echo " <td class='list_control_icons'>";
if (permission_exists('call_broadcast_edit')) {
echo " <a href='call_broadcast_edit.php?id=".$row['call_broadcast_uuid']."' alt='edit'>$v_link_label_edit</a>\n";
echo "<a href='call_broadcast_edit.php?id=".$row['call_broadcast_uuid']."' alt='".$text['button-edit']."'>$v_link_label_edit</a>";
}
if (permission_exists('call_broadcast_delete')) {
echo " <a href='call_broadcast_delete.php?id=".$row['call_broadcast_uuid']."' alt='delete' onclick=\"return confirm('".$text['confirm-delete-info']."')\">$v_link_label_delete</a>\n";
echo "<a href='call_broadcast_delete.php?id=".$row['call_broadcast_uuid']."' alt='".$text['button-delete']."' onclick=\"return confirm('".$text['confirm-delete-info']."')\">$v_link_label_delete</a>";
}
echo " </td>\n";
echo "</tr>\n";
@@ -134,9 +141,9 @@ else {
echo " <tr>\n";
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 " <td class='list_control_icons'>";
if (permission_exists('call_broadcast_add')) {
echo " <a href='call_broadcast_edit.php' alt='add'>$v_link_label_add</a>\n";
echo "<a href='call_broadcast_edit.php' alt='add'>$v_link_label_add</a>";
}
echo " </td>\n";
echo " </tr>\n";