diakosz3456
New Member
- Joined
- Apr 6, 2020
- Messages
- 46
- Reaction score
- 1
Hi, i have little problem with subpages on my ot page. When i try to go to Search Characters i have this:
var/www/html/sub.php
var/html/www/layout/sub.php
var/html/www/layout/sub/search.php
bump
var/www/html/sub.php
Lua:
<?php require_once 'engine/init.php'; require_once 'layout/overall/header.php';
if ($config['allowSubPages']) {
$page = (isset($_GET['page']) && !empty($_GET['page'])) ? getValue($_GET['page']) : '';
if (isset($subpages[$page]['file'])) require_once 'layout/sub/'.$subpages[$page]['file'];
else {
if (isset($subpages)) echo '<h2>Sub page not recognized.</h2><p>The sub page you requested is not recognized.</p>';
}
}
else echo '<h2>System disabled.</h2><p>The sub page system is disabled.</p>';
require_once 'layout/overall/footer.php'; ?>
var/html/www/layout/sub.php
Code:
<?php
$subpages = array(
// website.com/sub.php?page=blank
'index' => array(
// layout/sub/blank.php
'file' => 'index.php',
// false means don't run this file instead of the regular file at website.com/blank.php
'override' => true
),
'news' => array(
'file' => 'index.php',
'override' => false
),
'houses' => array(
'file' => 'houses.php',
'override' => true
),
'login' => array(
'file' => 'login.php',
'override' => false
),
'recover' => array(
'file' => 'recover.php',
'override' => true
),
'charactersearch' => array(
'file' => 'search.php',
'override' => false
),
'highscore' => array(
'file' => 'highscore.php',
'override' => true
),
'loggedin' => array(
'file' => 'loggedin.php',
'override' => true
)
);
?>
var/html/www/layout/sub/search.php
Code:
<h2>Character search</h2>
<div class="inner">
<form type="submit" action="characterprofile.php" method="get">
<input type="text" name="name" class="search">
</form>
</div>
Post automatically merged:
bump
Last edited: