Update contact_urls.php
This commit is contained in:
@@ -17,22 +17,26 @@
|
|||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Portions created by the Initial Developer are Copyright (C) 2008-2012
|
Portions created by the Initial Developer are Copyright (C) 2008-2018
|
||||||
the Initial Developer. All Rights Reserved.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
*/
|
*/
|
||||||
require_once "root.php";
|
|
||||||
require_once "resources/require.php";
|
//includes
|
||||||
require_once "resources/check_auth.php";
|
require_once "root.php";
|
||||||
if (permission_exists('contact_url_view')) {
|
require_once "resources/require.php";
|
||||||
//access granted
|
require_once "resources/check_auth.php";
|
||||||
}
|
|
||||||
else {
|
//check permissions
|
||||||
echo "access denied";
|
if (permission_exists('contact_url_view')) {
|
||||||
exit;
|
//access granted
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
echo "access denied";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
//show the content
|
//show the content
|
||||||
echo "<table width='100%' border='0'>\n";
|
echo "<table width='100%' border='0'>\n";
|
||||||
@@ -73,18 +77,18 @@ else {
|
|||||||
if ($result_count > 0) {
|
if ($result_count > 0) {
|
||||||
foreach($result as $row) {
|
foreach($result as $row) {
|
||||||
if (permission_exists('contact_url_edit')) {
|
if (permission_exists('contact_url_edit')) {
|
||||||
$tr_link = "href='contact_url_edit.php?contact_uuid=".$row['contact_uuid']."&id=".$row['contact_url_uuid']."'";
|
$tr_link = "href='contact_url_edit.php?contact_uuid=".escape($row['contact_uuid'])."&id=".escape($row['contact_url_uuid'])."'";
|
||||||
}
|
}
|
||||||
echo "<tr ".$tr_link." ".(($row['url_primary']) ? "style='font-weight: bold;'" : null).">\n";
|
echo "<tr ".$tr_link." ".((escape($row['url_primary'])) ? "style='font-weight: bold;'" : null).">\n";
|
||||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['url_label']." </td>\n";
|
echo " <td valign='top' class='".$row_style[$c]."'>".escape($row['url_label'])." </td>\n";
|
||||||
echo " <td valign='top' class='".$row_style[$c]." tr_link_void' style='width: 40%; max-width: 60px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;'><a href='".$row['url_address']."' target='_blank'>".str_replace("http://", "", str_replace("https://", "", $row['url_address']))."</a> </td>\n";
|
echo " <td valign='top' class='".$row_style[$c]." tr_link_void' style='width: 40%; max-width: 60px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;'><a href='".escape($row['url_address'])."' target='_blank'>".str_replace("http://", "", str_replace("https://", "", escape($row['url_address'])))."</a> </td>\n";
|
||||||
echo " <td valign='top' class='row_stylebg'>".$row['url_description']." </td>\n";
|
echo " <td valign='top' class='row_stylebg'>".escape($row['url_description'])." </td>\n";
|
||||||
echo " <td class='list_control_icons'>";
|
echo " <td class='list_control_icons'>";
|
||||||
if (permission_exists('contact_url_edit')) {
|
if (permission_exists('contact_url_edit')) {
|
||||||
echo "<a href='contact_url_edit.php?contact_uuid=".$row['contact_uuid']."&id=".$row['contact_url_uuid']."' alt='".$text['button-edit']."'>$v_link_label_edit</a>";
|
echo "<a href='contact_url_edit.php?contact_uuid=".escape($row['contact_uuid'])."&id=".$row['contact_url_uuid']."' alt='".$text['button-edit']."'>$v_link_label_edit</a>";
|
||||||
}
|
}
|
||||||
if (permission_exists('contact_url_delete')) {
|
if (permission_exists('contact_url_delete')) {
|
||||||
echo "<a href='contact_url_delete.php?contact_uuid=".$row['contact_uuid']."&id=".$row['contact_url_uuid']."' alt='".$text['button-delete']."' onclick=\"return confirm('".$text['confirm-delete']."')\">$v_link_label_delete</a>";
|
echo "<a href='contact_url_delete.php?contact_uuid=".escape($row['contact_uuid'])."&id=".escape($row['contact_url_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";
|
||||||
@@ -95,4 +99,4 @@ else {
|
|||||||
|
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
Reference in New Issue
Block a user