Пример #1
0
     $nav = themes_nav($count, $search['url']);
     $extras = array('GROUP BY' => 'A.queue_code', 'ORDER BY' => 'A.smslog_id DESC', 'LIMIT' => $nav['limit'], 'OFFSET' => $nav['offset']);
     $list = dba_search($table . ' AS A', 'B.username, A.p_gateway, A.p_smsc, A.smslog_id, A.p_dst, A.p_sms_type, A.p_msg, A.p_footer, A.p_datetime, A.p_update, A.p_status, A.uid, A.queue_code, COUNT(*) AS queue_count', $conditions, $keywords, $extras, $join);
 }
 $content = "\n\t\t\t<h2>" . _('All sent messages') . "</h2>\n\t\t\t" . $queue_label . "\n\t\t\t<p>" . $search['form'] . "</p>\n\t\t\t<form id=fm_all_outgoing name=fm_all_outgoing action=\"index.php?app=main&inc=feature_report&route=all_outgoing&op=actions&queue_code=" . $queue_code . "\" method=POST>\n\t\t\t" . _CSRF_FORM_ . "\n\t\t\t<input type=hidden name=go value=delete>\n\t\t\t<div class=actions_box>\n\t\t\t\t<div class=pull-left>\n\t\t\t\t\t<a href=\"" . _u('index.php?app=main&inc=feature_report&route=all_outgoing&op=actions&go=export&queue_code=' . $queue_code) . "\">" . $icon_config['export'] . "</a>\n\t\t\t\t</div>\n\t\t\t\t<div class=pull-right>\n\t\t\t\t\t<a href='#' onClick=\"return SubmitConfirm('" . _('Are you sure you want to delete these items ?') . "', 'fm_all_outgoing');\">" . $icon_config['delete'] . "</a>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class=table-responsive>\n\t\t\t<table class=playsms-table-list>\n\t\t\t<thead>\n\t\t\t<tr>\n\t\t\t\t<th width=20%>" . _('User') . "</th>\n\t\t\t\t<th width=15%>" . _('SMSC') . "</th>\n\t\t\t\t<th width=20%>" . _('To') . "</th>\n\t\t\t\t<th width=40%>" . _('Message') . "</th>\n\t\t\t\t<th width=5% class=\"sorttable_nosort\"><input type=checkbox onclick=CheckUncheckAll(document.fm_all_outgoing)></th>\n\t\t\t</tr>\n\t\t\t</thead>\n\t\t\t<tbody>";
 $i = $nav['top'];
 $j = 0;
 for ($j = 0; $j < count($list); $j++) {
     $list[$j] = core_display_data($list[$j]);
     $p_username = $list[$j]['username'];
     $p_gateway = $list[$j]['p_gateway'];
     $p_smsc = $list[$j]['p_smsc'];
     $smslog_id = $list[$j]['smslog_id'];
     $p_uid = $list[$j]['uid'];
     $p_dst = $list[$j]['p_dst'];
     $current_p_dst = report_resolve_sender($p_uid, $p_dst);
     $p_sms_type = $list[$j]['p_sms_type'];
     if (($p_footer = $list[$j]['p_footer']) && ($p_sms_type == "text" || $p_sms_type == "flash")) {
         $p_msg = $p_msg . ' ' . $p_footer;
     }
     $p_datetime = core_display_datetime($list[$j]['p_datetime']);
     $p_update = $list[$j]['p_update'];
     $p_status = $list[$j]['p_status'];
     $c_queue_code = $list[$j]['queue_code'];
     $c_queue_count = (int) $list[$j]['queue_count'];
     $queue_view_link = "";
     if ($c_queue_count > 1) {
         $queue_view_link = "<a href='" . $base_url . "&queue_code=" . $c_queue_code . "'>" . sprintf(_('view all %d'), $c_queue_count) . "</a>";
     }
     // 0 = pending
     // 1 = sent
Пример #2
0
 $base_url = 'index.php?app=main&inc=feature_report&route=user_incoming&op=user_incoming';
 $search = themes_search($search_category, $base_url);
 $conditions = array('in_uid' => $user_config['uid'], 'flag_deleted' => 0, 'in_status' => 1);
 $keywords = $search['dba_keywords'];
 $count = dba_count(_DB_PREF_ . '_tblSMSIncoming', $conditions, $keywords);
 $nav = themes_nav($count, $search['url']);
 $extras = array('AND in_feature' => '!= ""', 'ORDER BY' => 'in_id DESC', 'LIMIT' => $nav['limit'], 'OFFSET' => $nav['offset']);
 $list = dba_search(_DB_PREF_ . '_tblSMSIncoming', 'in_id, in_sender, in_keyword, in_datetime, in_feature, in_message', $conditions, $keywords, $extras);
 $content = "\n\t\t\t<h2>" . _('My feature messages') . "</h2>\n\t\t\t<p>" . $search['form'] . "</p>\n\t\t\t<form id=fm_incoming name=fm_incoming action=\"index.php?app=main&inc=feature_report&route=user_incoming&op=actions\" method=POST>\n\t\t\t" . _CSRF_FORM_ . "\n\t\t\t<input type=hidden name=go value=delete>\n\t\t\t<div class=actions_box>\n\t\t\t\t<div class=pull-left>\n\t\t\t\t\t<a href=\"" . _u('index.php?app=main&inc=feature_report&route=user_incoming&op=actions&go=export') . "\">" . $icon_config['export'] . "</a>\n\t\t\t\t</div>\n\t\t\t\t<div class=pull-right>\n\t\t\t\t\t<a href='#' onClick=\"return SubmitConfirm('" . _('Are you sure you want to delete these items ?') . "', 'fm_incoming');\">" . $icon_config['delete'] . "</a>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class=table-responsive>\n\t\t\t<table class=playsms-table-list>\n\t\t\t<thead>\n\t\t\t<tr>\n\t\t\t\t<th width=20%>" . _('From') . "</th>\n\t\t\t\t<th width=20%>" . _('Keyword') . "</th>\n\t\t\t\t<th width=55%>" . _('Content') . "</th>\n\t\t\t\t<th width=5% class=\"sorttable_nosort\"><input type=checkbox onclick=CheckUncheckAll(document.fm_incoming)></th>\n\t\t\t</tr>\n\t\t\t</thead>\n\t\t\t<tbody>";
 $i = $nav['top'];
 $j = 0;
 for ($j = 0; $j < count($list); $j++) {
     $list[$j] = core_display_data($list[$j]);
     $in_id = $list[$j]['in_id'];
     $in_sender = $list[$j]['in_sender'];
     $current_sender = report_resolve_sender($user_config['uid'], $in_sender);
     $in_keyword = $list[$j]['in_keyword'];
     $in_datetime = core_display_datetime($list[$j]['in_datetime']);
     $in_feature = $list[$j]['in_feature'];
     // $in_status = ($list[$j]['in_status'] == 1 ? '<span class=status_handled />' : '<span class=status_unhandled />');
     // $in_status = strtolower($in_status);
     $c_feature = '';
     if ($in_feature) {
         $c_feature = "<br />" . $in_feature;
     }
     $msg = trim($list[$j]['in_message']);
     $in_message = core_display_text($msg);
     $reply = '';
     $forward = '';
     if ($msg && $in_sender) {
         $reply = _sendsms($in_sender, $msg);
Пример #3
0
     $table = _DB_PREF_ . '_tblSMSOutgoing';
     $join = "INNER JOIN " . _DB_PREF_ . "_tblUser AS B ON B.flag_deleted='0' AND A.uid=B.uid";
     $list = dba_search($table . ' AS A', 'A.id', $conditions, $keywords, array('GROUP BY' => 'A.queue_code'), $join);
     $count = count($list);
     $nav = themes_nav($count, $search['url']);
     $extras = array('GROUP BY' => 'A.queue_code', 'ORDER BY' => 'A.smslog_id DESC', 'LIMIT' => $nav['limit'], 'OFFSET' => $nav['offset']);
     $list = dba_search($table . ' AS A', 'A.smslog_id, A.p_dst, A.p_sms_type, A.p_msg, A.p_footer, A.p_datetime, A.p_update, A.p_status, A.uid, A.queue_code, COUNT(*) AS queue_count', $conditions, $keywords, $extras, $join);
 }
 $content = "\n\t\t\t<h2>" . _('My sent messages') . "</h2>\n\t\t\t" . $queue_label . "\n\t\t\t<p>" . $search['form'] . "</p>\n\t\t\t<form id=fm_user_outgoing name=fm_user_outgoing action=\"index.php?app=main&inc=feature_report&route=user_outgoing&op=actions&queue_code=" . $queue_code . "\" method=POST>\n\t\t\t" . _CSRF_FORM_ . "\n\t\t\t<input type=hidden name=go value=delete>\n\t\t\t<div class=actions_box>\n\t\t\t\t<div class=pull-left>\n\t\t\t\t\t<a href=\"" . _u('index.php?app=main&inc=feature_report&route=user_outgoing&op=actions&go=export&queue_code=' . $queue_code) . "\">" . $icon_config['export'] . "</a>\n\t\t\t\t</div>\n\t\t\t\t<div class=pull-right>\n\t\t\t\t\t<a href='#' onClick=\"return SubmitConfirm('" . _('Are you sure you want to delete these items ?') . "', 'fm_user_outgoing');\">" . $icon_config['delete'] . "</a>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class=table-responsive>\n\t\t\t<table class=playsms-table-list>\n\t\t\t<thead>\n\t\t\t<tr>\n\t\t\t\t<th width=20%>" . _('To') . "</th>\n\t\t\t\t<th width=75%>" . _('Message') . "</th>\n\t\t\t\t<th width=5% class=\"sorttable_nosort\"><input type=checkbox onclick=CheckUncheckAll(document.fm_user_outgoing)></th>\n\t\t\t</tr>\n\t\t\t</thead>\n\t\t\t<tbody>";
 $i = $nav['top'];
 $j = 0;
 for ($j = 0; $j < count($list); $j++) {
     $list[$j] = core_display_data($list[$j]);
     $smslog_id = $list[$j]['smslog_id'];
     $p_dst = $list[$j]['p_dst'];
     $current_p_dst = report_resolve_sender($user_config['uid'], $p_dst);
     $p_sms_type = $list[$j]['p_sms_type'];
     if (($p_footer = $list[$j]['p_footer']) && ($p_sms_type == "text" || $p_sms_type == "flash")) {
         $p_msg = $p_msg . ' ' . $p_footer;
     }
     $p_datetime = core_display_datetime($list[$j]['p_datetime']);
     $p_update = $list[$j]['p_update'];
     $p_status = $list[$j]['p_status'];
     $c_queue_code = $list[$j]['queue_code'];
     $c_queue_count = (int) $list[$j]['queue_count'];
     $queue_view_link = "";
     if ($c_queue_count > 1) {
         $queue_view_link = "<a href='" . $base_url . "&queue_code=" . $c_queue_code . "'>" . sprintf(_('view all %d'), $c_queue_count) . "</a>";
     }
     // 0 = pending
     // 1 = sent
Пример #4
0
 $keywords = $search['dba_keywords'];
 $join = "INNER JOIN " . _DB_PREF_ . "_tblUser AS B ON B.flag_deleted='0' AND A.in_uid=B.uid";
 $count = dba_count(_DB_PREF_ . '_tblSMSIncoming as A', $conditions, $keywords, '', $join);
 $nav = themes_nav($count, $search['url']);
 $extras = array('AND A.in_feature' => '!= ""', 'ORDER BY' => 'A.in_id DESC', 'LIMIT' => $nav['limit'], 'OFFSET' => $nav['offset']);
 $list = dba_search(_DB_PREF_ . '_tblSMSIncoming AS A', 'B.username, A.in_id, A.in_uid, A.in_sender, A.in_keyword, A.in_datetime, A.in_feature, A.in_message', $conditions, $keywords, $extras, $join);
 $content = "\n\t\t\t<h2>" . _('All feature messages') . "</h2>\n\t\t\t<p>" . $search['form'] . "</p>\n\t\t\t<form id=fm_all_incoming name=fm_all_incoming action=\"index.php?app=main&inc=feature_report&route=all_incoming&op=actions\" method=POST>\n\t\t\t" . _CSRF_FORM_ . "\n\t\t\t<input type=hidden name=go value=delete>\n\t\t\t<div class=actions_box>\n\t\t\t\t<div class=pull-left>\n\t\t\t\t\t<a href=\"" . _u('index.php?app=main&inc=feature_report&route=all_incoming&op=actions&go=export') . "\">" . $icon_config['export'] . "</a>\n\t\t\t\t</div>\n\t\t\t\t<div class=pull-right>\n\t\t\t\t\t<a href='#' onClick=\"return SubmitConfirm('" . _('Are you sure you want to delete these items ?') . "', 'fm_all_incoming');\">" . $icon_config['delete'] . "</a>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class=table-responsive>\n\t\t\t<table class=playsms-table-list>\n\t\t\t<thead>\n\t\t\t<tr>\n\t\t\t\t<th width=20%>" . _('User') . "</th>\n\t\t\t\t<th width=20%>" . _('From') . "</th>\n\t\t\t\t<th width=20%>" . _('Keyword') . "</th>\n\t\t\t\t<th width=35%>" . _('Content') . "</th>\n\t\t\t\t<th width=5% class=\"sorttable_nosort\"><input type=checkbox onclick=CheckUncheckAll(document.fm_all_incoming)></th>\n\t\t\t</tr>\n\t\t\t</thead>\n\t\t\t<tbody>";
 $i = $nav['top'];
 $j = 0;
 for ($j = 0; $j < count($list); $j++) {
     $list[$j] = core_display_data($list[$j]);
     $in_username = $list[$j]['username'];
     $in_id = $list[$j]['in_id'];
     $in_uid = $list[$j]['in_uid'];
     $in_sender = $list[$j]['in_sender'];
     $current_sender = report_resolve_sender($in_uid, $in_sender);
     $in_keyword = $list[$j]['in_keyword'];
     $in_datetime = core_display_datetime($list[$j]['in_datetime']);
     if ($c_feature = $list[$j]['in_feature']) {
         $c_feature = "<br />" . $c_feature;
     }
     // $in_status = ($list[$j]['in_status'] == 1 ? '<span class=status_handled />' : '<span class=status_unhandled />');
     // $in_status = strtolower($in_status);
     $msg = $list[$j]['in_message'];
     $in_message = core_display_text($msg);
     $reply = '';
     $forward = '';
     if ($msg && $in_sender) {
         $reply = _sendsms($in_sender, $msg);
         $forward = _sendsms('', $msg, '', $icon_config['forward']);
     }