Jump to content
GIGN Forum

Top Banotāji


Recommended Posts

ja ja jaaa, zinu, ka juus man tagad bljausiet virsu par to ka shii teema jau ir bijusi izrunata...

Bet man searchaa rada error:

Sorry, an error occurred. If you are unsure on how to use a feature, or don't know why you got this error message, try looking through the help files for more information.

Nu, luudzu kaads iemetiet to kodu par TOP BANOTAJIEM (admin) webaa.

Tjipa rindinja ar tiem adminiem, kuri ir visvairaak nobanojushi un CIK.

Link to comment
Share on other sites

amxbans web direktorijā izveido jaunu php dokumentu (topadmin.php)

<style type="text/css">
#admintop {
font-size: 15px;
color: #B22222;
}

#admintop td{
border: dotted;
border-width: 1 0 0 0;
padding-right: 20px;
}

#admintop th{
text-align: left;
}
</style>

<?php

echo "<table id='admintop'>
<tr>
<th>Admins</th>
<th>Bani</th>
</tr>";

$con = mysql_connect("1.MySQL host","2.MySQL user","3.MySQL parole");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("amxbans", $con);

$result = mysql_query("SELECT count(*), admin_nick FROM amx_bans GROUP BY admin_nick ORDER BY count(*) DESC LIMIT 5"); // DESC LIMIT 5 noziimee, ka vinjsh paraadiis 5 aktiivaakos

while($row = mysql_fetch_array($result))
{
$admins = $row['admin_nick'];
$skaits = $row['count(*)'];
echo "<tr>
<td>$admins</td>
<td>$skaits</td>
</tr>";
}
mysql_close($con);
?>
</table>

Ierakstam savus datus:

1.MySQL host

2.MySQL user

3.MySQL parole

Avots

Link to comment
Share on other sites

<style type="text/css">

/*-------------admintop---------------*/

#admintop {

font-size: 15px;

color: #B22222;

}

#admintop td{

border: dotted;

border-width: 1 0 0 0;

padding-right: 20px;

}

#admintop th{

text-align: left;

}

</style>

<?php

echo "<table id='admintop'>

<tr>

<th>Admins</th>

<th>Bani</th>

</tr>";

$con = mysql_connect("localhost","mysql lietotaajvards","parole");

if (!$con)

{

die('Could not connect: ' . mysql_error());

}

mysql_select_db("amxbans", $con);

$result = mysql_query("SELECT count(*), admin_nick FROM amx_bans GROUP BY admin_nick ORDER BY count(*) DESC LIMIT 5"); // DESC LIMIT 5 noziimee, ka vinjsh paraadiis 5 aktiivaakos

while($row = mysql_fetch_array($result))

{

$admins = $row['admin_nick'];

$skaits = $row['count(*)'];

echo "<tr>

<td>$admins</td>

<td>$skaits</td>

</tr>";

}

mysql_close($con);

?>

</table>

Luuk viss fails. nevaru atrast probleemu... kads var palidzet?

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...