Text Messages - every text ITFlow sent and received (functions/sms.php), and * what came of it: waiting, sent or failed going out; on a ticket, in Texts (unmatched, a * code, spam) or a keyword coming in. Verification codes are masked here - Texts > Codes * reveals them, logged. A text can be retried, cancelled or deleted, one at a time or several * (admin/post/text_messages.php). */ // Default Column Sortby Filter $sort = "sms_message_created_at"; $order = "DESC"; require_once "includes/inc_all_admin.php"; $page_title = 'Text Messages'; try { mysqli_query($mysqli, "SELECT 1 FROM sms_messages LIMIT 1"); } catch (Throwable $e) { ?>
Text messaging arrives with a database update - run it in Maintenance > Update first.
"sms_message_created_at $order", 'sms_message_number' => "sms_message_number $order, sms_message_created_at DESC", 'sms_message_status' => "sms_message_status $order, sms_message_created_at DESC", ]; if (!isset($sortable_columns[$sort])) { $sort = 'sms_message_created_at'; } $search = "(sms_message_number LIKE '%$phone_query%' OR (sms_message_status <> 'code' AND sms_message_body LIKE '%$q%') OR sms_message_error LIKE '%$q%' OR contact_name LIKE '%$q%' OR client_name LIKE '%$q%' OR CONCAT(ticket_prefix, ticket_number) LIKE '%$q%') AND DATE(sms_message_created_at) BETWEEN '$dtf' AND '$dtt'"; $joins = "LEFT JOIN contacts ON contact_id = sms_message_contact_id AND sms_message_contact_id > 0 LEFT JOIN clients ON client_id = sms_message_client_id AND sms_message_client_id > 0 LEFT JOIN tickets ON ticket_id = sms_message_ticket_id AND sms_message_ticket_id > 0 LEFT JOIN users ON user_id = sms_message_user_id AND sms_message_user_id > 0"; $sql = mysqli_query($mysqli, "SELECT SQL_CALC_FOUND_ROWS sms_messages.*, contact_name, client_name, ticket_prefix, ticket_number, ticket_client_id, user_name FROM sms_messages $joins WHERE $search AND {$tabs[$show][2]} ORDER BY {$sortable_columns[$sort]}, sms_message_id DESC LIMIT $record_from, $record_to"); $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); // How many in each tab, as searched $count_sql = []; foreach ($tabs as $key => [, , $where]) { $count_sql[] = "COALESCE(SUM($where), 0)"; } $counts = array_combine(array_keys($tabs), array_map('intval', mysqli_fetch_row(mysqli_query($mysqli, "SELECT " . implode(', ', $count_sql) . " FROM sms_messages $joins WHERE $search")))); $sort_link = function ($column, $label) use ($url_query_strings_sort, $sort, $disp, $order_icon) { return '' . $label . ($sort === $column ? " $order_icon" : '') . ''; }; $pill_url = function ($show) { return '?' . http_build_query(array_filter(['q' => $_GET['q'] ?? '', 'show' => $show, 'canned_date' => $_GET['canned_date'] ?? '', 'dtf' => $_GET['dtf'] ?? '', 'dtt' => $_GET['dtt'] ?? ''])); }; $csrf = $_SESSION['csrf_token']; $filtered_dates = isset($_GET['dtf']) && $_GET['dtf'] !== '' && $_GET['dtf'] !== '1970-01-01'; $ready = smsReady(); ?>

Text Messages

Texting isn't on - nothing goes out, and texts to your number aren't taken in.
Text Messaging
">
Text
photo or file
By
# 1 ? ' · tried ' . intval($row['sms_message_attempts']) . ' times' : '' ?>
'texts', 'icon' => 'fa-sms', 'title' => $show !== '' ? 'Nothing ' . strtolower($tabs[$show][0]) : 'No texts yet', 'text' => 'Every text ITFlow sends and receives is kept here for a year - spam and dismissed texts for ' . SMS_SPAM_KEEP_DAYS . ' days, and a verification code\'s words for a day.', ]; ?>