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

Gesior Guild Logos Bug

villelagui

C++ Programmer
Joined
May 16, 2009
Messages
25
Reaction score
3
Location
Brasil
I'm having some problemas with gesior guild logos...

At the page Guilds the logos aren't shown and even if i try to update to a new one it wont change.

Won't give me any errors or anything like that...

Here's my Guilds - Warzera Server

PHP:
<?php
if(!defined('INITIALIZED'))
    exit;

if($action == 'login')
{
    if(check_guild_name($_REQUEST['guild']))
        $guild = $_REQUEST['guild'];
    if($_REQUEST['redirect'] == 'guild' || $_REQUEST['redirect'] == 'guilds')
        $redirect = $_REQUEST['redirect'];
    if(!$logged)
    {
        $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=guilds&action=login&guild='.urlencode($guild).'&redirect='.$redirect.'" 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>';
    }
    else
    {
        $main_content .= '<center><h3>Now you are logged. Redirecting...</h3></center>';
        if($redirect == 'guilds')
            header("Location: ?subtopic=guilds");
        elseif($redirect == 'guild')
            header("Location: ?subtopic=guilds&action=show&guild=".urlencode($guild));
        else
            $main_content .= 'Wrong address to redirect!';
    }
}
//-----------------------------------------------------------------------------//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------//-----------------------------------------------------------------------------
//show list of guilds
if($action == '')
{
    if(count($config['site']['worlds']) > 1)
    {
        foreach($config['site']['worlds'] as $idd => $world_n)
        {
            if($idd == (int) $_REQUEST['world'])
            {
                $world_id = $idd;
                $world_name = $world_n;
            }
        }
    }
    if(!isset($world_id))
    {
        $world_id = 0;
        $world_name = $config['server']['serverName'];
    }
    if(count($config['site']['worlds']) > 1)
    {
        $main_content .= '<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%><TR><TD></TD><TD>
        <FORM ACTION="" METHOD=get><INPUT TYPE="hidden" NAME="subtopic" VALUE="guilds"><TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4><TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" CLASS=white><B>World Selection</B></TD></TR><TR><TD BGCOLOR="'.$config['site']['darkborder'].'">
        <TABLE BORDER=0 CELLPADDING=1><TR><TD>Guilds on world:</TD><TD><SELECT SIZE="1" NAME="world">';
        foreach($config['site']['worlds'] as $id => $world_n)
        {
            if($id == $world_id)
                $main_content .= '<OPTION VALUE="'.$id.'" selected="selected">'.htmlspecialchars($world_n).'</OPTION>';
            else
                $main_content .= '<OPTION VALUE="'.$id.'">'.htmlspecialchars($world_n).'</OPTION>';
        }
        $main_content .= '</SELECT> </TD><TD><INPUT TYPE="image" NAME="Submit" ALT="Submit" SRC="'.$layout_name.'/images/buttons/sbutton_submit.gif">
            </TD></TR></TABLE></TABLE></FORM></TABLE>';
    }
   
    $guilds_list = new DatabaseList('Guild');
    $filterWorld = new SQL_Filter(new SQL_Field('world_id', 'guilds'), SQL_Filter::EQUAL, $world_id);
    $guilds_list->setFilter($filterWorld);
    $guilds_list->addOrder(new SQL_Order(new SQL_Field('name'), SQL_Order::ASC));
   
    $main_content .= '<h2><center>Guilds on '.htmlspecialchars($world_name).'</center></h2><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%>
    <TR BGCOLOR='.$config['site']['vdarkborder'].'><TD COLSPAN=3 CLASS=white><B>Guilds on '.htmlspecialchars($world_name).'</B></TD></TR>
    <TR BGCOLOR='.$config['site']['darkborder'].'><TD WIDTH=64><B>Logo</B></TD>
    <TD WIDTH=100%><B>Description</B></TD>
    <TD WIDTH=56><B>&#160;</B></TD></TR>';
    $showed_guilds = 1;
    if(count($guilds_list) > 0)
    {
        foreach($guilds_list as $guild)
        {
            if(is_int($showed_guilds / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $showed_guilds++;
            $description = $guild->getDescription();
            $newlines   = array("\r\n", "\n", "\r");
            $description_with_lines = str_replace($newlines, '<br />', $description, $count);
            if($count < $config['site']['guild_description_lines_limit'])
                $description = $description_with_lines;
            $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD><IMG SRC="'. $guild->getGuildLogoLink() .'" WIDTH=64 HEIGHT=64></TD>
            <TD valign="top"><B>'.htmlspecialchars($guild->getName()).'</B><BR/>'.$description.'';
            if($group_id_of_acc_logged >= $config['site']['access_admin_panel'])
                $main_content .= '<br /><a href="?subtopic=guilds&action=deletebyadmin&guild='.$guild->getId().'">Delete this guild (for ADMIN only!)</a>';
            $main_content .= '</TD><TD><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><FORM ACTION="?subtopic=guilds&action=show&guild='.$guild->getId().'" METHOD=post><TR><TD>
            <INPUT TYPE=image NAME="View" ALT="View" SRC="'.$layout_name.'/images/buttons/sbutton_view.gif" BORDER=0 WIDTH=120 HEIGHT=18>
            </TD></TR></FORM></TABLE>
            </TD></TR>';
        }
    }
    else
        $main_content .= '<TR BGCOLOR='.$config['site']['lightborder'].'><TD><IMG SRC="default_logo.gif" WIDTH=64 HEIGHT=64></TD>
        <TD valign="top"><B>Create guild</B><BR/>Currently there is no guild on server. Create first! Press button "Create Guild".</TD>
        <TD><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><FORM ACTION="?subtopic=guilds&action=createguild" METHOD=post><TR><TD>
        <INPUT TYPE=image NAME="Create Guild" ALT="Create Guild" SRC="'.$layout_name.'/images/buttons/sbutton_createguild.png" BORDER=0 WIDTH=120 HEIGHT=18>
        </TD></TR></FORM></TABLE></TD></TR>';
    $main_content .= '</TABLE><br><br>';
    if($logged)
        $main_content .= '<TABLE BORDER=0 WIDTH=100%><TR><TD ALIGN=center><IMG SRC="'.$layout_name.'/images/blank.gif" WIDTH=80 HEIGHT=1 BORDER=0<BR></TD><TD ALIGN=center><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><FORM ACTION="?subtopic=guilds&action=createguild" METHOD=post><TR><TD>
        <INPUT TYPE=image NAME="Create Guild" ALT="Create Guild" SRC="'.$layout_name.'/images/buttons/sbutton_createguild.png" BORDER=0 WIDTH=120 HEIGHT=18>
        </TD></TR></FORM></TABLE></TD><TD ALIGN=center><IMG SRC="'.$layout_name.'/images/blank.gif" WIDTH=80 HEIGHT=1 BORDER=0<BR></TD></TR></TABLE>
        <BR />If you have any problem with guilds try:
        <BR /><a href="?subtopic=guilds&action=cleanup_players">Cleanup players</a> - can\'t join guild/be invited? Can\'t create guild? Try cleanup players.';
    else
        $main_content .= 'Before you can create guild you must login.<br><TABLE BORDER=0 WIDTH=100%><TR><TD ALIGN=center><IMG SRC="'.$layout_name.'/images/blank.gif" WIDTH=80 HEIGHT=1 BORDER=0<BR></TD><TD ALIGN=center><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><FORM ACTION="?subtopic=guilds&action=login&redirect=guilds" METHOD=post><TR><TD>
        <INPUT TYPE=image NAME="Login" ALT="Login" SRC="'.$layout_name.'/images/buttons/sbutton_login.gif" BORDER=0 WIDTH=120 HEIGHT=18>
        </TD></TR></FORM></TABLE></TD><TD ALIGN=center><IMG SRC="'.$layout_name.'/images/blank.gif" WIDTH=80 HEIGHT=1 BORDER=0<BR></TD></TR></TABLE>';
}
//-----------------------------------------------------------------------------//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------//-----------------------------------------------------------------------------
//show guild page
if($action == 'show')
{
    $guild_id = (int) $_REQUEST['guild'];
    $guild = new Guild();
    $guild->load($guild_id);
    if(!$guild->isLoaded())
        $guild_errors[] = 'Guild with ID <b>'.$guild_id.'</b> doesn\'t exist.';
    if(!empty($guild_errors))
    {
        //show errors
        $main_content .= '<div class="SmallBox" >  <div class="MessageContainer" >    <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div>    <div class="BoxFrameEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>    <div class="BoxFrameEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>    <div class="ErrorMessage" >      <div class="BoxFrameVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div>      <div class="BoxFrameVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div>      <div class="AttentionSign" style="background-image:url('.$layout_name.'/images/content/attentionsign.gif);" /></div><b>The Following Errors Have Occurred:</b><br/>';
        foreach($guild_errors as $guild_error)
            $main_content .= '<li>'.$guild_error;
        //errors and back button
        $main_content .= '</div>    <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div>    <div class="BoxFrameEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>    <div class="BoxFrameEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>  </div></div><br/><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH=100%><FORM ACTION="?subtopic=guilds" METHOD=post><TR><TD><center><INPUT TYPE=image NAME="Back" ALT="Back" SRC="'.$layout_name.'/images/buttons/sbutton_back.gif" BORDER=0 WIDTH=120 HEIGHT=18></center></TD></TR></FORM></TABLE>';
    }
    else
    {
        //check is it vice or/and leader account (leader has vice + leader rights)
        $guild_leader_char = $guild->getOwner();
        $rank_list = $guild->getGuildRanksList();
        $guild_leader = FALSE;
        $guild_vice = FALSE;
        if($logged)
        {
            $account_players = $account_logged->getPlayers();
            foreach($account_players as $player)
            {
                $players_from_account_ids[] = $player->getId();
                $player_rank = $player->getRank();
                if(!empty($player_rank))
                    foreach($rank_list as $rank_in_guild)
                        if($rank_in_guild->getId() == $player_rank->getId())
                        {
                            $players_from_account_in_guild[] = $player->getName();
                            if($player_rank->getLevel() > 1)
                            {
                                $guild_vice = TRUE;
                                $level_in_guild = $player_rank->getLevel();
                            }
                            if($guild->getOwner()->getId() == $player->getId())
                            {
                                $guild_vice = TRUE;
                                $guild_leader = TRUE;
                            }
                        }
            }
        }
 
Back
Top