Skocz do zawartości

Witamy w Nieoficjalnym polskim support'cie AMX Mod X

Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza społecznościowego
  • Stwórz swój własny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe doświadczenia

Dołączona grafika Dołączona grafika

Guest Message by DevFuse
 

Jungle - zdjęcie

Jungle

Rejestracja: 22.03.2011
Aktualnie: Nieaktywny
Poza forum Ostatnio: 12.09.2016 22:47
-----

Moje tematy

Admin Top 5

07.06.2011 16:07

Hello all. I'm try to make new admin top script for GmAmxBans and I do it.
Instalation:
1. Make new file (.php) and paste there this code:
<?php

require_once ("include/config.inc.php");
require_once ("include/access.inc.php");
require_once ("include/menu.inc.php");
require_once ("include/steam.inc.php");
require_once ("include/sql.inc.php");
require_once ("include/logfunc.inc.php");
require_once ("include/functions.inc.php");

$smarty = new dynamicPage;

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");


$l = "<head>
	<meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>
	<link rel='stylesheet' type='text/css' href='templates/darkgold/css/style.css' />
</head>
<div class='main'>
		<table frame='box' rules='groups' summary='' width='100%'>
			<thead>
			
				<tr style='
	background: #1b1b1b ;
	font: bold 10pt arial;
	border-top:1px #3e3e3e solid;
	border-bottom: 1px #3e3e3e solid;
	color: #e3cc9a;

	margin-bottom: 5px;
	min-height: 0;

	margin:		0;
	padding:		5px 8px;
	overflow:		hidden;

	clear:			left;
'>
				
					<th style='width:110px; color: white;'>Admin nick</th>
					<th style='width: 10%; color: white;' class='_right'>Bans</th>
					
					
				</tr>
				
			</thead>
			<tbody>
";
while ($row = mysql_fetch_array($result))
{
    $admins = $row['admin_nick'];
    $bans = $row['count(*)'];
    $display = $row['admin_nick'] . $row['count(*)'];
    $smarty->assign("display", $display);

    $smarty->assign("admintopnick", $admins);
    $smarty->assign("admintopbans", $bans);
    $l .= "						<tr>	<td><span class='bialy'>$admins</span></td>
					<td class='_right'><span class='bialy'>$bans</span></td></tr>";

}

echo $l .= "		</tbody>
		</table>

		
";
?>
Where "Admin nick" and "Bans" translate to Polish independently.
For example, you can make frame and paste in the sidebar.
Dołączona grafika
Or you can paste in other page or another site and forum.