Вход Регистрация
Файл: public_html/admin/refbotlist.php
Строк: 17
<? include('checkcookie.php'); ?>
<h3>Просмотр списка купленных реф. ботов пользователями</h3>
<br>
<?
if(isset($_GET["id"]))
{
    
$id=$_GET["id"];
    
$user=$_POST["user"];

    if (
$_GET["option"]=="delete")
    {
        
$id=$_GET["id"];
        
mysql_query("DELETE FROM tb_refbot WHERE id='$id'");
    
        
$res=mysql_query("select count(id) from tb_users where username='$user'");
        
$res=mysql_result($res,0,0);
        if(
$res>0)
        {
            
mysql_query("update tb_users set refbots=refbots-1 where username='$user'");
        }

        echo 
"<font color="#cc0000"><b>Реф. бот пользователя $user удален.</b></font><br><br>";
    
}
}

?>
<br>
<table>
    <tr>
        <th>№</th>
        <th>Имя пользователя</th>
        <th>Тарифный план</th>
        <th>Дата и время последнего зачисления денег на баланс</th>
        <th></th>
    </tr>
    <?
    $sql
="SELECT * FROM tb_refbot";

    
$res mysql_query($sql);
    while (
$row mysql_fetch_array($res))
    {
        
?>
        <tr>
            <td><?=$row["id"?></td>
            <td><?=$row["user"?></td>
            <td><?=$row["refbottarif"?></td>
            <td><?=date("d.m.Y H:i"$row["data"]) ?></td>
            <td>
                <form method="post" action="adminmain.php?p=refbotlist&id=<?= $row["id"?>&option=delete">
                <input type="hidden" value="<?=$row["user"?>" name="user">
                <input type="submit" value="удалить" class="button">
                </form>
            </td>
        </tr>
        <?
    

    
?>
</table>
Онлайн: 4
Реклама