• 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!

[Znote AAC] Simple serverinfo

I get this error
Code:
Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in C:\xampp\htdocs\serverinfo.php on line 14

Line 14
Code:
        if ($stage1['maxlevel']== '') {
 
delete after.jpg

sorry if this is stupid as i am new, but no matter what i try to change it keeps telling me i have to edit it first. Do you think you could help me? btw super awesome work(im a big fan)!
 
this doesn't work with Znote tibia.com layout

edit: In order to see this page on note tibia.com layout i have to manualy type serverip/serverinfo.php. No tab is created on tibia.com layout.
 
Nice script worked on my windows but then i got dedicated server linux and its now saying invalid path any ideas? i write the path /home/server
 
Nice script worked on my windows but then i got dedicated server linux and its now saying invalid path any ideas? i write the path /home/server
Linux respect capital letters so be sure you're not using any or use them properly
 
Linux respect capital letters so be sure you're not using any or use them properly

PHP:
<?php require_once 'engine/init.php'; include 'layout/overall/header.php'; ?>

<h1>Server Information</h1>
<?php

$path = '/root/evodera';
echo '<table cellpadding="0"><tr class="yellow"><td><center>From level</center></td><td><center>To level</center></td><td><center>Rate</center></td></tr>';
if (is_dir($path)) {

   
    $xml1 = simplexml_load_file($path."\data\xml\stages.xml");
    foreach ($xml1->world->children() as $stage1) {
        if ($stage1['maxlevel'] == '') {
        $stage1['maxlevel'] = 'Infinite';   
        }
        echo '<tr><td><center>'.$stage1['minlevel'].'</center></td><td><center>'.$stage1['maxlevel'].'</center></td><td><center>'.$stage1['multiplier'].'</center></td></tr>';   
        }
    $word = 'a'; 
    $loadconfig = file($path.'\config.lua');
    $key = 'rateMagic';
    $key2 = 'rateLoot';
    $key3 = 'rateSkill';
    $found = false;
    foreach ($loadconfig as $lineNumber => $e) {
    if (strpos($e,$key) !== false) {
      $found = true;
      break;
    }
}

    foreach ($loadconfig as $lineNumberr => $ee) {
    if (strpos($ee,$key2) !== false) {
      $found = true;
      break;
    }
}

    foreach ($loadconfig as $lineNumberrr => $eee) {
    if (strpos($eee,$key3) !== false) {
      $found = true;
      break;
    }
}

if ($found) {
  echo '<table cellpadding="0"><tr class="yellow"><td><center>Magic rate</center></td><td><center>Skills rate</center></td><td><center>Loot rate</center></td></tr>';
  echo '<tr><td><center>'.$loadconfig[$lineNumber].'</center></td><td><center>'.$loadconfig[$lineNumberrr].'</center></td><td><center>'.$loadconfig[$lineNumberr].'</center></td></tr>';
}
   
    $getallplayers = mysql_query("SELECT COUNT(*) as MAX FROM players");
    $parseallplayers = mysql_fetch_assoc($getallplayers);
    $getallaccounts = mysql_query("SELECT COUNT(*) as MEX FROM accounts");
    $parseallaccounts = mysql_fetch_assoc($getallaccounts);
    $getallguilds = mysql_query("SELECT COUNT(*) as MOX FROM guilds");
    $parseallguilds = mysql_fetch_assoc($getallguilds);
   
    echo '</table></tr>';
    echo '<table cellpadding="0"><tr class="yellow"><td><center>Total accounts</center></td><td><center>Total players</center></td><td><center>Total guilds</center></td></tr>';
    echo '<tr><td><center>'.$parseallplayers['MAX'].'</center></td><td><center>'.$parseallaccounts['MEX'].'</center></td><td><center>'.$parseallguilds['MOX'].'</center></td></tr>';
    echo '</table></tr>';
   
    $talkactions = simplexml_load_file($path.'/data/talkactions/talkactions.xml');
    echo '<table cellpadding="0"><tr class="yellow"><td><center>Player commands</center></td></center></tr>';
    foreach ($talkactions as $commands) {
        if (empty($commands['access'])) {
    echo '<center><tr><td><center>'.$commands['words'].'</center></td></tr></center>';
        }
    }
    echo '</table></tr>';
   
} else {
   
echo '<br><b>Invalid path!</b>';
   
}
?>
<?php include 'layout/overall/footer.php'; ?>


Cant see any problems ?

@Lording
 
No, see how is the file name called * Info or info.php
maybe that could be the path problem
 
i got this please help

?php require_once 'engine/init.php'; include 'layout/overall/header.php'; ?>
Server Information

Invalid path!



From levelTo levelRate
 
i got this please help

?php require_once 'engine/init.php'; include 'layout/overall/header.php'; ?>
Server Information

Invalid path!



From levelTo levelRate

Change the location to your server folder
Code:
$path = 'C:\Users\Asus\Desktop\Daneria Land';
 
Got this error:
PHP:
Warning: mysql_query(): Access denied for user ''@'localhost' (using password: NO) in D:\xampp\htdocs\ZnoteAAC\serverinfo.php on line 53

Warning: mysql_query(): A link to the server could not be established in D:\xampp\htdocs\ZnoteAAC\serverinfo.php on line 53

Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in D:\xampp\htdocs\ZnoteAAC\serverinfo.php on line 54

Warning: mysql_query(): Access denied for user ''@'localhost' (using password: NO) in D:\xampp\htdocs\ZnoteAAC\serverinfo.php on line 55

Warning: mysql_query(): A link to the server could not be established in D:\xampp\htdocs\ZnoteAAC\serverinfo.php on line 55

Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in D:\xampp\htdocs\ZnoteAAC\serverinfo.php on line 56

Warning: mysql_query(): Access denied for user ''@'localhost' (using password: NO) in D:\xampp\htdocs\ZnoteAAC\serverinfo.php on line 57

Warning: mysql_query(): A link to the server could not be established in D:\xampp\htdocs\ZnoteAAC\serverinfo.php on line 57

Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in D:\xampp\htdocs\ZnoteAAC\serverinfo.php on line 58
Quick fix:
Replace
PHP:
    $getallplayers = mysql_query("SELECT COUNT(*) as MAX FROM players");
    $parseallplayers = mysql_fetch_assoc($getallplayers);
    $getallaccounts = mysql_query("SELECT COUNT(*) as MEX FROM accounts");
    $parseallaccounts = mysql_fetch_assoc($getallaccounts);
    $getallguilds = mysql_query("SELECT COUNT(*) as MOX FROM guilds");
    $parseallguilds = mysql_fetch_assoc($getallguilds);
With
PHP:
    $link = mysqli_connect($config['sqlHost'], $config['sqlUser'], $config['sqlPassword'], $config['sqlDatabase']);

    $getallplayers = mysqli_query($link, "SELECT COUNT(*) as MAX FROM players");
    $parseallplayers = mysqli_fetch_assoc($getallplayers);
    $getallaccounts = mysqli_query($link, "SELECT COUNT(*) as MEX FROM accounts");
    $parseallaccounts = mysqli_fetch_assoc($getallaccounts);
    $getallguilds = mysqli_query($link, "SELECT COUNT(*) as MOX FROM guilds");
    $parseallguilds = mysqli_fetch_assoc($getallguilds);
 
It works with the last Znote But the Rates are still bugged (not showing) some idea?

Xj9unzb.png
 
Same problem as above, got the latest version of Znote but the exp stages won't show. Is there a fix?
 
Back
Top