Пример #1
0
if (!$uid) {
    $uid = $user_config['uid'];
}
// sender ID
$c_sender_id = $_REQUEST['sender_id'];
if ($c_sender_id) {
    $c_sender_id = core_sanitize_sender($c_sender_id);
}
// sender ID description
$c_sender_id_description = trim($_REQUEST['description']) ? trim($_REQUEST['description']) : $c_sender_id;
switch (_OP_) {
    case 'sender_id_list':
        $search_category = array(_('Username') => 'uid', _('Sender ID') => 'registry_key');
        $keyword_converter = array('uid' => 'user_username2uid');
        $base_url = 'index.php?app=main&inc=core_sender_id&op=sender_id_list';
        $search = themes_search($search_category, $base_url, $keyword_converter);
        $conditions = array('uid' => $user_config['uid'], 'registry_family' => 'sender_id');
        if (auth_isadmin()) {
            unset($conditions['uid']);
        }
        $keywords = $search['dba_keywords'];
        $count = dba_count(_DB_PREF_ . '_tblRegistry', $conditions, $keywords);
        $nav = themes_nav($count, $search['url']);
        $extras = array('ORDER BY' => 'uid', 'LIMIT' => $nav['limit'], 'OFFSET' => $nav['offset']);
        $list = dba_search(_DB_PREF_ . '_tblRegistry', '*', $conditions, $keywords, $extras);
        $sender_id_list = array();
        $i = $nav['top'];
        $j = 0;
        for ($j = 0; $j < count($list); $j++) {
            $username = auth_isadmin() ? user_uid2username($list[$j]['uid']) : '';
            $status = $list[$j]['registry_value'] == 1 ? "<span class=status_enabled></span>" : "<span class=status_disabled></span>";
Пример #2
0
 $queue_home_link = "";
 if ($queue_code = trim($_REQUEST['queue_code'])) {
     $queue_label = "<h4>" . sprintf(_('List of queue %s'), $queue_code) . "</h4>";
     $queue_home_link = _back($base_url);
     $base_url .= '&queue_code=' . $queue_code;
     $search = themes_search($search_category, $base_url);
     $conditions = array('A.queue_code' => $queue_code, 'A.flag_deleted' => 0);
     $keywords = $search['dba_keywords'];
     $table = _DB_PREF_ . '_tblSMSOutgoing';
     $join = "INNER JOIN " . _DB_PREF_ . "_tblUser AS B ON B.flag_deleted='0' AND A.uid=B.uid";
     $count = dba_count($table . ' AS A', $conditions, $keywords, '', $join);
     $nav = themes_nav($count, $search['url']);
     $extras = array('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', $conditions, $keywords, $extras, $join);
 } else {
     $search = themes_search($search_category, $base_url);
     $conditions = array('A.flag_deleted' => 0);
     $keywords = $search['dba_keywords'];
     $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', '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]);
Пример #3
0
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with playSMS. If not, see <http://www.gnu.org/licenses/>.
 */
defined('_SECURE_') or die('Forbidden');
if (!auth_isadmin()) {
    auth_block();
}
switch (_OP_) {
    case "stoplist_list":
        $search_category = array(_('Mobile') => 'mobile', _('Username') => 'uid');
        $base_url = 'index.php?app=main&inc=feature_stoplist&op=stoplist_list';
        $search = themes_search($search_category, $base_url, array('uid' => 'user_username2uid'));
        $keywords = $search['dba_keywords'];
        $count = dba_count(_DB_PREF_ . '_featureStoplist', '', $keywords);
        $nav = themes_nav($count, $search['url']);
        $extras = array('ORDER BY' => 'uid', 'LIMIT' => $nav['limit'], 'OFFSET' => $nav['offset']);
        $list = dba_search(_DB_PREF_ . '_featureStoplist', '*', '', $keywords, $extras);
        $content = _dialog() . "\n\t\t\t<h2>" . _('Manage stoplist') . "</h2>\n\t\t\t<p>" . $search['form'] . "</p>\n\t\t\t<form name=fm_stoplist_list id=fm_stoplist_list action='index.php?app=main&inc=feature_stoplist&op=actions' method=post>\n\t\t\t" . _CSRF_FORM_ . "\n\t\t\t<div class=table-responsive>\n\t\t\t<table class=playsms-table-list>\n\t\t\t\t<thead>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td colspan=3>\n\t\t\t\t\t\t\t<div class=actions_box>\n\t\t\t\t\t\t\t\t<div class=pull-left>\n\t\t\t\t\t\t\t\t\t<a href='" . _u('index.php?app=main&inc=feature_stoplist&op=stoplist_add') . "'>" . $icon_config['add'] . "</a>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<script type='text/javascript'>\n\t\t\t\t\t\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\t\t\t\t\t\t\$('#action_go').click(function(){\n\t\t\t\t\t\t\t\t\t\t\t\$('#fm_stoplist_list').submit();\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t</script>\n\t\t\t\t\t\t\t\t<div class=pull-right>\n\t\t\t\t\t\t\t\t\t<select name=go class=search_input_category>\n\t\t\t\t\t\t\t\t\t\t<option value=>" . _('Select') . "</option>\n\t\t\t\t\t\t\t\t\t\t<option value=delete>" . _('Delete') . "</option>\n\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t\t<a href='#' id=action_go>" . $icon_config['go'] . "</a>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th width=45%>" . _('User') . "</th>\n\t\t\t\t\t\t<th width=50%>" . _('Blocked mobile') . "</th>\n\t\t\t\t\t\t<th width=5%><input type=checkbox onclick=CheckUncheckAll(document.fm_stoplist_list)></th>\n\t\t\t\t\t</tr>\n\t\t\t\t</thead>\n\t\t\t<tbody>";
        $i = $nav['top'];
        $j = 0;
        for ($j = 0; $j < count($list); $j++) {
            $pid = $list[$j]['id'];
            $username = user_uid2username($list[$j]['uid']);
            $mobile = $list[$j]['mobile'];
            $i--;
            $c_i = "<a href=\"" . _u('index.php?app=main&inc=feature_stoplist&op=stoplist_edit&id=' . $pid) . "\">" . $i . ".</a>";
            if ($list[$j]['uid'] == $user_config['uid']) {
Пример #4
0
         $form_sub_title = "<h3>" . _('List of users') . "</h3>";
         $disabled_on_users = 'disabled';
     } else {
         if ($view == 'subusers') {
             $conditions = array('flag_deleted' => 0, 'status' => 4);
             $form_sub_title = "<h3>" . _('List of subusers') . "</h3>";
             $disabled_on_subusers = 'disabled';
             $parent_column_title = "<th width='12%'>" . _('Parent') . "</th>";
         }
     }
 }
 $search_var = array(_('Registered') => 'register_datetime', _('Username') => 'username', _('Name') => 'name', _('Mobile') => 'mobile', _('ACL') => 'acl_id');
 if ($view == 'subusers') {
     $search_var[_('Parent account')] = 'parent_uid';
 }
 $search = themes_search($search_var, '', array('parent_uid' => 'user_username2uid', 'acl_id' => 'acl_getid'));
 $keywords = $search['dba_keywords'];
 $count = dba_count(_DB_PREF_ . '_tblUser', $conditions, $keywords);
 $nav = themes_nav($count, "index.php?app=main&inc=core_user&route=user_mgmnt&op=user_list&view=" . $view);
 $extras = array('ORDER BY' => 'register_datetime DESC, username', 'LIMIT' => $nav['limit'], 'OFFSET' => $nav['offset']);
 $list = dba_search(_DB_PREF_ . '_tblUser', '*', $conditions, $keywords, $extras);
 if ($err = TRUE) {
     $content = _dialog();
 }
 $content .= "\n\t\t\t<h2>" . _('Manage account') . "</h2>\n\t\t\t<input type='button' " . $disabled_on_admin . " value='" . _('Administrators') . "' onClick=\"javascript:linkto('" . _u('index.php?app=main&inc=core_user&route=user_mgmnt&op=user_list&view=admin') . "')\" class=\"button\" />\n\t\t\t<input type='button' " . $disabled_on_users . " value='" . _('Users') . "' onClick=\"javascript:linkto('" . _u('index.php?app=main&inc=core_user&route=user_mgmnt&op=user_list&view=users') . "')\" class=\"button\" />\n\t\t\t<input type='button' " . $disabled_on_subusers . " value='" . _('Subusers') . "' onClick=\"javascript:linkto('" . _u('index.php?app=main&inc=core_user&route=user_mgmnt&op=user_list&view=subusers') . "')\" class=\"button\" />\n\t\t\t" . $form_sub_title . "\n\t\t\t<p>" . $search['form'] . "</p>\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=core_user&route=user_mgmnt&op=user_add&view=' . $view) . "\">" . $icon_config['add'] . "</a>\n\t\t\t\t</div>\n\t\t\t\t<div class=pull-right>\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><tr>\n\t\t\t\t<th width='14%'>" . _('Registered') . "</th>\n\t\t\t\t" . $parent_column_title . "\n\t\t\t\t<th width='12%'>" . _('Username') . "</th>\n\t\t\t\t<th width='14%'>" . _('Name') . "</th>\n\t\t\t\t<th width='14%'>" . _('Mobile') . "</th>\n\t\t\t\t<th width='10%'>" . _('Credit') . "</th>\n\t\t\t\t<th width='12%'>" . _('ACL') . "</th>\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t<th width='12%'>" . _('Action') . "</th>\n\t\t\t</tr></thead>\n\t\t\t<tbody>";
 $j = $nav['top'];
 for ($i = 0; $i < count($list); $i++) {
     $action = "";
     // login as
     if ($list[$i]['uid'] != $user_config['uid']) {
         $action .= "<a href=\"" . _u('index.php?app=main&inc=core_user&route=user_mgmnt&op=login_as&uname=' . $list[$i]['username']) . "\">" . $icon_config['login_as'] . "</a>";
Пример #5
0
defined('_SECURE_') or die('Forbidden');
if (!auth_isuser()) {
    if (!auth_isadmin()) {
        auth_block();
    }
}
if ($_REQUEST['uname']) {
    $subuser_edited = user_getdatabyusername($_REQUEST['uname']);
    if ($subuser_edited['status'] != 4 || $subuser_edited['parent_uid'] != $user_config['uid']) {
        auth_block();
    }
}
switch (_OP_) {
    case "subuser_list":
        $search_var = array(_('Registered') => 'register_datetime', _('Username') => 'username', _('Name') => 'name', _('Mobile') => 'mobile');
        $search = themes_search($search_var);
        $conditions = array('status' => 4, 'parent_uid' => $user_config['uid']);
        $keywords = $search['dba_keywords'];
        $count = dba_count(_DB_PREF_ . '_tblUser', $conditions, $keywords);
        $nav = themes_nav($count, "index.php?app=main&inc=core_user&route=subuser_mgmnt&op=subuser_list");
        $extras = array('ORDER BY' => 'register_datetime DESC, username', 'LIMIT' => $nav['limit'], 'OFFSET' => $nav['offset']);
        $list = dba_search(_DB_PREF_ . '_tblUser', '*', $conditions, $keywords, $extras);
        if ($err = $_SESSION['error_string']) {
            $content = "<div class=error_string>{$err}</div>";
        }
        $content .= "\n\t\t\t<h2>" . _('Manage subuser') . "</h2>\n\t\t\t<h3>" . _('List of subusers') . "</h3>\n\t\t\t<p>" . $search['form'] . "</p>\t\t\t\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=core_user&route=subuser_mgmnt&op=subuser_add') . "\">" . $icon_config['add'] . "</a>\n\t\t\t\t</div>\n\t\t\t\t<div class=pull-right>\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><tr>\n\t\t\t\t<th width='20%'>" . _('Registered') . "</th>\n\t\t\t\t<th width='15%'>" . _('Username') . "</th>\n\t\t\t\t<th width='20%'>" . _('Name') . "</th>\n\t\t\t\t<th width='15%'>" . _('Mobile') . "</th>\n\t\t\t\t<th width='15%'>" . _('Credit') . "</th>\n\t\t\t\t<th width='15%'>" . _('Action') . "</th>\n\t\t\t</tr></thead>\n\t\t\t<tbody>";
        $j = $nav['top'];
        for ($i = 0; $i < count($list); $i++) {
            $action = "";
            // login as
            if ($list[$i]['uid'] != $user_config['uid']) {
Пример #6
0
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with playSMS. If not, see <http://www.gnu.org/licenses/>.
 */
defined('_SECURE_') or die('Forbidden');
if (!auth_isadmin()) {
    auth_block();
}
$id = $_REQUEST['id'];
$acl_name = acl_getname($id);
switch (_OP_) {
    case "user_list":
        $search_var = array(_('Registered') => 'register_datetime', _('Username') => 'username', _('Name') => 'name', _('Mobile') => 'mobile');
        $search = themes_search($search_var, '');
        $conditions = array('flag_deleted' => 0, 'acl_id' => $id);
        $keywords = $search['dba_keywords'];
        $count = dba_count(_DB_PREF_ . '_tblUser', $conditions, $keywords);
        $nav = themes_nav($count, "index.php?app=main&inc=core_acl&route=view&op=user_list&id=" . $id);
        $extras = array('ORDER BY' => 'register_datetime DESC, username', 'LIMIT' => $nav['limit'], 'OFFSET' => $nav['offset']);
        $list = dba_search(_DB_PREF_ . '_tblUser', '*', $conditions, $keywords, $extras);
        $content .= _dialog() . "\n\t\t\t<h2>" . _('Manage ACL') . "</h2>\n\t\t\t<h3>" . _('View report') . "</h3>\n\n\t\t\t<table class=playsms-table cellpadding=1 cellspacing=2 border=0>\n\t\t\t\t<tr>\n\t\t\t\t\t<td class=label-sizer>" . _('ACL ID') . "</td>\n\t\t\t\t\t<td>" . $id . "</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>" . _('ACL name') . "</td>\n\t\t\t\t\t<td>" . $acl_name . "</td>\n\t\t\t\t</tr>\n\t\t\t</table>\t\t\t\n\t\t\t<h4>" . _('List of accounts') . "</h4>\n\t\t\t<p>" . $search['form'] . "</p>\n\t\t\t<div class=table-responsive>\n\t\t\t<table class=playsms-table-list>\n\t\t\t<thead><tr>\n\t\t\t\t<th width='20%'>" . _('Registered') . "</th>\n\t\t\t\t<th width='20%'>" . _('Username') . "</th>\n\t\t\t\t<th width='20%'>" . _('Name') . "</th>\n\t\t\t\t<th width='20%'>" . _('Mobile') . "</th>\n\t\t\t\t<th width='20%'>" . _('Credit') . "</th>\n\t\t\t</tr></thead>\n\t\t\t<tbody>";
        $j = $nav['top'];
        for ($i = 0; $i < count($list); $i++) {
            $action = "";
            if ($list[$i]['uid'] != '1' || $list[$i]['uid'] != $user_config['uid']) {
                if (user_banned_get($list[$i]['uid'])) {
                    // unban
                    $banned_icon = $icon_config['ban'];
                } else {
Пример #7
0
defined('_SECURE_') or die('Forbidden');
if (!auth_isuser()) {
    if (!auth_isadmin()) {
        auth_block();
    }
}
if ($_REQUEST['uname']) {
    $subuser_edited = user_getdatabyusername($_REQUEST['uname']);
    if ($subuser_edited['status'] != 4 || $subuser_edited['parent_uid'] != $user_config['uid']) {
        auth_block();
    }
}
switch (_OP_) {
    case "subuser_list":
        $search_var = array(_('Registered') => 'register_datetime', _('Username') => 'username', _('Name') => 'name', _('Mobile') => 'mobile', _('ACL') => 'acl_id');
        $search = themes_search($search_var, '', array('acl_id' => 'acl_getid'));
        $conditions = array('flag_deleted' => 0, 'status' => 4, 'parent_uid' => $user_config['uid']);
        $keywords = $search['dba_keywords'];
        $count = dba_count(_DB_PREF_ . '_tblUser', $conditions, $keywords);
        $nav = themes_nav($count, "index.php?app=main&inc=core_user&route=subuser_mgmnt&op=subuser_list");
        $extras = array('ORDER BY' => 'register_datetime DESC, username', 'LIMIT' => $nav['limit'], 'OFFSET' => $nav['offset']);
        $list = dba_search(_DB_PREF_ . '_tblUser', '*', $conditions, $keywords, $extras);
        if ($err = TRUE) {
            $content = _dialog();
        }
        $content .= "\n\t\t\t<h2>" . _('Manage subuser') . "</h2>\n\t\t\t<h3>" . _('List of subusers') . "</h3>\n\t\t\t<p>" . $search['form'] . "</p>\t\t\t\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=core_user&route=subuser_mgmnt&op=subuser_add') . "\">" . $icon_config['add'] . "</a>\n\t\t\t\t</div>\n\t\t\t\t<div class=pull-right>\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><tr>\n\t\t\t\t<th width='15%'>" . _('Registered') . "</th>\n\t\t\t\t<th width='15%'>" . _('Username') . "</th>\n\t\t\t\t<th width='15%'>" . _('Name') . "</th>\n\t\t\t\t<th width='15%'>" . _('Mobile') . "</th>\n\t\t\t\t<th width='10%'>" . _('Credit') . "</th>\n\t\t\t\t<th width='15%'>" . _('ACL') . "</th>\n\t\t\t\t<th width='15%'>" . _('Action') . "</th>\n\t\t\t</tr></thead>\n\t\t\t<tbody>";
        $j = $nav['top'];
        for ($i = 0; $i < count($list); $i++) {
            $action = "";
            // login as
            if ($list[$i]['uid'] != $user_config['uid']) {