示例#1
0
    }
    ?>
</table>

<?php 
} else {
    ?>
<table class="tbl">
<tr>
	<th><strong>Дата</strong></th>
	<th><strong>Страница</strong></th>
	<th><strong>IP</strong></th>
	<th><strong>Страна</strong></th>
	<th><strong>ID</strong></th>
	<th><strong>Логин</strong></th>
</tr>
<?php 
    $idlist = "";
    $sql = "SELECT * FROM `loghistory` ORDER BY id DESC LIMIT 100";
    $rs = mysql_query($sql);
    while ($a = mysql_fetch_array($rs)) {
        $sql2 = 'SELECT * FROM `users` WHERE id = ' . $a['user_id'] . ' LIMIT 1';
        $rs_u = mysql_query($sql2);
        $a2 = mysql_fetch_array($rs_u);
        $country = getCOUNTRY($a['ip']);
        print "<tr>\n\t<td>" . date("d.m.Y H:i:s", $a['date']) . "</td>\n\t<td>" . $a['action'] . "</td>\n\t<td>" . $a['ip'] . "</td>\n\t<td><img src=\"/img/flags/" . $country . ".gif\" width=\"18\" height=\"12\" border=\"0\" alt=\"" . $country . "\" title=\"" . $country . "\" /> " . $country . "</td>\n\t<td>" . $a['user_id'] . "</td>\n\t<td><a href=\"?p=edit_user&id=" . $a['user_id'] . "\">" . $a2['login'] . "</a></td>\n</tr>";
    }
    ?>
</table>
<?php 
}
示例#2
0
<div id="wrap">
	<div id="header">
		<div class="left"><a href="/admin"><img src="images/logo.png" width="256" height="50" border="0" alt="SWEEPSTARTS"></a></div>
		<div class="right">
			<div class="block">
		Здравствуй, <?php 
    print $login;
    ?>
 [#<?php 
    print $user_id;
    ?>
]! IP: <?php 
    print $userip;
    ?>
 <img src="/img/flags/<?php 
    print getCOUNTRY($userip);
    ?>
.gif" width="18" height="12" border="0" alt="" /><br />Серверное время: <b><?php 
    print date("d.m.Y");
    ?>
</b> <span id="time"></span><br /><a href="/">Перейти на сайт</a> | <a href="javascript: if(confirm('Вы действительно хотите выйти?')) top.location.href='/logout.php';">Выход</a>
			</div>
		</div>
	</div>
	<div class="clear"></div>
	<ul class="menu">
		<li><a href="?p=settings"><img align="texttop" src="images/set_ico.png" alt=""> Настройки проекта</a></li>
		<li><a href="?p=plans"><img align="texttop" src="images/tarif_ico.png" alt=""> Тарифные планы</a></li>
		<li><a href="?p=deposits"><img align="texttop" src="images/vklad_ico.png" alt=""> Вклады</a></li>
		<li><a href="?p=info"><img align="texttop" src="images/instrument_ico.png" alt=""> Инструменты</a></li>
	</ul>
示例#3
0
function users_list($pg, $num, $query)
{
    $result = mysql_query($query);
    $themes = mysql_num_rows($result);
    if (!$themes) {
        print '<tr><td colspan="9" align="center"><font color="#ffffff"><b>Пользователей пока нет.</b></font></td></tr>';
    } else {
        $total = intval(($themes - 1) / $num) + 1;
        if (empty($pg) or $pg < 0) {
            $pg = 1;
        }
        if ($pg > $total) {
            $pg = $total;
        }
        $start = $pg * $num - $num;
        $result = mysql_query($query . " LIMIT " . $start . ", " . $num);
        while ($row = mysql_fetch_array($result)) {
            $country = getCOUNTRY($row['ip']);
            print "<tr>\n\t\t<td>" . $row['id'] . "</td>\n\t\t<td class=\"tdleft\"><a href=\"mailto:" . $row['mail'] . "\"><b>" . $row['login'] . "</b></a></td>\n\t\t<td>" . $row['balance'] . "</td>\n\t\t<td>" . date("d.m.y H:i", $row['reg_time']) . "</td>\n\t\t<td>" . date("d.m.y H:i", $row['go_time']) . "</td>\n\t\t<td>" . $row['ip'] . "</td>\n\t\t<td><img src=\"/img/flags/" . $country . ".gif\" width=\"18\" height=\"12\" border=\"0\" alt=\"" . $country . "\" title=\"" . $country . "\" /> " . substr($country, 0, 4) . "</td>\n\t<td>";
            switch ($row['status']) {
                case 0:
                    print "<img src=\"images/user.png\" width=\"16\" height=\"16\" border=\"0\" alt=\"User\">";
                    break;
                case 1:
                    print "<img src=\"images/admin.png\" width=\"16\" height=\"16\" border=\"0\" alt=\"Админ\">";
                    break;
                case 2:
                    print "<img src=\"images/moder.png\" width=\"16\" height=\"16\" border=\"0\" alt=\"Модератор\">";
                    break;
                case 3:
                    print "<img src=\"images/ban.png\" width=\"16\" height=\"16\" border=\"0\" alt=\"Заблокированный\">";
                    break;
                case 4:
                    print "<img src=\"images/hranitel.png\" width=\"16\" height=\"16\" border=\"0\" alt=\"Хранитель\">";
                    break;
            }
            print "</td>\n\t\t\t<td><nobr><a onClick=\"return confirm('Удалить этого пользователя?')\" href='del/user.php?pg=" . $pg . "&id=" . $row[id] . "'><img src=\"images/del_ico.png\" width=\"16\" height=\"16\" border=\"0\" alt=\"Удаление пользователя\"></a> ";
            switch ($row[status]) {
                case 0:
                    print '<a href="?p=users&pst=change_status&id=' . $row[id] . '&status=2"><img src="images/moder.png" width="16" height="16" border="0" alt="Сделать модером"></a> <a href="?p=users&pst=change_status&id=' . $row[id] . '&status=1"><img src="images/admin.png" width="16" height="16" border="0" alt="Сделать админом"></a> <a href="?p=users&pst=change_status&id=' . $row[id] . '&status=4"><img src="images/hranitel.png" width="16" height="16" border="0" alt="Сделать хранителем"></a> <a href="?p=users&pst=change_status&id=' . $row[id] . '&status=3"><img src="images/ban.png" width="16" height="16" border="0" alt="Закрыть доступ"></a>';
                    break;
                case 1:
                    print '<a href="?p=users&pst=change_status&id=' . $row[id] . '&status=0"><img src="images/user.png" width="16" height="16" border="0" alt="Сделать юзером"></a> <a href="?p=users&pst=change_status&id=' . $row[id] . '&status=2"><img src="images/moder.png" width="16" height="16" border="0" alt="Сделать модером"></a> <a href="?p=users&pst=change_status&id=' . $row[id] . '&status=4"><img src="images/hranitel.png" width="16" height="16" border="0" alt="Сделать хранителем"></a> <a href="?p=users&pst=change_status&id=' . $row[id] . '&status=3"><img src="images/ban.png" width="16" height="16" border="0" alt="Закрыть доступ"></a>';
                    break;
                case 2:
                    print '<a href="?p=users&pst=change_status&id=' . $row[id] . '&status=0"><img src="images/user.png" width="16" height="16" border="0" alt="Сделать юзером"></a> <a href="?p=users&pst=change_status&id=' . $row[id] . '&status=1"><img src="images/admin.png" width="16" height="16" border="0" alt="Сделать админом"></a> <a href="?p=users&pst=change_status&id=' . $row[id] . '&status=4"><img src="images/hranitel.png" width="16" height="16" border="0" alt="Сделать хранителем"></a> <a href="?p=users&pst=change_status&id=' . $row[id] . '&status=3"><img src="images/ban.png" width="16" height="16" border="0" alt="Закрыть доступ"></a>';
                    break;
                case 3:
                    print '<a href="?p=users&pst=change_status&id=' . $row[id] . '&status=0"><img src="images/user.png" width="16" height="16" border="0" alt="Разблокировать"></a> <a href="?p=users&pst=change_status&id=' . $row[id] . '&status=2"><img src="images/moder.png" width="16" height="16" border="0" alt="Сделать модером"></a> <a href="?p=users&pst=change_status&id=' . $row[id] . '&status=4"><img src="images/hranitel.png" width="16" height="16" border="0" alt="Сделать хранителем"></a> <a href="?p=users&pst=change_status&id=' . $row[id] . '&status=1"><img src="images/admin.png" width="16" height="16" border="0" alt="Сделать админом"></a>';
                    break;
                case 4:
                    print '<a href="?p=users&pst=change_status&id=' . $row[id] . '&status=0"><img src="images/user.png" width="16" height="16" border="0" alt="Сделать юзером"></a> <a href="?p=users&pst=change_status&id=' . $row[id] . '&status=2"><img src="images/moder.png" width="16" height="16" border="0" alt="Сделать модером"></a> <a href="?p=users&pst=change_status&id=' . $row[id] . '&status=1"><img src="images/admin.png" width="16" height="16" border="0" alt="Сделать админом"></a> <a href="?p=users&pst=change_status&id=' . $row[id] . '&status=3"><img src="images/ban.png" width="16" height="16" border="0" alt="Закрыть доступ"></a>';
                    break;
            }
            print ' <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> <a href="?p=logpages&id=' . $row[id] . '"><img src="images/logpage_ico.png" width="16" height="16" border="0" alt="Журнал переходов" /></a></nobr></td></tr>';
        }
        if ($pg != 1) {
            $pervpg = "<a href=?p=users&sort=" . $_GET['sort'] . "&pg=" . ($pg - 1) . ">««</a>";
        }
        if ($pg != $total) {
            $nextpg = " <a href=?p=users&sort=" . $_GET['sort'] . "&pg=" . ($pg + 1) . ">»»</a>";
        }
        if ($pg - 2 > 0) {
            $pg2left = " <a href=?p=users&sort=" . $_GET['sort'] . "&pg=" . ($pg - 2) . ">" . ($pg - 2) . "</a> | ";
        }
        if ($pg - 1 > 0) {
            $pg1left = " <a href=?p=users&sort=" . $_GET['sort'] . "&pg=" . ($pg - 1) . ">" . ($pg - 1) . "</a> | ";
        }
        if ($pg + 2 <= $total) {
            $pg2right = " | <a href=?p=users&sort=" . $_GET['sort'] . "&pg=" . ($pg + 2) . ">" . ($pg + 2) . "</a>";
        }
        if ($pg + 1 <= $total) {
            $pg1right = " | <a href=?p=users&sort=" . $_GET['sort'] . "&pg=" . ($pg + 1) . ">" . ($pg + 1) . "</a>";
        }
        print "<tr><td height=\"20\" colspan=\"9\" class=\"ftr\"><b>Страницы: </b>" . $pervpg . $pg2left . $pg1left . "[" . $pg . "]" . $pg1right . $pg2right . $nextpg . "</td></tr>";
    }
    print "</table>";
}