game/modules_data/location/_ref.php

93 lines
3.4 KiB
PHP
Raw Normal View History

2022-06-06 21:30:34 +00:00
<?php
if(!defined('GAME') || !isset($_GET['referals']))
{
die();
}
$rfs = array();
$rfs['count'] = mysql_fetch_array(mysql_query('SELECT COUNT(`id`) FROM `users` WHERE `host_reg` = "'.$u->info['id'].'" AND `active` = "" LIMIT 1000'));
$rfs['count'] = 0+$rfs['count'][0];
$rfs['c'] = 1;
$rfs['see'] = '';
$sp = mysql_query('SELECT `id`,`level` FROM `users` WHERE `host_reg` = "'.$u->info['id'].'" AND `active` = "" ORDER BY `level` DESC LIMIT '.$rfs['count']);
while($pl = mysql_fetch_array($sp))
{
$rfs['c2'] = '&nbsp; '.$rfs['c'].'. &nbsp; '.$u->microLogin($pl['id'],1).'<br>';
if($pl['level']<1)
{
$rfs['c2'] = '<font color="grey">'.$rfs['c2'].'</font>';
}elseif($pl['level']>5)
{
$rfs['c2'] = '<font color="green">'.$rfs['c2'].'</font>';
}
$rfs['see'] .= $rfs['c2'];
$rfs['c']++;
}
if($rfs['see']=='')
{
2023-01-10 16:29:32 +00:00
$rfs['see'] = '<b>К сожалению у Вас нет рефералов</b>';
2022-06-06 21:30:34 +00:00
}
?>
<table cellspacing="0" cellpadding="2" width="100%">
<tr>
<td style="vertical-align: top; "><table cellspacing="0" cellpadding="2" width="100%">
<tr>
2023-01-10 16:29:32 +00:00
<td colspan="4" align="center"><h4>Рефералы</h4></td>
2022-06-06 21:30:34 +00:00
</tr>
<tr>
2023-01-10 16:29:32 +00:00
<td colspan="4">Ваша уникальная ссылка <input style="background-color:#FBF8E1; border:1px solid #EFDBB6; padding:5px;" size="25" value="new-combats.com/r<?=$u->info['id']?>" /></td>
2022-06-06 21:30:34 +00:00
</tr>
<tr>
<td colspan="4">&nbsp;</td>
</tr>
<tr>
2023-01-10 16:29:32 +00:00
<td colspan="4">Количество рефералов: <b><?=$rfs['count']?></b> шт.</td>
2022-06-06 21:30:34 +00:00
</tr>
<tr>
<td colspan="4"><?=$rfs['see']?></td>
</tr>
</table></td>
<td style="width: 5%; vertical-align: top; ">&nbsp;</td>
<td style="width: 30%; vertical-align: top; "><table width="100%" cellpadding="2" cellspacing="0">
<tr>
2023-01-10 16:29:32 +00:00
<td style="width: 25%; vertical-align: top; text-align: right; "><input type='button' value='Обновить' style='width: 75px' onclick='location=&quot;main.php?referals&quot;' />
2022-06-06 21:30:34 +00:00
&nbsp;
2023-01-10 16:29:32 +00:00
<input type="button" value="Вернуться" style='width: 75px' onclick='location=&quot;main.php&quot;' /></td>
2022-06-06 21:30:34 +00:00
</tr>
<tr>
2023-01-10 16:29:32 +00:00
<td align="center"><h4>Настройка реферальной системы</h4></td>
2022-06-06 21:30:34 +00:00
</tr>
<tr>
<td style="text-align:left;"><table width="100%" border="0" cellspacing="5" cellpadding="0">
<tr>
2023-01-10 16:29:32 +00:00
<td width="200">Счет зачисления Екр.:</td>
2022-06-06 21:30:34 +00:00
<td><select name="r_bank" id="r_bank">
<?
$sp = mysql_query('SELECT * FROM `bank` WHERE `uid` = "'.$u->info['id'].'" AND `block` = "0" LIMIT 1');
while($pl = mysql_fetch_array($sp))
{
2023-01-10 16:29:32 +00:00
echo '<option value="'.$pl['id'].'">№ '.$pl['id'].'</option>';
2022-06-06 21:30:34 +00:00
}
?>
</select></td>
</tr>
<tr>
2023-01-10 16:29:32 +00:00
<td>Тип регистрации:</td>
2022-06-06 21:30:34 +00:00
<td>
<form method="post" action="main.php?referals">
<select name="r_type" id="r_type">
2023-01-10 16:29:32 +00:00
<option value="1">обычная</option>
<option value="2">премиум</option>
2022-06-06 21:30:34 +00:00
</select>
</form></td>
</tr>
<tr>
2023-01-10 16:29:32 +00:00
<td align="right"><input type="submit" name="button" id="button" value="сохранить изменения" /></td>
2022-06-06 21:30:34 +00:00
<td>&nbsp;</td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>