my config:
PHP Code:
<?php
//SQL
$host = "localhost";
$user = "root";
$pass = "root";
$schema = "odinms";
//Links
$forum = "forum";
$files = "http://games.on.net/file/22367/Maple_Story_Client_v6.2";
$client = "UntitledStory.exe";
//Server
$sitename = "ValenceStory";
$servername = "ValenceStory";
$sitebar = "Welcome to ValenceStory!";
$color = "blue";
$version = "62";
$exprate = "65";
$mesorate = "25";
$droprate = "3";
//server status
$loginport = "7575";
$worldport = "8484";
$m = "100";
//Connect
$connect = mysql_connect($host,$user,$pass);
$db = mysql_select_db($schema, $connect) or die(mysql_error());
//Data
$accounts = mysql_num_rows(mysql_query("SELECT * FROM accounts"));
$characters = mysql_num_rows(mysql_query("SELECT * FROM characters where gm = 0"));
$gms = mysql_num_rows(mysql_query("SELECT * FROM characters where gm > 1"));
$guilds = mysql_num_rows(mysql_query("SELECT * FROM guilds"));
$banned = mysql_num_rows(mysql_query("SELECT * FROM accounts where banned = 1"));
$online = mysql_num_rows(mysql_query("SELECT * FROM accounts where loggedin = 2"));
function getname(){
$a = mysql_query("SELECT * FROM `skeer_name` WHERE `id`='".$_SESSION['id']."'");
$b = mysql_fetch_array($a);
return $b['name'];
}
function getadmin(){
$a = mysql_query("SELECT * FROM `characters` WHERE `accountid`='".$_SESSION['id']."'") or die(mysql_error());
$b = mysql_fetch_array($a);
if($_SESSION['id']) {
if ($b['gm'] > 2) {
return true;
} else {
return false;
}
} else {
return false;
}
}
?>
(btw hamachi for testing xD)
statusbar.php:
Code:
<?php
/*
Copyright (C) 2008 Murad H. <murad8@live.com>
*/
// Original Author: Indounit
// Modified by: Cype Developments
$m = 100;
$p = mysql_num_rows(mysql_query("SELECT * FROM accounts where loggedin = 2"));
$t = "by IndoUnit";
$fp = @fsockopen($serverip, $worldport, $errno, $errstr, 1);
if (!$fp) {
$t = "Server%20Offline";
$bgcolor = "#8c0101";
}else{
$t = "Server%20Online";
$bgcolor="#037708";
}
@fclose($fp);
echo "
<tr>
<td colspan='2' align='center' class='regtext' style='background-color:".$bgcolor.";'>
<script type=\"text/javascript\">ItsIanFlash('".$t."', '".$p."', '".$m."', '".$bgcolor."');</script>
</td>
</tr>";
?>
forums.php
[code]
<?php
include("top.php");
?>
<?php
include("statusbar.php");
?>
[/php]