Add the log link to fax
This commit is contained in:
@@ -158,6 +158,9 @@ require_once "resources/paging.php";
|
|||||||
if (permission_exists('fax_sent_view')) {
|
if (permission_exists('fax_sent_view')) {
|
||||||
echo " <a href='fax_box.php?id=".$row['fax_uuid']."&box=sent'>".$text['label-sent']."</a>";
|
echo " <a href='fax_box.php?id=".$row['fax_uuid']."&box=sent'>".$text['label-sent']."</a>";
|
||||||
}
|
}
|
||||||
|
if (permission_exists('fax_log_view')) {
|
||||||
|
echo " <a href='fax_log.php?id=".$row['fax_uuid']."'>".$text['label-log']."</a>";
|
||||||
|
}
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo " <td valign='top' class='row_stylebg' width='35%'>".$row['fax_description']." </td>\n";
|
echo " <td valign='top' class='row_stylebg' width='35%'>".$row['fax_description']." </td>\n";
|
||||||
echo " <td class='list_control_icons'>";
|
echo " <td class='list_control_icons'>";
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ else {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//get the id
|
//get the id
|
||||||
if (count($_GET)>0) {
|
if (count($_GET) > 0) {
|
||||||
$id = check_str($_GET["id"]);
|
$id = check_str($_GET["id"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+12
-5
@@ -19,6 +19,11 @@ else {
|
|||||||
$order_by = $_GET["order_by"];
|
$order_by = $_GET["order_by"];
|
||||||
$order = $_GET["order"];
|
$order = $_GET["order"];
|
||||||
|
|
||||||
|
//get the fax_uuid
|
||||||
|
if (count($_GET) > 0) {
|
||||||
|
$fax_uuid = check_str($_GET["fax_uuid"]);
|
||||||
|
}
|
||||||
|
|
||||||
//additional includes
|
//additional includes
|
||||||
require_once "resources/header.php";
|
require_once "resources/header.php";
|
||||||
require_once "resources/paging.php";
|
require_once "resources/paging.php";
|
||||||
@@ -45,6 +50,7 @@ else {
|
|||||||
//prepare to page the results
|
//prepare to page the results
|
||||||
$sql = "select count(*) as num_rows from v_fax_logs ";
|
$sql = "select count(*) as num_rows from v_fax_logs ";
|
||||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||||
|
$sql .= "and fax_uuid = '$fax_uuid' ";
|
||||||
if (strlen($order_by)> 0) { $sql .= "order by $order_by $order "; }
|
if (strlen($order_by)> 0) { $sql .= "order by $order_by $order "; }
|
||||||
$prep_statement = $db->prepare($sql);
|
$prep_statement = $db->prepare($sql);
|
||||||
if ($prep_statement) {
|
if ($prep_statement) {
|
||||||
@@ -69,6 +75,7 @@ else {
|
|||||||
//get the list
|
//get the list
|
||||||
$sql = "select * from v_fax_logs ";
|
$sql = "select * from v_fax_logs ";
|
||||||
$sql .= "where domain_uuid = '$domain_uuid' ";
|
$sql .= "where domain_uuid = '$domain_uuid' ";
|
||||||
|
$sql .= "and fax_uuid = '$fax_uuid' ";
|
||||||
if (strlen($order_by)> 0) { $sql .= "order by $order_by $order "; }
|
if (strlen($order_by)> 0) { $sql .= "order by $order_by $order "; }
|
||||||
$sql .= "limit $rows_per_page offset $offset ";
|
$sql .= "limit $rows_per_page offset $offset ";
|
||||||
$prep_statement = $db->prepare(check_sql($sql));
|
$prep_statement = $db->prepare(check_sql($sql));
|
||||||
@@ -104,7 +111,7 @@ else {
|
|||||||
//echo th_order_by('fax_epoch', $text['label-fax_epoch'], $order_by, $order);
|
//echo th_order_by('fax_epoch', $text['label-fax_epoch'], $order_by, $order);
|
||||||
echo "<td class='list_control_icons'>";
|
echo "<td class='list_control_icons'>";
|
||||||
if (permission_exists('fax_log_add')) {
|
if (permission_exists('fax_log_add')) {
|
||||||
echo "<a href='fax_log_edit.php' alt='".$text['button-add']."'>$v_link_label_add</a>";
|
echo "<a href='fax_log_edit.php?fax_uuid=$fax_uuid' alt='".$text['button-add']."'>$v_link_label_add</a>";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo " \n";
|
echo " \n";
|
||||||
@@ -115,7 +122,7 @@ else {
|
|||||||
if ($result_count > 0) {
|
if ($result_count > 0) {
|
||||||
foreach($result as $row) {
|
foreach($result as $row) {
|
||||||
if (permission_exists('fax_log_edit')) {
|
if (permission_exists('fax_log_edit')) {
|
||||||
$tr_link = "href='fax_log_edit.php?id=".$row['fax_log_uuid']."'";
|
$tr_link = "href='fax_log_edit.php?id=".$row['fax_log_uuid']."&fax_uuid=$fax_uuid'";
|
||||||
}
|
}
|
||||||
echo "<tr ".$tr_link.">\n";
|
echo "<tr ".$tr_link.">\n";
|
||||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['fax_success']." </td>\n";
|
echo " <td valign='top' class='".$row_style[$c]."'>".$row['fax_success']." </td>\n";
|
||||||
@@ -138,10 +145,10 @@ else {
|
|||||||
//echo " <td valign='top' class='".$row_style[$c]."'>".$row['fax_epoch']." </td>\n";
|
//echo " <td valign='top' class='".$row_style[$c]."'>".$row['fax_epoch']." </td>\n";
|
||||||
echo " <td class='list_control_icons'>";
|
echo " <td class='list_control_icons'>";
|
||||||
if (permission_exists('fax_log_edit')) {
|
if (permission_exists('fax_log_edit')) {
|
||||||
echo "<a href='fax_log_edit.php?id=".$row['fax_log_uuid']."' alt='".$text['button-edit']."'>$v_link_label_edit</a>";
|
echo "<a href='fax_log_edit.php?id=".$row['fax_log_uuid']."&fax_uuid=$fax_uuid' alt='".$text['button-edit']."'>$v_link_label_edit</a>";
|
||||||
}
|
}
|
||||||
if (permission_exists('fax_log_delete')) {
|
if (permission_exists('fax_log_delete')) {
|
||||||
echo "<a href='fax_log_delete.php?id=".$row['fax_log_uuid']."' alt='".$text['button-delete']."' onclick=\"return confirm('".$text['confirm-delete']."')\">$v_link_label_delete</a>";
|
echo "<a href='fax_log_delete.php?id=".$row['fax_log_uuid']."&fax_uuid=$fax_uuid' alt='".$text['button-delete']."' onclick=\"return confirm('".$text['confirm-delete']."')\">$v_link_label_delete</a>";
|
||||||
}
|
}
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
@@ -158,7 +165,7 @@ else {
|
|||||||
echo " <td width='33.3%' align='center' nowrap='nowrap'>$paging_controls</td>\n";
|
echo " <td width='33.3%' align='center' nowrap='nowrap'>$paging_controls</td>\n";
|
||||||
echo " <td class='list_control_icons'>";
|
echo " <td class='list_control_icons'>";
|
||||||
if (permission_exists('fax_log_add')) {
|
if (permission_exists('fax_log_add')) {
|
||||||
echo "<a href='fax_log_edit.php' alt='".$text['button-add']."'>$v_link_label_add</a>";
|
echo "<a href='fax_log_edit.php?fax_uuid=$fax_uuid' alt='".$text['button-add']."'>$v_link_label_add</a>";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo " ";
|
echo " ";
|
||||||
|
|||||||
Reference in New Issue
Block a user