Block .php archive

XzRs

Junior Member
Members
5Posts:
1 Threads:
Dec 02Joined:
0 Reputation:
#1
Hi, the global.php of BrainCMS blocks the .php file, can u help me?

Image: Please log in or register to see this link.
Reply

Tom

RetroRiper Love
Owner
Developer
49Posts:
5 Threads:
Oct 07Joined:
4 Reputation:
Developer
#2
XzRs Wrote: Please log in or register to see this link.Hi, the global.php of BrainCMS blocks the .php file, can u help me?

Image: Please log in or register to see this link.
Hello,

Add in your file this line of code

PHP Code:
<?php
if(!defined('BRAIN_CMS'))
?>
[Image: logo.png]
Reply

XzRs

Junior Member
Members
5Posts:
1 Threads:
Dec 02Joined:
0 Reputation:
#3
Tom Wrote: Please log in or register to see this link.
XzRs Wrote: Please log in or register to see this link.Hi, the global.php of BrainCMS blocks the .php file, can u help me?

Image: Please log in or register to see this link.
Add in your file this line of code

PHP Code:
<?php
if(!defined('BRAIN_CMS'))
?>
Don't work
Reply

Tom

RetroRiper Love
Owner
Developer
49Posts:
5 Threads:
Oct 07Joined:
4 Reputation:
Developer
#4
XzRs Wrote: Please log in or register to see this link.
Tom Wrote: Please log in or register to see this link.
XzRs Wrote: Please log in or register to see this link.Hi, the global.php of BrainCMS blocks the .php file, can u help me?

Image: Please log in or register to see this link.
Add in your file this line of code

PHP Code:
<?php
if(!defined('BRAIN_CMS'))
?>
Don't work
Post your code here plz.
[Image: logo.png]
Reply

XzRs

Junior Member
Members
5Posts:
1 Threads:
Dec 02Joined:
0 Reputation:
#5
commands17.php

PHP Code:
<?php
    require_once 
'../../../../../global.php';
 
   header('content-type: text/plain');
 
   
    
// Check to see if there is already a texts file and when it was last
 
   // updated. If it was last updated over 12 hours ago then we will open
 
   // a database connection to update it.
 
   if(file_exists('commands.txt') && (time() - 43200 filemtime('commands.txt')))
 
   {
 
       include_once('commands.txt');       
    
}


    echo 
'Lista de comandos

'
;
    echo 
'<span class="padding-top"><br></span><span class="padding-top"><br></span><h2>Comandos Staff</h2><span class="padding-bottom"><br></span>
          <span class="padding-top"><br></span>'
;
    
$staff $db->query("SELECT * FROM client_commands WHERE rank >= 3 ORDER BY id ASC");

                                        
            
                                        
    echo 
'<span class="padding-bottom"><br></span>';
    
    echo 
'<span class="padding-top"><br></span><span class="padding-top"><br></span><h2>Comandos para los usuarios</h2><span class="padding-bottom"><br></span>
          <span class="padding-top"><br></span>'
;
    
$users $db->query("SELECT * FROM client_commands WHERE rank = 1 ORDER BY id ASC");
    while(
$data $users->fetch_array()){
                                        
    echo 
'<p class="bullet-item">•&nbsp; <b>:'.$data['com_title'].'</b> - <i>' $data['com_desc'] . '</i></p>';                
        }                                
    echo 
'<span class="padding-bottom"><br></span>';
    
    echo 
'<span class="padding-top"><br></span><h2>Comandos para los VIP\'s</h2><span class="padding-bottom"><br></span>
          <span class="padding-top"><br></span>'
;
    
$vip $db->query("SELECT * FROM client_commands WHERE rank = 2 ORDER BY id ASC");
    while(
$vips $vip->fetch_array()){
                                        
    echo 
'<p class="bullet-item">•&nbsp; <b>:'.$vips['com_title'].'</b> - ' $vips['com_desc'] . '</p>';                
        }                                
    echo 
'<span class="padding-bottom"><br></span>';
    
 
   echo '<span class="padding-bottom"><br></span>
<span class="padding-top"><br></span><h2>Caracteres especiales usando alt-codes!</h2><span class="padding-bottom"><br></span>
<span class="padding-top"><br></span><p>Para mas diversion puedes usar el boton alt-key en tu teclado y escribiendo los siguientes numeros con tus teclas de numeros!</p><span class="padding-bottom"><br></span>
<img src="//habboo-a.akamaihd.net/c_images/habbopages/chat_altcodes.png" height="295" hspace="1" vspace="1"/><font size="12px"><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p></font><p><font size="-1"> </font></p><img src="http://images-eussl.habbo.com/c_images/reception/3b505e.png" width="1000" height="1"/><br>'
;    
    
 
   $sql->close();

 
   // The above has grabbed the badge names and descriptions from the database
 
   // and outputted them to the page. Now we need to write them to the cache
 
   // so we aren't opening a database connection each time this file is requested.
 
   $file fopen('commands.txt''w');

 
   fwrite($fileob_get_contents());
 
   fclose($file);
?>
global.php

PHP Code:
<?php
if(!defined('BRAIN_CMS')) 
    { 
        die(
'Sorry but you cannot access this file!'); 
    }
    
    
session_start();
    
ob_start();
    
    
define('Z'$_SERVER['DOCUMENT_ROOT'].'/');
    
define('A''system/');
    
define('B''app/');
    
define('C''classes/');
    
define('E''languages/');
    
define('G''content/');
    
define('H''templates/');
    
define('I''maintenance/');
    
define('J''adminpan/');
    
define('K''plugins/');
    
    require_once 
'/brain-config.php';
    require_once 
'/'.$config['lang'].'.php';
    require_once 
'/functions.php';
    require_once 
'/class.game.php';
    require_once 
'/class.user.php';
    require_once 
'/class.html.php';
    require_once 
'/class.admin.php';
    require_once 
'/class.db.php';
    
    
define('S'$config['skin']);
    
    
Html::loadPlugins();

?>
Reply

Tom

RetroRiper Love
Owner
Developer
49Posts:
5 Threads:
Oct 07Joined:
4 Reputation:
Developer
#6
XzRs Wrote: Please log in or register to see this link.commands17.php

PHP Code:
<?php
    require_once 
'../../../../../global.php';
 
   header('content-type: text/plain');
 
   
    
// Check to see if there is already a texts file and when it was last
 
   // updated. If it was last updated over 12 hours ago then we will open
 
   // a database connection to update it.
 
   if(file_exists('commands.txt') && (time() - 43200 filemtime('commands.txt')))
 
   {
 
       include_once('commands.txt');       
    
}


    echo 
'Lista de comandos

'
;
    echo 
'<span class="padding-top"><br></span><span class="padding-top"><br></span><h2>Comandos Staff</h2><span class="padding-bottom"><br></span>
          <span class="padding-top"><br></span>'
;
    
$staff $db->query("SELECT * FROM client_commands WHERE rank >= 3 ORDER BY id ASC");

                                        
            
                                        
    echo 
'<span class="padding-bottom"><br></span>';
    
    echo 
'<span class="padding-top"><br></span><span class="padding-top"><br></span><h2>Comandos para los usuarios</h2><span class="padding-bottom"><br></span>
          <span class="padding-top"><br></span>'
;
    
$users $db->query("SELECT * FROM client_commands WHERE rank = 1 ORDER BY id ASC");
    while(
$data $users->fetch_array()){
                                        
    echo 
'<p class="bullet-item">•&nbsp; <b>:'.$data['com_title'].'</b> - <i>' $data['com_desc'] . '</i></p>';                
        }                                
    echo 
'<span class="padding-bottom"><br></span>';
    
    echo 
'<span class="padding-top"><br></span><h2>Comandos para los VIP\'s</h2><span class="padding-bottom"><br></span>
          <span class="padding-top"><br></span>'
;
    
$vip $db->query("SELECT * FROM client_commands WHERE rank = 2 ORDER BY id ASC");
    while(
$vips $vip->fetch_array()){
                                        
    echo 
'<p class="bullet-item">•&nbsp; <b>:'.$vips['com_title'].'</b> - ' $vips['com_desc'] . '</p>';                
        }                                
    echo 
'<span class="padding-bottom"><br></span>';
    
 
   echo '<span class="padding-bottom"><br></span>
<span class="padding-top"><br></span><h2>Caracteres especiales usando alt-codes!</h2><span class="padding-bottom"><br></span>
<span class="padding-top"><br></span><p>Para mas diversion puedes usar el boton alt-key en tu teclado y escribiendo los siguientes numeros con tus teclas de numeros!</p><span class="padding-bottom"><br></span>
<img src="//habboo-a.akamaihd.net/c_images/habbopages/chat_altcodes.png" height="295" hspace="1" vspace="1"/><font size="12px"><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p></font><p><font size="-1"> </font></p><img src="http://images-eussl.habbo.com/c_images/reception/3b505e.png" width="1000" height="1"/><br>'
;    
    
 
   $sql->close();

 
   // The above has grabbed the badge names and descriptions from the database
 
   // and outputted them to the page. Now we need to write them to the cache
 
   // so we aren't opening a database connection each time this file is requested.
 
   $file fopen('commands.txt''w');

 
   fwrite($fileob_get_contents());
 
   fclose($file);
?>
global.php

PHP Code:
<?php
if(!defined('BRAIN_CMS')) 
    { 
        die(
'Sorry but you cannot access this file!'); 
    }
    
    
session_start();
    
ob_start();
    
    
define('Z'$_SERVER['DOCUMENT_ROOT'].'/');
    
define('A''system/');
    
define('B''app/');
    
define('C''classes/');
    
define('E''languages/');
    
define('G''content/');
    
define('H''templates/');
    
define('I''maintenance/');
    
define('J''adminpan/');
    
define('K''plugins/');
    
    require_once 
'/brain-config.php';
    require_once 
'/'.$config['lang'].'.php';
    require_once 
'/functions.php';
    require_once 
'/class.game.php';
    require_once 
'/class.user.php';
    require_once 
'/class.html.php';
    require_once 
'/class.admin.php';
    require_once 
'/class.db.php';
    
    
define('S'$config['skin']);
    
    
Html::loadPlugins();

?>
You need to add

Code:
<?php
if(!defined('BRAIN_CMS'))
?>

In commands17.php
[Image: logo.png]
Reply

XzRs

Junior Member
Members
5Posts:
1 Threads:
Dec 02Joined:
0 Reputation:
#7
Tom Wrote: Please log in or register to see this link.
XzRs Wrote: Please log in or register to see this link.commands17.php

PHP Code:
<?php
    require_once 
'../../../../../global.php';
 
   header('content-type: text/plain');
 
   
    
// Check to see if there is already a texts file and when it was last
 
   // updated. If it was last updated over 12 hours ago then we will open
 
   // a database connection to update it.
 
   if(file_exists('commands.txt') && (time() - 43200 filemtime('commands.txt')))
 
   {
 
       include_once('commands.txt');       
    
}


    echo 
'Lista de comandos

'
;
    echo 
'<span class="padding-top"><br></span><span class="padding-top"><br></span><h2>Comandos Staff</h2><span class="padding-bottom"><br></span>
          <span class="padding-top"><br></span>'
;
    
$staff $db->query("SELECT * FROM client_commands WHERE rank >= 3 ORDER BY id ASC");

                                        
            
                                        
    echo 
'<span class="padding-bottom"><br></span>';
    
    echo 
'<span class="padding-top"><br></span><span class="padding-top"><br></span><h2>Comandos para los usuarios</h2><span class="padding-bottom"><br></span>
          <span class="padding-top"><br></span>'
;
    
$users $db->query("SELECT * FROM client_commands WHERE rank = 1 ORDER BY id ASC");
    while(
$data $users->fetch_array()){
                                        
    echo 
'<p class="bullet-item">•&nbsp; <b>:'.$data['com_title'].'</b> - <i>' $data['com_desc'] . '</i></p>';                
        }                                
    echo 
'<span class="padding-bottom"><br></span>';
    
    echo 
'<span class="padding-top"><br></span><h2>Comandos para los VIP\'s</h2><span class="padding-bottom"><br></span>
          <span class="padding-top"><br></span>'
;
    
$vip $db->query("SELECT * FROM client_commands WHERE rank = 2 ORDER BY id ASC");
    while(
$vips $vip->fetch_array()){
                                        
    echo 
'<p class="bullet-item">•&nbsp; <b>:'.$vips['com_title'].'</b> - ' $vips['com_desc'] . '</p>';                
        }                                
    echo 
'<span class="padding-bottom"><br></span>';
    
 
   echo '<span class="padding-bottom"><br></span>
<span class="padding-top"><br></span><h2>Caracteres especiales usando alt-codes!</h2><span class="padding-bottom"><br></span>
<span class="padding-top"><br></span><p>Para mas diversion puedes usar el boton alt-key en tu teclado y escribiendo los siguientes numeros con tus teclas de numeros!</p><span class="padding-bottom"><br></span>
<img src="//habboo-a.akamaihd.net/c_images/habbopages/chat_altcodes.png" height="295" hspace="1" vspace="1"/><font size="12px"><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p></font><p><font size="-1"> </font></p><img src="http://images-eussl.habbo.com/c_images/reception/3b505e.png" width="1000" height="1"/><br>'
;    
    
 
   $sql->close();

 
   // The above has grabbed the badge names and descriptions from the database
 
   // and outputted them to the page. Now we need to write them to the cache
 
   // so we aren't opening a database connection each time this file is requested.
 
   $file fopen('commands.txt''w');

 
   fwrite($fileob_get_contents());
 
   fclose($file);
?>
global.php

PHP Code:
<?php
if(!defined('BRAIN_CMS')) 
    { 
        die(
'Sorry but you cannot access this file!'); 
    }
    
    
session_start();
    
ob_start();
    
    
define('Z'$_SERVER['DOCUMENT_ROOT'].'/');
    
define('A''system/');
    
define('B''app/');
    
define('C''classes/');
    
define('E''languages/');
    
define('G''content/');
    
define('H''templates/');
    
define('I''maintenance/');
    
define('J''adminpan/');
    
define('K''plugins/');
    
    require_once 
'/brain-config.php';
    require_once 
'/'.$config['lang'].'.php';
    require_once 
'/functions.php';
    require_once 
'/class.game.php';
    require_once 
'/class.user.php';
    require_once 
'/class.html.php';
    require_once 
'/class.admin.php';
    require_once 
'/class.db.php';
    
    
define('S'$config['skin']);
    
    
Html::loadPlugins();

?>
You need to add

Code:
<?php
if(!defined('BRAIN_CMS'))
?>

In commands17.php
I did it and it did not work
Reply

Tom

RetroRiper Love
Owner
Developer
49Posts:
5 Threads:
Oct 07Joined:
4 Reputation:
Developer
#8
XzRs Wrote: Please log in or register to see this link.
Tom Wrote: Please log in or register to see this link.
XzRs Wrote: Please log in or register to see this link.commands17.php

PHP Code:
<?php
    require_once 
'../../../../../global.php';
 
   header('content-type: text/plain');
 
   
    
// Check to see if there is already a texts file and when it was last
 
   // updated. If it was last updated over 12 hours ago then we will open
 
   // a database connection to update it.
 
   if(file_exists('commands.txt') && (time() - 43200 filemtime('commands.txt')))
 
   {
 
       include_once('commands.txt');       
    
}


    echo 
'Lista de comandos

'
;
    echo 
'<span class="padding-top"><br></span><span class="padding-top"><br></span><h2>Comandos Staff</h2><span class="padding-bottom"><br></span>
          <span class="padding-top"><br></span>'
;
    
$staff $db->query("SELECT * FROM client_commands WHERE rank >= 3 ORDER BY id ASC");

                                        
            
                                        
    echo 
'<span class="padding-bottom"><br></span>';
    
    echo 
'<span class="padding-top"><br></span><span class="padding-top"><br></span><h2>Comandos para los usuarios</h2><span class="padding-bottom"><br></span>
          <span class="padding-top"><br></span>'
;
    
$users $db->query("SELECT * FROM client_commands WHERE rank = 1 ORDER BY id ASC");
    while(
$data $users->fetch_array()){
                                        
    echo 
'<p class="bullet-item">•&nbsp; <b>:'.$data['com_title'].'</b> - <i>' $data['com_desc'] . '</i></p>';                
        }                                
    echo 
'<span class="padding-bottom"><br></span>';
    
    echo 
'<span class="padding-top"><br></span><h2>Comandos para los VIP\'s</h2><span class="padding-bottom"><br></span>
          <span class="padding-top"><br></span>'
;
    
$vip $db->query("SELECT * FROM client_commands WHERE rank = 2 ORDER BY id ASC");
    while(
$vips $vip->fetch_array()){
                                        
    echo 
'<p class="bullet-item">•&nbsp; <b>:'.$vips['com_title'].'</b> - ' $vips['com_desc'] . '</p>';                
        }                                
    echo 
'<span class="padding-bottom"><br></span>';
    
 
   echo '<span class="padding-bottom"><br></span>
<span class="padding-top"><br></span><h2>Caracteres especiales usando alt-codes!</h2><span class="padding-bottom"><br></span>
<span class="padding-top"><br></span><p>Para mas diversion puedes usar el boton alt-key en tu teclado y escribiendo los siguientes numeros con tus teclas de numeros!</p><span class="padding-bottom"><br></span>
<img src="//habboo-a.akamaihd.net/c_images/habbopages/chat_altcodes.png" height="295" hspace="1" vspace="1"/><font size="12px"><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p></font><p><font size="-1"> </font></p><img src="http://images-eussl.habbo.com/c_images/reception/3b505e.png" width="1000" height="1"/><br>'
;    
    
 
   $sql->close();

 
   // The above has grabbed the badge names and descriptions from the database
 
   // and outputted them to the page. Now we need to write them to the cache
 
   // so we aren't opening a database connection each time this file is requested.
 
   $file fopen('commands.txt''w');

 
   fwrite($fileob_get_contents());
 
   fclose($file);
?>
global.php

PHP Code:
<?php
if(!defined('BRAIN_CMS')) 
    { 
        die(
'Sorry but you cannot access this file!'); 
    }
    
    
session_start();
    
ob_start();
    
    
define('Z'$_SERVER['DOCUMENT_ROOT'].'/');
    
define('A''system/');
    
define('B''app/');
    
define('C''classes/');
    
define('E''languages/');
    
define('G''content/');
    
define('H''templates/');
    
define('I''maintenance/');
    
define('J''adminpan/');
    
define('K''plugins/');
    
    require_once 
'/brain-config.php';
    require_once 
'/'.$config['lang'].'.php';
    require_once 
'/functions.php';
    require_once 
'/class.game.php';
    require_once 
'/class.user.php';
    require_once 
'/class.html.php';
    require_once 
'/class.admin.php';
    require_once 
'/class.db.php';
    
    
define('S'$config['skin']);
    
    
Html::loadPlugins();

?>
You need to add

Code:
<?php
if(!defined('BRAIN_CMS'))
?>

In commands17.php
I did it and it did not work
Try this.
PHP Code:
<?php
    define
('BRAIN_CMS'1);    
 
   require_once '../../../../../global.php';
 
   header('content-type: text/plain');
 
   
    
// Check to see if there is already a texts file and when it was last
 
   // updated. If it was last updated over 12 hours ago then we will open
 
   // a database connection to update it.
 
   if(file_exists('commands.txt') && (time() - 43200 filemtime('commands.txt')))
 
   {
 
       include_once('commands.txt');       
    
}


 
   echo 'Lista de comandos

'
;
 
   echo '<span class="padding-top"><br></span><span class="padding-top"><br></span><h2>Comandos Staff</h2><span class="padding-bottom"><br></span>
          <span class="padding-top"><br></span>'
;
 
   $staff $db->query("SELECT * FROM client_commands WHERE rank >= 3 ORDER BY id ASC");

 
                                       
            
                                        
    echo 
'<span class="padding-bottom"><br></span>';
 
   
    echo 
'<span class="padding-top"><br></span><span class="padding-top"><br></span><h2>Comandos para los usuarios</h2><span class="padding-bottom"><br></span>
          <span class="padding-top"><br></span>'
;
 
   $users $db->query("SELECT * FROM client_commands WHERE rank = 1 ORDER BY id ASC");
 
   while($data $users->fetch_array()){
 
                                       
    echo 
'<p class="bullet-item">•&nbsp; <b>:'.$data['com_title'].'</b> - <i>' $data['com_desc'] . '</i></p>'               
        
                               
    echo 
'<span class="padding-bottom"><br></span>';
 
   
    echo 
'<span class="padding-top"><br></span><h2>Comandos para los VIP\'s</h2><span class="padding-bottom"><br></span>
          <span class="padding-top"><br></span>'
;
 
   $vip $db->query("SELECT * FROM client_commands WHERE rank = 2 ORDER BY id ASC");
 
   while($vips $vip->fetch_array()){
 
                                       
    echo 
'<p class="bullet-item">•&nbsp; <b>:'.$vips['com_title'].'</b> - ' $vips['com_desc'] . '</p>'               
        
                               
    echo 
'<span class="padding-bottom"><br></span>';
 
   
    echo 
'<span class="padding-bottom"><br></span>
<span class="padding-top"><br></span><h2>Caracteres especiales usando alt-codes!</h2><span class="padding-bottom"><br></span>
<span class="padding-top"><br></span><p>Para mas diversion puedes usar el boton alt-key en tu teclado y escribiendo los siguientes numeros con tus teclas de numeros!</p><span class="padding-bottom"><br></span>
<img src="//habboo-a.akamaihd.net/c_images/habbopages/chat_altcodes.png" height="295" hspace="1" vspace="1"/><font size="12px"><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p></font><p><font size="-1"> </font></p><img src="http://images-eussl.habbo.com/c_images/reception/3b505e.png" width="1000" height="1"/><br>'
   
    
    $sql
->close();

 
   // The above has grabbed the badge names and descriptions from the database
 
   // and outputted them to the page. Now we need to write them to the cache
 
   // so we aren't opening a database connection each time this file is requested.
 
   $file fopen('commands.txt''w');

 
   fwrite($fileob_get_contents());
 
   fclose($file);
?>
[Image: logo.png]
Reply

XzRs

Junior Member
Members
5Posts:
1 Threads:
Dec 02Joined:
0 Reputation:
#9
Tom Wrote: Please log in or register to see this link.
XzRs Wrote: Please log in or register to see this link.
Tom Wrote: Please log in or register to see this link.
XzRs Wrote: Please log in or register to see this link.commands17.php

PHP Code:
<?php
    require_once 
'../../../../../global.php';
 
   header('content-type: text/plain');
 
   
    
// Check to see if there is already a texts file and when it was last
 
   // updated. If it was last updated over 12 hours ago then we will open
 
   // a database connection to update it.
 
   if(file_exists('commands.txt') && (time() - 43200 filemtime('commands.txt')))
 
   {
 
       include_once('commands.txt');       
    
}


    echo 
'Lista de comandos

'
;
    echo 
'<span class="padding-top"><br></span><span class="padding-top"><br></span><h2>Comandos Staff</h2><span class="padding-bottom"><br></span>
          <span class="padding-top"><br></span>'
;
    
$staff $db->query("SELECT * FROM client_commands WHERE rank >= 3 ORDER BY id ASC");

                                        
            
                                        
    echo 
'<span class="padding-bottom"><br></span>';
    
    echo 
'<span class="padding-top"><br></span><span class="padding-top"><br></span><h2>Comandos para los usuarios</h2><span class="padding-bottom"><br></span>
          <span class="padding-top"><br></span>'
;
    
$users $db->query("SELECT * FROM client_commands WHERE rank = 1 ORDER BY id ASC");
    while(
$data $users->fetch_array()){
                                        
    echo 
'<p class="bullet-item">•&nbsp; <b>:'.$data['com_title'].'</b> - <i>' $data['com_desc'] . '</i></p>';                
        }                                
    echo 
'<span class="padding-bottom"><br></span>';
    
    echo 
'<span class="padding-top"><br></span><h2>Comandos para los VIP\'s</h2><span class="padding-bottom"><br></span>
          <span class="padding-top"><br></span>'
;
    
$vip $db->query("SELECT * FROM client_commands WHERE rank = 2 ORDER BY id ASC");
    while(
$vips $vip->fetch_array()){
                                        
    echo 
'<p class="bullet-item">•&nbsp; <b>:'.$vips['com_title'].'</b> - ' $vips['com_desc'] . '</p>';                
        }                                
    echo 
'<span class="padding-bottom"><br></span>';
    
 
   echo '<span class="padding-bottom"><br></span>
<span class="padding-top"><br></span><h2>Caracteres especiales usando alt-codes!</h2><span class="padding-bottom"><br></span>
<span class="padding-top"><br></span><p>Para mas diversion puedes usar el boton alt-key en tu teclado y escribiendo los siguientes numeros con tus teclas de numeros!</p><span class="padding-bottom"><br></span>
<img src="//habboo-a.akamaihd.net/c_images/habbopages/chat_altcodes.png" height="295" hspace="1" vspace="1"/><font size="12px"><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p></font><p><font size="-1"> </font></p><img src="http://images-eussl.habbo.com/c_images/reception/3b505e.png" width="1000" height="1"/><br>'
;    
    
 
   $sql->close();

 
   // The above has grabbed the badge names and descriptions from the database
 
   // and outputted them to the page. Now we need to write them to the cache
 
   // so we aren't opening a database connection each time this file is requested.
 
   $file fopen('commands.txt''w');

 
   fwrite($fileob_get_contents());
 
   fclose($file);
?>
global.php

PHP Code:
<?php
if(!defined('BRAIN_CMS')) 
    { 
        die(
'Sorry but you cannot access this file!'); 
    }
    
    
session_start();
    
ob_start();
    
    
define('Z'$_SERVER['DOCUMENT_ROOT'].'/');
    
define('A''system/');
    
define('B''app/');
    
define('C''classes/');
    
define('E''languages/');
    
define('G''content/');
    
define('H''templates/');
    
define('I''maintenance/');
    
define('J''adminpan/');
    
define('K''plugins/');
    
    require_once 
'/brain-config.php';
    require_once 
'/'.$config['lang'].'.php';
    require_once 
'/functions.php';
    require_once 
'/class.game.php';
    require_once 
'/class.user.php';
    require_once 
'/class.html.php';
    require_once 
'/class.admin.php';
    require_once 
'/class.db.php';
    
    
define('S'$config['skin']);
    
    
Html::loadPlugins();

?>
You need to add

Code:
<?php
if(!defined('BRAIN_CMS'))
?>

In commands17.php
I did it and it did not work
Try this.
PHP Code:
<?php
    define
('BRAIN_CMS'1);    
 
   require_once '../../../../../global.php';
 
   header('content-type: text/plain');
 
   
    
// Check to see if there is already a texts file and when it was last
 
   // updated. If it was last updated over 12 hours ago then we will open
 
   // a database connection to update it.
 
   if(file_exists('commands.txt') && (time() - 43200 filemtime('commands.txt')))
 
   {
 
       include_once('commands.txt');       
    
}


 
   echo 'Lista de comandos

'
;
 
   echo '<span class="padding-top"><br></span><span class="padding-top"><br></span><h2>Comandos Staff</h2><span class="padding-bottom"><br></span>
          <span class="padding-top"><br></span>'
;
 
   $staff $db->query("SELECT * FROM client_commands WHERE rank >= 3 ORDER BY id ASC");

 
                                       
            
                                        
    echo 
'<span class="padding-bottom"><br></span>';
 
   
    echo 
'<span class="padding-top"><br></span><span class="padding-top"><br></span><h2>Comandos para los usuarios</h2><span class="padding-bottom"><br></span>
          <span class="padding-top"><br></span>'
;
 
   $users $db->query("SELECT * FROM client_commands WHERE rank = 1 ORDER BY id ASC");
 
   while($data $users->fetch_array()){
 
                                       
    echo 
'<p class="bullet-item">•&nbsp; <b>:'.$data['com_title'].'</b> - <i>' $data['com_desc'] . '</i></p>'               
        
                               
    echo 
'<span class="padding-bottom"><br></span>';
 
   
    echo 
'<span class="padding-top"><br></span><h2>Comandos para los VIP\'s</h2><span class="padding-bottom"><br></span>
          <span class="padding-top"><br></span>'
;
 
   $vip $db->query("SELECT * FROM client_commands WHERE rank = 2 ORDER BY id ASC");
 
   while($vips $vip->fetch_array()){
 
                                       
    echo 
'<p class="bullet-item">•&nbsp; <b>:'.$vips['com_title'].'</b> - ' $vips['com_desc'] . '</p>'               
        
                               
    echo 
'<span class="padding-bottom"><br></span>';
 
   
    echo 
'<span class="padding-bottom"><br></span>
<span class="padding-top"><br></span><h2>Caracteres especiales usando alt-codes!</h2><span class="padding-bottom"><br></span>
<span class="padding-top"><br></span><p>Para mas diversion puedes usar el boton alt-key en tu teclado y escribiendo los siguientes numeros con tus teclas de numeros!</p><span class="padding-bottom"><br></span>
<img src="//habboo-a.akamaihd.net/c_images/habbopages/chat_altcodes.png" height="295" hspace="1" vspace="1"/><font size="12px"><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p></font><p><font size="-1"> </font></p><img src="http://images-eussl.habbo.com/c_images/reception/3b505e.png" width="1000" height="1"/><br>'
   
    
    $sql
->close();

 
   // The above has grabbed the badge names and descriptions from the database
 
   // and outputted them to the page. Now we need to write them to the cache
 
   // so we aren't opening a database connection each time this file is requested.
 
   $file fopen('commands.txt''w');

 
   fwrite($fileob_get_contents());
 
   fclose($file);
?>
It appears that:

Lista de comandos

<span class="padding-top"><br></span><span class="padding-top"><br></span><h2>Comandos Staff</h2><span class="padding-bottom"><br></span>
         <span class="padding-top"><br></span><br />
<b>Fatal error</b>:  Uncaught Error: Call to a member function query() on array in C:\xampp\htdocs\game\gamedata\habbopages\chat\comandos\commands17.php:20
Stack trace:
#0 {main}
 thrown in <b>C:\xampp\htdocs\game\gamedata\habbopages\chat\comandos\commands17.php</b> on line <b>20</b><br />
Reply

Tom

RetroRiper Love
Owner
Developer
49Posts:
5 Threads:
Oct 07Joined:
4 Reputation:
Developer
#10
XzRs Wrote: Please log in or register to see this link.
Tom Wrote: Please log in or register to see this link.
XzRs Wrote: Please log in or register to see this link.
Tom Wrote: Please log in or register to see this link.
XzRs Wrote: Please log in or register to see this link.commands17.php

PHP Code:
<?php
    require_once 
'../../../../../global.php';
 
   header('content-type: text/plain');
 
   
    
// Check to see if there is already a texts file and when it was last
 
   // updated. If it was last updated over 12 hours ago then we will open
 
   // a database connection to update it.
 
   if(file_exists('commands.txt') && (time() - 43200 filemtime('commands.txt')))
 
   {
 
       include_once('commands.txt');       
    
}


    echo 
'Lista de comandos

'
;
    echo 
'<span class="padding-top"><br></span><span class="padding-top"><br></span><h2>Comandos Staff</h2><span class="padding-bottom"><br></span>
          <span class="padding-top"><br></span>'
;
    
$staff $db->query("SELECT * FROM client_commands WHERE rank >= 3 ORDER BY id ASC");

                                        
            
                                        
    echo 
'<span class="padding-bottom"><br></span>';
    
    echo 
'<span class="padding-top"><br></span><span class="padding-top"><br></span><h2>Comandos para los usuarios</h2><span class="padding-bottom"><br></span>
          <span class="padding-top"><br></span>'
;
    
$users $db->query("SELECT * FROM client_commands WHERE rank = 1 ORDER BY id ASC");
    while(
$data $users->fetch_array()){
                                        
    echo 
'<p class="bullet-item">•&nbsp; <b>:'.$data['com_title'].'</b> - <i>' $data['com_desc'] . '</i></p>';                
        }                                
    echo 
'<span class="padding-bottom"><br></span>';
    
    echo 
'<span class="padding-top"><br></span><h2>Comandos para los VIP\'s</h2><span class="padding-bottom"><br></span>
          <span class="padding-top"><br></span>'
;
    
$vip $db->query("SELECT * FROM client_commands WHERE rank = 2 ORDER BY id ASC");
    while(
$vips $vip->fetch_array()){
                                        
    echo 
'<p class="bullet-item">•&nbsp; <b>:'.$vips['com_title'].'</b> - ' $vips['com_desc'] . '</p>';                
        }                                
    echo 
'<span class="padding-bottom"><br></span>';
    
 
   echo '<span class="padding-bottom"><br></span>
<span class="padding-top"><br></span><h2>Caracteres especiales usando alt-codes!</h2><span class="padding-bottom"><br></span>
<span class="padding-top"><br></span><p>Para mas diversion puedes usar el boton alt-key en tu teclado y escribiendo los siguientes numeros con tus teclas de numeros!</p><span class="padding-bottom"><br></span>
<img src="//habboo-a.akamaihd.net/c_images/habbopages/chat_altcodes.png" height="295" hspace="1" vspace="1"/><font size="12px"><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p></font><p><font size="-1"> </font></p><img src="http://images-eussl.habbo.com/c_images/reception/3b505e.png" width="1000" height="1"/><br>'
;    
    
 
   $sql->close();

 
   // The above has grabbed the badge names and descriptions from the database
 
   // and outputted them to the page. Now we need to write them to the cache
 
   // so we aren't opening a database connection each time this file is requested.
 
   $file fopen('commands.txt''w');

 
   fwrite($fileob_get_contents());
 
   fclose($file);
?>
global.php

PHP Code:
<?php
if(!defined('BRAIN_CMS')) 
    { 
        die(
'Sorry but you cannot access this file!'); 
    }
    
    
session_start();
    
ob_start();
    
    
define('Z'$_SERVER['DOCUMENT_ROOT'].'/');
    
define('A''system/');
    
define('B''app/');
    
define('C''classes/');
    
define('E''languages/');
    
define('G''content/');
    
define('H''templates/');
    
define('I''maintenance/');
    
define('J''adminpan/');
    
define('K''plugins/');
    
    require_once 
'/brain-config.php';
    require_once 
'/'.$config['lang'].'.php';
    require_once 
'/functions.php';
    require_once 
'/class.game.php';
    require_once 
'/class.user.php';
    require_once 
'/class.html.php';
    require_once 
'/class.admin.php';
    require_once 
'/class.db.php';
    
    
define('S'$config['skin']);
    
    
Html::loadPlugins();

?>
You need to add

Code:
<?php
if(!defined('BRAIN_CMS'))
?>

In commands17.php
I did it and it did not work
Try this.
PHP Code:
<?php
    define
('BRAIN_CMS'1);    
 
   require_once '../../../../../global.php';
 
   header('content-type: text/plain');
 
   
    
// Check to see if there is already a texts file and when it was last
 
   // updated. If it was last updated over 12 hours ago then we will open
 
   // a database connection to update it.
 
   if(file_exists('commands.txt') && (time() - 43200 filemtime('commands.txt')))
 
   {
 
       include_once('commands.txt');       
    
}


 
   echo 'Lista de comandos

'
;
 
   echo '<span class="padding-top"><br></span><span class="padding-top"><br></span><h2>Comandos Staff</h2><span class="padding-bottom"><br></span>
          <span class="padding-top"><br></span>'
;
 
   $staff $db->query("SELECT * FROM client_commands WHERE rank >= 3 ORDER BY id ASC");

 
                                       
            
                                        
    echo 
'<span class="padding-bottom"><br></span>';
 
   
    echo 
'<span class="padding-top"><br></span><span class="padding-top"><br></span><h2>Comandos para los usuarios</h2><span class="padding-bottom"><br></span>
          <span class="padding-top"><br></span>'
;
 
   $users $db->query("SELECT * FROM client_commands WHERE rank = 1 ORDER BY id ASC");
 
   while($data $users->fetch_array()){
 
                                       
    echo 
'<p class="bullet-item">•&nbsp; <b>:'.$data['com_title'].'</b> - <i>' $data['com_desc'] . '</i></p>'               
        
                               
    echo 
'<span class="padding-bottom"><br></span>';
 
   
    echo 
'<span class="padding-top"><br></span><h2>Comandos para los VIP\'s</h2><span class="padding-bottom"><br></span>
          <span class="padding-top"><br></span>'
;
 
   $vip $db->query("SELECT * FROM client_commands WHERE rank = 2 ORDER BY id ASC");
 
   while($vips $vip->fetch_array()){
 
                                       
    echo 
'<p class="bullet-item">•&nbsp; <b>:'.$vips['com_title'].'</b> - ' $vips['com_desc'] . '</p>'               
        
                               
    echo 
'<span class="padding-bottom"><br></span>';
 
   
    echo 
'<span class="padding-bottom"><br></span>
<span class="padding-top"><br></span><h2>Caracteres especiales usando alt-codes!</h2><span class="padding-bottom"><br></span>
<span class="padding-top"><br></span><p>Para mas diversion puedes usar el boton alt-key en tu teclado y escribiendo los siguientes numeros con tus teclas de numeros!</p><span class="padding-bottom"><br></span>
<img src="//habboo-a.akamaihd.net/c_images/habbopages/chat_altcodes.png" height="295" hspace="1" vspace="1"/><font size="12px"><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p></font><p><font size="-1"> </font></p><img src="http://images-eussl.habbo.com/c_images/reception/3b505e.png" width="1000" height="1"/><br>'
   
    
    $sql
->close();

 
   // The above has grabbed the badge names and descriptions from the database
 
   // and outputted them to the page. Now we need to write them to the cache
 
   // so we aren't opening a database connection each time this file is requested.
 
   $file fopen('commands.txt''w');

 
   fwrite($fileob_get_contents());
 
   fclose($file);
?>
It appears that:

Lista de comandos

<span class="padding-top"><br></span><span class="padding-top"><br></span><h2>Comandos Staff</h2><span class="padding-bottom"><br></span>
         <span class="padding-top"><br></span><br />
<b>Fatal error</b>:  Uncaught Error: Call to a member function query() on array in C:\xampp\htdocs\game\gamedata\habbopages\chat\comandos\commands17.php:20
Stack trace:
#0 {main}
 thrown in <b>C:\xampp\htdocs\game\gamedata\habbopages\chat\comandos\commands17.php</b> on line <b>20</b><br />
The mysql code is not the right way, BrainCMSs use PDO

Like this:
PHP Code:
$stmt $dbh->prepare("SELECT * FROM client_commands WHERE rank = 2 ORDER BY id ASC");
$stmt->execute();
if (
$stmt->RowCount() > 0)
{

}
else
{



[Image: logo.png]
Reply
Users browsing this thread:
1 Guest(s)