←  Pluginy

AMXX.pl: Support AMX Mod X i SourceMod

»

Zombie Plague 4.3
Web Stats 0.2.3 - Statystyki ZombiePlague

  • +
  • -
Raketen - zdjęcie Raketen 23.04.2010

Wszystko ładnie śmiga. Dzięki ;)
Odpowiedz

  • +
  • -
Lukasz5 - zdjęcie Lukasz5 23.04.2010

Osiedlowy koks nie masz raczej pliku .txt w data/lang...
Odpowiedz

  • +
  • -
Szyfrant - zdjęcie Szyfrant 02.05.2010

Daj ktoś skompilowany amxx?
Nie moge skompilować mimo iz mam zombieplague.inc
Odpowiedz

  • +
  • -
Karolus - zdjęcie Karolus 23.07.2010

Proszę bardzo skompilowany :>

Załączone pliki

Odpowiedz

  • +
  • -
camilost - zdjęcie camilost 26.07.2010

Jeśli ktoś nie wie:
Nowsza wersja z 30-12-09 oznaczona 0.2.5 link: [ZP] Addon: Web Stats v0.2.5 - AlliedModders
Odpowiedz

  • +
  • -
Windows 7 - zdjęcie Windows 7 18.12.2010

Warning: mysql_result(): supplied argument is not a valid MySQL result resource in /home/bans/public_html/aaa/zp_stats/inc/index.php on line 54

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/bans/public_html/aaa/zp_stats/inc/index.php on line 55

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/bans/public_html/aaa/zp_stats/inc/index.php on line 76


<?php

$template = 'index.xsl';

$where = '';
$where2 = '';

$seconds = array(31104000, 2592000, 86400, 3600, 60);

$time_lang = $lang->getElementsByTagName('time');

$post = array('', ' K', ' M', ' G', ' T');

$asort = array('`rank`', '`nick`', '`total_ammo`', '`total_damage`', '`zombiekills`', '`humankills`',
	'`nemkills`', '`survkills`', '`suicide`', '`death`', '`infected`', '`online`');

$atsort = array('ASC', 'DESC');	
	
if (isset($_GET['sort']))
{
	$sort = abs((int)$_GET['sort']);
	if ($sort > (count($asort) - 1))
		$sort = 0;
	$tsort = $asort[$sort];
	
	if (isset($_SESSION['ptsort']))
	{
		$_SESSION['ptsort'] = $_SESSION['ptsort'] ? 0 : 1;
	}
	else
		$_SESSION['ptsort'] = 0;
	
	$_SESSION['psort'] = $tsort.' '.$atsort[$_SESSION['ptsort']];
}

if (isset($_SESSION['psort']))
	$psort = $_SESSION['psort'];
else
	$psort = '`rank` ASC';
	
if (isset($_REQUEST['search']))
{
	if (get_magic_quotes_gpc())
		$search = $_REQUEST['search'];
	else
		$search = addslashes($_REQUEST['search']);
	$root->appendChild($data->createElement('search', $search));	
	$where = "AND (`nick` LIKE '%$search%' OR `ip` LIKE '%$search%' OR `steam_id` LIKE '%$search%')";	
	$where2 = "WHERE (`nick` LIKE '%$search%' OR `ip` LIKE '%$search%' OR `steam_id` LIKE '%$search%')";
}

$time = time() - $max_inactivity * 24 * 60 * 60;
$r = mysql_query("SELECT COUNT(*) FROM `zp_players` WHERE `last_join` > $time AND `total_ammo` >= $min_ammo AND `online` > $min_online $where");
$total = mysql_result($r, 0);
mysql_free_result($r);

$p_total = intval(($total - 1) / $players_per_page) + 1;

$show_page = (isset($_GET['page']) ? abs((int)$_GET['page']) : 1);
if ($show_page > $p_total)
	$show_page = $p_total;
$start=($show_page-1) * $players_per_page;

mysql_query("SET @_c = 0");

$sql = "SELECT * FROM 
(SELECT *, (@_c := @_c + 1) AS `rank`, 
((`infect` + `zombiekills` + `humankills` + `nemkills`*4 + `survkills`*4)/(`suicide`*4+`death`+`infected` + 1)) AS `skill` 
FROM `zp_players` WHERE `last_join` > $time AND `total_ammo` >= $min_ammo AND `online` > $min_online 
ORDER BY `skill` DESC) AS `newtable` $where2 ORDER BY $psort LIMIT $start, $players_per_page";

$r = mysql_query($sql);

$node = $data->createElement('players');
$players = $root->appendChild($node);
while ($row = mysql_fetch_assoc($r))
{

	if ($row['online'] > 0)
	{
		$online = '';
		$i = 0;
		while ($i < 5)
		{
			if ($row['online'] > $seconds[$i])
			{
				$floor = floor($row['online'] / $seconds[$i]);
				if ($floor > 0)
				{
					$online .= ($floor.($time_lang->item($i)->nodeValue));
					$row['online'] %= $seconds[$i];
				}
			}
			$i++;
		}
		$row['online'] = $online;
	}

	$i = 0;
	while($row['total_damage'] >= 1024)
	{
		$row['total_damage'] /= 1024;
		$i++;
	}
	$row['total_damage'] = round($row['total_damage'], 2).$post[$i];
	
	$row['nick'] = htmlentities($row['nick'], ENT_COMPAT, 'UTF-8');
	
	$player = $players->appendChild($data->createElement('player'));
	foreach ($row as $key => $value)
		$player->appendChild($data->createElement($key, $value));
}

if ($p_total > 1)
{
	$start_page = $show_page - $pages_for_navigator;
	if ($start_page < 2)
		$start_page = 2;
	$end_page = $show_page + $pages_for_navigator;
	if ($end_page >= $p_total)
		$end_page = $p_total - 1;

	$node = $data->createElement('pages');
	$pages = $root->appendChild($node);
	
	$page = $pages->appendChild($data->createElement('page'));
	if ($show_page == 1)
			$page->setAttribute('current', 1);
	$page->appendChild($data->createElement('href', '1'));
	$page->appendChild($data->createElement('data', '1'));
	
	if ($start_page > 2)
	{
		$page = $pages->appendChild($data->createElement('page'));
		$page->appendChild($data->createElement('href', $show_page-1));
		$page->appendChild($data->createElement('data', '...'));
	}
	
	for ($i = $start_page; $i <= $end_page; $i++)
	{
		$page = $pages->appendChild($data->createElement('page'));
		if ($i == $show_page)
			$page->setAttribute('current', 1);
		$page->appendChild($data->createElement('href', $i));
		$page->appendChild($data->createElement('data', $i));
	}
	
	if ($end_page < $p_total - 1)
	{
		$page = $pages->appendChild($data->createElement('page'));
		$page->appendChild($data->createElement('href', $show_page+1));
		$page->appendChild($data->createElement('data', '...'));
	}
	
	$page = $pages->appendChild($data->createElement('page'));
	if ($show_page == $p_total)
			$page->setAttribute('current', 1);
	$page->appendChild($data->createElement('href', $p_total));
	$page->appendChild($data->createElement('data', $p_total));

}
?>

Dodano 18 grudzień 2010 - 09:28:
Proszę o pomoc.
Wgrałem wszystkie pliki i potem na stronie pokazuje się to:


Warning: mysql_result(): supplied argument is not a valid MySQL result resource in /home/bans/public_html/aaa/zp_stats/inc/index.php on line 54

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/bans/public_html/aaa/zp_stats/inc/index.php on line 55

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/bans/public_html/aaa/zp_stats/inc/index.php on line 76


Jak ktoś chce zobaczyć to niech kliknie TUTAJ
Odpowiedz

  • +
  • -
DaddyKuba - zdjęcie DaddyKuba 20.12.2010

Nie może połączyć się z Bazą MySQL.
Odpowiedz

  • +
  • -
Echoon - zdjęcie Echoon 22.01.2011

Zrobiłem wszystko tak jak opisane i wyświetla mi się komunikat na białej stronie:

Access denied for user 'baza_echoon'@'s40.proserwer.pl' (using password: YES)


Co jest tego przyczyną i jak to naprawić aby działało ?
Odpowiedz

  • +
  • -
bakaj - zdjęcie bakaj 05.02.2011

Echoon - brak polaczenia z baza SQL. Cos zle wpisales w pliku config.php

Windows 7 - plugin nie tworzy automatycznie tabel w bazie. Wejdz do phpmyadmin i zimportuj do bazy zapytania z pliku zp_web_stats.sql, ktory znajduje sie w folderze WEB, to problem zniknie.

Osiedlowy Koks - Jezeli wrzuciles zp_web_stats.txt do data/lang, a dalej nie wczytuje jezyka, to zmien kodowanie z UTF-8 na UTF-8 (bez BOM) jakims edytorem np. NotePad++
Użytkownik bakaj edytował ten post 05.02.2011 18:38
Odpowiedz

  • +
  • -
Tamer - zdjęcie Tamer 19.05.2012

Witam mam problem z pluginem. Działa oraz łączy z bazą danych, ale jak próbuje wgrać tabele do bazy mysql to wyskakuje mi błąd. Może być to spowodowane tym, że używam bazy z pukawki?
Odpowiedz

  • +
  • -
Tamer - zdjęcie Tamer 19.05.2012

Jeżeli ktoś mi zrobi z tym pluginem, że będzie wszystko pięknie działało to zapłacę 50pkt na pukawce.

Pozdrawiam
Odpowiedz