die;
}
if (isset($_POST["imapr_server"])) {
    as_gateway_popup_save();
    exit;
}
if (isset($_GET["status"])) {
    status();
    exit;
}
if (isset($_GET["about"])) {
    about();
    exit;
}
if (isset($_GET["popup"])) {
    users_list();
    exit;
}
if (isset($_GET["search-list"])) {
    users_list_item();
    exit;
}
if (isset($_GET["import"])) {
    import();
    exit;
}
if (isset($_GET["tasks-list"])) {
    task_list();
    exit;
}
if (isset($_GET["IMPORTATION_FILE_PATH"])) {
Exemple #2
0
<?php 
defined('ACCESS') or die;
?>
<table class="tbl">
	<tr>
		<th width="40"><b>ID</b></th>
  		<th><b>Логин</b></th>
		<th width="100"><b>Баланс</b></th>
		<th width="100"><b>Реферальские</b></th>
		<th width="100"><b>Регистрация</b></th>
		<th width="110"><b>EDIT</b></th>
	</tr>
<?php 
function users_list($query)
{
    $result = mysql_query($query);
    $themes = mysql_num_rows($result);
    if (!$themes) {
        print '<tr><td colspan="6" align="center"><b>Пользователей нет.</b></td></tr>';
    } else {
        $result = mysql_query($query);
        while ($row = mysql_fetch_array($result)) {
            print "<tr>\n\t\t<td>" . $row['id'] . "</td>\n\t\t<td align=\"left\"><a href=\"mailto:" . $row['mail'] . "\"><b>" . $row['login'] . "</b></a></td>\n\t\t<td>" . $row['balance'] . "</td>\n\t\t<td>" . $row['reftop'] . "</td>\n\t\t<td>" . date("d.m.y H:i", $row['reg_time']) . "</td>";
            print '<td><nobr><a href="?p=edit_user&id=' . $row[id] . '"><img src="images/edit_ico.png" width="16" height="16" border="0" alt="Редактировать"></a> <a href="?p=referals&id=' . $row[id] . '"><img src="images/partners.png" width="16" height="16" border="0" alt="Привлечённые рефералы"></a> <a href="?p=logip&id=' . $row[id] . '"><img src="images/monip_ico.png" width="16" height="16" border="0" alt="Лог IP"></a></nobr></td></tr>';
        }
    }
    print "</table>";
}
$sql = "SELECT * FROM `users` ORDER BY `reftop` DESC LIMIT 100";
users_list($sql);
Exemple #3
0
function users_index()
{
    users_list();
}
Exemple #4
0
    print "</table>";
}
if ($_GET['sort'] == "id") {
    $sort = "ORDER BY id DESC";
} elseif ($_GET['sort'] == "sum") {
    $sort = "order by sum DESC";
} elseif ($_GET[sort] == "username") {
    $sort = "order by username ASC";
} else {
    $sort = "order by id ASC";
}
if ($_GET['action'] == "search") {
    $su = " AND username = '******'name'], ENT_QUOTES, '') . "'";
}
$sql = "SELECT * FROM deposits WHERE status = 0 AND id != 999 " . $su . " " . $sort;
users_list(intval($_GET['pg']), 50, $sql);
?>
<form action="?p=deposits&action=add_depo" method="post">
<FIELDSET style="border: solid #666666 1px; padding: 10px; margin-top: 20px;">
<LEGEND><b>Открыть депозит пользователю</b></LEGEND>
<table width="100%" border="0">
	<tr>
		<td><strong>Логин:</strong></td>
		<td align="right"><input style="width: 750px;" type="text" name="name" size="93" /></td>
	</tr>
	<tr>
		<td><strong>Сумма:</strong></td>
		<td align="right"><input style="width: 750px;" type="text" name="sum" size="93" value="100.00" /></td>
	</tr>
	<tr>
		<td><strong>Тарифный план:</strong></td>
Exemple #5
0
function run()
{
    global $user;
    global $layout;
    global $DB;
    $out = '';
    $item = new user();
    switch ($_REQUEST['act']) {
        case 1:
            // json data retrieval & operations
            switch ($_REQUEST['oper']) {
                case 'del':
                    // remove rows
                    $ids = $_REQUEST['ids'];
                    $deleted = 0;
                    foreach ($ids as $id) {
                        $item = new user();
                        $item->load($id);
                        $deleted = $deleted + $item->delete();
                    }
                    echo json_encode(count($ids) == $deleted);
                    break;
                default:
                    // list or search
                    $page = intval($_REQUEST['page']);
                    $max = intval($_REQUEST['rows']);
                    $offset = ($page - 1) * $max;
                    $orderby = $_REQUEST['sidx'] . ' ' . $_REQUEST['sord'];
                    $where = " 1=1 ";
                    if ($_REQUEST['_search'] == 'true' || isset($_REQUEST['quicksearch'])) {
                        if (isset($_REQUEST['quicksearch'])) {
                            $where .= $item->quicksearch($_REQUEST['quicksearch']);
                        } else {
                            if (isset($_REQUEST['filters'])) {
                                $where .= navitable::jqgridsearch($_REQUEST['filters']);
                            } else {
                                // single search
                                $where .= ' AND ' . navitable::jqgridcompare($_REQUEST['searchField'], $_REQUEST['searchOper'], $_REQUEST['searchString']);
                            }
                        }
                    }
                    $DB->queryLimit('id,username,email,profile,language,blocked', 'nv_users', $where, $orderby, $offset, $max);
                    $dataset = $DB->result();
                    $total = $DB->foundRows();
                    //echo $DB->get_last_error();
                    $out = array();
                    $profiles = profile::profile_names();
                    $languages = language::language_names();
                    for ($i = 0; $i < count($dataset); $i++) {
                        $out[$i] = array(0 => $dataset[$i]['id'], 1 => '<strong>' . $dataset[$i]['username'] . '</strong>', 2 => $dataset[$i]['email'], 3 => $profiles[$dataset[$i]['profile']], 4 => $languages[$dataset[$i]['language']], 5 => $dataset[$i]['blocked'] == 1 ? '<img src="img/icons/silk/cancel.png" />' : '');
                    }
                    navitable::jqgridJson($out, $page, $offset, $max, $total);
                    break;
            }
            session_write_close();
            exit;
            break;
        case 2:
            // edit/new form
            if (!empty($_REQUEST['id'])) {
                $item->load(intval($_REQUEST['id']));
            }
            if (isset($_REQUEST['form-sent'])) {
                $item->load_from_post();
                try {
                    $item->save();
                    permission::update_permissions(json_decode($_REQUEST['navigate_permissions_changes'], true), 0, $item->id);
                    $layout->navigate_notification(t(53, "Data saved successfully."), false, false, 'fa fa-check');
                } catch (Exception $e) {
                    $layout->navigate_notification($e->getMessage(), true, true);
                }
            }
            $out = users_form($item);
            break;
        case 4:
            // remove
            if (!empty($_REQUEST['id'])) {
                $item->load(intval($_REQUEST['id']));
                if ($item->delete() > 0) {
                    $layout->navigate_notification(t(55, 'Item removed successfully.'), false);
                    $out = users_list();
                } else {
                    $layout->navigate_notification(t(56, 'Unexpected error.'), false);
                    $out = users_form($item);
                }
            }
            break;
        case 0:
            // list / search result
        // list / search result
        default:
            $out = users_list();
            break;
    }
    return $out;
}
                $page_link_href = 'admin.php?categ=external_services&sub=peruser&iduser='******'#' . urlencode($group) . ($method ? '_' . urlencode($method) : "");
                $user_name_display = htmlentities($es_rights->users[$list_users[$j]]->username, ENT_QUOTES, $charset);
                $result .= "<li><a href=" . $page_link_href . ">" . $user_name_display . "</a></li>\n";
                ++$count;
            }
        }
    }
    $result .= "</ul>";
    //A-t-on trouvé des utilisateur? Si non, on affiche 'Aucun'
    if (!$count) {
        return "<ul><li><i>" . htmlentities($msg["es_user_auth_none"], ENT_QUOTES, $charset) . "</i></li></ul>";
    }
    return $result;
}
$table_rights = "<table style='width:100%'>\n<thead><th colspan='3'>Groupe</th><th colspan='3'>" . htmlentities($msg["external_services_general_utilisateurs_autorises"], ENT_QUOTES, $charset) . "</th></thead>\n";
//pour chaque groupe
$group_list = $es->get_group_list();
for ($i = 0; $i < count($group_list); $i++) {
    $group = $group_list[$i];
    $rights_group = $es_rights->get_rights($group["name"], "");
    $table_rights .= "<tr class='" . ($i % 2 ? "even" : "odd") . "'><td><b>" . htmlentities($group["name"], ENT_QUOTES, $charset) . "</b></td><td colspan='2'><i>" . htmlentities($group["description"], ENT_QUOTES, $charset) . "</i></td>\n\t<td>\n\t<input type='hidden' name='group[" . $group["name"] . "]' value='1'/>\n\t</td>\n\t<td colspan='3'>" . users_list($group["name"], '', $rights_group->users, array()) . "</td>\n\t\n\t</tr>";
    $table_rights .= "<thead><td></td><th colspan='2'>" . htmlentities($msg["external_services_general_methode"], ENT_QUOTES, $charset) . "</th><th colspan='3'>" . htmlentities($msg["external_services_general_utilisateurs_autorises"], ENT_QUOTES, $charset) . "</th></thead>";
    //Pour chaque méthode
    for ($j = 0; $j < count($group["methods"]); $j++) {
        $method = $group["methods"][$j];
        $rights = $es_rights->get_rights($group["name"], $method["name"]);
        $table_rights .= "<tr class='" . ($i % 2 ? "even" : "odd") . "'>\n\t\t" . (!$j ? "<td rowspan='" . count($group["methods"]) . "'>&nbsp;</td>" : "") . "\n\t\t<td><b>" . htmlentities($method["name"], ENT_QUOTES, $charset) . "</b></td><td><i>" . htmlentities($method["description"], ENT_QUOTES, $charset) . "</i></td>\n\t\t<td></td>\n\t\t<td></td>\n\t\t<td>" . users_list($group["name"], $method["name"], $rights->users, $rights_group->users) . "</td>\n\t\t</tr>";
    }
}
$table_rights .= "</table>";
print str_replace("!!table_rights!!", $table_rights, $es_admin_general);