Hello.^_^
I present to you my FIRST script in php.
It gives us the information and the server IP, port, about characters in a database, etc.
Author of script: Tapcioo
I think someone come in handy.
Okey go:
Open you latestnews.php
After:
Add:
Next search
Add:
Screen:
///
Thanks and REP++
I present to you my FIRST script in php.
It gives us the information and the server IP, port, about characters in a database, etc.
Author of script: Tapcioo
I think someone come in handy.
Okey go:
Open you latestnews.php
After:
Code:
<?php
Add:
Code:
$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
Code:
$time = time();
Add:
Code:
//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:
///
Thanks and REP++