contacts php 8.1 changes (#6730)

* Update contacts_vcard.php

* Update vcard.php

* Update contact_edit.php

* Update contact_view.php

* Update contact_phone_edit.php

* Update contact_address_edit.php

* Update contact_addresses.php

* Update contact_addresses_view.php

* Update contact_attachment.php

* Update contact_attachment_edit.php

* Update contact_attachments.php

* Update contact_attachments_view.php

* Update contact_email_edit.php

* Update contact_emails.php

* Update contact_emails_view.php

* Update contact_extensions.php

* Update contact_extensions_view.php

* Update contact_import.php

* Update contact_import_google.php

* Update contact_json.php

* Update contact_note_edit.php

* Update contact_notes.php

* Update contact_notes_view.php

* Update contact_phones.php

* Update contact_phones_view.php

* Update contact_relation_edit.php

* Update contact_emails_view.php

* Update contact_addresses_view.php

* Update contact_relations.php

* Update contact_relations_view.php

* Update contact_setting_edit.php

* Update contact_settings.php

* Update contact_time_edit.php

* Update contact_timer.php

* Update contact_timer_inc.php

* Update contact_times.php

* Update contact_url_edit.php

* Update contact_urls.php

* Update contact_urls_view.php

* Update contact_import.php

* Update contact_import.php

* Update contact_email_edit.php

* Update contact_url_edit.php

* Update contact_relation_edit.php

* Update contact_note_edit.php

* Update contact_setting_edit.php

* Update contact_attachment_edit.php

* Update contact_edit.php

* Update contact_phones_view.php

* Update contact_note_edit.php

* Update contact_attachment_edit.php

* Update contact_phones_view.php

* Update contact_edit.php

* Update contacts.php

* Update contact_edit.php

* Update contact_edit.php

* Update contact_edit.php

* Update contact_edit.php

* Update contact_edit.php

* Update contact_phone_edit.php

* Update contact_addresses.php

* Update contact_addresses_view.php

* Update contact_attachment_edit.php

* Update contact_attachments.php

* Update contact_attachments_view.php

* Update contact_edit.php

* Update contact_email_edit.php

* Update contact_emails.php

* Update contact_emails_view.php

* Update contact_extensions.php

* Update contact_extensions_view.php

* Update contact_import.php

* Update contact_import_google.php

* Update contact_json.php

* Update contact_note_edit.php

* Update contact_notes.php

* Update contact_notes_view.php

* Update contact_phone_edit.php

* Update contact_phones.php

* Update contact_phones_view.php

* Update contact_relations.php

* Update contact_relations_view.php

* Update contact_setting_edit.php

* Update contact_settings.php

* Update contact_time_edit.php

* Update contact_timer.php

* Update contact_timer_inc.php

* Update contact_times.php

* Update contact_url_edit.php

* Update contact_urls.php

* Update contact_urls_view.php

* Update contact_view.php

* Update contacts.php

* Update contacts_vcard.php
This commit is contained in:
Alex
2023-06-01 11:50:12 -06:00
committed by GitHub
parent 7b25e81a8d
commit 9df57e679d
38 changed files with 565 additions and 472 deletions
+10 -7
View File
@@ -41,19 +41,22 @@
exit;
}
//set from session variables
$list_row_edit_button = !empty($_SESSION['theme']['list_row_edit_button']['boolean']) ? $_SESSION['theme']['list_row_edit_button']['boolean'] : 'false';
//get the contact attachment list
$sql = "select *, length(decode(attachment_content,'base64')) as attachment_size from v_contact_attachments ";
$sql .= "where domain_uuid = :domain_uuid ";
$sql .= "and contact_uuid = :contact_uuid ";
$sql .= "order by attachment_primary desc, attachment_filename asc ";
$parameters['domain_uuid'] = $domain_uuid;
$parameters['contact_uuid'] = $contact_uuid;
$parameters['contact_uuid'] = $contact_uuid ?? '';
$database = new database;
$contact_attachments = $database->select($sql, $parameters, 'all');
unset($sql, $parameters);
//show if exists
if (is_array($contact_attachments) && @sizeof($contact_attachments) != 0) {
if (!empty($contact_attachments)) {
//styles and attachment layer
echo "<style>\n";
@@ -89,7 +92,7 @@
echo "<tr class='list-header'>\n";
if (permission_exists('contact_attachment_delete')) {
echo " <th class='checkbox'>\n";
echo " <input type='checkbox' id='checkbox_all_attachments' name='checkbox_all' onclick=\"edit_all_toggle('attachments');\" ".($contact_attachments ?: "style='visibility: hidden;'").">\n";
echo " <input type='checkbox' id='checkbox_all_attachments' name='checkbox_all' onclick=\"edit_all_toggle('attachments');\" ".(!empty($contact_attachments) ?: "style='visibility: hidden;'").">\n";
echo " </th>\n";
}
echo "<th class='pct-15'>".$text['label-type']."</th>\n";
@@ -97,12 +100,12 @@
echo "<th>".$text['label-attachment_size']."</th>\n";
echo "<th>".$text['label-tools']."</th>\n";
echo "<th class='hide-md-dn'>".$text['label-attachment_description']."</th>\n";
if (permission_exists('contact_attachment_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
if (permission_exists('contact_attachment_edit') && $list_row_edit_button == 'true') {
echo " <td class='action-button'>&nbsp;</td>\n";
}
echo "</tr>\n";
if (is_array($contact_attachments) && @sizeof($contact_attachments) != 0) {
if (!empty($contact_attachments)) {
$x = 0;
foreach ($contact_attachments as $row) {
$attachment_type = strtolower(pathinfo($row['attachment_filename'], PATHINFO_EXTENSION));
@@ -129,7 +132,7 @@
}
echo " </td>\n";
echo " <td class='description overflow hide-md-dn'>".escape($row['attachment_description'])."</td>\n";
if (permission_exists('contact_attachment_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
if (permission_exists('contact_attachment_edit') && $list_row_edit_button == 'true') {
echo " <td class='action-button'>\n";
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
echo " </td>\n";
@@ -145,4 +148,4 @@
}
?>
?>