echo "<td colspan='2' align='right'>\n"; //echo " <input type='button' class='btn' name='' alt='view' onclick=\"window.location='v_cdr_search.php'\" value='advanced'>\n"; echo "</td>\n"; echo "<td colspan='1' align='right'>\n"; echo "\t<input type='button' class='btn' name='' alt='view' onclick=\"window.location='v_cdr_search.php'\" value='advanced'> \n"; echo "\t<input type='submit' class='btn' name='submit' value='filter'>\n"; echo "</td>\n"; echo "</tr>"; echo "</table>"; echo "</form>"; } echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n"; echo "<tr>\n"; echo "<th>Start</th>\n"; //echo th_order_by('start_stamp', 'Start', $order_by, $order); echo th_order_by('caller_id_name', 'CID Name', $order_by, $order); echo "<th>Source</th>\n"; //echo th_order_by('caller_id_number', 'Source', $order_by, $order); echo "<th>Destination</th>\n"; //echo th_order_by('destination_number', 'Destination', $order_by, $order); //echo th_order_by('context', 'Context', $order_by, $order); //echo th_order_by('answer_stamp', 'Answer', $order_by, $order); //echo th_order_by('end_stamp', 'End', $order_by, $order); echo "<th>Duration</th>\n"; //echo th_order_by('duration', 'Duration', $order_by, $order); echo "<th>Bill</th>\n"; //echo th_order_by('billsec', 'Bill', $order_by, $order); echo "<th>Status</th>\n"; //echo th_order_by('hangup_cause', 'Status', $order_by, $order); echo "<form method='post' action='v_cdr_csv.php'>"; echo "<td align='left' width='22'>\n";
echo "\t\t\t</td>\n"; echo "\t</tr>\n"; echo "</table>\n"; echo "<form name='frm' method='post' action='voicemail_delete.php'>\n"; echo "<table class='tr_hover' width='100%' border='0' cellpadding='0' cellspacing='0'>\n"; echo "<tr>\n"; if (permission_exists('voicemail_delete') && $num_rows > 0) { echo "<th style='width: 30px; text-align: center; padding: 0px;'><input type='checkbox' id='chk_all' onchange=\"(this.checked) ? check('all') : check('none');\"></th>"; } echo th_order_by('voicemail_id', $text['label-voicemail_id'], $order_by, $order); echo th_order_by('voicemail_mail_to', $text['label-voicemail_mail_to'], $order_by, $order); echo th_order_by('voicemail_file', $text['label-voicemail_file_attached'], $order_by, $order); echo th_order_by('voicemail_local_after_email', $text['label-voicemail_local_after_email'], $order_by, $order); echo "<th>" . $text['label-tools'] . "</th>\n"; echo th_order_by('voicemail_enabled', $text['label-voicemail_enabled'], $order_by, $order); echo th_order_by('voicemail_description', $text['label-voicemail_description'], $order_by, $order); echo "<td class='list_control_icon'>"; if (permission_exists('voicemail_add') || permission_exists('voicemail_edit')) { echo "<a href='voicemail_edit.php' alt='" . $text['button-add'] . "'>" . $v_link_label_add . "</a>"; } if (permission_exists('voicemail_delete') && $num_rows > 0) { echo "<a href='javascript:void(0);' onclick=\"if (confirm('" . $text['confirm-delete'] . "')) { document.forms.frm.submit(); }\" alt='" . $text['button-delete'] . "'>" . $v_link_label_delete . "</a>"; } echo "</td>\n"; echo "</tr>\n"; $c = 0; $row_style["0"] = "row_style0"; $row_style["1"] = "row_style1"; if ($num_rows > 0) { foreach ($voicemails as $row) { $tr_link = permission_exists('voicemail_edit') ? "href='voicemail_edit.php?id=" . $row['voicemail_uuid'] . "'" : null;
} $sql .= " limit {$rows_per_page} offset {$offset} "; $prep_statement = $db->prepare(check_sql($sql)); $prep_statement->execute(); $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); $result_count = count($result); unset($prep_statement, $sql); $c = 0; $row_style["0"] = "row_style0"; $row_style["1"] = "row_style1"; echo "<div align='center'>\n"; echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n"; echo "<tr>\n"; echo th_order_by('username', 'Username', $order_by, $order); echo th_order_by('language', 'Language', $order_by, $order); echo th_order_by('proficiency', 'Proficiency', $order_by, $order); echo "<td align='right' width='42'>\n"; echo "\t<a href='v_fifo_agent_languages_edit.php' alt='add'>{$v_link_label_add}</a>\n"; //echo " <input type='button' class='btn' name='' alt='add' onclick=\"window.location='v_fifo_agent_languages_edit.php'\" value='+'>\n"; echo "</td>\n"; echo "<tr>\n"; if ($result_count == 0) { //no results } else { //received results foreach ($result as $row) { //print_r( $row ); echo "<tr >\n"; echo "\t<td valign='top' class='" . $row_style[$c] . "'>" . $row[username] . "</td>\n"; echo "\t<td valign='top' class='" . $row_style[$c] . "'>" . $row[language] . "</td>\n"; echo "\t<td valign='top' class='" . $row_style[$c] . "'>" . $row[proficiency] . "</td>\n";
$c = 0; $row_style["0"] = "row_style0"; $row_style["1"] = "row_style1"; echo "<table class='tr_hover' width='100%' border='0' cellpadding='0' cellspacing='0'>\n"; echo "<tr>\n"; //echo th_order_by('meeting_uuid', 'Meeting UUID', $order_by, $order); //echo th_order_by('conference_uuid', 'Conference UUID', $order_by, $order); //echo th_order_by('username', $text['label-username'], $order_by, $order); //echo th_order_by('uuid', $text['label-uuid'], $order_by, $order); echo th_order_by('caller_id_name', $text['label-caller-id-name'], $order_by, $order); echo th_order_by('caller_id_number', $text['label-caller-id-number'], $order_by, $order); echo th_order_by('moderator', $text['label-moderator'], $order_by, $order); echo th_order_by('network_addr', $text['label-network-address'], $order_by, $order); echo "<th>" . $text['label-time'] . "</th>\n"; echo th_order_by('start_epoch', $text['label-start'], $order_by, $order); echo th_order_by('end_epoch', $text['label-end'], $order_by, $order); if (permission_exists('conference_session_details')) { echo "<td class='list_control_icon'> </td>\n"; } echo "</tr>\n"; if ($result_count > 0) { foreach ($result as $row) { if (defined('TIME_24HR') && TIME_24HR == 1) { $start_date = date("j M Y H:i:s", $row['start_epoch']); $end_date = date("j M Y H:i:s", $row['end_epoch']); } else { $start_date = date("j M Y h:i:sa", $row['start_epoch']); $end_date = date("j M Y h:i:sa", $row['end_epoch']); } $time_difference = ''; if (strlen($row['end_epoch']) > 0) {
$prep_statement->execute(); $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); $result_count = count($result); unset($prep_statement, $sql); $c = 0; $row_style["0"] = "row_style0"; $row_style["1"] = "row_style1"; echo "<table class='tr_hover' width='100%' border='0' cellpadding='0' cellspacing='0'>\n"; echo "<tr>\n"; echo th_order_by('recording_name', $text['label-recording_name'], $order_by, $order); if ($_SESSION['recordings']['storage_type']['text'] != 'base64') { echo th_order_by('recording_filename', $text['label-file_name'], $order_by, $order); echo "<th class='listhdr' style='text-align: center;' nowrap>" . $text['label-file-size'] . "</th>\n"; } echo "<th class='listhdr' nowrap>" . $text['label-tools'] . "</th>\n"; echo th_order_by('recording_description', $text['label-description'], $order_by, $order); echo "<td class='list_control_icons'> </td>\n"; echo "</tr>\n"; //calculate colspan for progress bar $colspan = 5; //max if ($_SESSION['recordings']['storage_type']['text'] == 'base64') { $colspan = $colspan - 2; } if (!(permission_exists('recording_edit') || permission_exists('recording_delete'))) { $colspan = $colspan - 1; } if ($result_count > 0) { foreach ($result as $row) { //playback progress bar if (permission_exists('recording_play')) {
$prep_statement->execute(); $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); $result_count = count($result); unset($prep_statement, $sql); $c = 0; $row_style["0"] = "row_style0"; $row_style["1"] = "row_style1"; echo "<div align='center'>\n"; echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n"; echo "<tr>\n"; echo th_order_by('fifo_name', 'Queue Name', $order_by, $order); echo th_order_by('agent_username', 'Username', $order_by, $order); echo th_order_by('agent_priority', 'Agent Priority', $order_by, $order); echo th_order_by('agent_status', 'Status', $order_by, $order); echo th_order_by('agent_last_call', 'Last Call', $order_by, $order); echo th_order_by('agent_contact_number', 'Contact Number', $order_by, $order); echo "<td align='right' width='42'>\n"; //echo " <a href='v_fifo_agents_edit.php' alt='add'>$v_link_label_add</a>\n"; echo "</td>\n"; echo "<tr>\n"; if ($result_count == 0) { //no results } else { //received results foreach ($result as $row) { //set the php variables $agent_last_call = $row[agent_last_call]; date_default_timezone_set('America/Boise'); //format the last call time $agent_last_call_desc = date("g:i:s a j M Y", $agent_last_call); //get the agent status description
echo "<br />\n"; echo "</td>\n"; echo "</tr>\n"; //alternate the row style $c = 0; $row_style["0"] = "row_style0"; $row_style["1"] = "row_style1"; //show the data echo "<table class='tr_hover' width='100%' border='0' cellpadding='0' cellspacing='0'>\n"; echo "<tr>\n"; if (permission_exists('user_all') && $_GET['showall'] == 'true') { echo th_order_by('domain_name', $text['label-domain'], $order_by, $order, '', '', $param); } echo th_order_by('username', $text['label-username'], $order_by, $order); echo "<th>" . $text['label-groups'] . "</th>\n"; echo th_order_by('user_enabled', $text['label-enabled'], $order_by, $order, '', '', $param); echo "<td class='list_control_icons'>"; if (permission_exists('user_add')) { if ($_SESSION['limit']['users']['numeric'] == '' || $_SESSION['limit']['users']['numeric'] != '' && $total_users < $_SESSION['limit']['users']['numeric']) { echo "<a href='signup.php' alt='" . $text['button-add'] . "'>" . $v_link_label_add . "</a>"; } } echo "</td>\n"; echo "</tr>\n"; if ($user_count > 0) { foreach ($users as $row) { if (if_superadmin($superadmins, $row['user_uuid']) && !if_group("superadmin")) { //hide } else { $tr_link = permission_exists('user_edit') ? "href='usersupdate.php?id=" . $row['user_uuid'] . "'" : null; echo "<tr " . $tr_link . ">\n";
echo th_order_by('fax_result_code', $text['label-fax_result_code'], $order_by, $order, null, null, "&id=" . $fax_uuid); echo th_order_by('fax_result_text', $text['label-fax_result_text'], $order_by, $order, null, null, "&id=" . $fax_uuid); echo th_order_by('fax_file', $text['label-fax_file'], $order_by, $order, null, null, "&id=" . $fax_uuid); echo th_order_by('fax_ecm_used', $text['label-fax_ecm_used'], $order_by, $order, null, null, "&id=" . $fax_uuid); echo th_order_by('fax_local_station_id', $text['label-fax_local_station_id'], $order_by, $order, null, null, "&id=" . $fax_uuid); //echo th_order_by('fax_document_transferred_pages', $text['label-fax_document_transferred_pages'], $order_by, $order); //echo th_order_by('fax_document_total_pages', $text['label-fax_document_total_pages'], $order_by, $order); //echo th_order_by('fax_image_resolution', $text['label-fax_image_resolution'], $order_by, $order); //echo th_order_by('fax_image_size', $text['label-fax_image_size'], $order_by, $order); echo th_order_by('fax_bad_rows', $text['label-fax_bad_rows'], $order_by, $order, null, null, "&id=" . $fax_uuid); echo th_order_by('fax_transfer_rate', $text['label-fax_transfer_rate'], $order_by, $order, null, null, "&id=" . $fax_uuid); echo th_order_by('fax_retry_attempts', $text['label-fax_retry_attempts'], $order_by, $order, null, null, "&id=" . $fax_uuid); //echo th_order_by('fax_retry_limit', $text['label-fax_retry_limit'], $order_by, $order); //echo th_order_by('fax_retry_sleep', $text['label-fax_retry_sleep'], $order_by, $order); echo th_order_by('fax_uri', $text['label-fax_destination'], $order_by, $order, null, null, "&id=" . $fax_uuid); echo th_order_by('fax_epoch', $text['label-fax_date'], $order_by, $order, null, null, "&id=" . $fax_uuid); //echo th_order_by('fax_epoch', $text['label-fax_epoch'], $order_by, $order); echo "<td class='list_control_icons'>"; echo " \n"; echo "</td>\n"; echo "</tr>\n"; if ($result_count > 0) { foreach ($result as $row) { $tr_link = "href='fax_log_view.php?id=" . $row['fax_log_uuid'] . "&fax_uuid=" . $fax_uuid . "'"; echo "<tr " . $tr_link . ">\n"; echo "\t<td valign='top' class='" . $row_style[$c] . "'>" . $row['fax_success'] . " </td>\n"; echo "\t<td valign='top' class='" . $row_style[$c] . "'>" . $row['fax_result_code'] . " </td>\n"; echo "\t<td valign='top' class='" . $row_style[$c] . "'>" . $row['fax_result_text'] . " </td>\n"; echo "\t<td valign='top' class='" . $row_style[$c] . "'>" . basename($row['fax_file']) . " </td>\n"; echo "\t<td valign='top' class='" . $row_style[$c] . "'>" . $row['fax_ecm_used'] . " </td>\n"; echo "\t<td valign='top' class='" . $row_style[$c] . "'>" . $row['fax_local_station_id'] . " </td>\n";
} $sql .= "limit {$rows_per_page} offset {$offset} "; $prep_statement = $db->prepare(check_sql($sql)); $prep_statement->execute(); $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); $result_count = count($result); unset($prep_statement, $sql); $c = 0; $row_style["0"] = "row_style0"; $row_style["1"] = "row_style1"; echo "<table class='tr_hover' width='100%' border='0' cellpadding='0' cellspacing='0'>\n"; echo "<tr>\n"; echo th_order_by('node_type', $text['label-node_type'], $order_by, $order); echo th_order_by('node_cidr', $text['label-node_cidr'], $order_by, $order); echo th_order_by('node_domain', $text['label-node_domain'], $order_by, $order); echo th_order_by('node_description', $text['label-node_description'], $order_by, $order); echo "<td class='list_control_icons'>"; if (permission_exists('access_control_node_add')) { echo "<a href='access_control_node_edit.php?access_control_uuid=" . $_GET['id'] . "' alt='" . $text['button-add'] . "'>{$v_link_label_add}</a>"; } else { echo " \n"; } echo "</td>\n"; echo "<tr>\n"; if ($result_count > 0) { foreach ($result as $row) { if (permission_exists('access_control_node_edit')) { $tr_link = "href='access_control_node_edit.php?access_control_uuid=" . $row['access_control_uuid'] . "&id=" . $row['access_control_node_uuid'] . "'"; } echo "<tr " . $tr_link . ">\n"; echo "\t<td valign='top' class='" . $row_style[$c] . "'>" . $row['node_type'] . " </td>\n";
echo "\t<tr>\n"; echo "\t\t<td width='50%' align='left' nowrap='nowrap'><b>" . $text['title-conference_control_details'] . "</b></td>\n"; //echo " <form method='get' action=''>\n"; //echo " <td width='50%' style='vertical-align: top; text-align: right; white-space: nowrap;'>\n"; //echo " <input type='text' class='txt' style='width: 150px' name='search' id='search' value='".$search."'>\n"; //echo " <input type='submit' class='btn' name='submit' value='".$text['button-search']."'>\n"; //echo " </td>\n"; //echo " </form>\n"; echo "\t</tr>\n"; echo "</table>\n"; echo "<table class='tr_hover' width='100%' border='0' cellpadding='0' cellspacing='0'>\n"; echo "<tr>\n"; echo th_order_by('control_digits', $text['label-control_digits'], $order_by, $order); echo th_order_by('control_action', $text['label-control_action'], $order_by, $order); echo th_order_by('control_data', $text['label-control_data'], $order_by, $order); echo th_order_by('control_enabled', $text['label-control_enabled'], $order_by, $order); echo "<td class='list_control_icons'>"; if (permission_exists('conference_control_detail_add')) { echo "<a href='conference_control_detail_edit.php?conference_control_uuid=" . $_GET['id'] . "' alt='" . $text['button-add'] . "'>{$v_link_label_add}</a>"; } else { echo " \n"; } echo "</td>\n"; echo "<tr>\n"; if (is_array($result)) { foreach ($result as $row) { if (permission_exists('conference_control_detail_edit')) { $tr_link = "href='conference_control_detail_edit.php?conference_control_uuid=" . $row['conference_control_uuid'] . "&id=" . $row['conference_control_detail_uuid'] . "'"; } echo "<tr " . $tr_link . ">\n"; echo "\t<td valign='top' class='" . $row_style[$c] . "'>" . $row['control_digits'] . " </td>\n";
echo th_order_by('tta', $text['label-tta'], $order_by, $order, null, "style='text-align: right;'", $param); echo th_order_by('duration', $text['label-duration'], $order_by, $order, null, "style='text-align: center;'", $param); if (file_exists($_SERVER["PROJECT_ROOT"] . "/app/billing/app_config.php")) { echo "<th>" . $text['label-price'] . "</th>\n"; $col_count++; } if (permission_exists('xml_cdr_pdd')) { echo th_order_by('pdd_ms', 'PDD', $order_by, $order, null, "style='text-align: right;'", $param); $col_count++; } if (permission_exists('xml_cdr_mos')) { echo th_order_by('rtp_audio_in_mos', 'MOS', $order_by, $order, null, "style='text-align: center;'", $param); $col_count++; } if (if_group("admin") || if_group("superadmin") || if_group("cdr")) { echo th_order_by('hangup_cause', $text['label-hangup_cause'], $order_by, $order, null, null, $param); } else { echo "<th>" . $text['label-status'] . "</th>\n"; } if (if_group("admin") || if_group("superadmin") || if_group("cdr")) { echo "<td class='list_control_icon'>"; if (permission_exists('xml_cdr_delete') && $result_count > 0) { echo "<a href='javascript:void(0);' onclick=\"if (confirm('" . $text['confirm-delete'] . "')) { document.forms.frm.submit(); }\" alt='" . $text['button-delete'] . "'>" . $v_link_label_delete . "</a>"; } echo "</td>\n"; $col_count++; } echo "</tr>\n"; if (file_exists($_SERVER["PROJECT_ROOT"] . "/app/billing/app_config.php")) { require_once "app/billing/resources/functions/rating.php"; require_once "resources/classes/database.php";
$c = 0; $row_style["0"] = "row_style0"; $row_style["1"] = "row_style1"; echo "<form name='frm_delete' method='post' action='time_condition_delete.php'>\n"; echo "<input type='hidden' name='app_uuid' value='" . $app_uuid . "'>\n"; echo "<table class='tr_hover' width='100%' border='0' cellpadding='0' cellspacing='0'>\n"; echo "<tr>\n"; if (permission_exists('dialplan_delete') && $result_count > 0) { echo "<th style='text-align: center;' style='text-align: center; padding: 3px 0px 0px 0px;' width='1'><input type='checkbox' onchange=\"(this.checked) ? check('all') : check('none');\"></th>"; } echo th_order_by('dialplan_name', $text['label-name'], $order_by, $order, $app_uuid, null, $search != '' ? "search=" . $search : null); echo th_order_by('dialplan_number', $text['label-number'], $order_by, $order, $app_uuid, null, $search != '' ? "search=" . $search : null); echo th_order_by('dialplan_context', $text['label-context'], $order_by, $order, $app_uuid, null, $search != '' ? "search=" . $search : null); echo th_order_by('dialplan_order', $text['label-order'], $order_by, $order, $app_uuid, "style='text-align: center;'", $search != '' ? "search=" . $search : null); echo th_order_by('dialplan_enabled', $text['label-enabled'], $order_by, $order, $app_uuid, "style='text-align: center;'", $search != '' ? "search=" . $search : null); echo th_order_by('dialplan_description', $text['label-description'], $order_by, $order, $app_uuid, null, $search != '' ? "search=" . $search : null); echo "<td class='list_control_icons'>"; if (permission_exists('time_condition_add')) { echo "<a href='" . PROJECT_PATH . "/app/time_conditions/time_condition_edit.php' alt='" . $text['button-add'] . "'>{$v_link_label_add}</a>"; } if (permission_exists('time_condition_delete') && $result_count > 0) { echo "<a href='javascript:void(0);' onclick=\"if (confirm('" . $text['confirm-delete'] . "')) { document.forms.frm_delete.submit(); }\" alt='" . $text['button-delete'] . "'>" . $v_link_label_delete . "</a>"; } echo "</td>\n"; echo "</tr>\n"; if ($result_count > 0) { foreach ($result as $row) { $app_uuid = $row['app_uuid']; $tr_link = "href='" . PROJECT_PATH . "/app/time_conditions/time_condition_edit.php?id=" . $row['dialplan_uuid'] . ($app_uuid != '' ? "&app_uuid=" . $app_uuid : null) . "'"; echo "<tr " . $tr_link . ">\n"; if (permission_exists("time_condition_delete")) {
$prep_statement->execute(); $result = $prep_statement->fetchAll(); $result_count = count($result); unset($prep_statement, $sql); //table headers $c = 0; $row_style["0"] = "row_style0"; $row_style["1"] = "row_style1"; echo "<table class='tr_hover' width='100%' border='0' cellpadding='0' cellspacing='0'>\n"; echo "<tr>\n"; echo th_order_by('call_block_number', $text['label-number'], $order_by, $order); echo th_order_by('call_block_name', $text['label-name'], $order_by, $order); echo th_order_by('call_block_count', $text['label-count'], $order_by, $order, '', "style='text-align: center;'"); echo th_order_by('date_added', $text['label-date-added'], $order_by, $order); echo th_order_by('call_block_action', $text['label-action'], $order_by, $order); echo th_order_by('call_block_enabled', $text['label-enabled'], $order_by, $order); echo "<td class='list_control_icons'>"; if (permission_exists('call_block_add')) { echo "<a href='call_block_edit.php' alt='" . $text['button-add'] . "'>{$v_link_label_add}</a>"; } echo "</td>\n"; echo "</tr>\n"; //show the results if ($result_count > 0) { foreach ($result as $row) { $tr_link = permission_exists('call_block_edit') ? "href='call_block_edit.php?id=" . $row['call_block_uuid'] . "'" : null; echo "<tr " . $tr_link . ">\n"; echo "\t<td valign='top' class='" . $row_style[$c] . "'>"; if (permission_exists('call_block_edit')) { echo "<a href='call_block_edit.php?id=" . $row['call_block_uuid'] . "'>" . $row['call_block_number'] . "</a>"; } else {
} //echo $sql; $prep_statement = $db->prepare(check_sql($sql)); $prep_statement->execute(); $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); $result_count = count($result); $c = 0; $row_style["0"] = "row_style0"; $row_style["1"] = "row_style1"; echo "<table class='tr_hover' width='100%' border='0' cellpadding='2' cellspacing='0'>\n"; echo "<tr>"; echo th_order_by('rss_title', $text['label-title'], $order_by, $order); echo th_order_by('rss_link', $text['label-link'], $order_by, $order); //echo th_order_by('rss_sub_category', 'Template', $order_by, $order); echo th_order_by('rss_group', $text['label-group'], $order_by, $order); echo th_order_by('rss_order', $text['label-order'], $order_by, $order, '', "style='text-align: center;'"); if ($result_count == 0) { //no results echo "<td class='list_control_icons'>\n"; } else { echo "<td class='list_control_icons'>\n"; } echo "\t<a href='rssadd.php' alt='add'>{$v_link_label_add}</a>\n"; echo "</td>\n"; echo "</tr>"; if ($result_count > 0) { foreach ($result as $row) { //print_r( $row ); $tr_link = "href='rssupdate.php?rss_uuid=" . $row[rss_uuid] . "'"; echo "<tr " . $tr_link . ">\n"; //echo "<td valign='top'><a href='rssupdate.php?rss_uuid=".$row[rss_uuid]."'>".$row[rss_uuid]."</a></td>";
} $sql .= "limit {$rows_per_page} offset {$offset} "; $prep_statement = $db->prepare(check_sql($sql)); $prep_statement->execute(); $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); $result_count = count($result); unset($prep_statement, $sql); $c = 0; $row_style["0"] = "row_style0"; $row_style["1"] = "row_style1"; echo "<table class='tr_hover' width='100%' border='0' cellpadding='0' cellspacing='0'>\n"; echo "<tr>\n"; echo th_order_by('database_type', $text['label-type'], $order_by, $order); echo th_order_by('database_host', $text['label-host'], $order_by, $order); echo th_order_by('database_name', $text['label-name'], $order_by, $order); echo th_order_by('database_description', $text['label-description'], $order_by, $order); echo "<td class='list_control_icons' style='width: 25px;'> </td>\n"; echo "<tr>\n"; if ($result_count > 0) { foreach ($result as $row) { $tr_link = "href='exec.php?id=" . $row['database_uuid'] . "'"; echo "<tr " . $tr_link . ">\n"; echo "\t<td valign='top' class='" . $row_style[$c] . "'>" . $row['database_type'] . " </td>\n"; echo "\t<td valign='top' class='" . $row_style[$c] . "'>" . $row['database_host'] . " </td>\n"; echo "\t<td valign='top' class='" . $row_style[$c] . "'><a href='exec.php?id=" . $row['database_uuid'] . "'>" . $row['database_name'] . "</a> </td>\n"; echo "\t<td valign='top' class='row_stylebg'>" . $row['database_description'] . " </td>\n"; echo "\t<td class='list_control_icons' style='width: 25px;'>"; echo "\t\t<a href='exec.php?id=" . $row['database_uuid'] . "' alt='" . $text['button-edit'] . "'>" . $v_link_label_edit . "</a>\n"; echo "\t</td>\n"; echo "</tr>\n"; $c = $c == 0 ? 1 : 0;
$sql .= "order by {$order_by} {$order} "; } $sql .= " limit {$rows_per_page} offset {$offset} "; $prep_statement = $db->prepare(check_sql($sql)); $prep_statement->execute(); $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); $result_count = count($result); unset($prep_statement, $sql); $c = 0; $row_style["0"] = "row_style0"; $row_style["1"] = "row_style1"; echo "<div align='center'>\n"; echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n"; echo "<tr>\n"; echo th_order_by('profile_name', 'Profile Name', $order_by, $order); echo th_order_by('profile_desc', 'Description', $order_by, $order); echo "<td align='right' width='42'>\n"; echo "\t<a href='v_fifo_agent_profiles_edit.php' alt='add'>{$v_link_label_add}</a>\n"; //echo " <input type='button' class='btn' name='' alt='add' onclick=\"window.location='v_fifo_agent_profiles_edit.php'\" value='+'>\n"; echo "</td>\n"; echo "<tr>\n"; if ($result_count == 0) { //no results } else { //received results foreach ($result as $row) { //print_r( $row ); echo "<tr >\n"; echo "\t<td valign='top' class='" . $row_style[$c] . "'>" . $row[profile_name] . "</td>\n"; echo "\t<td valign='top' class='" . $row_style[$c] . "'>" . $row[profile_desc] . "</td>\n"; echo "\t<td valign='top' align='right'>\n";
echo "<br><br>"; $c = 0; $row_style["0"] = "row_style0"; $row_style["1"] = "row_style1"; $row_style["2"] = "row_style2"; //loop through the voicemail messages if (count($voicemails) > 0) { echo "<br />"; echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n"; //set the table header $table_header = "<tr>\n"; $table_header .= th_order_by('created_epoch', $text['label-created_epoch'], $order_by, $order); $table_header .= th_order_by('caller_id_name', $text['label-caller_id_name'], $order_by, $order); $table_header .= th_order_by('caller_id_number', $text['label-caller_id_number'], $order_by, $order); $table_header .= "<th>" . $text['label-tools'] . "</th>\n"; $table_header .= th_order_by('message_length', $text['label-message_length'], $order_by, $order, null, "style='text-align: right;'"); if ($_SESSION['voicemail']['storage_type']['text'] != 'base64') { $table_header .= "<th style='text-align: right;'>" . $text['label-message_size'] . "</th>\n"; } $table_header .= "<td style='width: 25px;'> </td>"; $table_header .= "</tr>\n"; $previous_voicemail_id = ''; foreach ($voicemails as $field) { if ($previous_voicemail_id != $field['voicemail_id']) { if ($previous_voicemail_id != '') { echo "<tr><td colspan='20'><br /><br /><br /></td></tr>\n"; } echo "<tr>\n"; echo "\t<td colspan='3' align='left' valign='top'>\n"; echo "\t\t<b>" . $text['label-mailbox'] . ": " . $field['voicemail_id'] . " </b><br /> \n"; echo "\t</td>\n";
$sql .= "order by {$order_by} {$order} "; } $sql .= "limit {$rows_per_page} offset {$offset} "; $prep_statement = $db->prepare(check_sql($sql)); $prep_statement->execute(); $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); $result_count = count($result); unset($prep_statement, $sql); $c = 0; $row_style["0"] = "row_style0"; $row_style["1"] = "row_style1"; echo "<table class='tr_hover' width='100%' border='0' cellpadding='0' cellspacing='0'>\n"; echo "<tr>\n"; echo th_order_by('item_qty', $text['label-item_qty'], $order_by, $order); echo th_order_by('item_unit_price', $text['label-item_unit_price'], $order_by, $order); echo th_order_by('item_desc', $text['label-item_desc'], $order_by, $order); echo "<th nowrap='nowrap'>" . $text['label-item_amount'] . "</th>\n"; echo "<td align='right' width='42'>\n"; $back = $back != '' ? "&back=" . $back : null; if (permission_exists('invoice_item_add')) { echo "\t<a href='invoice_item_edit.php?invoice_uuid=" . $_GET['id'] . "&contact_uuid=" . $contact_uuid_to . $back . "' alt='" . $text['button-add'] . "'>{$v_link_label_add}</a>\n"; } else { echo "\t \n"; } echo "</td>\n"; echo "<tr>\n"; if ($result_count > 0) { foreach ($result as $row) { $item_desc = $row['item_desc']; $item_desc = str_replace("\n", "<br />", $item_desc); $tr_link = permission_exists('invoice_item_edit') ? "href='invoice_item_edit.php?invoice_uuid=" . $row['invoice_uuid'] . "&id=" . $row['invoice_item_uuid'] . "&contact_uuid=" . $contact_uuid_to . $back . "'" : null;
$prep_statement = $db->prepare(check_sql($sql)); $prep_statement->execute(); $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); $result_count = count($result); unset($prep_statement, $sql); $c = 0; $row_style["0"] = "row_style0"; $row_style["1"] = "row_style1"; echo "<table class='tr_hover' width='100%' border='0' cellpadding='0' cellspacing='0'>\n"; echo "<tr>\n"; if ($_REQUEST['showall'] == true && permission_exists('emails_all')) { echo th_order_by('domain_name', $text['label-domain-name'], $order_by, $order, null, null, $param); } echo th_order_by('sent_date', $text['label-sent'], $order_by, $order, null, null, $param); echo th_order_by('type', $text['label-type'], $order_by, $order, null, null, $param); echo th_order_by('status', $text['label-status'], $order_by, $order, null, null, $param); echo "<th>" . $text['label-message'] . "</th>\n"; echo "<th>" . $text['label-reference'] . "</th>\n"; echo "<td class='list_control_icons'> </td>\n"; echo "</tr>\n"; if ($result_count > 0) { foreach ($result as $row) { //get call details $sql = "select caller_id_name, caller_id_number, destination_number from v_xml_cdr "; $sql .= "where domain_uuid = '" . $domain_uuid . "' "; $sql .= "and uuid = '" . $row['call_uuid'] . "' "; //echo "<tr><td colspan='40'>".$sql."</td></tr>"; $prep_statement = $db->prepare(check_sql($sql)); $prep_statement->execute(); $result2 = $prep_statement->fetchAll(PDO::FETCH_NAMED); foreach ($result2 as $row2) {
echo "<tr>\n"; echo th_order_by('queue_name', $text['label-queue_name'], $order_by, $order); echo th_order_by('queue_extension', $text['label-extension'], $order_by, $order); echo th_order_by('queue_strategy', $text['label-strategy'], $order_by, $order); //echo th_order_by('queue_moh_sound', $text['label-music_on_hold'], $order_by, $order); //echo th_order_by('queue_record_template', $text['label-record_template'], $order_by, $order); //echo th_order_by('queue_time_base_score', $text['label-time_base_score'], $order_by, $order); //echo th_order_by('queue_max_wait_time', $text['label-max_wait_time'], $order_by, $order); //echo th_order_by('queue_max_wait_time_with_no_agent', $text['label-max_wait_time_with_no_agent'], $order_by, $order); echo th_order_by('queue_tier_rules_apply', $text['label-tier_rules_apply'], $order_by, $order); //echo th_order_by('queue_tier_rule_wait_second', $text['label-tier_rule_wait_second'], $order_by, $order); //echo th_order_by('queue_tier_rule_no_agent_no_wait', $text['label-tier_rule_no_agent_no_wait'], $order_by, $order); //echo th_order_by('queue_discard_abandoned_after', $text['label-discard_abandoned_after'], $order_by, $order); //echo th_order_by('queue_abandoned_resume_allowed', $text['label-abandoned_resume_allowed'], $order_by, $order); //echo th_order_by('queue_tier_rule_wait_multiply_level', $text['label-tier_rule_wait_multiply_level'], $order_by, $order); echo th_order_by('queue_description', $text['label-description'], $order_by, $order); echo "<td class='list_control_icons'>"; if (permission_exists('call_center_queue_add')) { if ($_SESSION['limit']['call_center_queues']['numeric'] == '' || $_SESSION['limit']['call_center_queues']['numeric'] != '' && $total_call_center_queues < $_SESSION['limit']['call_center_queues']['numeric']) { echo "<a href='call_center_queue_edit.php' alt='" . $text['button-add'] . "'>" . $v_link_label_add . "</a>"; } } echo "</td>\n"; echo "</tr>\n"; if ($result_count > 0) { foreach ($result as $row) { $tr_link = permission_exists('call_center_queue_edit') ? "href='call_center_queue_edit.php?id=" . $row[call_center_queue_uuid] . "'" : null; echo "<tr " . $tr_link . ">\n"; echo "\t<td valign='top' class='" . $row_style[$c] . "'>"; if (permission_exists('call_center_queue_edit')) { echo "<a href='call_center_queue_edit.php?id=" . $row[call_center_queue_uuid] . "'>" . $row[queue_name] . "</a>";
//remove trailing order by //show the results $col_count = 6; echo "<form name='frm' method='post' action='xml_cdr_delete.php'>\n"; echo "<table class='tr_hover' width='100%' cellpadding='0' cellspacing='0' border='0'>\n"; echo "<tr>\n"; echo "<th> </th>\n"; if ($_REQUEST['showall'] && permission_exists('xml_cdr_all')) { echo th_order_by('domain_name', $text['label-domain'], $order_by, $order, null, null, $param); $col_count++; } echo th_order_by('extension', $text['label-extension'], $order_by, $order, null, null, $param); echo th_order_by('start_stamp', $text['label-start'], $order_by, $order, null, "style='text-align: center;'", $param); echo th_order_by('caller_id_number', $text['label-source'], $order_by, $order, null, null, $param); echo th_order_by('destination_number', $text['label-destination'], $order_by, $order, null, null, $param); echo th_order_by('message', $text['label-message'], $order_by, $order, null, null, $param); echo "</tr>\n"; if ($result_count > 0) { echo "<tr>\n"; //determine if theme images exist $theme_image_path = $_SERVER["DOCUMENT_ROOT"] . "/themes/" . $_SESSION['domain']['template']['name'] . "/images/"; $theme_cdr_images_exist = file_exists($theme_image_path . "icon_cdr_inbound_answered.png") && file_exists($theme_image_path . "icon_cdr_inbound_voicemail.png") && file_exists($theme_image_path . "icon_cdr_inbound_cancelled.png") && file_exists($theme_image_path . "icon_cdr_inbound_failed.png") && file_exists($theme_image_path . "icon_cdr_outbound_answered.png") && file_exists($theme_image_path . "icon_cdr_outbound_cancelled.png") && file_exists($theme_image_path . "icon_cdr_outbound_failed.png") && file_exists($theme_image_path . "icon_cdr_local_answered.png") && file_exists($theme_image_path . "icon_cdr_local_voicemail.png") && file_exists($theme_image_path . "icon_cdr_local_cancelled.png") && file_exists($theme_image_path . "icon_cdr_local_failed.png") ? true : false; foreach ($result as $index => $row) { $tmp_start_epoch = $_SESSION['domain']['time_format']['text'] == '12h' ? date("j M Y g:i:sa", $row['start_stamp']) : date("j M Y H:i:s", $row['start_epoch']); //determine call result and appropriate icon echo "<td valign='top' class='" . $row_style[$c] . "'>\n"; if ($theme_cdr_images_exist) { $call_result = 'answered'; echo "<img src='" . PROJECT_PATH . "/themes/" . $_SESSION['domain']['template']['name'] . "/images/icon_cdr_" . $row['direction'] . "_" . $call_result . ".png' width='16' style='border: none; cursor: help;' title='" . $text['label-' . $row['direction']] . ": " . $text['label-' . $call_result] . "'>\n"; } else { echo " ";
$prep_statement->execute(); $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); $result_count = count($result); unset($prep_statement, $sql); $c = 0; $row_style["0"] = "row_style0"; $row_style["1"] = "row_style1"; echo "<table class='tr_hover' width='100%' border='0' cellpadding='0' cellspacing='0'>\n"; echo "<tr>\n"; echo "<th> </th>\n"; echo th_order_by('invoice_number', $text['label-invoice_number'], $order_by, $order); echo th_order_by('invoice_type', $text['label-invoice_type'], $order_by, $order); echo th_order_by('contact_organization', $text['label-contact_to_organization'], $order_by, $order); echo th_order_by('contact_name_given', $text['label-contact_to_given_name'], $order_by, $order); echo th_order_by('contact_name_family', $text['label-contact_to_family_name'], $order_by, $order); echo th_order_by('invoice_date', $text['label-invoice_date'], $order_by, $order); echo "<td align='right' width='42'>\n"; if (permission_exists('invoice_add')) { echo "\t<a href='invoice_edit.php?contact_uuid=" . $_GET['id'] . "' alt='" . $text['button-add'] . "'>{$v_link_label_add}</a>\n"; } else { echo "\t \n"; } echo "</td>\n"; echo "<tr>\n"; if ($result_count > 0) { foreach ($result as $row) { $back = $contact_uuid != '' ? "&back=" . urlencode("invoices.php?id=" . $contact_uuid) : null; $tr_link = permission_exists('invoice_edit') ? "href='invoice_edit.php?contact_uuid=" . $row['contact_uuid'] . "&id=" . $row['invoice_uuid'] . $back . "'" : null; echo "<tr " . $tr_link . ">\n"; echo "\t<td align='center' valign='middle' class='" . $row_style[$c] . "' style='padding: 0px 0px 0px 5px;'>"; if ($row['invoice_paid'] == 1) {
} $sql .= " limit {$rows_per_page} offset {$offset} "; $prep_statement = $db->prepare(check_sql($sql)); $prep_statement->execute(); $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); $result_count = count($result); unset($prep_statement, $sql); $c = 0; $row_style["0"] = "row_style0"; $row_style["1"] = "row_style1"; echo "<table class='tr_hover' width='100%' border='0' cellpadding='0' cellspacing='0'>\n"; echo "<tr>\n"; echo th_order_by('service_name', $text['label-name'], $order_by, $order); echo "<th>" . $text['label-status'] . "</th>\n"; echo "<th>" . $text['label-action'] . "</th>\n"; echo th_order_by('service_description', $text['label-description'], $order_by, $order); echo "<td class='list_control_icons'>"; if (permission_exists('service_add')) { echo "<a href='service_edit.php' alt='add'>{$v_link_label_add}</a>"; } echo "</td>\n"; echo "</tr>\n"; if ($result_count > 0) { foreach ($result as $row) { $tr_link = permission_exists('service_edit') ? "href='service_edit.php?id=" . $row[service_uuid] . "'" : null; echo "<tr " . $tr_link . ">\n"; echo "\t<td valign='top' class='" . $row_style[$c] . "'>"; if (permission_exists('service_edit')) { echo "<a href='service_edit.php?id=" . $row[service_uuid] . "'>" . $row[service_name] . "</a>"; } else { echo $row[service_name];
} $sql .= "limit {$rows_per_page} offset {$offset} "; $prep_statement = $db->prepare(check_sql($sql)); $prep_statement->execute(); $result = $prep_statement->fetchAll(); $result_count = count($result); unset($prep_statement, $sql); $c = 0; $row_style["0"] = "row_style0"; $row_style["1"] = "row_style1"; echo "<table class='tr_hover' width='100%' border='0' cellpadding='0' cellspacing='0'>\n"; echo "<tr>\n"; echo "<th>" . $text['label-time'] . "</th>\n"; echo th_order_by('start_epoch', $text['label-start'], $order_by, $order); echo th_order_by('end_epoch', $text['label-end'], $order_by, $order); echo th_order_by('profile', $text['label-profile'], $order_by, $order); //echo th_order_by('recording', $text['label-recording'], $order_by, $order); echo "<th>" . $text['label-tools'] . "</th>\n"; echo "<td class='list_control_icon'> </td>\n"; echo "</tr>\n"; if ($result_count > 0) { foreach ($result as $row) { $tmp_year = date("Y", $row['start_epoch']); $tmp_month = date("M", $row['start_epoch']); $tmp_day = date("d", $row['start_epoch']); if (defined('TIME_24HR') && TIME_24HR == 1) { $start_date = date("j M Y H:i:s", $row['start_epoch']); $end_date = date("j M Y H:i:s", $row['end_epoch']); } else { $start_date = date("j M Y h:i:sa", $row['start_epoch']); $end_date = date("j M Y h:i:sa", $row['end_epoch']);
$sql .= "order by " . $order_by . " " . $order . " "; } $sql .= "limit " . $rows_per_page . " offset " . $offset . " "; $prep_statement = $db->prepare(check_sql($sql)); $prep_statement->execute(); $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); $result_count = count($result); unset($prep_statement, $sql); $c = 0; $row_style["0"] = "row_style0"; $row_style["1"] = "row_style1"; echo "<table class='tr_hover' width='100%' border='0' cellpadding='0' cellspacing='0'>\n"; echo "<tr>\n"; echo th_order_by('name', $text['label-profile_name'], $order_by, $order); echo th_order_by('enabled', $text['label-profile_enabled'], $order_by, $order); echo th_order_by('description', $text['label-profile_description'], $order_by, $order); echo "<td class='list_control_icons'>\n"; if (permission_exists('device_profile_add')) { echo "\t<a href='device_profile_edit.php' alt='" . $text['button-add'] . "'>" . $v_link_label_add . "</a>\n"; } echo "</td>\n"; echo "<tr>\n"; if ($result_count > 0) { foreach ($result as $row) { $tr_link = permission_exists('device_profile_edit') ? "href='device_profile_edit.php?id=" . $row['device_profile_uuid'] . "'" : null; echo "<tr " . $tr_link . ">\n"; echo "\t<td valign='top' class='" . $row_style[$c] . "'>"; echo permission_exists('device_profile_edit') ? "<a href='device_profile_edit.php?id=" . $row['device_profile_uuid'] . "'>" . $row['device_profile_name'] . "</a>" : $row['device_profile_name']; echo $row['domain_uuid'] == '' ? " <span style='color: #888; font-size: 80%'>" . $text['select-global'] . "</span>" : null; echo "\t</td>\n"; echo "\t<td valign='top' class='" . $row_style[$c] . "'>" . $text['label-' . $row['device_profile_enabled']] . " </td>\n";
} $sql .= "limit {$rows_per_page} offset {$offset} "; $prep_statement = $db->prepare(check_sql($sql)); $prep_statement->execute(); $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); $result_count = count($result); unset($prep_statement, $sql); $c = 0; $row_style["0"] = "row_style0"; $row_style["1"] = "row_style1"; echo "<div align='center'>\n"; echo "<table class='tr_hover' width='100%' border='0' cellpadding='0' cellspacing='0'>\n"; echo "<tr>\n"; echo th_order_by('access_control_name', $text['label-access_control_name'], $order_by, $order); echo th_order_by('access_control_default', $text['label-access_control_default'], $order_by, $order); echo th_order_by('access_control_description', $text['label-access_control_description'], $order_by, $order); echo "<td class='list_control_icons'>"; if (permission_exists('access_control_add')) { echo "<a href='access_control_edit.php' alt='" . $text['button-add'] . "'>{$v_link_label_add}</a>"; } else { echo " \n"; } echo "</td>\n"; echo "<tr>\n"; if ($result_count > 0) { foreach ($result as $row) { if (permission_exists('access_control_edit')) { $tr_link = "href='access_control_edit.php?id=" . $row['access_control_uuid'] . "'"; } echo "<tr " . $tr_link . ">\n"; echo "\t<td valign='top' class='" . $row_style[$c] . "'>" . $row['access_control_name'] . " </td>\n";
echo "</table>\n"; echo "<br>\n"; //show the table and content $c = 0; $row_style["0"] = "row_style0"; $row_style["1"] = "row_style1"; echo "<table class='tr_hover' width='100%' border='0' cellpadding='0' cellspacing='0'>\n"; echo "<tr>\n"; echo th_order_by('fax_caller_id_name', $text['label-fax_caller_id_name'], $order_by, $order, "&id=" . $_GET['id'] . "&box=" . $_GET['box'] . "&page=" . $_GET['page']); echo th_order_by('fax_caller_id_number', $text['label-fax_caller_id_number'], $order_by, $order, "&id=" . $_GET['id'] . "&box=" . $_GET['box'] . "&page=" . $_GET['page']); if ($_REQUEST['box'] == 'sent') { echo th_order_by('fax_destination', $text['label-fax_destination'], $order_by, $order, "&id=" . $_GET['id'] . "&box=" . $_GET['box'] . "&page=" . $_GET['page']); } echo "<th width=''>" . $text['table-file'] . "</th>\n"; echo "<th width='10%'>" . $text['table-view'] . "</th>\n"; echo th_order_by('fax_date', $text['label-fax_date'], $order_by, $order, "&id=" . $_GET['id'] . "&box=" . $_GET['box'] . "&page=" . $_GET['page']); echo "<td style='width: 25px;' class='list_control_icons'> </td>\n"; echo "</tr>\n"; if ($num_rows > 0) { foreach ($fax_files as $row) { $file = basename($row['fax_file_path']); if (strtolower(substr($file, -3)) == "tif" || strtolower(substr($file, -3)) == "pdf") { $file_name = substr($file, 0, strlen($file) - 4); } $file_ext = $row['fax_file_type']; //decode the base64 if (strlen($row['fax_base64']) > 0) { if ($_REQUEST['box'] == 'inbox' && permission_exists('fax_inbox_view')) { if (!file_exists($dir_fax_inbox . '/' . $file)) { file_put_contents($dir_fax_inbox . '/' . $file, base64_decode($row['fax_base64'])); }
echo th_order_by('tta', $text['label-tta'], $order_by, $order, null, "style='text-align: right;'", $param); echo th_order_by('duration', $text['label-duration'], $order_by, $order, null, "style='text-align: center;'", $param); if (file_exists($_SERVER["PROJECT_ROOT"] . "/app/billing/app_config.php")) { // billing collumns echo "<th>" . $text['label-price'] . "</th>\n"; $col_count++; } if (permission_exists('xml_cdr_pdd')) { echo th_order_by('pdd_ms', 'PDD', $order_by, $order, null, "style='text-align: right;'", $param); $col_count++; } if (permission_exists('xml_cdr_mos')) { echo th_order_by('rtp_audio_in_mos', 'MOS', $order_by, $order, null, "style='text-align: center;'", $param); $col_count++; } echo th_order_by('hangup_cause', $text['label-status'], $order_by, $order, $param); if (if_group("admin") || if_group("superadmin") || if_group("cdr")) { echo "<td class='list_control_icon'>"; if (permission_exists('xml_cdr_delete') && $result_count > 0) { echo "<a href='javascript:void(0);' onclick=\"if (confirm('" . $text['confirm-delete'] . "')) { document.forms.frm.submit(); }\" alt='" . $text['button-delete'] . "'>" . $v_link_label_delete . "</a>"; } echo "</td>\n"; $col_count++; } echo "</tr>\n"; if (file_exists($_SERVER["PROJECT_ROOT"] . "/app/billing/app_config.php")) { require_once "app/billing/resources/functions/rating.php"; require_once "resources/classes/database.php"; $database = new database(); } if ($result_count > 0) {
$sql .= " limit {$rows_per_page} offset {$offset} "; $prep_statement = $db->prepare(check_sql($sql)); $prep_statement->execute(); $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); $result_count = count($result); unset($prep_statement, $sql); $c = 0; $row_style["0"] = "row_style0"; $row_style["1"] = "row_style1"; echo "<div align='center'>\n"; echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n"; echo "<tr>\n"; echo th_order_by('hunt_group_extension', $text['label-extension'], $order_by, $order); echo th_order_by('hunt_group_name', $text['label-name'], $order_by, $order); echo th_order_by('hunt_group_name', $text['label-enabled'], $order_by, $order); echo th_order_by('hunt_group_description', $text['label-description'], $order_by, $order); echo "<td align='right' width='42'>\n"; if (permission_exists('hunt_group_add')) { echo "\t<a href='hunt_group_edit.php' alt='" . $text['button-add'] . "'>{$v_link_label_add}</a>\n"; } echo "</td>\n"; echo "<tr>\n"; if ($result_count > 0) { foreach ($result as $row) { echo "<tr >\n"; echo " <td valign='top' class='" . $row_style[$c] . "'>" . $row['hunt_group_extension'] . "</td>\n"; echo " <td valign='top' class='" . $row_style[$c] . "'>" . $row['hunt_group_name'] . "</td>\n"; echo " <td valign='top' class='" . $row_style[$c] . "'>"; if ($row['hunt_group_enabled'] == "true") { echo $text['option-true']; } else {
$sql .= "and direction != 'outbound' "; $sql .= "order by start_stamp DESC "; $sql .= "limit 20 "; $prep_statement = $db->prepare(check_sql($sql)); $prep_statement->execute(); $result = $prep_statement->fetchAll(); $result_count = count($result); unset($prep_statement); echo "<b>" . $text['label-edit-add-recent'] . "</b>"; echo "<br><br>"; echo "<table class='tr_hover' width='100%' cellpadding='0' cellspacing='0' border='0'>\n"; echo "<th style='width: 25px;'> </th>\n"; echo th_order_by('caller_id_name', $text['label-name'], $order_by, $order); echo th_order_by('caller_id_number', $text['label-number'], $order_by, $order); echo th_order_by('start_stamp', $text['label-called-on'], $order_by, $order); echo th_order_by('duration', $text['label-duration'], $order_by, $order); echo "<td> </td>\n"; echo "</tr>"; $c = 0; $row_style["0"] = "row_style0"; $row_style["1"] = "row_style1"; if ($result_count > 0) { foreach ($result as $row) { $tr_onclick = " onclick=\"call_block_recent('" . $row['uuid'] . "','" . urlencode($row['caller_id_name']) . "');\" "; if (strlen($row['caller_id_number']) >= 7) { if (defined('TIME_24HR') && TIME_24HR == 1) { $tmp_start_epoch = date("j M Y H:i:s", $row['start_epoch']); } else { $tmp_start_epoch = date("j M Y h:i:sa", $row['start_epoch']); } echo "<tr>\n";