• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Hello.. My requests is hard today.. But lets see :>

Brent Dalli

Banned User
Joined
Jun 14, 2011
Messages
78
Reaction score
2
My Xampp version 1.7.3, Gesior 0.3.6, Cryingdamson 0.3.6)
_____________

First thing!.. Error on my website while making character.. Just a error, but the character will be made, so If i click create character it creates the character , but appears a error, Heres it:
Code:
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE `player_id` = 19 AND `skillid` = 0' at line 1' in C:\xampp\htdocs\pot\OTS_Player.php:195 Stack trace: #0 C:\xampp\htdocs\pot\OTS_Player.php(195): PDO->query('UPDATE `player_...') #1 C:\xampp\htdocs\accountmanagement.php(810): OTS_Player->save() #2 C:\xampp\htdocs\index.php(131): include('C:\xampp\htdocs...') #3 {main} thrown in C:\xampp\htdocs\pot\OTS_Player.php on line 195
Thats while making a druid!.
And while making a sorcerer appears the same..
And pally and knight the same too!...
Thats my first request, I think its hard, but i really need a fast help!...
___________________________________
Second Request.:
Im needing a poll system to my server, because theres the error on my website.. (Gesior 0.3.6, XAMPP 1.7.3! And CryingDamson 0.3.6)...
Thats the error..
Code:
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42S02]: Base table or view not found: 1146 Table '25january.z_polls' doesn't exist' in C:\xampp\htdocs\layouts\tibiacom\layout.php:532 Stack trace: #0 C:\xampp\htdocs\layouts\tibiacom\layout.php(532): PDO->query('SELECT * FROM z...') #1 C:\xampp\htdocs\index.php(283): include('C:\xampp\htdocs...') #2 {main} thrown in C:\xampp\htdocs\layouts\tibiacom\layout.php on line 532
That's was the second request!..
_________________
Third Request...:
I need to make a new button in the shop buttons... Theres:
Shop Offer.
Buy Points.
I need to make a new one called...:
Egyptian Donation System .. Or atleast i want to add to Buy Points, a button on it! That i can write what i want!...
Thats was third request!
________________________________
Sorry for wasting your time, Fourth One:)
Invalid subtopic. Can't load page...
Thats on banishments, I tried many times and searched whole 2 hours! at OtLand Forum Search
So if someone helps me with a script of bans.php
_________________________________________
Im thankful for who writed, and Rep+++++ For who helps me with those errors.::>
 
SQL:
CREATE TABLE `z_polls` (
	`id` int(11) UNSIGNED NOT NULL auto_increment,
	`question` varchar(255) NOT NULL,
	`end` int(11) UNSIGNED NOT NULL DEFAULT 0,
	`start` int(11) UNSIGNED NOT NULL DEFAULT 0,
	`answers` int(11) UNSIGNED NOT NULL DEFAULT 0,
	`votes_all` int(11) UNSIGNED NOT NULL DEFAULT 0,
	PRIMARY KEY  (`id`)
);

CREATE TABLE `z_polls_answers` (
	`poll_id` int(11) UNSIGNED NOT NULL,
	`answer_id` int(11) UNSIGNED NOT NULL DEFAULT 0,
	`answer` varchar(255) NOT NULL,
	`votes` int(11) UNSIGNED NOT NULL DEFAULT 0
);

upload OTS_Player.php, fix bans by editing index.php, add new subtopic by editing index.php and layout.php
 
I've deleted my first polls table.. and executed the one you gave me, and also already doing..:

Invalid subtopic. Can't load page.

Ithink polls.php is bugged, can u give me a script of it!?
Heres mine:
PHP:
<div>
{$poll} <br />
</div>  <?php
/* Polls System By Averatec from pervera.pl & otland.net */

if($logged)
{
    $link = "polls"; // your link to polls in index.php
    $dark = $config['site']['darkborder'];
    $light = $config['site']['lightborder'];
    $color[] = red; // for <15%
    $color[] = orange; // for <35%
    $color[] = yellow; // for <=50%
    $color[] = green; // for >50%
    $time = time();
    $POLLS = $SQL->query('SELECT * FROM '.$SQL->tableName('z_polls').'');
    $level = 20; // need level to vote

    function color($number, $color1, $color2, $color3, $color4)
    {
        if($number < 15)
        return '<font color='.$color1.'><b>'.$number.'%</b></font>';
        elseif($number < 35 and $number >= 15)
        return '<font color='.$color2.'><b>'.$number.'%</b></font>';
        elseif($number <= 50 and $number >=35)
        return '<font color='.$color3.'><b>'.$number.'%</b></font>';
        elseif($number > 50)
        return '<font color='.$color4.'><b>'.$number.'%</b></font>';
    }
    
    /* Checking Account */
    $account_players = $account_logged->getPlayers();
    foreach($account_players as $player)
    {
        $player = $player->getLevel();
        if($player >= $level)
        $allow=true;        
    }
    
    if(empty($_REQUEST['id']) and $_REQUEST['control'] != "true")  // list of polls
    {
        $active = $SQL->query('SELECT * FROM `z_polls` where `end` > '.$time.''); // active polls
        $closed = $SQL->query('SELECT * FROM `z_polls` where `end` < '.$time.''); // closed polls
        /* Active Polls */
        $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD COLSPAN=2 CLASS=white><B>Active Polls</B></TD></TR>';
        if(is_int($number_of_rows / 2)) { $bgcolor = $dark; } else { $bgcolor = $light; } $number_of_rows++;
        $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><td width=75%><b>Topic</b></td><td><b>End</b></td></tr>';
        if(is_int($number_of_rows / 2)) { $bgcolor = $dark; } else { $bgcolor = $light; } $number_of_rows++;
        foreach($active as $poll)
        {
            $main_content .= '<tr BGCOLOR="'.$bgcolor.'"><td><a href="?subtopic='.$link.'&id='.$poll['id'].'">'.$poll['question'].'</a></td><td>'.date("jS F Y", $poll['end']).'</td></tr>';
            $empty_active = true;
        }
        
        if(!$empty_active)
        {
            $main_content .= '<tr BGCOLOR="'.$bgcolor.'"><td colspan=2><center><i>Don\'t have open polls.</i></center></td></tr>';
        }
        
        $main_content .= "</table><br><br>";
        /* Closed Polls */
        $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD COLSPAN=2 CLASS=white><B>Closed Polls</B></TD></TR>';
        if(is_int($number_of_rows / 2)) { $bgcolor = $dark; } else { $bgcolor = $light; } $number_of_rows++;
        $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><td width=75%><b>Topic</b></td><td><b>End</b></td></tr>';
        if(is_int($number_of_rows / 2)) { $bgcolor = $dark; } else { $bgcolor = $light; } $number_of_rows++;
        foreach($closed as $poll)
        {
            $main_content .= '<tr BGCOLOR="'.$bgcolor.'"><td><a href="?subtopic='.$link.'&id='.$poll['id'].'">'.$poll['question'].'</a></td><td>'.date("jS F Y", $poll['end']).'</td></tr>';
            $empty_closed = true;
        }
        
        if(!$empty_closed)
        {
            $main_content .= '<tr BGCOLOR="'.$bgcolor.'"><td colspan=2><center><i>Don\'t have closed polls.</i></center></td></tr>';
        }
        
        $main_content .= "</table>";
        $showed=true;
    }
    
    if(!empty($_REQUEST['id']) and $_REQUEST['control'] != "true")
    {
        foreach($POLLS as $POLL)
        {
            if($_REQUEST['id'] == $POLL['id'])
            {
                $ANSWERS = $SQL->query('SELECT * FROM '.$SQL->tableName('z_polls_answers').' where `poll_id` = '.addslashes(htmlspecialchars(trim($_REQUEST['id']))).' order by `answer_id`');
                $votes_all = $POLL['votes_all'];
                
                if($votes_all == 0)
                {
                    $i=1;
                    foreach($ANSWERS as $answer)
                    {
                        $percent[$i] = 0;
                        $i++;
                    }
                }
                else
                {
                    $i=1;
                    foreach($ANSWERS as $answer)
                    {
                        $percent[$i] = round(((100*$answer['votes'])/$votes_all),2);
                        $i++;
                    }
                }
                
                if($POLL['end'] > $time) // active poll
                {
                    if($_REQUEST['vote'] == true and $allow == true)
                    {
                        if($account_logged->getCustomField('vote') < $_REQUEST['id'] and !empty($_POST['answer']))
                        {
                            if(isset($_POST['continue']))
                            {
                                $vote = addslashes(htmlspecialchars(trim($_REQUEST['id'])));
                                $account_logged->setCustomField("vote", $vote);
                                $UPDATE_poll = $SQL->query('UPDATE `z_polls` SET `votes_all` = `votes_all` + 1 where `id` = '.addslashes(htmlspecialchars(trim($_REQUEST['id']))).'');
                                $UPDATE_answer = $SQL->query('UPDATE `z_polls_answers` SET `votes` = `votes` + 1 where `answer_id` = '.addslashes(htmlspecialchars(trim($_POST['answer']))).' and`poll_id` = '.addslashes(htmlspecialchars(trim($_REQUEST['id']))).'');
                                header('Location: index.php?subtopic='.$link.'&id='.$_REQUEST['id'].'');
                            }
                        }
                        else
                        {
                            header('Location: index.php?subtopic='.$link.'&id='.$_REQUEST['id'].'');
                        }
                    }
                    
                    if($account_logged->getCustomField('vote') < $_REQUEST['id'] and $allow == true)
                    {
                        $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD COLSPAN=2 CLASS=white><B>Vote</B></TD></TR>';
                        $main_content .= '<TR BGCOLOR="'.$dark.'"><td COLSPAN=2 CLASS=white><b>'.$POLL['question'].'</b></td></tr>
                        <form action="index.php?subtopic='.$link.'&id='.$_REQUEST['id'].'&vote=true" method="POST"> ';
                        $ANSWERS_input = $SQL->query('SELECT * FROM '.$SQL->tableName('z_polls_answers').' where `poll_id` = '.$_REQUEST['id'].' order by `answer_id`');
                        $i=1;
                        foreach($ANSWERS_input as $answer)
                        {
                            if(is_int($i / 2)) {
                                $bgcolor = $dark;
                            }
                            else
                            {
                                $bgcolor = $light;
                            }
                            $main_content .= '<tr BGCOLOR="'.$bgcolor.'"><td><input type=radio name=answer value="'.$i.'">'.$answer['answer'].'</td></tr>';
                            $i++;
                        }
                        $main_content .= '</table><input type="submit" name="continue" value="Submit" class="input2" /></form><br><br>';
                    }
                    elseif($account_logged->getCustomField('vote') >= $_REQUEST['id'])
                    {
                        $result[] = '<br><b>You have already voted.</b><br>';
                    }
                    
                    $result[] = '<br>All players with a character of at least level '.$level.' may vote.<br>';

                    $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD COLSPAN=3 CLASS=white><B>Results</B></TD></TR>';
                    $main_content .= '<TR BGCOLOR="'.$dark.'"><td COLSPAN=3 CLASS=white><b>'.$POLL['question'].'</b></td></tr>';
                    $ANSWERS_show = $SQL->query('SELECT * FROM '.$SQL->tableName('z_polls_answers').' where `poll_id` = '.$_REQUEST['id'].' order by `answer_id`');
                    $i=1;
                    foreach($ANSWERS_show as $answer)
                    {
                        if(is_int($i / 2)) {
                            $bgcolor = $dark;
                        }
                        else
                        {
                            $bgcolor = $light;
                        }
                        $x=0;
                        $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><td width=60%>'.$answer['answer'].'</td><td width=20%><img src="bar.php?long='.(int) $percent[$i].'"></td><td>'.$answer['votes'].'('.color($percent[$i], $color[0], $color[1], $color[2], $color[3]).')</td></tr>';
                        $i++;
                    }
                    $main_content .= '</table>';
                    
                    foreach($result as $error)
                    {
                        $main_content .= $error;
                    }
                    
                    $main_content .= '<br>The poll started at '.date("jS F Y", $POLL['start']).'<br>';
                    $main_content .= 'The poll will end at '.date("jS F Y", $POLL['end']).'<br>';
                    $main_content .= '<br>Total votes <b>'.$POLL['votes_all'].'</b><br>';                    
                    
                }
                else // closed poll
                {
                    $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD COLSPAN=3 CLASS=white><B>Results</B></TD></TR>';
                    $main_content .= '<TR BGCOLOR="'.$dark.'"><td COLSPAN=3 CLASS=white><b>'.$POLL['question'].'</b></td></tr>';
                    $ANSWERS_show = $SQL->query('SELECT * FROM '.$SQL->tableName('z_polls_answers').' where `poll_id` = '.$_REQUEST['id'].' order by `answer_id`');
                    $i=1;
                    foreach($ANSWERS_show as $answer)
                    {
                        if(is_int($i / 2)) {
                            $bgcolor = $dark;
                        }
                        else
                        {
                            $bgcolor = $light;
                        }
                        $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><td width=60%>'.$answer['answer'].'</td><td width=20%><img src="bar.php?long='.(int) $percent[$i].'"></td><td>'.$answer['votes'].'('.color($percent[$i], $color[0], $color[1], $color[2], $color[3]).')</td></tr>';
                        $i++;
                    }
                    $main_content .= '</table><br><br>';
                    
                    $main_content .= '<br>The poll started at '.date("jS F Y", $POLL['start']).'<br>';
                    $main_content .= 'The poll ended at '.date("jS F Y", $POLL['end']).'<br>';
                    $main_content .= '<br>Total votes <b>'.$POLL['votes_all'].'</b><br>';
                    
                }
                $showed=true;
                $main_content .= '<div class=\'hr1\'></div><a href="index.php?subtopic='.$link.'"><font size="2"><b>Go to list of polls</b></font></a>';
            }
        }
    }
    
    if($group_id_of_acc_logged >= $config['site']['access_admin_panel'] and $_REQUEST['control'] != "true")
    {
        $main_content .= '<br><a href="?subtopic='.$link.'&control=true"><b>Panel Control</b></a><br><br>';
    }
    
    /* Control Panel - Only Add Poll Function */
     
    if($group_id_of_acc_logged >= $config['site']['access_admin_panel'] and $_REQUEST['control'] == "true")
    {
        if(isset($_POST['submit']))
        {
            $_SESSION['answers'] = $_POST['answers'];
            $main_content .= '<form method="post" action=""><b><font size=3>Adding Poll</font></b><br><br>
            <input type=text name=question value="" /> Question<br>
            <input type=text name=end value="" /> Time to end, in days<br>';
            
            for( $x = 1; $x <= $_SESSION['answers']; $x++ )
            {
                $main_content .= '<input type=text name='.$x.' value="" /> Answer no. '.$x.'<br>';
            }
            $main_content .= '<input type="submit" name="finish" value="Submit" class="input2"/></form><br><br>';
            $show=true;
        }

        if(isset($_POST['finish']))
        {
                $id = $SQL->query('SELECT MAX(id) FROM `z_polls`')->fetch();
                $id_next = $id[0] + 1;
                
                for( $x = 1; $x <= $_SESSION['answers']; $x++ )
                {
                    $INSERT_answer = $SQL->query('INSERT INTO `z_polls_answers` (`poll_id`,`answer_id`,`answer`) VALUES ('.$SQL->quote($id_next).','.$SQL->quote($x).','.$SQL->quote($_POST[$x]).')');
                }
                $end = $time+24*60*60*$_POST['end'];
                $INSERT_poll = $SQL->query('INSERT INTO `z_polls` (`id`,`question`,`end`,`answers`,`start`) VALUES ('.$SQL->quote($id_next).','.$SQL->quote($_POST['question']).','.$SQL->quote($end).','.$SQL->quote($_SESSION['answers']).','.$SQL->quote($time).')');
        }
            
        $POLLS_check = $SQL->query('SELECT MAX(end) FROM '.$SQL->tableName('z_polls').'');
        foreach($POLLS_check as $checked)
        {
            if($checked[0] > $time)
            $check=true;
            else
            $check=false;
        }
        if(!$show)
        {
            if(!$check)
            {
                $main_content .= '<form method="post" action=""><b><font size=3>Adding Poll</font></b><br><br>
                <input type=text name=answers value="" /> Number of Answers<br>
                <input type="submit" name="submit" value="Submit" class="input2"/></form><br><br>';
            }
            else
            {
                $main_content .= '<b><font size=3><br>Cannot be two and more active polls.<br><br></font></b>';
            }
        }
        $showed=true;
        $main_content .= '<br><div class=\'hr1\'></div><a href="index.php?subtopic='.$link.'"><font size="2"><b>Go to list of polls</b></font></a>';
    }
    
    if(!$showed)
    {
        $main_content .= 'This poll doesn\'t exist.<br>';
        $main_content .= '<div class=\'hr1\'></div><a href="index.php?subtopic='.$link.'"><font size="2"><b>Go to list of  polls</b></font></a>';
    }
    
}
else
{
        $main_content .= 'Please enter your account number and your password.<br/><a href="?subtopic=createaccount" >Create an account</a> if you do not have one yet.<br/><br/><form action="?subtopic=polls" method="post" ><div class="TableContainer" >  <table class="Table1" cellpadding="0" cellspacing="0" >    <div class="CaptionContainer" >      <div class="CaptionInnerContainer" >        <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>        <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>        <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span>        <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span>        <div class="Text" >Account Login</div>        <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></span>        <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif);" ></span>        <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>        <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></span>      </div>    </div>    <tr>      <td>        <div class="InnerTableContainer" >          <table style="width:100%;" ><tr><td class="LabelV" ><span >Account Number:</span></td><td style="width:100%;" ><input type="password" name="account_login" SIZE="10" maxlength="10" ></td></tr><tr><td class="LabelV" ><span >Password:</span></td><td><input type="password" name="password_login" size="30" maxlength="29" ></td></tr>          </table>        </div>  </table></div></td></tr><br/><table width="100%" ><tr align="center" ><td><table border="0" cellspacing="0" cellpadding="0" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></td><tr></form></table></td><td><table border="0" cellspacing="0" cellpadding="0" ><form action="?subtopic=lostaccount" method="post" ><tr><td style="border:0px;" ><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Account lost?" alt="Account lost?" src="'.$layout_name.'/images/buttons/_sbutton_accountlost.gif" ></div></div></td></tr></form></table></td></tr></table>';
}
?>         ?>
 
Last edited by a moderator:
Also new bug while searching a player ..
Fatal error: Uncaught exception 'E_OTS_NotLoaded' in C:\xampp\htdocs\pot\OTS_Player.php:1866 Stack trace: #0 C:\xampp\htdocs\characters.php(122): OTS_Player->getSkill(0) #1 C:\xampp\htdocs\index.php(95): include('C:\xampp\htdocs...') #2 {main} thrown in C:\xampp\htdocs\pot\OTS_Player.php on line 1866
 
SQL:
CREATE TABLE `z_polls` (
	`id` int(11) UNSIGNED NOT NULL auto_increment,
	`question` varchar(255) NOT NULL,
	`end` int(11) UNSIGNED NOT NULL DEFAULT 0,
	`start` int(11) UNSIGNED NOT NULL DEFAULT 0,
	`answers` int(11) UNSIGNED NOT NULL DEFAULT 0,
	`votes_all` int(11) UNSIGNED NOT NULL DEFAULT 0,
	PRIMARY KEY  (`id`)
);

CREATE TABLE `z_polls_answers` (
	`poll_id` int(11) UNSIGNED NOT NULL,
	`answer_id` int(11) UNSIGNED NOT NULL DEFAULT 0,
	`answer` varchar(255) NOT NULL,
	`votes` int(11) UNSIGNED NOT NULL DEFAULT 0
);

upload OTS_Player.php, fix bans by editing index.php, add new subtopic by editing index.php and layout.php

Also i dont know how to edit index.php, heres mine:

PHP:
<?PHP
//start :)
//phpinfo();
//exit;
session_start();
ob_start("ob_gzhandler");
//require('./exaBD.php');
function microtime_float()
{
    list($usec, $sec) = explode(" ", microtime());
    return ((float)$usec + (float)$sec);
}
$time_start = microtime_float();
date_default_timezone_set("Africa/Cairo");
//##### CONFIG #####
include('config-and-functions.php');
$action = $_REQUEST['action'];
//##### LOGOUT #####
if($action == "logout") {
unset($_SESSION['account']);
unset($_SESSION['password']);
}
//##### LOGIN #####
//check is player logged
$logged = FALSE;
if(isset($_SESSION['account'])) {
	$account_logged = $ots->createObject('Account');
	$account_logged->load($_SESSION['account']);
	if($account_logged->isLoaded() && $account_logged->getPassword() == $_SESSION['password']) {
		$logged = TRUE;
		$group_id_of_acc_logged = $account_logged->getPageAccess();
	}
	else
	{
		$logged = FALSE;
		unset($_SESSION['account']);
		unset($account_logged);
	}
}
//login with data from form
$login_account = strtoupper($_POST['account_login']);
$login_password = trim($_POST['password_login']);
if(!$logged && !empty($login_account) && !empty($login_password))
{
	$login_password = password_ency($login_password);
	$account_logged = $ots->createObject('Account');
	$account_logged->find($login_account);
	if($account_logged->isLoaded())
	{
		if($login_password == $account_logged->getPassword())
		{
			$_SESSION['account'] = $account_logged->getId();
			$_SESSION['password'] = $login_password;
			$logged = TRUE;
			$account_logged->setCustomField("page_lastday", time());
			$group_id_of_acc_logged = $account_logged->getPageAccess();
		} else
			$logged = FALSE;
	}
}
//#### LOAD PAGE ##########
//load subtopic page
if(empty($_REQUEST['subtopic'])) {
	$_REQUEST['subtopic'] = "latestnews";
	$subtopic = "latestnews";
}
switch($_REQUEST['subtopic']) {
	case "latestnews":
		$topic = "Latest News";
		$subtopic = "latestnews";
		include("latestnews.php");
	break;
	
	case "creatures";
		$topic = "Monsters";
		$subtopic = "creatures";
		include("creatures.php");
	break;
	
	case "spells";
		$topic = "Spells";
		$subtopic = "spells";
		include("spells.php");
	break;
	
	case "experiencetable";
		$topic = "Experience Table";
		$subtopic = "experiencetable";
		include("experiencetable.php");
	break;
	
	case "characters";
		$topic = "Characters";
		$subtopic = "characters";
		include("characters.php");
	break;
	
	case "whoisonline";
		$topic = "Who is online?";
		$subtopic = "whoisonline";
		include("whoisonline.php");
	break;
	
	case "highscores";
		$topic = "Highscores";
		$subtopic = "highscores";
		include("highscores.php");
	break;
	
	case "killstatistics";
		$topic = "Last Kills";
		$subtopic = "killstatistics";
		include("killstatistics.php");
	break;
	
	case "houses";
		$topic = "Houses";
		$subtopic = "houses";
		include("houses.php");
	break;
	
	case "guilds";
		$topic = "Guilds";
		$subtopic = "guilds";
		include("guilds.php");
	break;
	
	case "accountmanagement";
		$topic = "Account Management";
		$subtopic = "accountmanagement";
		include("accountmanagement.php");
	break;
	
	case "createaccount";
		$topic = "Create Account";
		$subtopic = "createaccount";
		include("createaccount.php");
	break;
	
	case "lostaccount";
		$topic = "Lost Account Interface";
		$subtopic = "lostaccount";
		include("lostaccount.php");
	break;

	case "tibiarules";
		$topic = "Server Rules";
		$subtopic = "tibiarules";
		include("tibiarules.php");
	break;

	case "adminpanel":
		$topic = "Admin Panel";
		$subtopic = "adminpanel";
		include("adminpanel.php");
	break;
	
	case "forum":
		$topic = "Forum";
		$subtopic = "forum";
		include("forum.php");
	break;
	
	case "team";
		$subtopic = "team";
		$topic = "Gamemasters List";
		include("team.php");
	break;

	case "downloads";
		$subtopic = "downloads";
		$topic = "Downloads";
		include("downloads.php");
	break;

	case "serverinfo";
		$subtopic = "serverinfo";
		$topic = "Server Info";
		include("serverinfo.php");
	break;

	case "shopsystem";
		$subtopic = "shopsystem";
		$topic = "Shop System";
		include("shopsystem.php");
	break;
	
	case "buypoints";
		$subtopic = "buypoints";
		$topic = "Egypt Donation";
		include("buypoints.php");
	break;

	case "egyptdonation";
		$subtopic = "egyptdonation";
		$topic = "Egypt Donation";
		include("egypt.php");
	break;      case "gallery";
		$subtopic = "gallery";
		$topic = "Gallery";
		include("gallery.php");
	break;
	
	case "namelock";
		$subtopic = "namelock";
		$topic = "Namelock Manager";
		include("namelocks.php");
	break;
	
	case "archive";
		$subtopic = "archive";
		$topic = "News Archives";
		include("archive.php");
	break;
	
	case "mail";
		$subtopic = "mail";
		$topic = "Mass emails sender";
		include("mail.php");
	break;

      case "shopadmin";
           $subtopic = "shopadmin";
           $topic = "Shop Admin";
           include("shopadmin.php");
      break;

      case "records";
           $subtopic = "records";
           $topic = "Players Online Records";
           include("records.php");
      break;
      
   
      break;

	
}
//generate title of page
if(empty($topic)) {
$title = $GLOBALS['config']['server']["serverName"]." - OTS";
$main_content .= 'Invalid subtopic. Can\'t load page.';
}
else
{
$title = $GLOBALS['config']['server']["serverName"]." - ".$topic;
}
//#####LAYOUT#####

$layout_header = '<script type=\'text/javascript\'>
function GetXmlHttpObject()
{
var xmlHttp=null;
try
  {
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttp;
}

function MouseOverBigButton(source)
{
  source.firstChild.style.visibility = "visible";
}
function MouseOutBigButton(source)
{
  source.firstChild.style.visibility = "hidden";
}
function BigButtonAction(path)
{
  window.location = path;
}
var';
if($logged) { $layout_header .= "loginStatus=1; loginStatus='true';"; } else { $layout_header .= "loginStatus=0; loginStatus='false';"; };
$layout_header .= "var activeSubmenuItem='".$subtopic."';  var IMAGES=0; IMAGES='".$config['server']['url']."/".$layout_name."/images'; var LINK_ACCOUNT=0; LINK_ACCOUNT='".$config['server']['url']."';</script>";
include($layout_name."/layout.php");
ob_end_flush();
?>
 
Last edited by a moderator:
Back
Top