• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Rekord

Status
Not open for further replies.

Notify

New Member
Joined
Dec 6, 2009
Messages
76
Reaction score
0
Witam. Ma ktos skrypcik, aby na stronie pokazywalo rekord graczy online?

Prosze o pomoc.
 
To do layout.php

<?PHP $zapytanie = $SQL->query('SELECT `record` FROM `server_record` ORDER BY `record` DESC LIMIT 1;'); foreach($zapytanie as $wynik) { echo ''.$wynik['record'].''; } ?>

A to?

<?PHP
$zapytanie = $SQL->query('SELECT * FROM `server_record` ORDER BY `record` DESC LIMIT 25;');
foreach($zapytanie as $wynik) {
$data = date("d/m/Y, G:i:s", $wynik['timestamp']);
$gracze++;
if(is_int($gracze / 2))
$bgcolor = $config['site']['lightborder'];
else
$bgcolor = $config['site']['darkborder'];
$tresc .= '<TR BGCOLOR='.$bgcolor.'><TD><center>'.$wynik['record'].'</center></TD><TD><center>'.$data.'</center></TD></TR>';
}
$main_content .= '<b><center>Players online records on '.$config['server']['serverName'].'</center></b><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD CLASS=white><b><center>Players</center></b></TD><TD class="white"><b><center>Date</center></b></TD></TR>'.$tresc.'</TABLE>';
?>
 
Probowalem dodac taka lnijke

Record: '.$config['status']['serverStatus_record'];
Ale nie pokazuje liczby z rekordem.

Pomoze ktos?
 
Last edited by a moderator:
Code:
<li><a href="#"><?PHP $zapytanie = $SQL->query('SELECT `record` FROM `server_record` ORDER BY `record` DESC LIMIT 1;'); foreach($zapytanie as $wynik) { echo 'Record: '.$wynik['record'].''; } ?></a></li>
Czy to takie trudne?
A to drugie do record.php (musisz zrobić sobie nowy plik) i w index.php dodać co należy. Nie będę pisał już co bo chyba wiesz?:>

@edit
Podam ci co wsadzić do index.php
Code:
	case "record";
		$topic = "Record Online Players";
		$subtopic = "record";
		include("record.php");
	break;
 
Last edited:
@GM Asta.

Dzieki, juz sobie z tym poradzilem zrobilem to znacznie inaczej:) Ale repa masz.
 
Hmm
Trzeba coś napisać na layouts bo mało skryptów a chciał bym więcej dodać
Tylko pomysłu nie mam
 
Status
Not open for further replies.
Back
Top