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

AAC PHP issues using Gesior [TFS 1.3] [Gesior]

platano

Active Member
Joined
Jul 21, 2009
Messages
162
Solutions
1
Reaction score
38
Location
Mexico
Currently using TFS 1.3 Tibia Client Version: 10.00 and 12.30

Im really new to PHP can anyone please tell my why is this page trying to get parameters out of REQUEST when it's supposed to get them out of a form?

I have no idea what I said but let me try to dive into details.

Code:
Notice: Undefined index: name in /var/www/html/pages/guilds.php on line 821

Notice: Undefined index: leader in /var/www/html/pages/guilds.php on line 822

Notice: Undefined index: todo in /var/www/html/pages/guilds.php on line 823

Notice: Undefined index: password in /var/www/html/pages/guilds.php on line 824

Notice: Undefined index: name in /var/www/html/pages/guilds.php on line 1037

I get that whenever I try to create a guild, this is the guilds.php Im using.

https://pastebin.com/zRrkJTLa ------- guilds.php

Removed money offer because I read rules ._. sorry :)


EDIT: THIS IS THE ACTUAL ISSUE, Whenever I try to create a guild, I go to guilds.php, then I click create guild, aftermath I fill the form (guild_name, character, password) on submit it says guild has been created and I click continue, THERE BUG!

It says guilds with such name does not exist, I go back and guild has not been created.

I think there's an issue at this php script sorry for not leaving all details clear
 
Last edited:
Bump I still have issues with this uhmm should I post this in Jobs in order to offer some money to get this solved quickly?
 
Its related to your method of sending data.

Request Global string in PHP works with GET/POST requests (both of them at the same time).
I think the login check should be before of that strings.

1590671719637.png

PHP:
   if(!$logged)
        $guild_errors[] = 'You are not logged in. You can\'t create guild.';
 
Put this somewhere at the beginning of your index.php

Code:
ini_set('error_reporting', E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED);

It will disable such notices.
 
uLHeH0X.png


lvl required and premium is not a problem as seen on the picture.

@slawkens

I used

PHP:
<?php
       ini_set("display_errors",1);
       error_reporting(E_ALL);
        //code goes here
?>

To see if there was any errors while I was trying to debug in localhost but I don't have those lines in production, those errors may be an issue but let try to simplify the problem im experiencing using a gif

myawesomebug.gif
Post automatically merged:

Its related to your method of sending data.

Request Global string in PHP works with GET/POST requests (both of them at the same time).
I think the login check should be before of that strings.

View attachment 46062

PHP:
   if(!$logged)
        $guild_errors[] = 'You are not logged in. You can\'t create guild.';

So putting that if before the $action "create" ?

Sorry I kind of missunderstood probably what you meant, can you elaborate a little bit more

Looks like the whole guilds.php is working with that structure if($action == "something"){}
And once inside that if there's several validations for the logic flow
PHP:
[LIST=1]
[*]if($action == "create") {
[*]    $guild_name = trim($_REQUEST['name']);
[*]    $leader = $_REQUEST['leader'];
[*]    $todo = $_REQUEST['todo'];
[*]    $guild_password = trim($_REQUEST['password']); 
[*]    if(!$logged)
[*]        $guild_errors[] = 'You are not logged in. You can\'t create guild.';
[*]    if(empty($guild_errors))
[*]    {
[*]        $account_players = $account_logged->getPlayers();
[*]        foreach($account_players as $player)
[*]        {
[*]            $player_rank = $player->getRank();
[*]            if(empty($player_rank))
[*]                if($player->getLevel() >= $config['site']['guild_need_level'])
[*]                    if(!$config['site']['guild_need_pacc'] || $account_logged->isPremium())
[*]                        $array_of_player_nig[] = $player->getName();
[*]        }
[*]    }
[*]    if(count($array_of_player_nig) == 0)
[*]        $guild_errors[] = 'On your account all characters are in guilds or have too low level to create new guild.';
[*]    if($todo == "save") {
[*]        if(!check_guild_name($guild_name)) {
[*]            $guild_errors[] = 'Invalid guild name format.';
[*]        }
[*]        if(!check_name($leader)) {
[*]            $guild_errors[] = 'Invalid character name format.';
[*]        }
[*]        if(empty($guild_errors)) {
[*]            $player = new Player();
[*]            $player->find($leader);
[*]            if(!$player->isLoaded())
[*]                $guild_errors[] = 'Character <b>'.htmlspecialchars($leader).'</b> doesn\'t exist.';
[*]        }
[*]        if(empty($guild_errors)) {
[*]            $guild = new Guild();
[*]            $guild->find($guild_name);
[*]            if($guild->isLoaded())
[*]                $guild_errors[] = 'Guild <b>'.htmlspecialchars($guild_name).'</b> already exist. Select other name.';
[*]        }
[*]        if(empty($guild_errors)) {
[*]            $bad_char = TRUE;
[*]            foreach($array_of_player_nig as $nick_from_list)
[*]                if($nick_from_list == $player->getName())
[*]                    $bad_char = FALSE;
[*]            if($bad_char)
[*]                $guild_errors[] = 'Character <b>'.htmlspecialchars($leader).'</b> isn\'t on your account or is already in guild.';
[*]        }
[*]        if(empty($guild_errors)) {
[*]            if($player->getLevel() < $config['site']['guild_need_level'])
[*]                $guild_errors[] = 'Character <b>'.htmlspecialchars($leader).'</b> has too low level. To create guild you need character with level <b>'.$config['site']['guild_need_level'].'</b>.';
[*]            if($config['site']['guild_need_pacc'] && !$account_logged->isPremium())
[*]                $guild_errors[] = 'Character <b>'.htmlspecialchars($leader).'</b> is on FREE account. To create guild you need PREMIUM account.';
[*]        }
[*]        if(empty($guild_errors)) {
[*]            if (!$account_logged->isValidPassword($guild_password))
[*]                $guild_errors[] = 'Wrong password, please check it and try again.';
[*]        }
[*]    }
[*]   
[*]    if(!empty($guild_errors)) {
[*]        $main_content .= '
[*]            <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/global/content/box-frame-edge.gif);" /></span>
[*]                            <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/global/content/box-frame-edge.gif);" /></span>
[*]                            <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/global/content/table-headline-border.gif);" ></span>
[*]                            <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/global/content/box-frame-vertical.gif);" /></span>                       
[*]                            <div class="Text" >Error</div>
[*]                            <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/global/content/box-frame-vertical.gif);" /></span>
[*]                            <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/global/content/table-headline-border.gif);" ></span>
[*]                            <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/global/content/box-frame-edge.gif);" /></span>
[*]                            <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/global/content/box-frame-edge.gif);" /></span>
[*]                        </div>
[*]                    </div>
[*]                    <tr>
[*]                        <td>
[*]                            <div class="InnerTableContainer" >
[*]                                <table style="width:100%;" >
[*]                                    <tr>
[*]                                        <td>';
[*]                                    foreach($guild_errors as $guild_error)
[*]                                        $main_content .= '<p>'.$guild_error.'</p>';
[*]                                    $main_content .= '
[*]                                        </td>
[*]                                    </tr>
[*]                                </table>
[*]                            </div>
[*]                        </td>
[*]                    </tr>
[*]                </table>
[*]            </div><BR>
[*]            <TABLE BORDER=0 WIDTH=100%>
[*]                <TR>
[*]                    <TD ALIGN=center>
[*]                        <table border="0" cellspacing="0" cellpadding="0" >
[*]                            <form action="?subtopic=guilds" method="post" >
[*]                                <tr>
[*]                                    <td style="border:0px;" >';
[*]                                    if ($logged)
[*]                                        if(count($array_of_player_nig) > 0)
[*]                                            $main_content .= '
[*]                                                <input type="hidden" name=action value=create >';
[*]                                    $main_content .= '
[*]                                        <input type="hidden" name=name value="'.$guild_name.'" >
[*]                                        <input type="hidden" name=leader value="'.$leader.'" >
[*]                                        <div class="BigButton" style="background-image:url('.$layout_name.'/images/global/buttons/sbutton.gif)" >
[*]                                            <div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/global/buttons/sbutton_over.gif);" ></div>
[*]                                                <input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/global/buttons/_sbutton_back.gif" >
[*]                                            </div>
[*]                                        </div>
[*]                                    </td>
[*]                                </tr>
[*]                            </form>
[*]                        </table>
[*]                    </TD>
[*]                </TR>
[*]            </TABLE>';
[*]    } else {
[*]        if($todo == "save")
[*]        {
[*]            $new_guild = new Guild();
[*]            $new_guild->setCreationData(time());
[*]            $new_guild->setName($guild_name);
[*]            $new_guild->setOwner($player);
[*]            $new_guild->setDescription('New guild. Leader must edit this text :)');
[*]            $new_guild->setGuildLogo('image/gif', Website::getFileContents('./images/guildlogos/default_logo.gif'));
[*]           
[*]            $new_guild->save();
[*]            $ranks = $new_guild->getGuildRanksList(true);
[*]            foreach($ranks as $rank)
[*]                if($rank->getLevel() == 3)
[*]                {
[*]                    $player->setRank($rank);
[*]                    $player->save();
[*]                }
[*]            $main_content .= '
[*]                <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/global/content/box-frame-edge.gif);" /></span>
[*]                                <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/global/content/box-frame-edge.gif);" /></span>
[*]                                <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/global/content/table-headline-border.gif);" ></span>
[*]                                <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/global/content/box-frame-vertical.gif);" /></span>                       
[*]                                <div class="Text" >Guild Founded!</div>
[*]                                <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/global/content/box-frame-vertical.gif);" /></span>
[*]                                <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/global/content/table-headline-border.gif);" ></span>
[*]                                <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/global/content/box-frame-edge.gif);" /></span>
[*]                                <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/global/content/box-frame-edge.gif);" /></span>
[*]                            </div>
[*]                        </div>
[*]                        <tr>
[*]                            <td>
[*]                                <div class="InnerTableContainer" >
[*]                                    <table style="width:100%;" >
[*]                                        <tr>
[*]                                            <td>You have founded the '.htmlspecialchars($guild_name).'. Now go ahead and invite the first members.</td>
[*]                                        </tr>
[*]                                    </table>
[*]                                </div>
[*]                            </td>
[*]                        </tr>
[*]                    </table>
[*]                </div><br>
[*]                <TABLE BORDER=0 WIDTH=100%>
[*]                    <TR>
[*]                        <TD ALIGN=center>
[*]                            <table border="0" cellspacing="0" cellpadding="0" >
[*]                                <form action="?subtopic=guilds" method="post" >
[*]                                    <tr>
[*]                                        <td style="border:0px;" >
[*]                                            <input type="hidden" name=action value=view >
[*]                                            <input type="hidden" name=GuildName value="'.$guild_name.'" >
[*]                                            <div class="BigButton" style="background-image:url('.$layout_name.'/images/global/buttons/sbutton.gif)" >
[*]                                                <div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/global/buttons/sbutton_over.gif);" ></div>
[*]                                                    <input class="ButtonText" type="image" name="Continue" alt="Continue" src="'.$layout_name.'/images/global/buttons/_sbutton_continue.gif" >
[*]                                                </div>
[*]                                            </div>
[*]                                        </td>
[*]                                    </tr>
[*]                                </form>
[*]                            </table>
[*]                        </TD>
[*]                    </TR>
[*]                </TABLE>';
[*]        } else {
[*]            #form to create
[*]            $main_content .= 'Do you want to found a new guild? none of your characters may hold one of the two highest ranks in any other guild.<BR><BR>Now enter the name of the new guild, specify the name of your character that should become the first leader and confirm with your account password. Then click on "Submit". Note that the first two data cannot be changed later.<BR><BR>';
[*]            $main_content .= '
[*]                <FORM ACTION="?subtopic=guilds" 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/global/content/box-frame-edge.gif);" /></span>
[*]                                <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/global/content/box-frame-edge.gif);" /></span>
[*]                                <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/global/content/table-headline-border.gif);" ></span>
[*]                                <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/global/content/box-frame-vertical.gif);" /></span>                       
[*]                                <div class="Text" >Found Guild</div>
[*]                                <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/global/content/box-frame-vertical.gif);" /></span>
[*]                                <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/global/content/table-headline-border.gif);" ></span>
[*]                                <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/global/content/box-frame-edge.gif);" /></span>
[*]                                <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/global/content/box-frame-edge.gif);" /></span>
[*]                            </div>
[*]                        </div>
[*]                        <tr>
[*]                            <td>
[*]                                <div class="InnerTableContainer" >
[*]                                    <table style="width:100%;" >
[*]                                        <TR>
[*]                                            <TD BGCOLOR=#D4C0A1>
[*]                                                <TABLE BORDER=0 CELLPADDING=1>
[*]                                                    <TR>
[*]                                                        <TD>Guild Name:</TD>
[*]                                                        <TD><INPUT NAME="name" VALUE="'.$_REQUEST['name'].'" SIZE=30 MAXLENGTH=29></TD>
[*]                                                    </TR>
[*]                                                    <TR>
[*]                                                        <TD>Leader:</TD>
[*]                                                        <TD>
[*]                                                            <SELECT NAME="leader">';
[*]                                                                if(count($array_of_player_nig) > 0) {
[*]                                                                    sort($array_of_player_nig);
[*]                                                                    foreach($array_of_player_nig as $nick)
[*]                                                                        $main_content .= '<OPTION>'.htmlspecialchars($nick).'</OPTION>';
[*]                                                                }
[*]                                                        $main_content .= '
[*]                                                            </SELECT>
[*]                                                        </TD>
[*]                                                    </TR>
[*]                                                    <TR>
[*]                                                        <TD>Password:</TD>
[*]                                                        <TD><INPUT TYPE=password NAME="password" SIZE=30 MAXLENGTH=29></TD>
[*]                                                    </TR>
[*]                                                </TABLE>
[*]                                            </TD>
[*]                                        </TR>
[*]                                    </table>
[*]                                </div>
[*]                            </td>
[*]                        </tr>
[*]                    </table>
[*]                </div><BR>
[*]                <TABLE BORDER=0 WIDTH=100%>
[*]                    <TR>
[*]                        <TD ALIGN=center><IMG SRC="'.$layout_name.'/images/global/general/blank.gif" WIDTH=120 HEIGHT=1 BORDER=0><BR></TD>
[*]                        <TD ALIGN=center>
[*]                            <table border="0" cellspacing="0" cellpadding="0" >
[*]                            <form action="?subtopic=guilds" method="post" >
[*]                                <tr>
[*]                                    <td style="border:0px;" >
[*]                                        <input type="hidden" name="todo" value="save" >
[*]                                        <input type="hidden" name="action" value="create" >
[*]                                        <div class="BigButton" style="background-image:url('.$layout_name.'/images/global/buttons/sbutton.gif)" >
[*]                                            <div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/global/buttons/sbutton_over.gif);" ></div>
[*]                                                <input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/global/buttons/_sbutton_submit.gif" >
[*]                                            </div>
[*]                                        </div>
[*]                                    </td>
[*]                                <tr>
[*]                            </form>
[*]                            </table>
[*]                        </TD>
[*]                        <TD ALIGN=center>
[*]                            <table border="0" cellspacing="0" cellpadding="0" >
[*]                                <form action="?subtopic=guilds" method="post" >
[*]                                    <tr>
[*]                                        <td style="border:0px;" >
[*]                                            <div class="BigButton" style="background-image:url('.$layout_name.'/images/global/buttons/sbutton.gif)" >
[*]                                                <div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/global/buttons/sbutton_over.gif);" ></div>
[*]                                                    <input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/global/buttons/_sbutton_back.gif" >
[*]                                                </div>
[*]                                            </div>
[*]                                        </td>
[*]                                    </tr>
[*]                                </form>
[*]                            </table>
[*]                        </TD>
[*]                        <TD ALIGN=center><IMG SRC="'.$layout_name.'/images/global/general/blank.gif" WIDTH=120 HEIGHT=1 BORDER=0><BR></TD>
[*]                    </TR>
[*]                </TABLE>';
[*]        }
[*]    }
[*]}
[/LIST]
 
Last edited:
uLHeH0X.png


lvl required and premium is not a problem as seen on the picture.

@slawkens

I used

PHP:
<?php
       ini_set("display_errors",1);
       error_reporting(E_ALL);
        //code goes here
?>

To see if there was any errors while I was trying to debug in localhost but I don't have those lines in production, those errors may be an issue but let try to simplify the problem im experiencing using a gif

View attachment 46086
Post automatically merged:



So putting that if before the $action "create" ?

Sorry I kind of missunderstood probably what you meant, can you elaborate a little bit more

Looks like the whole guilds.php is working with that structure if($action == "something"){}
And once inside that if there's several validations for the logic flow
PHP:
[LIST=1]
[*]if($action == "create") {
[*]    $guild_name = trim($_REQUEST['name']);
[*]    $leader = $_REQUEST['leader'];
[*]    $todo = $_REQUEST['todo'];
[*]    $guild_password = trim($_REQUEST['password']);
[*]    if(!$logged)
[*]        $guild_errors[] = 'You are not logged in. You can\'t create guild.';
[*]    if(empty($guild_errors))
[*]    {
[*]        $account_players = $account_logged->getPlayers();
[*]        foreach($account_players as $player)
[*]        {
[*]            $player_rank = $player->getRank();
[*]            if(empty($player_rank))
[*]                if($player->getLevel() >= $config['site']['guild_need_level'])
[*]                    if(!$config['site']['guild_need_pacc'] || $account_logged->isPremium())
[*]                        $array_of_player_nig[] = $player->getName();
[*]        }
[*]    }
[*]    if(count($array_of_player_nig) == 0)
[*]        $guild_errors[] = 'On your account all characters are in guilds or have too low level to create new guild.';
[*]    if($todo == "save") {
[*]        if(!check_guild_name($guild_name)) {
[*]            $guild_errors[] = 'Invalid guild name format.';
[*]        }
[*]        if(!check_name($leader)) {
[*]            $guild_errors[] = 'Invalid character name format.';
[*]        }
[*]        if(empty($guild_errors)) {
[*]            $player = new Player();
[*]            $player->find($leader);
[*]            if(!$player->isLoaded())
[*]                $guild_errors[] = 'Character <b>'.htmlspecialchars($leader).'</b> doesn\'t exist.';
[*]        }
[*]        if(empty($guild_errors)) {
[*]            $guild = new Guild();
[*]            $guild->find($guild_name);
[*]            if($guild->isLoaded())
[*]                $guild_errors[] = 'Guild <b>'.htmlspecialchars($guild_name).'</b> already exist. Select other name.';
[*]        }
[*]        if(empty($guild_errors)) {
[*]            $bad_char = TRUE;
[*]            foreach($array_of_player_nig as $nick_from_list)
[*]                if($nick_from_list == $player->getName())
[*]                    $bad_char = FALSE;
[*]            if($bad_char)
[*]                $guild_errors[] = 'Character <b>'.htmlspecialchars($leader).'</b> isn\'t on your account or is already in guild.';
[*]        }
[*]        if(empty($guild_errors)) {
[*]            if($player->getLevel() < $config['site']['guild_need_level'])
[*]                $guild_errors[] = 'Character <b>'.htmlspecialchars($leader).'</b> has too low level. To create guild you need character with level <b>'.$config['site']['guild_need_level'].'</b>.';
[*]            if($config['site']['guild_need_pacc'] && !$account_logged->isPremium())
[*]                $guild_errors[] = 'Character <b>'.htmlspecialchars($leader).'</b> is on FREE account. To create guild you need PREMIUM account.';
[*]        }
[*]        if(empty($guild_errors)) {
[*]            if (!$account_logged->isValidPassword($guild_password))
[*]                $guild_errors[] = 'Wrong password, please check it and try again.';
[*]        }
[*]    }
[*]  
[*]    if(!empty($guild_errors)) {
[*]        $main_content .= '
[*]            <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/global/content/box-frame-edge.gif);" /></span>
[*]                            <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/global/content/box-frame-edge.gif);" /></span>
[*]                            <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/global/content/table-headline-border.gif);" ></span>
[*]                            <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/global/content/box-frame-vertical.gif);" /></span>                      
[*]                            <div class="Text" >Error</div>
[*]                            <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/global/content/box-frame-vertical.gif);" /></span>
[*]                            <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/global/content/table-headline-border.gif);" ></span>
[*]                            <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/global/content/box-frame-edge.gif);" /></span>
[*]                            <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/global/content/box-frame-edge.gif);" /></span>
[*]                        </div>
[*]                    </div>
[*]                    <tr>
[*]                        <td>
[*]                            <div class="InnerTableContainer" >
[*]                                <table style="width:100%;" >
[*]                                    <tr>
[*]                                        <td>';
[*]                                    foreach($guild_errors as $guild_error)
[*]                                        $main_content .= '<p>'.$guild_error.'</p>';
[*]                                    $main_content .= '
[*]                                        </td>
[*]                                    </tr>
[*]                                </table>
[*]                            </div>
[*]                        </td>
[*]                    </tr>
[*]                </table>
[*]            </div><BR>
[*]            <TABLE BORDER=0 WIDTH=100%>
[*]                <TR>
[*]                    <TD ALIGN=center>
[*]                        <table border="0" cellspacing="0" cellpadding="0" >
[*]                            <form action="?subtopic=guilds" method="post" >
[*]                                <tr>
[*]                                    <td style="border:0px;" >';
[*]                                    if ($logged)
[*]                                        if(count($array_of_player_nig) > 0)
[*]                                            $main_content .= '
[*]                                                <input type="hidden" name=action value=create >';
[*]                                    $main_content .= '
[*]                                        <input type="hidden" name=name value="'.$guild_name.'" >
[*]                                        <input type="hidden" name=leader value="'.$leader.'" >
[*]                                        <div class="BigButton" style="background-image:url('.$layout_name.'/images/global/buttons/sbutton.gif)" >
[*]                                            <div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/global/buttons/sbutton_over.gif);" ></div>
[*]                                                <input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/global/buttons/_sbutton_back.gif" >
[*]                                            </div>
[*]                                        </div>
[*]                                    </td>
[*]                                </tr>
[*]                            </form>
[*]                        </table>
[*]                    </TD>
[*]                </TR>
[*]            </TABLE>';
[*]    } else {
[*]        if($todo == "save")
[*]        {
[*]            $new_guild = new Guild();
[*]            $new_guild->setCreationData(time());
[*]            $new_guild->setName($guild_name);
[*]            $new_guild->setOwner($player);
[*]            $new_guild->setDescription('New guild. Leader must edit this text :)');
[*]            $new_guild->setGuildLogo('image/gif', Website::getFileContents('./images/guildlogos/default_logo.gif'));
[*]          
[*]            $new_guild->save();
[*]            $ranks = $new_guild->getGuildRanksList(true);
[*]            foreach($ranks as $rank)
[*]                if($rank->getLevel() == 3)
[*]                {
[*]                    $player->setRank($rank);
[*]                    $player->save();
[*]                }
[*]            $main_content .= '
[*]                <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/global/content/box-frame-edge.gif);" /></span>
[*]                                <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/global/content/box-frame-edge.gif);" /></span>
[*]                                <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/global/content/table-headline-border.gif);" ></span>
[*]                                <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/global/content/box-frame-vertical.gif);" /></span>                      
[*]                                <div class="Text" >Guild Founded!</div>
[*]                                <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/global/content/box-frame-vertical.gif);" /></span>
[*]                                <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/global/content/table-headline-border.gif);" ></span>
[*]                                <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/global/content/box-frame-edge.gif);" /></span>
[*]                                <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/global/content/box-frame-edge.gif);" /></span>
[*]                            </div>
[*]                        </div>
[*]                        <tr>
[*]                            <td>
[*]                                <div class="InnerTableContainer" >
[*]                                    <table style="width:100%;" >
[*]                                        <tr>
[*]                                            <td>You have founded the '.htmlspecialchars($guild_name).'. Now go ahead and invite the first members.</td>
[*]                                        </tr>
[*]                                    </table>
[*]                                </div>
[*]                            </td>
[*]                        </tr>
[*]                    </table>
[*]                </div><br>
[*]                <TABLE BORDER=0 WIDTH=100%>
[*]                    <TR>
[*]                        <TD ALIGN=center>
[*]                            <table border="0" cellspacing="0" cellpadding="0" >
[*]                                <form action="?subtopic=guilds" method="post" >
[*]                                    <tr>
[*]                                        <td style="border:0px;" >
[*]                                            <input type="hidden" name=action value=view >
[*]                                            <input type="hidden" name=GuildName value="'.$guild_name.'" >
[*]                                            <div class="BigButton" style="background-image:url('.$layout_name.'/images/global/buttons/sbutton.gif)" >
[*]                                                <div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/global/buttons/sbutton_over.gif);" ></div>
[*]                                                    <input class="ButtonText" type="image" name="Continue" alt="Continue" src="'.$layout_name.'/images/global/buttons/_sbutton_continue.gif" >
[*]                                                </div>
[*]                                            </div>
[*]                                        </td>
[*]                                    </tr>
[*]                                </form>
[*]                            </table>
[*]                        </TD>
[*]                    </TR>
[*]                </TABLE>';
[*]        } else {
[*]            #form to create
[*]            $main_content .= 'Do you want to found a new guild? none of your characters may hold one of the two highest ranks in any other guild.<BR><BR>Now enter the name of the new guild, specify the name of your character that should become the first leader and confirm with your account password. Then click on "Submit". Note that the first two data cannot be changed later.<BR><BR>';
[*]            $main_content .= '
[*]                <FORM ACTION="?subtopic=guilds" 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/global/content/box-frame-edge.gif);" /></span>
[*]                                <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/global/content/box-frame-edge.gif);" /></span>
[*]                                <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/global/content/table-headline-border.gif);" ></span>
[*]                                <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/global/content/box-frame-vertical.gif);" /></span>                      
[*]                                <div class="Text" >Found Guild</div>
[*]                                <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/global/content/box-frame-vertical.gif);" /></span>
[*]                                <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/global/content/table-headline-border.gif);" ></span>
[*]                                <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/global/content/box-frame-edge.gif);" /></span>
[*]                                <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/global/content/box-frame-edge.gif);" /></span>
[*]                            </div>
[*]                        </div>
[*]                        <tr>
[*]                            <td>
[*]                                <div class="InnerTableContainer" >
[*]                                    <table style="width:100%;" >
[*]                                        <TR>
[*]                                            <TD BGCOLOR=#D4C0A1>
[*]                                                <TABLE BORDER=0 CELLPADDING=1>
[*]                                                    <TR>
[*]                                                        <TD>Guild Name:</TD>
[*]                                                        <TD><INPUT NAME="name" VALUE="'.$_REQUEST['name'].'" SIZE=30 MAXLENGTH=29></TD>
[*]                                                    </TR>
[*]                                                    <TR>
[*]                                                        <TD>Leader:</TD>
[*]                                                        <TD>
[*]                                                            <SELECT NAME="leader">';
[*]                                                                if(count($array_of_player_nig) > 0) {
[*]                                                                    sort($array_of_player_nig);
[*]                                                                    foreach($array_of_player_nig as $nick)
[*]                                                                        $main_content .= '<OPTION>'.htmlspecialchars($nick).'</OPTION>';
[*]                                                                }
[*]                                                        $main_content .= '
[*]                                                            </SELECT>
[*]                                                        </TD>
[*]                                                    </TR>
[*]                                                    <TR>
[*]                                                        <TD>Password:</TD>
[*]                                                        <TD><INPUT TYPE=password NAME="password" SIZE=30 MAXLENGTH=29></TD>
[*]                                                    </TR>
[*]                                                </TABLE>
[*]                                            </TD>
[*]                                        </TR>
[*]                                    </table>
[*]                                </div>
[*]                            </td>
[*]                        </tr>
[*]                    </table>
[*]                </div><BR>
[*]                <TABLE BORDER=0 WIDTH=100%>
[*]                    <TR>
[*]                        <TD ALIGN=center><IMG SRC="'.$layout_name.'/images/global/general/blank.gif" WIDTH=120 HEIGHT=1 BORDER=0><BR></TD>
[*]                        <TD ALIGN=center>
[*]                            <table border="0" cellspacing="0" cellpadding="0" >
[*]                            <form action="?subtopic=guilds" method="post" >
[*]                                <tr>
[*]                                    <td style="border:0px;" >
[*]                                        <input type="hidden" name="todo" value="save" >
[*]                                        <input type="hidden" name="action" value="create" >
[*]                                        <div class="BigButton" style="background-image:url('.$layout_name.'/images/global/buttons/sbutton.gif)" >
[*]                                            <div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/global/buttons/sbutton_over.gif);" ></div>
[*]                                                <input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/global/buttons/_sbutton_submit.gif" >
[*]                                            </div>
[*]                                        </div>
[*]                                    </td>
[*]                                <tr>
[*]                            </form>
[*]                            </table>
[*]                        </TD>
[*]                        <TD ALIGN=center>
[*]                            <table border="0" cellspacing="0" cellpadding="0" >
[*]                                <form action="?subtopic=guilds" method="post" >
[*]                                    <tr>
[*]                                        <td style="border:0px;" >
[*]                                            <div class="BigButton" style="background-image:url('.$layout_name.'/images/global/buttons/sbutton.gif)" >
[*]                                                <div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/global/buttons/sbutton_over.gif);" ></div>
[*]                                                    <input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/global/buttons/_sbutton_back.gif" >
[*]                                                </div>
[*]                                            </div>
[*]                                        </td>
[*]                                    </tr>
[*]                                </form>
[*]                            </table>
[*]                        </TD>
[*]                        <TD ALIGN=center><IMG SRC="'.$layout_name.'/images/global/general/blank.gif" WIDTH=120 HEIGHT=1 BORDER=0><BR></TD>
[*]                    </TR>
[*]                </TABLE>';
[*]        }
[*]    }
[*]}
[/LIST]
BUMP!
 
Considering what's happening, the most likely reasons are:

1. Your local machine and the server run on different version of PHP (newer versions of PHP are more strict towards various parts of unsafe code)
2. You have a different level of reporting set on your local machine compared to the server, so you could try excluding notices, strict usages & deprecated usages from reporting by:
PHP:
error_reporting(E_ALL - E_NOTICE - E_STRICT - E_DEPRECATED);
 
Back
Top