mod.servstats.php :
Code:
<?PHP
$file = $_config['server_feed'] . 'serverstats.php';
$data = file_get_contents($_rootdir.'backend.php'.$file);
$feed = simplexml_load_string($data);
?>
<style>
#stats {
margin: 2px;
background-color:#000;
padding-left: 15px;
}
#stats label {
float: left;
width: 70px;
color: rgb(152, 207, 154);
}
.label2 {
padding-left: 15px;
float: left;
color: rgb(152, 207, 154);
}
</style>
<div id="servstats" align="left">
<?PHP
$c = 1;
$i = 1;
foreach ($feed->children() as $x => $s) {
if ($x == 'service') {
echo '<table width="100%">';
foreach ($s as $s1 => $s2) {
if ($s2->user == 0) {
echo '<tr style="background-color:#000;">
<td width="130" height="20" style="background-color:#000;"><div class="label2">'. $s2->desc. '</div></td>
<td width="39" align="left" height="20"><small>Wait</small></td>
</tr>';
} else {
echo '<tr style="background-color:#000;">
<td width="100" height="20" ><div class="label2">'. $s2->desc. '</div></td>
<td width="39" align="left" height="20">
<div style="position: relative; top: 4px; left: 0pt; width: 39px; background-image: url(includes/empty.jpg);"><img src="includes/spacer.gif" height="8"></div>
<div style="position: relative; top: -4px; left: 0pt; width: '.$s2->user.'%; background-image: url(includes/full.jpg); background-repeat: no-repeat;"><img src="includes/spacer.gif" height="8"></div>
</td>
</tr>';
}
}
echo '</table>';
} else {
foreach ($s as $s1 => $s2) {
echo '<div id="stats"><label>'. $s1. '</label> : <b>'.$s2.'</b></div>';
}
}
}
?>
</div>
Frontend Config :
Code:
$_config['server_feed'] = 'http://WANIP/backend/';// dont forget to add / in the end
$_config['front_page'] = 'frontpage';
$_config['popup_vote'] = 120;
$_config['top_hero'] = 10;
$_config['nocache'] = false;
$_config['close_site'] = false;
$_config['redirect'] = 'http://WANIP/';
Backend Config :
Code:
$_config['db_type'] = 'mssql';
$_config['Server'] = "192.168.1.5"; <----ip my server
$_config['User'] = "******";
$_config['Pass'] = "******";
$_config['DB'] = "ACCOUNT";
$_config['DB2'] = "GAMEDB";
$_config['DB3'] = "CabalCash";
that my setting on config.. that right or wrong?
update :register page on my friend is work.. but still got problem :
Code:
Fatal error: Call to a member function children() on a non-object in C:\xampp\htdocs\modules\mod.servstats.php on line 29