Mix Dem
Advanced User
- Dołączył
- Listopad 23, 2010
- Posty
- 487
- Liczba reakcji
- 31
Cze??.
Prezentuje wam m?j 1 skrypt w php
Ten skrypt podaje informacje o IP serwera, porcie i innych danych.
Author of script: Tapcioo
Mysle ze sie komus przyda
Okej dalej:
Otw?rz latestnews.php
Po:
Dodaj:
Next search
Add:
Screen:
///
Pozdrawiam
Prezentuje wam m?j 1 skrypt w php
Ten skrypt podaje informacje o IP serwera, porcie i innych danych.
Author of script: Tapcioo
Mysle ze sie komus przyda

Okej dalej:
Otw?rz latestnews.php
Po:
Kod:
<?php
Dodaj:
Kod:
$main_content = "
<script type=\"text/javascript\"><!--
function show_hide(flip)
{
var tmp = document.getElementById(flip);
if(tmp)
tmp.style.display = tmp.style.display == 'none' ? '' : 'none';
}
--></script>";
Next search
Kod:
$time = time();
Add:
Kod:
//zapytania//
$lua = parse_ini_file($config['site']['server_path'].'/config.lua');
$ip = explode("*", $lua['ip']);
$port = explode("*", $lua['loginPort']);
$motd = explode("*", $lua['motd']);
$accounts = $SQL->query('SELECT COUNT(*) FROM `accounts` WHERE `id`>0;')->fetch();
$players = $SQL->query('SELECT COUNT(*) FROM `players` WHERE `id`>0;')->fetch();
$guilds = $SQL->query('SELECT COUNT(*) FROM `guilds` WHERE `id`>0;')->fetch();
//reszta//
$main_content .= '<table BORDER=0 CELLPaDDING="4" CELLSPACING="1" width=100%;>
<TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD ALIGN=center CLASS=white><B>';
$main_content .= "<a onclick=\"show_hide('statl'); return false;\" style=\"cursor: pointer;\">» View server information «</a></B></TD></TR></TABLE>";
$main_content .= '<center><TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=90% id="statl" style="display: none;" ><TR><TD><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'>
<tr bgcolor="'.$config['site']['darkborder'].'"><td>Server IP: '.$lua['ip'].'</li></td>
<td>Accounts on '.$config['server']['serverName'].': '.$accounts[0].'</li></td></tr>
<tr bgcolor="'.$config['site']['lightborder'].'"><td>Port: '.$lua['loginPort'].'</li></td>
<td>Players on '.$config['server']['serverName'].': '.$players[0].'</li></td></tr>
<tr bgcolor="'.$config['site']['darkborder'].'"><td>MOTD: '.$lua['motd'].'</li></td>
<td>Guilds on '.$config['server']['serverName'].': '.$guilds[0].'</center></td></tr>
</table>
</table>
';
///dont delete this!
$main_content .= '<div align="right"><small><b>Author: <a href="http://otland.net/members/tapcioo/">Tapcioo</a></b></small></div><br />';
//nie usuwaj tego!
Screen:

///
Pozdrawiam