Amxbans Forum Index Amxbans

 RSS   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


New development is now @ amxbans.de

This forum will still be up for some time but please visit the new continued amxbans development site.
Regards Lantz69

Top5 best admins

 
Post new topic   Reply to topic    Amxbans Forum Index -> Amxbans Mods
View previous topic :: View next topic  
Author Message
avolknet
Peon

Joined: 26 Jul 2007


PostPosted: Thu Jul 26, 2007 7:55 am    Post subject: Top5 best admins Reply with quote

Top5 best admins i website

Put this in jour web index
Code:

<?
include("top5bestbaners.php");
?>

DONWLOAD the file Top5bestbaners.php edit it and put ther wher is your index.php
Back to top
View user's profile Send private message
m@mBa
Peon

Joined: 30 Apr 2007


PostPosted: Sun Aug 05, 2007 1:53 am    Post subject: Reply with quote

I copy top5bestbaners.php in amxbans main directory.
Add in this file mysql info.
I edit index.php & put your code:

Code:
<?php
header( "Location:ban_list.php" );
include("top5bestbaners.php"); ?>

I don't look a new mod, no changes Sad

Where is problem?
Thanks Smile
Back to top
View user's profile Send private message
bglomax
Peon

Joined: 23 Feb 2007


PostPosted: Fri Aug 10, 2007 11:23 am    Post subject: Reply with quote

The problem is that you didn't edit the top5.....php file , it contains fields that are needed for the sql query to access the db - username pass ...etc.
Back to top
View user's profile Send private message
m@mBa
Peon

Joined: 30 Apr 2007


PostPosted: Sat Aug 11, 2007 9:15 am    Post subject: Reply with quote

I'm add sql-info in this file! Smile
Back to top
View user's profile Send private message
avolknet
Peon

Joined: 26 Jul 2007


PostPosted: Fri Sep 07, 2007 1:59 am    Post subject: Reply with quote

Code:
<?php

echo "<table id='admintop'>
 <tr>
 <th>Admin</th>
 <th>Bans</th>
 </tr>";
 
$con = mysql_connect("host","dbusername","dbpassword");
if (!$con)
 {
 die('Could not connect: ' . mysql_error());
 }
mysql_select_db("yourdatbase", $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>



Please edit this 2 lines
dbusername = your mysql username
dbpassword = your mysql datbase password
host = localhost or your ip (if the amxbans is on your server wher is cs server)
your database = amxbans mysql datbase


$con = mysql_connect("host","dbusername","dbpassword");
'Could not connect: ' . mysql_error());

mysql_select_db("yourdatbase", $con);
Back to top
View user's profile Send private message
Never
Peon

Joined: 09 Sep 2006


PostPosted: Thu Oct 25, 2007 4:31 am    Post subject: Reply with quote

Nice, realy Nice Wink
_________________
Back to top
View user's profile Send private message
weegoing
Peon

Joined: 18 Sep 2006


PostPosted: Wed Dec 05, 2007 4:01 am    Post subject: Reply with quote

now fix?
_________________


we build house
Back to top
View user's profile Send private message
Nofius
Militia

Joined: 31 Oct 2005
Location: Mora || Dalarna

PostPosted: Mon Dec 10, 2007 9:57 am    Post subject: Reply with quote

Well have upload file and wrote in db stuff and modified index.php but were are it going to show up, doesnt show anything on my page... Were will it show up ?
_________________
Amxmodx 1.81.3722 - Amxbans 5.0
public.csgubbar.com:27015
=======================
Community | Webhosting | Clan
http://www.csgubbar.com
Back to top
View user's profile Send private message Visit poster's website
test2
Peon

Joined: 05 Dec 2007


PostPosted: Tue Jan 08, 2008 10:07 am    Post subject: Reply with quote

avolknet forši skriptus pīzdo un padod, kā sevējos tjipo baigi krutais tēvīņš...
eng:
this noob (avolknet) is only a copy+paste noob, copying my scripts and posting it here
Back to top
View user's profile Send private message
Vazze
Peon

Joined: 10 Mar 2008


PostPosted: Wed Mar 12, 2008 8:29 pm    Post subject: Reply with quote

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /var/www/info.php on line 18
Admin Bans
Back to top
View user's profile Send private message
sn0wbiatch
Peon

Joined: 05 Jan 2009


PostPosted: Mon Jan 05, 2009 12:43 pm    Post subject: Reply with quote

well, i fixed it this way:
Code:

top5admins.php

<?php

echo "<table id='admintop'>
 <tr>
 <th>Admin</th>
 <th>Bans</th>
 </tr>";

if ($config->error_handler == "enabled") {
        include("$config->error_handler_path");
        }

$result = mysql_query("SELECT count(*), admin_nick FROM amx_bans GROUP BY admin_nick ORDER BY count(*) DESC LIMIT 5");

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


And in ban_list.php between:
Code:

$smarty->display('ban_list.tpl');
and
$smarty->display('main_footer.tpl');

include("top5admins.php");

So like:

$smarty->display('ban_list.tpl');
include("top5admins.php");
$smarty->display('main_footer.tpl');
Back to top
View user's profile Send private message
avolknet
Peon

Joined: 26 Jul 2007


PostPosted: Sat Jan 10, 2009 4:48 pm    Post subject: Reply with quote

test2 wrote:
avolknet forši skriptus pīzdo un padod, kā sevējos tjipo baigi krutais tēvīņš...
eng:
this noob (avolknet) is only a copy+paste noob, copying my scripts and posting it here


Katrs otrais n00bs kas zin kautko no MySql var uztaisīt šādu skriptu Very Happy lol !!! es viņu pats rakstijiu


This idiot is just jelous, because he don't know how to code php


sn0wbiatch wrote:
well, i fixed it this way:
Code:

top5admins.php

<?php

echo "<table id='admintop'>
 <tr>
 <th>Admin</th>
 <th>Bans</th>
 </tr>";

if ($config->error_handler == "enabled") {
        include("$config->error_handler_path");
        }

$result = mysql_query("SELECT count(*), admin_nick FROM amx_bans GROUP BY admin_nick ORDER BY count(*) DESC LIMIT 5");

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


And in ban_list.php between:
Code:

$smarty->display('ban_list.tpl');
and
$smarty->display('main_footer.tpl');

include("top5admins.php");

So like:

$smarty->display('ban_list.tpl');
include("top5admins.php");
$smarty->display('main_footer.tpl');


Nice work Wink !
Back to top
View user's profile Send private message
zorba
Peon

Joined: 25 Apr 2010


PostPosted: Mon Apr 26, 2010 1:21 pm    Post subject: Reply with quote

Thank you sn0wbiatch for the fix !
_________________
Best Rakeback Offers
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Amxbans Forum Index -> Amxbans Mods All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group