Portions created by the Initial Developer are Copyright (C) 2008-2020 the Initial Developer. All Rights Reserved. Contributor(s): Mark J Crane */ //includes require_once "root.php"; require_once "resources/require.php"; require_once "resources/check_auth.php"; //check permissions if (permission_exists('contact_url_view')) { //access granted } else { echo "access denied"; exit; } //set the uuid if (is_uuid($_GET['id'])) { $contact_uuid = $_GET['id']; } //get the contact list $sql = "select * from v_contact_urls "; $sql .= "where domain_uuid = :domain_uuid "; $sql .= "and contact_uuid = :contact_uuid "; $sql .= "order by url_primary desc, url_label asc "; $parameters['domain_uuid'] = $_SESSION['domain_uuid']; $parameters['contact_uuid'] = $contact_uuid; $database = new database; $contact_urls = $database->select($sql, $parameters, 'all'); unset($sql, $parameters); //show if exists if (is_array($contact_urls) && @sizeof($contact_urls) != 0) { //show the content echo "
\n"; echo "
".$text['label-urls']."
\n"; echo "
\n"; echo "
\n"; echo "\n"; echo "\n"; if (permission_exists('contact_url_delete')) { echo " \n"; } echo "\n"; echo "\n"; echo "\n"; if (permission_exists('contact_url_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') { echo " \n"; } echo "\n"; if (is_array($contact_urls) && @sizeof($contact_urls) != 0) { $x = 0; foreach ($contact_urls as $row) { if (permission_exists('contact_url_edit')) { $list_row_url = "contact_url_edit.php?contact_uuid=".urlencode($row['contact_uuid'])."&id=".urlencode($row['contact_url_uuid']); } echo "\n"; if (permission_exists('contact_url_delete')) { echo " \n"; } echo " \n"; echo " \n"; echo " \n"; if (permission_exists('contact_url_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') { echo " \n"; } echo "\n"; $x++; } } unset($contact_urls); echo "
\n"; echo " \n"; echo " ".$text['label-url_label']."".$text['label-url_address']."".$text['label-url_description']." 
\n"; echo " \n"; echo " \n"; echo " ".escape($row['url_label'])." ".($row['url_primary'] ? " " : null)."".escape($row['url_description'])." \n"; echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]); echo "
\n"; echo "
\n"; } ?>