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_note_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_notes "; $sql .= "where domain_uuid = :domain_uuid "; $sql .= "and contact_uuid = :contact_uuid "; $sql .= "order by last_mod_date desc "; $parameters['domain_uuid'] = $_SESSION['domain_uuid']; $parameters['contact_uuid'] = $contact_uuid; $database = new database; $contact_notes = $database->select($sql, $parameters, 'all'); unset($sql, $parameters); //show if exists if (is_array($contact_notes) && @sizeof($contact_notes) != 0) { //show the content echo "
\n"; echo "
".$text['label-contact_notes']."
\n"; echo "
\n"; echo "
\n"; echo "\n"; echo "\n"; if (permission_exists('contact_note_delete')) { echo " \n"; } echo "\n"; echo "\n"; if (permission_exists('contact_note_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') { echo " \n"; } echo "\n"; if (is_array($contact_notes) && @sizeof($contact_notes) != 0) { foreach ($contact_notes as $row) { $contact_note = $row['contact_note']; $contact_note = escape($contact_note); $contact_note = str_replace("\n","
",$contact_note); if (permission_exists('contact_note_add')) { $list_row_url = "contact_note_edit.php?contact_uuid=".escape($row['contact_uuid'])."&id=".escape($row['contact_note_uuid']); } echo "\n"; if (permission_exists('contact_note_delete')) { echo " \n"; } echo " \n"; echo " \n"; if (permission_exists('contact_note_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') { echo " \n"; } echo "\n"; $x++; } } unset($contact_notes); echo "
\n"; echo " \n"; echo " ".$text['label-note_content']."".$text['label-note_user']." 
\n"; echo " \n"; echo " \n"; echo " ".$contact_note."".escape($row['last_mod_user']).": ".date("j M Y @ H:i:s", strtotime($row['last_mod_date']))."\n"; echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]); echo "
"; echo "
\n"; } ?>