View Single Post
  #4  
Old 28th March 2013, 20:01
joeroberts's Avatar
joeroberts joeroberts is offline
BT.Manager Owner
 
Join Date: Jan 2008
United States
Posts: 2,113
Default
sorry my fault
PHP Code:
 <?
require "backend/functions.php";
dbconn();

$res mysql_query("SELECT * FROM lottery_config") or sqlerr(__FILE____LINE__);
while (
$arr mysql_fetch_assoc($res))
$arr_config[$arr['name']] = $arr['value'];
$endday $arr_config['end_date'];
if (!
$arr_config["enable"])show_error_msg("Sorry""Lottery is disabled.");
stdhead();
begin_frame("Users who Have Purchased Tickets");
print(
"<center><font color=red>Lottery Ends: </font><b>" $endday "</b></center><br /><br />");
?>
<table align=center border="1" width="600" cellpadding="5">
<tr>
<td class="tabletitle">#</td>
<td class="tabletitle">User name</td>
<td class="tabletitle">Number of tickets</td>
<td class="tabletitle">Uploaded</td>
<td class="tabletitle">Downloaded</td>
<td class="tabletitle">Ratio</td>
</tr>
<?
$sql 
mysql_query("SELECT user FROM tickets") or die (mysql_error());
while (
$myrow mysql_fetch_assoc($sql))$user[] = $myrow["user"];
$user array_values(array_unique($user));
for (
$i 0$i sizeof($user); $i++){$tickets[] = mysql_num_rows(mysql_query("SELECT * FROM tickets WHERE user=$user[$i]"));
$sqy "SELECT username, uploaded, downloaded FROM users WHERE id=$user[$i]";
 
$vay mysql_query($sqy);
 
$sq mysql_fetch_row($vay);
$username[] = $sq['username'];
$id[] = $user[$i];
$uploaded[] = mksize($sq['uploaded']);
$downloaded[] = mksize($sq['downloaded']);
$ratio[] = $sq['downloaded'];
$ratio2[] = $sq['uploaded'];
echo 
"<tr><td class=tableb>" . ($i 1) . "</td>
<td class=tableb><a href=account-details.php?id=
$id[$i]>$username[$i]</a></td>
<td class=tableb>
$tickets[$i]</td>
<td class=tableb>
$uploaded[$i]</td>
<td class=tableb>
$downloaded[$i]</td>
<td class=tableb>" 
number_format($ratio2[$i] / $ratio[$i], 3) . "</td></tr>";
}
?>
</table>
<?
print("<center><h3><a href=games.php>Back to Casino</a></h3></center>");
end_frame();
stdfoot();
die;
?>
__________________
Do not ask me to help you work on your site that is not phpMyBitTorrent
Do not ask me to make a mod for any other source
Do not Ask me to setup your site.
I will no longer help you setup your site, there is a setup script if you have trouble with it post in the forum here or in BT.Manager™ forum
My Current Demo is here http://demo.btmanager.org/
Reply With Quote