Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

BDOOR Problem Village NAME

Status
Not open for further replies.
Initiate Mage
Joined
Feb 25, 2012
Messages
18
Reaction score
2
Some Player Put Village Name <scritp> and His village is locked!!!!
Please help me to FIX IT BUG
Tnx
 
Skilled Illusionist
Joined
Feb 22, 2010
Messages
367
Reaction score
46
Some Player Put Village Name <scritp> and His village is locked!!!!
Please help me to FIX IT BUG
Tnx

I would suggest that you ip ban the user and delete his account.

To fix this you would need to put a check system that made the server check to see if it uses any strange character such as a < or >. That would take a lot of recoding though everywhere.

Good Luck.
--Brandon
 
Upvote 0
Joined
Sep 25, 2011
Messages
710
Reaction score
318
It's easy to fix this problem. And it's not much editing
Use this profile.php ( I already fixed this )

PHP:
<?php
require( ".".DIRECTORY_SEPARATOR."app".DIRECTORY_SEPARATOR."boot.php" );
require_once( MODEL_PATH."profile.php" );
class GPage extends SecureGamePage
{

    public $fullView;
    public $profileData;
    public $selectedTabIndex;
    public $villagesCount;
    public $villages;
    public $birthDate;
    public $agentForPlayers = array( );
    public $myAgentPlayers = array( );
    public $errorText;
    public $bbCodeReplacedArray = array( );
    public $isAdmin;
    public $protectiontime;

    public function GPage( )
    {
        parent::securegamepage( );  
        $this->viewFile = "profile.phtml";
        $this->contentCssClass = "player";
    }

    public function load( )
    {
        parent::load( );
        $this->isAdmin = $this->data['player_type'] == PLAYERTYPE_ADMIN;
        $uid = isset( $_GET['uid'] ) && 0 < intval( $_GET['uid'] ) ? intval( $_GET['uid'] ) : $this->player->playerId;
        if ( $this->isAdmin && isset( $_GET['spy'] ) && 0 < $uid && $uid != $this->player->playerId )
        {
            $gameStatus = $this->player->gameStatus;
            $previd = $this->player->playerId;
            $this->player = new Player( );
            $this->player->playerId = $uid;
            $this->player->prevPlayerId = $previd;
            $this->player->isAgent = FALSE;
            $this->player->isSpy = TRUE;
            $this->player->gameStatus = $gameStatus;
            $this->player->save( ); 
            $this->redirect( "village1.php" );
        }
        else
        {
            $this->selectedTabIndex = 0;  
            $this->fullView = FALSE;
            $m = new ProfileModel( );
            if ( $uid != $this->player->playerId )
            {
                $this->profileData = $m->getPlayerDataById( $uid );
                 $this->villagesCount = sizeof( explode( ",", $this->profileData['villages_id'] ) );
                    $this->villages = $m->getVillagesSummary( $this->profileData['villages_id'] );
                
                if ( $this->profileData == NULL )
                {
                    $m->dispose( );
                    $this->redirect( "village1.php" );
                }
            }
            else
            {   
                $this->profileData = $this->data;
                $this->protectiontime = $m->getPlayerDataById($uid );
                $this->profileData['id'] = $uid;
                $this->fullView = !$this->player->isAgent;
                $this->selectedTabIndex = !$this->player->isAgent && isset( $_GET['t'] ) && is_numeric( $_GET['t'] ) && 0 <= intval( $_GET['t'] ) && intval( $_GET['t'] ) <= 4 ? intval( $_GET['t'] ) : 0;
                if ( $this->selectedTabIndex == 4 && $this->data['player_type'] == PLAYERTYPE_TATAR )
                {
                    $this->selectedTabIndex = 0;
                }
                $agentForPlayers = trim( $this->profileData['agent_for_players'] ) == "" ? array( ) : explode( ",", $this->profileData['agent_for_players'] );
                foreach ( $agentForPlayers as $agent )
                {
                    $agentName = explode( " ", $agent );
                    $agentId = explode( " ", $agent );
                    list( $agentId, $agentName ) = $agentId;
                    $this->agentForPlayers[$agentId] = $agentName;
                }
                $myAgentPlayers = trim( $this->profileData['my_agent_players'] ) == "" ? array( ) : explode( ",", $this->profileData['my_agent_players'] );
                foreach ( $myAgentPlayers as $agent )
                {
                    $agentName = explode( " ", $agent );
                    $agentId = explode( " ", $agent );
                    list( $agentId, $agentName ) = $agentId;
                    $this->myAgentPlayers[$agentId] = $agentName;
                }
                $this->profileData['rank'] = $m->getPlayerRank( $uid, $this->profileData['total_people_count'] * 10 + $this->profileData['villages_count'] );
                
                if ( $this->isPost( ) )
                {
                    if ( $this->fullView && isset( $_POST['e'] ) )
                    {
                        switch ( $_POST['e'] )
                        {
                            case 1 :
                                if ( !empty( $_FILES['avatar']['name'] ) )
                                {
                                    $exe = explode( ".", $_FILES['avatar']['name'] );
                                    $EXT = end( $exe );
                                    $array = array( "GIF", "SWF", "BMP", "TIFF", "JPG", "PNG", "JEPG" );
                                    if ( in_array( strtoupper( $EXT ), $array ) )
                                    {
                                        $i = time( );
                                        $avatar = $i.".".$EXT;
                                        $test = move_uploaded_file( $_FILES['avatar']['tmp_name'], ROOT_PATH."avatar/".$avatar );
                                        if ( $test )
                                        {
                                            if ( $_POST['oldavatar'] != "http://www.dboor.com/tatar/assets/default/img/q/l6.jpg" )
                                            {
                                                @unlink( @$_POST['oldavatar'] );
                                            }
                                        }
                                        else
                                        {
                                            $avatar = $_POST['oldavatar'];
                                        }
                                    }
                                    else
                                    {
                                        $avatar = $_POST['oldavatar'];
                                    }
                                }
                                else
                                {
                                    $avatar = $_POST['oldavatar'];
                                }
								$villla = isset( $_POST['dname'] ) && strlen($_POST['dname']) < 25 ? $_POST['dname'] : "";
								if (strpos($villla,'<') !== FALSE) 
								{
								echo " <center><b>Don't try stupid things</b></center>"; exit;
								}
								{}
                                $avatar = empty( $avatar ) ? "/assets/default/img/q/l6.jpg" : "/avatar/".$avatar;
                            $_y_ = isset( $_POST['jahr'] ) && 1930 <= intval( $_POST['jahr'] ) && intval( $_POST['jahr'] ) <= 2005 ? intval( $_POST['jahr'] ) : "";
                                $_m_ = isset( $_POST['monat'] ) && 1 <= intval( $_POST['monat'] ) && intval( $_POST['monat'] ) <= 12 ? intval( $_POST['monat'] ) : "";
                                $_d_ = isset( $_POST['tag'] ) && 1 <= intval( $_POST['tag'] ) && intval( $_POST['tag'] ) <= 31 ? intval( $_POST['tag'] ) : "";
                                $newData = array(
                                "gender" => 0 <= intval( $_POST['mw'] ) && intval( $_POST['mw'] ) <= 2 ? intval( $_POST['mw'] ) : 0,
                                "house_name" => isset( $_POST['ort'] ) && strlen($_POST['ort']) < 25 ? $_POST['ort'] : "",
                                "village_name" => isset( $_POST['dname'] ) && strlen($_POST['dname']) < 25 ? $_POST['dname'] : "",
                                "avatar" => htmlspecialchars( $avatar ),
                                "description1" => isset( $_POST['be1'] ) ? htmlspecialchars( $_POST['be1'] ) : "",
                                "description2" => isset( $_POST['be2'] ) ? htmlspecialchars( $_POST['be2'] ) : "",
                                "birthData" => $_y_."-".$_m_."-".$_d_,
                                "villages" => $this->data['villages_data']);
								$villla = isset( $_POST['dname'] ) && strlen($_POST['dname']) < 25 ? $_POST['dname'] : "";
								
								
							$m->editPlayerProfile( $this->player->playerId, $newData );
                                $m->dispose( );
                                $this->redirect( "profile.php" );
                                return;
                            case 2 :
                                      if ( isset( $_POST['pw1'], $_POST['pw2'] ) && isset( $_POST['pw3'] ) && $_POST['pw2'] == $_POST['pw3'] && 4 <= strlen( $_POST['pw2'] ) && strtolower( $this->profileData['pwd'] ) == strtolower( md5( $_POST['pw1'] ) ) )
                            {
                                $m->changePlayerPassword( $this->player->playerId, md5( $_POST['pw2'] ) );
                            }
                            if ( isset( $_POST['email_alt'], $_POST['email_neu'] ) && strtolower( $this->profileData['email'] ) == strtolower( $_POST['email_alt'] ) && preg_match( "/^[^@]+@[a-zA-Z0-9._-]+\\.[a-zA-Z]+\$/", $_POST['email_neu'] ) )
                            {
                                $m->changePlayerEmail( $this->player->playerId, $_POST['email_neu'] );
                            }
                                break;
                            case 3 :
                                if ( isset( $_POST['v1'] ) && trim( $_POST['v1'] ) != "" && sizeof( $this->myAgentPlayers ) < 2 )
                                {
                                    $aid = $m->getPlayerIdByName( $_POST['v1'] );
                                    if ( 0 < intval( $aid ) && $aid != $this->player->playerId && !isset( $this->myAgentPlayers[$aid] ) )
                                    {
                                        $_agentsFor = $m->getPlayerAgentForById( intval( $aid ) );
                                        if ( 1 < sizeof( explode( ",", $_agentsFor ) ) )
                                        {
                                            $this->errorText = profile_setagent_err_msg;
                                        }
                                        else
                                        {
                                            $this->myAgentPlayers[$aid] = $_POST['v1'];
                                            $m->setMyAgents( $this->player->playerId, $this->data['name'], $this->myAgentPlayers, $aid );
                                        }
                                    }
                                }
                                break;
                            case 4 :
                                if ( isset( $_POST['del'] ) && $_POST['del'] == 1 && strtolower( $this->profileData['pwd'] ) == strtolower( md5( $_POST['del_pw'] ) ) && !$this->isPlayerInDeletionProgress( ) && !$this->isGameTransientStopped( ) && !$this->isGameOver( ) )
                                {
                                    $this->queueModel->addTask( new QueueTask( QS_ACCOUNT_DELETE, $this->player->playerId, 259200 ) );
                                }
                        
                    }
                }
                }
                else if ( $this->selectedTabIndex == 3 )
                {
                    if ( isset( $_GET['aid'] ) && 0 < intval( $_GET['aid'] ) )
                    {
                        $aid = intval( $_GET['aid'] );
                        if ( isset( $this->myAgentPlayers[$aid] ) )
                        {
                            unset( $this->myAgentPlayers[$aid] );  
                            $m->removeMyAgents( $this->player->playerId, $this->myAgentPlayers, $aid );
                        }
                    }
                    else
                    {
                        if ( isset( $_GET['afid'] ) && 0 < intval( $_GET['afid'] ) )
                        {
                            $aid = intval( $_GET['afid'] );
                            if ( isset( $this->agentForPlayers[$aid] ) )
                            {
                                unset( $this->agentForPlayers[$aid] );
                                $m->removeAgentsFor( $this->player->playerId, $this->agentForPlayers, $aid );
                            }
                        }
                    }
                }
                else if ( $this->selectedTabIndex == 4 && isset( $_GET['qid'] ) && 0 < intval( $_GET['qid'] ) )
                {
                    $this->queueModel->cancelTask( $this->player->playerId, intval( $_GET['qid'] ) );
                }
                if ( $this->selectedTabIndex == 0 )
                {
                    $this->villagesCount = sizeof( explode( ",", $this->profileData['villages_id'] ) );
                    $this->villages = $m->getVillagesSummary( $this->profileData['villages_id'] );
                }
                else if ( $this->selectedTabIndex == 1 )
                {
                    $birth_date = $this->profileData['birth_date'];
                    if ( !$birth_date )
                    {
                        $birth_date = "0-0-0";
                    }
                    $day = explode( "-", $birth_date );
                    $month = explode( "-", $birth_date );
                    $year = explode( "-", $birth_date );
                    list( $year, $month, $day ) = $year; 
                    $this->birthDate = array( "year" => $year, "month" => $month, "day" => $day );
                }
                
                
                $m->dispose( );
            }
        }
    }

    public function canCancelPlayerDeletionProcess( )
    {
        if ( !QueueTask::iscancelabletask( QS_ACCOUNT_DELETE ) )
        {
            return FALSE;
        }
        $timeout = QueueTask::getmaxcanceltimeout( QS_ACCOUNT_DELETE );
        if ( 0 - 1 < $timeout )
        {
            $elapsedTime = $this->queueModel->tasksInQueue[QS_ACCOUNT_DELETE][0]['elapsedTime'];
            if ( $timeout < $elapsedTime )
            {
                return FALSE;
            }
        }
        return TRUE;
    }

    public function preRender( )
    {
       parent::prerender( );
        if ( isset( $_GET['uid'] ) )
        {
            $this->villagesLinkPostfix .= "&uid=".intval( $_GET['uid'] );
        }
        if ( 0 < $this->selectedTabIndex )
        {
            $this->villagesLinkPostfix .= "&t=".$this->selectedTabIndex;
        }
    }

    public function getProfileDescription( $text )
    {
        $img = "<img class=\"%s\" src=\"assets/x.gif\" onmouseout=\"med_closeDescription()\" onmousemove=\"med_mouseMoveHandler(arguments[0],'<p>%s</p>')\">";
        $medals = explode( ",", $this->profileData['medals'] );
        foreach ( $medals as $medal )
        {
            if ( trim( $medal ) == "" )
            {
                continue;
            }
            $week = explode( ":", $medal );
            $rank = explode( ":", $medal );
            $index = explode( ":", $medal );
            list( $index, $rank, $week ) = $index; 
            if ( !isset( $this->gameMetadata['medals'][$index] ) )
            {
                continue;
            }
            $medalData = $this->gameMetadata['medals'][$index];
            $bbCode = "";
            if ( $index == 0 )
            {
                $bbCode = intval( $medalData['BBCode'] );
                $postfix = 0 < $this->profileData['protection_remain_sec'] ? "" : "d";
                $cssClass = $medalData['cssClass'].$postfix;
                $altText = htmlspecialchars( sprintf( constant( "medal_".$medalData['textIndex'].$postfix ), $postfix == "d" ? $this->profileData['registration_date'] : $this->profileData['protection_remain'] ) );
            }
            else
            {
                $bbCode = intval( $medalData['BBCode'] ) + intval( $week ) * 10 + ( intval( $rank ) - 1 );
                $cssClass = "medal ".$medalData['cssClass']."_".$rank;
                $altText = htmlspecialchars( sprintf( "<table><tr><th>".profile_medal_txt_cat.":</th><td>%s</td></tr><tr><th>".profile_medal_txt_week.":</th><td>%s</td></tr><tr><th>".profile_medal_txt_rank.":</th><td>%s</td></tr></table>", constant( "medal_".$medalData['textIndex'] ), $week, $rank ) );
            }
            if ( !isset( $this->bbCodeReplacedArray[$bbCode] ) )
            {
                $count = 0;
                $text = preg_replace( "/\\[#".$bbCode."\\]/", sprintf( $img, $cssClass, $altText ), $text, 1, $count );
                if ( 0 < $count )
                {
                    $this->bbCodeReplacedArray[$bbCode] = $count;
                }
            }
        }
        return nl2br( $text );
    }

}

$p = new GPage( );
$p->run( );
?>











How Ban something On Bdoor?
And for this

make one file .htaccess
PHP:
order deny, allow
deny from (The IP that you want to ban)
allow from all
 
Upvote 0
Initiate Mage
Joined
Feb 25, 2012
Messages
18
Reaction score
2
:D,Lot Of player Hack They Village is too slow in phpmyadmin Change village :(
 
Upvote 0
Initiate Mage
Joined
Dec 9, 2011
Messages
45
Reaction score
9
copy and paste :
PHP:
<?php
require_once(LANG_UI_PATH."profile.php");
echo '<h1>'.LANGUI_PROFILE_T1.'</h1><br />';

if($this->fullView){echo '
    <div id="textmenu">
        <a href="profile.php" '.(($this->selectedTabIndex == 0)? 'class="selected"':'').'>'.LANGUI_PROFILE_T2.'</a> | 
        <a href="profile.php?t=1" '.(($this->selectedTabIndex == 1) ? 'class="selected"':'').'>'.LANGUI_PROFILE_T3.'</a> | 
        <a href="profile.php?t=2" '.(($this->selectedTabIndex == 2) ? 'class="selected"':'').'>'.LANGUI_PROFILE_T4.'</a> | 
        <a href="profile.php?t=3" '.(($this->selectedTabIndex == 3) ? 'class="selected"':'').'>'.LANGUI_PROFILE_T5.'</a>';
        if($this->data['player_type'] != PLAYERTYPE_TATAR ){
            echo ' | <a href="profile.php?t=4"'.(($this->selectedTabIndex == 4) ? 'class="selected"':'').'>'.LANGUI_PROFILE_T6.'</a>';
        }echo '
    </div>';
}
echo '<br />';

if($this->selectedTabIndex == 0){echo '
    <script type="text/javascript">
        function getMouseCoords(e) {
            var coords = {};
            if (!e) var e = window.event;
            if (e.pageX || e.pageY) {
                coords.x = e.pageX;
                coords.y = e.pageY;
            }
            else if (e.clientX || e.clientY) {
                coords.x = e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft;
                coords.y = e.clientY + document.body.scrollTop + document.documentElement.scrollTop;
            }
            return coords;
        }
        function med_mouseMoveHandler(e, desc_string) {
            var coords = getMouseCoords(e);
            var layer = _("medal_mouseover");
            layer.style.top = (coords.y + 25) + "px";
            layer.style.left = (coords.x - 20) + "px";
            layer.className = "";
            layer.innerHTML  = desc_string;
        }
        function med_closeDescription(){
            var layer = _("medal_mouseover");
            layer.className = "hide";
        }
        layer = document.createElement("div");
        layer.id = "medal_mouseover";
        layer.className = "hide";
        document.body.appendChild(layer);
    </script>
    <table id="profile" cellpadding="1" cellspacing="1">
        <thead>
            <tr>
                <th colspan="2">'.LANGUI_PROFILE_T7.' '.$this->profileData['name'].' '.((isset($this->profileData['is_blocked']) && $this->profileData['is_blocked'] == 1)? '<font color="#990000">Suspended</font>':'').'</th>
            </tr>
            <tr>
                <td>'.LANGUI_PROFILE_T8.' :</td>
                <td>'.LANGUI_PROFILE_T9.' :</td>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td class="empty"></td>
                <td class="empty"></td>
            </tr>
            <tr>
                <td class="details">
                    <table cellpadding="0" cellspacing="0">
                        <tbody>
                            <tr>
                                <th>'.LANGUI_PROFILE_T10.' :</th>
                                <td>'.$this->profileData['rank'].'</td>
                            </tr>
                            <tr>
                                <th>'.LANGUI_PROFILE_T11.' :</th>
                                <td>'.constant("tribe_".$this->profileData['tribe_id']).'</td>
                            </tr>
                            <tr>
                                <th>'.LANGUI_PROFILE_T12.' :</th>
                                <td>'.((0 < intval($this->profileData['alliance_id'])) ? '<a href="alliance.php?id='.$this->profileData['alliance_id'].'">'.$this->profileData['alliance_name'].'</a>' : '-').'</td>
                            </tr>
                            <tr>
                                <th>'.LANGUI_PROFILE_T13.'</th>
                                <td>'.$this->villagesCount.'</td>
                            </tr>
                            <tr>
                                <th>'.LANGUI_PROFILE_T14.' :</th>
                                <td>'.$this->profileData['total_people_count'].'</td>
                            </tr>';
                            if(0 < $this->profileData['age']){echo '
                            <tr>
                                <th>'.LANGUI_PROFILE_T15.' :</th>
                                <td>'.$this->profileData['age'].'</td>
                            </tr>';
                            }
                            if(0 < $this->profileData['gender']){
                                echo "\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<th>";
        echo LANGUI_PROFILE_T16;
        echo ":</th>\r\n\t\t\t\t\t\t<td>";
        echo $this->profileData['gender'] == 1 ? LANGUI_PROFILE_T17 : LANGUI_PROFILE_T18;
        echo "</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t";
    }
    echo "\t\t\t\t\t";
    if ( $this->profileData['house_name'] != "" )
    {
        echo "\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<th>";
        echo LANGUI_PROFILE_T19;
        echo ":</th>\r\n\t\t\t\t\t\t<td>";
        echo $this->profileData['house_name'];
        echo "</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t";
    }
    echo "\t\t\t\t\t";
    if ( $this->profileData['tribe_id'] != 5 )
    {
        echo "\t\t\t\t\t<tr><td colspan=\"2\" class=\"empty\"></td></tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td colspan=\"2\"> ";
        if ( !$this->player->isAgent )
        {
            if ( $this->fullView )
            {
                echo "<a href=\"profile.php?t=1\">";
                echo LANGUI_PROFILE_T20;
                echo "</a>";
            }
            else
            {
                echo "<a href=\"msg.php?uid=";
                echo $this->profileData['id'];
                echo "\">";
                echo LANGUI_PROFILE_T21;
                echo "</a>";
            }
        }
        echo "</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t";
    }
    echo "\t\t\t\t\t";
    if ( $this->isAdmin && $this->player->playerId != $this->profileData['id'] )
    {
        echo "\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td colspan=\"2\"><a href=\"profile.php?spy&uid=";
        echo $this->profileData['id'];
        echo "\">";
        echo LANGUI_PROFILE_T22;
        echo "</a></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t";
    }
    echo "\t\t\t\t\t";
    echo "\t\t\t\t\t<tr><td colspan=\"2\" class=\"empty\"></td></tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td colspan=\"2\" class=\"desc2\"><div class=\"desc2div\">";
    echo $this->getProfileDescription( $this->profileData['description2'] );
    echo "</div></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t</tbody>\r\n\t\t\t\t</table>\r\n\t\t\t</td>\r\n\t\t\t<td class=\"desc1\"><div>";
    echo $this->getProfileDescription( $this->profileData['description1'] );
    echo "</div></td>\r\n\t\t</tr>\r\n\t</tbody>\r\n</table>\r\n\r\n<table cellpadding=\"1\" cellspacing=\"1\" id=\"villages\">\r\n\t<thead>\r\n\t<tr><th colspan=\"3\">";
    echo LANGUI_PROFILE_T13;
    echo "</th></tr>\r\n\t<tr>\r\n\t\t<td>";
    echo LANGUI_PROFILE_T23;
    echo "</td>\r\n\t\t<td>";
    echo LANGUI_PROFILE_T14;
    echo "</td>\r\n\t\t<td>";
    echo LANGUI_PROFILE_T24;
    echo "</td>\r\n\t</tr>\r\n\t</thead>\r\n\t<tbody>\r\n\t\t";
    while ( $this->villages->next( ) )
    {
        echo "\t\t<tr>\r\n\t\t\t<td class=\"nam\"><a href=\"village3.php?id=";
        echo $this->villages->row['id'];
        echo "\">";
        echo $this->villages->row['village_name'];
        echo "</a>";
        if ( $this->villages->row['is_capital'] )
        {
            echo " ";
            echo "<s";
            echo "pan class=\"none3\">(";
            echo LANGUI_PROFILE_T25;
            echo ")</span>";
        }
        echo "</td>\r\n\t\t\t<td class=\"hab\">";
        echo $this->villages->row['people_count'];
        echo "</td>\r\n\t\t\t<td class=\"aligned_coords\"><div class=\"cox\">(";
        echo $this->villages->row['rel_x'];
        echo "</div><div class=\"pi\">|</div><div class=\"coy\">";
        echo $this->villages->row['rel_y'];
        echo ")</div></td>\r\n\t\t</tr>\r\n\t\t";
    }
    echo "\t</tbody>\r\n</table>\r\n\r\n";
}
else if ( $this->selectedTabIndex == 1 )
{
    echo "<form action=\"profile.php\" enctype=\"multipart/form-data\" method=\"POST\">\r\n\t<input type=\"hidden\" name=\"e\" value=\"1\" />\r\n\t<input type=\"hidden\" name=\"oldavatar\" value=\"";
    echo htmlspecialchars( $this->profileData['avatar'] );
    echo "\" />\r\n\t<table cellpadding=\"1\" cellspacing=\"1\" id=\"edit\" class=\"vip\">\r\n\t\t<thead>\r\n\t\t\t<tr>\r\n\t\t\t\t<th colspan=\"3\">";
    echo LANGUI_PROFILE_T7;
    echo " ";
    echo $this->profileData['name'];
    echo "</th>\r\n\t\t\t</tr>\r\n\t\t\t<tr>\r\n\t\t\t\t<td colspan=\"2\">";
    echo LANGUI_PROFILE_T8;
    echo ":</td>\r\n\t\t\t\t<td>";
    echo LANGUI_PROFILE_T9;
    echo ":</td>\r\n\t\t\t</tr>\r\n\t\t</thead>\r\n\t\t<tbody>\r\n\t\t\t<tr>\r\n\t\t\t\t<td colspan=\"2\" class=\"empty\"></td><td class=\"empty\"></td>\r\n\t\t\t</tr>\r\n\t\t\t<tr>\r\n\t\t\t\t<th>";
    echo LANGUI_PROFILE_T26;
    echo ":</th>\r\n\t\t\t\t<td class=\"birth\">\r\n\t\t\t\t\t<input tabindex=\"3\" type=\"text\" name=\"jahr\" value=\"";
    if ( 0 < $this->birthDate['year'] )
    {
        echo $this->birthDate['year'];
    }
    echo "\" maxlength=\"4\" class=\"text year\">\r\n\t\t\t\t\t";
    echo "<s";
    echo "elect tabindex=\"2\" name=\"monat\" size=\"0\" class=\"dropdown\">\r\n\t\t\t\t\t\t<option value=\"0\"></option>\r\n\t\t\t\t\t\t<option value=\"1\"";
    if ( $this->birthDate['month'] == 1 )
    {
        echo " selected=\"selected\"";
    }
    echo ">";
    echo LANGUI_PROFILE_T27;
    echo "</option>\r\n\t\t\t\t\t\t<option value=\"2\"";
    if ( $this->birthDate['month'] == 2 )
    {
        echo " selected=\"selected\"";
    }
    echo ">";
    echo LANGUI_PROFILE_T28;
    echo "</option>\r\n\t\t\t\t\t\t<option value=\"3\"";
    if ( $this->birthDate['month'] == 3 )
    {
        echo " selected=\"selected\"";
    }
    echo ">";
    echo LANGUI_PROFILE_T29;
    echo "</option>\r\n\t\t\t\t\t\t<option value=\"4\"";
    if ( $this->birthDate['month'] == 4 )
    {
        echo " selected=\"selected\"";
    }
    echo ">";
    echo LANGUI_PROFILE_T30;
    echo "</option>\r\n\t\t\t\t\t\t<option value=\"5\"";
    if ( $this->birthDate['month'] == 5 )
    {
        echo " selected=\"selected\"";
    }
    echo ">";
    echo LANGUI_PROFILE_T31;
    echo "</option>\r\n\t\t\t\t\t\t<option value=\"6\"";
    if ( $this->birthDate['month'] == 6 )
    {
        echo " selected=\"selected\"";
    }
    echo ">";
    echo LANGUI_PROFILE_T32;
    echo "</option>\r\n\t\t\t\t\t\t<option value=\"7\"";
    if ( $this->birthDate['month'] == 7 )
    {
        echo " selected=\"selected\"";
    }
    echo ">";
    echo LANGUI_PROFILE_T33;
    echo "</option>\r\n\t\t\t\t\t\t<option value=\"8\"";
    if ( $this->birthDate['month'] == 8 )
    {
        echo " selected=\"selected\"";
    }
    echo ">";
    echo LANGUI_PROFILE_T34;
    echo "</option>\r\n\t\t\t\t\t\t<option value=\"9\"";
    if ( $this->birthDate['month'] == 9 )
    {
        echo " selected=\"selected\"";
    }
    echo ">";
    echo LANGUI_PROFILE_T35;
    echo "</option>\r\n\t\t\t\t\t\t<option value=\"10\"";
    if ( $this->birthDate['month'] == 10 )
    {
        echo " selected=\"selected\"";
    }
    echo ">";
    echo LANGUI_PROFILE_T36;
    echo "</option>\r\n\t\t\t\t\t\t<option value=\"11\"";
    if ( $this->birthDate['month'] == 11 )
    {
        echo " selected=\"selected\"";
    }
    echo ">";
    echo LANGUI_PROFILE_T37;
    echo "</option>\r\n\t\t\t\t\t\t<option value=\"12\"";
    if ( $this->birthDate['month'] == 12 )
    {
        echo " selected=\"selected\"";
    }
    echo ">";
    echo LANGUI_PROFILE_T38;
    echo "</option>\r\n\t\t\t\t\t</select>\r\n\t\t\t\t\t<input tabindex=\"1\" class=\"text day\" type=\"text\" name=\"tag\" value=\"";
    if ( 0 < $this->birthDate['day'] )
    {
        echo $this->birthDate['day'];
    }
    echo "\" maxlength=\"2\">\r\n\t\t\t\t</td>\r\n\t\t\t\t<td rowspan=\"8\" class=\"desc1\"><textarea tabindex=\"7\" name=\"be1\">";
    echo $this->profileData['description1'];
    echo "</textarea></td>\r\n\t\t\t</tr>\r\n\t\t\t<tr>\r\n\t\t\t\t<th>";
    echo LANGUI_PROFILE_T16;
    echo ":</th>\r\n\t\t\t\t<td class=\"gend\">\r\n\t\t\t\t\t<label><input class=\"radio\" type=\"radio\" name=\"mw\" value=\"0\"";
    if ( $this->profileData['gender'] == 0 )
    {
        echo "  checked=\"\" tabindex=\"4\"";
    }
    echo ">";
    echo LANGUI_PROFILE_T39;
    echo "</label>\r\n\t\t\t\t\t<label><input class=\"radio\" type=\"radio\" name=\"mw\" value=\"1\"";
    if ( $this->profileData['gender'] == 1 )
    {
        echo "  checked=\"\" tabindex=\"4\"";
    }
    echo ">";
    echo LANGUI_PROFILE_T40;
    echo "</label>\r\n\t\t\t\t\t<label><input class=\"radio\" type=\"radio\" name=\"mw\" value=\"2\"";
    if ( $this->profileData['gender'] == 2 )
    {
        echo "  checked=\"\" tabindex=\"4\"";
    }
    echo ">";
    echo LANGUI_PROFILE_T41;
    echo "</label>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr>\r\n\t\t\t\t<th>";
    echo LANGUI_PROFILE_T19;
    echo ":</th>\r\n\t\t\t\t<td><input tabindex=\"5\" type=\"text\" name=\"ort\" value=\"";
    echo htmlspecialchars( $this->profileData['house_name'] );
    echo "\" maxlength=\"30\" class=\"text\" /></td>\r\n\t\t\t</tr>\r\n\t\t\t<tr><td colspan=\"2\" class=\"empty\"></td></tr>\r\n\t\t\t<tr>\r\n\t\t\t\t<th>";
    echo LANGUI_PROFILE_T42;
    echo ":</th>\r\n\t\t\t\t<td><input tabindex=\"6\" type=\"text\" name=\"dname\" value=\"";
    echo htmlspecialchars( $this->profileData['village_name'] );
    echo "\" maxlength=\"20\" class=\"text\" /></td>\r\n\t\t\t</tr>\r\n            <tr>\r\n\t\t\t  <th>";
    echo LANGUI_PROFILE_T71;
    echo ":</th>\r\n\t\t\t  <td><input tabindex=\"10\" type=\"file\" name=\"avatar\" class=\"text\" /></td>\r\n\t      </tr>\r\n\t\t\t<tr><td colspan=\"2\" class=\"empty\"></td></tr>\r\n\t\t\t<tr><td colspan=\"2\" class=\"desc2\"><textarea tabindex=\"8\" name=\"be2\">";
    echo $this->profileData['description2'];
    echo "</textarea></td></tr>\r\n\t\t</tbody>\r\n\t</table>\r\n\r\n\t<table cellpadding=\"1\" cellspacing=\"1\" id=\"medals\">\r\n\t\t<thead>\r\n\t\t\t<tr><th colspan=\"4\">";
    echo LANGUI_PROFILE_T43;
    echo "</th></tr>\r\n\t\t\t<tr>\r\n\t\t\t\t<td>";
    echo LANGUI_PROFILE_T44;
    echo "</td>\r\n\t\t\t\t<td>";
    echo LANGUI_PROFILE_T45;
    echo "</td>\r\n\t\t\t\t<td>";
    echo LANGUI_PROFILE_T46;
    echo "</td>\r\n\t\t\t\t<td>";
    echo LANGUI_PROFILE_T47;
    echo "</td>\r\n\t\t\t</tr>\r\n\t\t</thead>\r\n\t\t<tbody>\r\n\t\t\t";
    $medals = explode( ",", $this->profileData['medals'] );
    foreach ( $medals as $medal )
    {
        $week = explode( ":", $medal );
        $rank = explode( ":", $medal );
        $index = explode( ":", $medal );
        list( $index, $rank, $week ) = $index;        
        if ( !isset( $this->gameMetadata['medals'][$index] ) )
        {
            continue;
        }
        $medalData = $this->gameMetadata['medals'][$index];
        if ( $index == 0 )
        {
            $rank = 1;
        }
        echo "\t\t\t<tr>\r\n\t\t\t   <td class=\"typ\">";
        echo constant( "medal_row_".$medalData['textIndex'] );
        echo "</td>\r\n\t\t\t   <td class=\"ra\">";
        echo $rank;
        echo "</td>\r\n\t\t\t   <td class=\"we\">";
        echo $week;
        echo "</td>\r\n\t\t\t   <td class=\"bb\">[#";
        echo intval( $medalData['BBCode'] ) + intval( $week ) * 10 + ( intval( $rank ) - 1 );
        echo "]</td>\r\n\t\t\t</tr>\r\n\t\t\t";
    }
    echo "\t\t</tbody>\r\n\t</table>\r\n\t<p class=\"btn\"><input type=\"image\" value=\"\" tabindex=\"9\" name=\"s1\" id=\"btn_ok\" class=\"dynamic_img\" src=\"assets/x.gif\" alt=\"";
    echo text_okdone_lang;
    echo "\"></p>\r\n</form>\r\n";
}
else if ( $this->selectedTabIndex == 2 )
{
    echo "<form action=\"profile.php?t=2\" method=\"POST\">\r\n<input type=\"hidden\" name=\"e\" value=\"2\">\r\n\r\n<table cellpadding=\"1\" cellspacing=\"1\" id=\"change_mail\" class=\"account\">\r\n\t<thead>\r\n\t\t<tr><th colspan=\"2\">";
    echo LANGUI_PROFILE_T48;
    echo "</th></tr>\r\n\t</thead>\r\n\t<tbody>\r\n\t\t<tr><td class=\"note\" colspan=\"2\">";
    echo LANGUI_PROFILE_T49;
    echo "</td></tr>\r\n\t\t<tr>\r\n\t\t\t<th>";
    echo LANGUI_PROFILE_T50;
    echo ":</th>\r\n\t\t\t<td><input class=\"text\" type=\"password\" name=\"pw1\" maxlength=\"20\"></td>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t\t<th>";
    echo LANGUI_PROFILE_T51;
    echo ":</th>\r\n\t\t\t<td><input class=\"text\" type=\"password\" name=\"pw2\" maxlength=\"20\"></td>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t\t<th>";
    echo LANGUI_PROFILE_T51;
    echo ":</th>\r\n\t\t\t<td><input class=\"text\" type=\"password\" name=\"pw3\" maxlength=\"20\"></td>\r\n\t\t</tr>\r\n\t</tbody>\r\n</table>\r\n\r\n<table cellpadding=\"1\" cellspacing=\"1\" id=\"change_mail\" class=\"account\">\r\n\t<thead>\r\n\t\t<tr><th colspan=\"2\">";
    echo LANGUI_PROFILE_T52;
    echo "</th></tr>\r\n\t</thead>\r\n\t<tbody>\r\n\t\t<tr><td class=\"note\" colspan=\"2\">";
    echo LANGUI_PROFILE_T53;
    echo "</td></tr>\r\n\t\t<tr>\r\n\t\t\t<th>";
    echo LANGUI_PROFILE_T54;
    echo ":</th>\r\n\t\t\t<td><input class=\"text\" type=\"text\" name=\"email_alt\" maxlength=\"50\"></td>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t\t<th>";
    echo LANGUI_PROFILE_T55;
    echo ":</th>\r\n\t\t\t<td><input class=\"text\" type=\"text\" name=\"email_neu\" maxlength=\"50\"></td>\r\n\t\t</tr>\r\n\t</tbody>\r\n</table>\r\n<p class=\"btn\"><input type=\"image\" value=\"\" name=\"s1\" id=\"btn_save\" class=\"dynamic_img\" src=\"assets/x.gif\" alt=\"";
    echo text_save_lang;
    echo "\"></p>\r\n</form>\r\n";
}
else if ( $this->selectedTabIndex == 3 )
{
    if ( $this->errorText != "" )
    {
        echo "<p class=\"f10 e\">";
        echo $this->errorText;
        echo "</p>";
    }
    echo "<form action=\"profile.php?t=3\" method=\"POST\">\r\n<input type=\"hidden\" name=\"e\" value=\"3\">\r\n\r\n<table cellpadding=\"1\" cellspacing=\"1\" id=\"sitter\" class=\"account\">\r\n\t<thead>\r\n\t\t<tr><th colspan=\"2\">";
    echo LANGUI_PROFILE_T56;
    echo "</th></tr>\r\n\t</thead>\r\n\t<tbody>\r\n\t\t<tr><td class=\"note\" colspan=\"2\">";
    echo LANGUI_PROFILE_T57;
    echo "</td></tr>\r\n\t\t<tr>\r\n\t\t\t<th>";
    echo LANGUI_PROFILE_T58;
    echo ":</th>\r\n\t\t\t<td><input class=\"text\" type=\"text\" name=\"v1\" maxlength=\"15\"";
    if ( 2 <= sizeof( $this->myAgentPlayers ) )
    {
        echo " disabled=\"\"";
    }
    echo ">";
    echo "<s";
    echo "pan class=\"";
    echo 2 <= sizeof( $this->myAgentPlayers ) ? "max" : "count";
    echo "\">(";
    echo sizeof( $this->myAgentPlayers );
    echo "/2)</span></td>\r\n\t\t</tr>\r\n\t\t<tr><td colspan=\"2\" class=\"sitter\">\r\n\t\t";
    if ( sizeof( $this->myAgentPlayers ) == 0 )
    {
        echo "\t\t\t";
        echo "<s";
        echo "pan class=\"none\">";
        echo LANGUI_PROFILE_T59;
        echo "</span>\r\n\t\t";
    }
    else
    {
        foreach ( $this->myAgentPlayers as $aid => $aname )
        {
            echo "\t\t<div><a href=\"profile.php?t=3&aid=";
            echo $aid;
            echo "\"><img class=\"del\" src=\"assets/x.gif\" title=\"";
            echo LANGUI_PROFILE_T60;
            echo "\" alt=\"";
            echo LANGUI_PROFILE_T60;
            echo "\"></a> <a href=\"profile.php?uid=";
            echo $aid;
            echo "\">";
            echo $aname;
            echo "</a></div>\r\n\t\t";
        }
    }
    echo "\t\t</td></tr>\r\n\t\t\r\n\t\t<tr><td class=\"note\" colspan=\"2\">";
    echo LANGUI_PROFILE_T61;
    echo "</td></tr>\r\n\t\t<tr><td colspan=\"2\" class=\"sitter\">\r\n\t\t";
    if ( sizeof( $this->agentForPlayers ) == 0 )
    {
        echo "\t\t\t";
        echo "<s";
        echo "pan class=\"none\">";
        echo LANGUI_PROFILE_T62;
        echo "</span>\r\n\t\t";
    }
    else
    {
        foreach ( $this->agentForPlayers as $aid => $aname )
        {
            echo "\t\t<div><a href=\"profile.php?t=3&afid=";
            echo $aid;
            echo "\"><img class=\"del\" src=\"assets/x.gif\" title=\"";
            echo LANGUI_PROFILE_T63;
            echo "\" alt=\"";
            echo LANGUI_PROFILE_T63;
            echo "\"></a> <a href=\"profile.php?uid=";
            echo $aid;
            echo "\">";
            echo $aname;
            echo "</a></div>\r\n\t\t";
        }
    }
    echo "\t\t</td></tr>\r\n\t</tbody>\r\n</table>\r\n";
    if ( sizeof( $this->myAgentPlayers ) < 2 )
    {
        echo "<p class=\"btn\"><input type=\"image\" value=\"\" name=\"s1\" id=\"btn_save\" class=\"dynamic_img\" src=\"assets/x.gif\" alt=\"";
        echo text_save_lang;
        echo "\"></p>";
    }
    echo "</form>\r\n";
}
else if ( $this->selectedTabIndex == 4 )
{
    echo "<form action=\"profile.php?t=4\" method=\"POST\">\r\n<input type=\"hidden\" name=\"e\" value=\"4\">\r\n\r\n<table cellpadding=\"1\" cellspacing=\"1\" id=\"del_acc\" class=\"account\">\r\n\t<thead>\r\n\t\t<tr><th colspan=\"2\">";
    echo LANGUI_PROFILE_T6;
    echo "</th></tr>\r\n\t</thead>\r\n\t<tbody>\r\n\t\t<tr><td class=\"note\" colspan=\"2\">";
    echo LANGUI_PROFILE_T64;
    echo "</td></tr>\r\n\t\t";
    if ( $this->isPlayerInDeletionProgress( ) )
    {
        echo "\t\t<tr>\r\n\t\t\t<td colspan=\"2\" class=\"count\">\r\n\t\t\t\t";
        if ( $this->canCancelPlayerDeletionProcess( ) )
        {
            echo "<a href=\"profile.php?t=4&qid=";
            echo $this->getPlayerDeletionId( );
            echo "\"><img class=\"del\" src=\"assets/x.gif\" alt=\"";
            echo LANGUI_PROFILE_T65;
            echo "\" title=\"";
            echo LANGUI_PROFILE_T65;
            echo "\"> ";
        }
        echo "</a>";
        echo LANGUI_PROFILE_T66;
        echo " ";
        echo "<s";
        echo "pan id=\"timer1\">";
        echo $this->getPlayerDeletionTime( );
        echo "</span> ";
        echo time_hour_lang;
        echo "\t\t\t</td>\r\n\t\t</tr>\r\n\t\t";
    }
    else
    {
        echo "\t\t<tr>\r\n\t\t\t<th>";
        echo LANGUI_PROFILE_T6;
        echo "</th>\r\n\t\t\t<td class=\"del_selection\">\r\n\t\t\t\t<label><input class=\"radio\" type=\"radio\" name=\"del\" value=\"1\"> ";
        echo LANGUI_PROFILE_T67;
        echo "</label>\r\n\t\t\t\t<label><input class=\"radio\" type=\"radio\" name=\"del\" value=\"0\" checked=\"\"> ";
        echo LANGUI_PROFILE_T68;
        echo "</label>\r\n\t\t\t</td>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t\t<th>";
        echo LANGUI_PROFILE_T69;
        echo ":</th>\r\n\t\t\t<td><input class=\"text\" type=\"password\" name=\"del_pw\" maxlength=\"20\"></td>\r\n\t\t</tr>\r\n\t\t";
    }
    echo "\t</tbody>\r\n</table>\r\n";
    if ( !$this->isPlayerInDeletionProgress( ) )
    {
        echo "<p class=\"btn\"><input type=\"image\" value=\"\" name=\"s1\" id=\"btn_save\" class=\"dynamic_img\" src=\"assets/x.gif\" alt=\"";
        echo text_save_lang;
        echo "\"></p>";
    }
    echo "</form>\r\n";
} 
?>
 
Upvote 0
Initiate Mage
Joined
Aug 30, 2012
Messages
25
Reaction score
0
It's easy to fix this problem. And it's not much editing
Use this profile.php ( I already fixed this )

PHP:
<?php
require( ".".DIRECTORY_SEPARATOR."app".DIRECTORY_SEPARATOR."boot.php" );
require_once( MODEL_PATH."profile.php" );
class GPage extends SecureGamePage
{

    public $fullView;
    public $profileData;
    public $selectedTabIndex;
    public $villagesCount;
    public $villages;
    public $birthDate;
    public $agentForPlayers = array( );
    public $myAgentPlayers = array( );
    public $errorText;
    public $bbCodeReplacedArray = array( );
    public $isAdmin;
    public $protectiontime;

    public function GPage( )
    {
        parent::securegamepage( );  
        $this->viewFile = "profile.phtml";
        $this->contentCssClass = "player";
    }

    public function load( )
    {
        parent::load( );
        $this->isAdmin = $this->data['player_type'] == PLAYERTYPE_ADMIN;
        $uid = isset( $_GET['uid'] ) && 0 < intval( $_GET['uid'] ) ? intval( $_GET['uid'] ) : $this->player->playerId;
        if ( $this->isAdmin && isset( $_GET['spy'] ) && 0 < $uid && $uid != $this->player->playerId )
        {
            $gameStatus = $this->player->gameStatus;
            $previd = $this->player->playerId;
            $this->player = new Player( );
            $this->player->playerId = $uid;
            $this->player->prevPlayerId = $previd;
            $this->player->isAgent = FALSE;
            $this->player->isSpy = TRUE;
            $this->player->gameStatus = $gameStatus;
            $this->player->save( ); 
            $this->redirect( "village1.php" );
        }
        else
        {
            $this->selectedTabIndex = 0;  
            $this->fullView = FALSE;
            $m = new ProfileModel( );
            if ( $uid != $this->player->playerId )
            {
                $this->profileData = $m->getPlayerDataById( $uid );
                 $this->villagesCount = sizeof( explode( ",", $this->profileData['villages_id'] ) );
                    $this->villages = $m->getVillagesSummary( $this->profileData['villages_id'] );
                
                if ( $this->profileData == NULL )
                {
                    $m->dispose( );
                    $this->redirect( "village1.php" );
                }
            }
            else
            {   
                $this->profileData = $this->data;
                $this->protectiontime = $m->getPlayerDataById($uid );
                $this->profileData['id'] = $uid;
                $this->fullView = !$this->player->isAgent;
                $this->selectedTabIndex = !$this->player->isAgent && isset( $_GET['t'] ) && is_numeric( $_GET['t'] ) && 0 <= intval( $_GET['t'] ) && intval( $_GET['t'] ) <= 4 ? intval( $_GET['t'] ) : 0;
                if ( $this->selectedTabIndex == 4 && $this->data['player_type'] == PLAYERTYPE_TATAR )
                {
                    $this->selectedTabIndex = 0;
                }
                $agentForPlayers = trim( $this->profileData['agent_for_players'] ) == "" ? array( ) : explode( ",", $this->profileData['agent_for_players'] );
                foreach ( $agentForPlayers as $agent )
                {
                    $agentName = explode( " ", $agent );
                    $agentId = explode( " ", $agent );
                    list( $agentId, $agentName ) = $agentId;
                    $this->agentForPlayers[$agentId] = $agentName;
                }
                $myAgentPlayers = trim( $this->profileData['my_agent_players'] ) == "" ? array( ) : explode( ",", $this->profileData['my_agent_players'] );
                foreach ( $myAgentPlayers as $agent )
                {
                    $agentName = explode( " ", $agent );
                    $agentId = explode( " ", $agent );
                    list( $agentId, $agentName ) = $agentId;
                    $this->myAgentPlayers[$agentId] = $agentName;
                }
                $this->profileData['rank'] = $m->getPlayerRank( $uid, $this->profileData['total_people_count'] * 10 + $this->profileData['villages_count'] );
                
                if ( $this->isPost( ) )
                {
                    if ( $this->fullView && isset( $_POST['e'] ) )
                    {
                        switch ( $_POST['e'] )
                        {
                            case 1 :
                                if ( !empty( $_FILES['avatar']['name'] ) )
                                {
                                    $exe = explode( ".", $_FILES['avatar']['name'] );
                                    $EXT = end( $exe );
                                    $array = array( "GIF", "SWF", "BMP", "TIFF", "JPG", "PNG", "JEPG" );
                                    if ( in_array( strtoupper( $EXT ), $array ) )
                                    {
                                        $i = time( );
                                        $avatar = $i.".".$EXT;
                                        $test = move_uploaded_file( $_FILES['avatar']['tmp_name'], ROOT_PATH."avatar/".$avatar );
                                        if ( $test )
                                        {
                                            if ( $_POST['oldavatar'] != "http://www.dboor.com/tatar/assets/default/img/q/l6.jpg" )
                                            {
                                                @unlink( @$_POST['oldavatar'] );
                                            }
                                        }
                                        else
                                        {
                                            $avatar = $_POST['oldavatar'];
                                        }
                                    }
                                    else
                                    {
                                        $avatar = $_POST['oldavatar'];
                                    }
                                }
                                else
                                {
                                    $avatar = $_POST['oldavatar'];
                                }
								$villla = isset( $_POST['dname'] ) && strlen($_POST['dname']) < 25 ? $_POST['dname'] : "";
								if (strpos($villla,'<') !== FALSE) 
								{
								echo " <center><b>Don't try stupid things</b></center>"; exit;
								}
								{}
                                $avatar = empty( $avatar ) ? "/assets/default/img/q/l6.jpg" : "/avatar/".$avatar;
                            $_y_ = isset( $_POST['jahr'] ) && 1930 <= intval( $_POST['jahr'] ) && intval( $_POST['jahr'] ) <= 2005 ? intval( $_POST['jahr'] ) : "";
                                $_m_ = isset( $_POST['monat'] ) && 1 <= intval( $_POST['monat'] ) && intval( $_POST['monat'] ) <= 12 ? intval( $_POST['monat'] ) : "";
                                $_d_ = isset( $_POST['tag'] ) && 1 <= intval( $_POST['tag'] ) && intval( $_POST['tag'] ) <= 31 ? intval( $_POST['tag'] ) : "";
                                $newData = array(
                                "gender" => 0 <= intval( $_POST['mw'] ) && intval( $_POST['mw'] ) <= 2 ? intval( $_POST['mw'] ) : 0,
                                "house_name" => isset( $_POST['ort'] ) && strlen($_POST['ort']) < 25 ? $_POST['ort'] : "",
                                "village_name" => isset( $_POST['dname'] ) && strlen($_POST['dname']) < 25 ? $_POST['dname'] : "",
                                "avatar" => htmlspecialchars( $avatar ),
                                "description1" => isset( $_POST['be1'] ) ? htmlspecialchars( $_POST['be1'] ) : "",
                                "description2" => isset( $_POST['be2'] ) ? htmlspecialchars( $_POST['be2'] ) : "",
                                "birthData" => $_y_."-".$_m_."-".$_d_,
                                "villages" => $this->data['villages_data']);
								$villla = isset( $_POST['dname'] ) && strlen($_POST['dname']) < 25 ? $_POST['dname'] : "";
								
								
							$m->editPlayerProfile( $this->player->playerId, $newData );
                                $m->dispose( );
                                $this->redirect( "profile.php" );
                                return;
                            case 2 :
                                      if ( isset( $_POST['pw1'], $_POST['pw2'] ) && isset( $_POST['pw3'] ) && $_POST['pw2'] == $_POST['pw3'] && 4 <= strlen( $_POST['pw2'] ) && strtolower( $this->profileData['pwd'] ) == strtolower( md5( $_POST['pw1'] ) ) )
                            {
                                $m->changePlayerPassword( $this->player->playerId, md5( $_POST['pw2'] ) );
                            }
                            if ( isset( $_POST['email_alt'], $_POST['email_neu'] ) && strtolower( $this->profileData['email'] ) == strtolower( $_POST['email_alt'] ) && preg_match( "/^[^@]+@[a-zA-Z0-9._-]+\\.[a-zA-Z]+\$/", $_POST['email_neu'] ) )
                            {
                                $m->changePlayerEmail( $this->player->playerId, $_POST['email_neu'] );
                            }
                                break;
                            case 3 :
                                if ( isset( $_POST['v1'] ) && trim( $_POST['v1'] ) != "" && sizeof( $this->myAgentPlayers ) < 2 )
                                {
                                    $aid = $m->getPlayerIdByName( $_POST['v1'] );
                                    if ( 0 < intval( $aid ) && $aid != $this->player->playerId && !isset( $this->myAgentPlayers[$aid] ) )
                                    {
                                        $_agentsFor = $m->getPlayerAgentForById( intval( $aid ) );
                                        if ( 1 < sizeof( explode( ",", $_agentsFor ) ) )
                                        {
                                            $this->errorText = profile_setagent_err_msg;
                                        }
                                        else
                                        {
                                            $this->myAgentPlayers[$aid] = $_POST['v1'];
                                            $m->setMyAgents( $this->player->playerId, $this->data['name'], $this->myAgentPlayers, $aid );
                                        }
                                    }
                                }
                                break;
                            case 4 :
                                if ( isset( $_POST['del'] ) && $_POST['del'] == 1 && strtolower( $this->profileData['pwd'] ) == strtolower( md5( $_POST['del_pw'] ) ) && !$this->isPlayerInDeletionProgress( ) && !$this->isGameTransientStopped( ) && !$this->isGameOver( ) )
                                {
                                    $this->queueModel->addTask( new QueueTask( QS_ACCOUNT_DELETE, $this->player->playerId, 259200 ) );
                                }
                        
                    }
                }
                }
                else if ( $this->selectedTabIndex == 3 )
                {
                    if ( isset( $_GET['aid'] ) && 0 < intval( $_GET['aid'] ) )
                    {
                        $aid = intval( $_GET['aid'] );
                        if ( isset( $this->myAgentPlayers[$aid] ) )
                        {
                            unset( $this->myAgentPlayers[$aid] );  
                            $m->removeMyAgents( $this->player->playerId, $this->myAgentPlayers, $aid );
                        }
                    }
                    else
                    {
                        if ( isset( $_GET['afid'] ) && 0 < intval( $_GET['afid'] ) )
                        {
                            $aid = intval( $_GET['afid'] );
                            if ( isset( $this->agentForPlayers[$aid] ) )
                            {
                                unset( $this->agentForPlayers[$aid] );
                                $m->removeAgentsFor( $this->player->playerId, $this->agentForPlayers, $aid );
                            }
                        }
                    }
                }
                else if ( $this->selectedTabIndex == 4 && isset( $_GET['qid'] ) && 0 < intval( $_GET['qid'] ) )
                {
                    $this->queueModel->cancelTask( $this->player->playerId, intval( $_GET['qid'] ) );
                }
                if ( $this->selectedTabIndex == 0 )
                {
                    $this->villagesCount = sizeof( explode( ",", $this->profileData['villages_id'] ) );
                    $this->villages = $m->getVillagesSummary( $this->profileData['villages_id'] );
                }
                else if ( $this->selectedTabIndex == 1 )
                {
                    $birth_date = $this->profileData['birth_date'];
                    if ( !$birth_date )
                    {
                        $birth_date = "0-0-0";
                    }
                    $day = explode( "-", $birth_date );
                    $month = explode( "-", $birth_date );
                    $year = explode( "-", $birth_date );
                    list( $year, $month, $day ) = $year; 
                    $this->birthDate = array( "year" => $year, "month" => $month, "day" => $day );
                }
                
                
                $m->dispose( );
            }
        }
    }

    public function canCancelPlayerDeletionProcess( )
    {
        if ( !QueueTask::iscancelabletask( QS_ACCOUNT_DELETE ) )
        {
            return FALSE;
        }
        $timeout = QueueTask::getmaxcanceltimeout( QS_ACCOUNT_DELETE );
        if ( 0 - 1 < $timeout )
        {
            $elapsedTime = $this->queueModel->tasksInQueue[QS_ACCOUNT_DELETE][0]['elapsedTime'];
            if ( $timeout < $elapsedTime )
            {
                return FALSE;
            }
        }
        return TRUE;
    }

    public function preRender( )
    {
       parent::prerender( );
        if ( isset( $_GET['uid'] ) )
        {
            $this->villagesLinkPostfix .= "&uid=".intval( $_GET['uid'] );
        }
        if ( 0 < $this->selectedTabIndex )
        {
            $this->villagesLinkPostfix .= "&t=".$this->selectedTabIndex;
        }
    }

    public function getProfileDescription( $text )
    {
        $img = "<img class=\"%s\" src=\"assets/x.gif\" onmouseout=\"med_closeDescription()\" onmousemove=\"med_mouseMoveHandler(arguments[0],'<p>%s</p>')\">";
        $medals = explode( ",", $this->profileData['medals'] );
        foreach ( $medals as $medal )
        {
            if ( trim( $medal ) == "" )
            {
                continue;
            }
            $week = explode( ":", $medal );
            $rank = explode( ":", $medal );
            $index = explode( ":", $medal );
            list( $index, $rank, $week ) = $index; 
            if ( !isset( $this->gameMetadata['medals'][$index] ) )
            {
                continue;
            }
            $medalData = $this->gameMetadata['medals'][$index];
            $bbCode = "";
            if ( $index == 0 )
            {
                $bbCode = intval( $medalData['BBCode'] );
                $postfix = 0 < $this->profileData['protection_remain_sec'] ? "" : "d";
                $cssClass = $medalData['cssClass'].$postfix;
                $altText = htmlspecialchars( sprintf( constant( "medal_".$medalData['textIndex'].$postfix ), $postfix == "d" ? $this->profileData['registration_date'] : $this->profileData['protection_remain'] ) );
            }
            else
            {
                $bbCode = intval( $medalData['BBCode'] ) + intval( $week ) * 10 + ( intval( $rank ) - 1 );
                $cssClass = "medal ".$medalData['cssClass']."_".$rank;
                $altText = htmlspecialchars( sprintf( "<table><tr><th>".profile_medal_txt_cat.":</th><td>%s</td></tr><tr><th>".profile_medal_txt_week.":</th><td>%s</td></tr><tr><th>".profile_medal_txt_rank.":</th><td>%s</td></tr></table>", constant( "medal_".$medalData['textIndex'] ), $week, $rank ) );
            }
            if ( !isset( $this->bbCodeReplacedArray[$bbCode] ) )
            {
                $count = 0;
                $text = preg_replace( "/\\[#".$bbCode."\\]/", sprintf( $img, $cssClass, $altText ), $text, 1, $count );
                if ( 0 < $count )
                {
                    $this->bbCodeReplacedArray[$bbCode] = $count;
                }
            }
        }
        return nl2br( $text );
    }

}

$p = new GPage( );
$p->run( );
?>












And for this

make one file .htaccess
PHP:
order deny, allow
deny from (The IP that you want to ban)
allow from all

copy and paste :
PHP:
<?php
require_once(LANG_UI_PATH."profile.php");
echo '<h1>'.LANGUI_PROFILE_T1.'</h1><br />';

if($this->fullView){echo '
    <div id="textmenu">
        <a href="profile.php" '.(($this->selectedTabIndex == 0)? 'class="selected"':'').'>'.LANGUI_PROFILE_T2.'</a> | 
        <a rel="nofollow" href="profile.php?t=1" '.(($this->selectedTabIndex == 1) ? 'class="selected"':'').'>'.LANGUI_PROFILE_T3.'</a> | 
        <a rel="nofollow" href="profile.php?t=2" '.(($this->selectedTabIndex == 2) ? 'class="selected"':'').'>'.LANGUI_PROFILE_T4.'</a> | 
        <a rel="nofollow" href="profile.php?t=3" '.(($this->selectedTabIndex == 3) ? 'class="selected"':'').'>'.LANGUI_PROFILE_T5.'</a>';
        if($this->data['player_type'] != PLAYERTYPE_TATAR ){
            echo ' | <a rel="nofollow" href="profile.php?t=4"'.(($this->selectedTabIndex == 4) ? 'class="selected"':'').'>'.LANGUI_PROFILE_T6.'</a>';
        }echo '
    </div>';
}
echo '<br />';

if($this->selectedTabIndex == 0){echo '
    <script type="text/javascript">
        function getMouseCoords(e) {
            var coords = {};
            if (!e) var e = window.event;
            if (e.pageX || e.pageY) {
                coords.x = e.pageX;
                coords.y = e.pageY;
            }
            else if (e.clientX || e.clientY) {
                coords.x = e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft;
                coords.y = e.clientY + document.body.scrollTop + document.documentElement.scrollTop;
            }
            return coords;
        }
        function med_mouseMoveHandler(e, desc_string) {
            var coords = getMouseCoords(e);
            var layer = _("medal_mouseover");
            layer.style.top = (coords.y + 25) + "px";
            layer.style.left = (coords.x - 20) + "px";
            layer.className = "";
            layer.innerHTML  = desc_string;
        }
        function med_closeDescription(){
            var layer = _("medal_mouseover");
            layer.className = "hide";
        }
        layer = document.createElement("div");
        layer.id = "medal_mouseover";
        layer.className = "hide";
        document.body.appendChild(layer);
    </script>
    <table id="profile" cellpadding="1" cellspacing="1">
        <thead>
            <tr>
                <th colspan="2">'.LANGUI_PROFILE_T7.' '.$this->profileData['name'].' '.((isset($this->profileData['is_blocked']) && $this->profileData['is_blocked'] == 1)? '<font color="#990000">Suspended</font>':'').'</th>
            </tr>
            <tr>
                <td>'.LANGUI_PROFILE_T8.' :</td>
                <td>'.LANGUI_PROFILE_T9.' :</td>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td class="empty"></td>
                <td class="empty"></td>
            </tr>
            <tr>
                <td class="details">
                    <table cellpadding="0" cellspacing="0">
                        <tbody>
                            <tr>
                                <th>'.LANGUI_PROFILE_T10.' :</th>
                                <td>'.$this->profileData['rank'].'</td>
                            </tr>
                            <tr>
                                <th>'.LANGUI_PROFILE_T11.' :</th>
                                <td>'.constant("tribe_".$this->profileData['tribe_id']).'</td>
                            </tr>
                            <tr>
                                <th>'.LANGUI_PROFILE_T12.' :</th>
                                <td>'.((0 < intval($this->profileData['alliance_id'])) ? '<a rel="nofollow" href="alliance.php?id='.$this->profileData['alliance_id'].'">'.$this->profileData['alliance_name'].'</a>' : '-').'</td>
                            </tr>
                            <tr>
                                <th>'.LANGUI_PROFILE_T13.'</th>
                                <td>'.$this->villagesCount.'</td>
                            </tr>
                            <tr>
                                <th>'.LANGUI_PROFILE_T14.' :</th>
                                <td>'.$this->profileData['total_people_count'].'</td>
                            </tr>';
                            if(0 < $this->profileData['age']){echo '
                            <tr>
                                <th>'.LANGUI_PROFILE_T15.' :</th>
                                <td>'.$this->profileData['age'].'</td>
                            </tr>';
                            }
                            if(0 < $this->profileData['gender']){
                                echo "\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<th>";
        echo LANGUI_PROFILE_T16;
        echo ":</th>\r\n\t\t\t\t\t\t<td>";
        echo $this->profileData['gender'] == 1 ? LANGUI_PROFILE_T17 : LANGUI_PROFILE_T18;
        echo "</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t";
    }
    echo "\t\t\t\t\t";
    if ( $this->profileData['house_name'] != "" )
    {
        echo "\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<th>";
        echo LANGUI_PROFILE_T19;
        echo ":</th>\r\n\t\t\t\t\t\t<td>";
        echo $this->profileData['house_name'];
        echo "</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t";
    }
    echo "\t\t\t\t\t";
    if ( $this->profileData['tribe_id'] != 5 )
    {
        echo "\t\t\t\t\t<tr><td colspan=\"2\" class=\"empty\"></td></tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td colspan=\"2\"> ";
        if ( !$this->player->isAgent )
        {
            if ( $this->fullView )
            {
                echo "<a href=\"profile.php?t=1\">";
                echo LANGUI_PROFILE_T20;
                echo "</a>";
            }
            else
            {
                echo "<a href=\"msg.php?uid=";
                echo $this->profileData['id'];
                echo "\">";
                echo LANGUI_PROFILE_T21;
                echo "</a>";
            }
        }
        echo "</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t";
    }
    echo "\t\t\t\t\t";
    if ( $this->isAdmin && $this->player->playerId != $this->profileData['id'] )
    {
        echo "\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td colspan=\"2\"><a href=\"profile.php?spy&uid=";
        echo $this->profileData['id'];
        echo "\">";
        echo LANGUI_PROFILE_T22;
        echo "</a></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t";
    }
    echo "\t\t\t\t\t";
    echo "\t\t\t\t\t<tr><td colspan=\"2\" class=\"empty\"></td></tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td colspan=\"2\" class=\"desc2\"><div class=\"desc2div\">";
    echo $this->getProfileDescription( $this->profileData['description2'] );
    echo "</div></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t</tbody>\r\n\t\t\t\t</table>\r\n\t\t\t</td>\r\n\t\t\t<td class=\"desc1\"><div>";
    echo $this->getProfileDescription( $this->profileData['description1'] );
    echo "</div></td>\r\n\t\t</tr>\r\n\t</tbody>\r\n</table>\r\n\r\n<table cellpadding=\"1\" cellspacing=\"1\" id=\"villages\">\r\n\t<thead>\r\n\t<tr><th colspan=\"3\">";
    echo LANGUI_PROFILE_T13;
    echo "</th></tr>\r\n\t<tr>\r\n\t\t<td>";
    echo LANGUI_PROFILE_T23;
    echo "</td>\r\n\t\t<td>";
    echo LANGUI_PROFILE_T14;
    echo "</td>\r\n\t\t<td>";
    echo LANGUI_PROFILE_T24;
    echo "</td>\r\n\t</tr>\r\n\t</thead>\r\n\t<tbody>\r\n\t\t";
    while ( $this->villages->next( ) )
    {
        echo "\t\t<tr>\r\n\t\t\t<td class=\"nam\"><a href=\"village3.php?id=";
        echo $this->villages->row['id'];
        echo "\">";
        echo $this->villages->row['village_name'];
        echo "</a>";
        if ( $this->villages->row['is_capital'] )
        {
            echo " ";
            echo "<s";
            echo "pan class=\"none3\">(";
            echo LANGUI_PROFILE_T25;
            echo ")</span>";
        }
        echo "</td>\r\n\t\t\t<td class=\"hab\">";
        echo $this->villages->row['people_count'];
        echo "</td>\r\n\t\t\t<td class=\"aligned_coords\"><div class=\"cox\">(";
        echo $this->villages->row['rel_x'];
        echo "</div><div class=\"pi\">|</div><div class=\"coy\">";
        echo $this->villages->row['rel_y'];
        echo ")</div></td>\r\n\t\t</tr>\r\n\t\t";
    }
    echo "\t</tbody>\r\n</table>\r\n\r\n";
}
else if ( $this->selectedTabIndex == 1 )
{
    echo "<form action=\"profile.php\" enctype=\"multipart/form-data\" method=\"POST\">\r\n\t<input type=\"hidden\" name=\"e\" value=\"1\" />\r\n\t<input type=\"hidden\" name=\"oldavatar\" value=\"";
    echo htmlspecialchars( $this->profileData['avatar'] );
    echo "\" />\r\n\t<table cellpadding=\"1\" cellspacing=\"1\" id=\"edit\" class=\"vip\">\r\n\t\t<thead>\r\n\t\t\t<tr>\r\n\t\t\t\t<th colspan=\"3\">";
    echo LANGUI_PROFILE_T7;
    echo " ";
    echo $this->profileData['name'];
    echo "</th>\r\n\t\t\t</tr>\r\n\t\t\t<tr>\r\n\t\t\t\t<td colspan=\"2\">";
    echo LANGUI_PROFILE_T8;
    echo ":</td>\r\n\t\t\t\t<td>";
    echo LANGUI_PROFILE_T9;
    echo ":</td>\r\n\t\t\t</tr>\r\n\t\t</thead>\r\n\t\t<tbody>\r\n\t\t\t<tr>\r\n\t\t\t\t<td colspan=\"2\" class=\"empty\"></td><td class=\"empty\"></td>\r\n\t\t\t</tr>\r\n\t\t\t<tr>\r\n\t\t\t\t<th>";
    echo LANGUI_PROFILE_T26;
    echo ":</th>\r\n\t\t\t\t<td class=\"birth\">\r\n\t\t\t\t\t<input tabindex=\"3\" type=\"text\" name=\"jahr\" value=\"";
    if ( 0 < $this->birthDate['year'] )
    {
        echo $this->birthDate['year'];
    }
    echo "\" maxlength=\"4\" class=\"text year\">\r\n\t\t\t\t\t";
    echo "<s";
    echo "elect tabindex=\"2\" name=\"monat\" size=\"0\" class=\"dropdown\">\r\n\t\t\t\t\t\t<option value=\"0\"></option>\r\n\t\t\t\t\t\t<option value=\"1\"";
    if ( $this->birthDate['month'] == 1 )
    {
        echo " selected=\"selected\"";
    }
    echo ">";
    echo LANGUI_PROFILE_T27;
    echo "</option>\r\n\t\t\t\t\t\t<option value=\"2\"";
    if ( $this->birthDate['month'] == 2 )
    {
        echo " selected=\"selected\"";
    }
    echo ">";
    echo LANGUI_PROFILE_T28;
    echo "</option>\r\n\t\t\t\t\t\t<option value=\"3\"";
    if ( $this->birthDate['month'] == 3 )
    {
        echo " selected=\"selected\"";
    }
    echo ">";
    echo LANGUI_PROFILE_T29;
    echo "</option>\r\n\t\t\t\t\t\t<option value=\"4\"";
    if ( $this->birthDate['month'] == 4 )
    {
        echo " selected=\"selected\"";
    }
    echo ">";
    echo LANGUI_PROFILE_T30;
    echo "</option>\r\n\t\t\t\t\t\t<option value=\"5\"";
    if ( $this->birthDate['month'] == 5 )
    {
        echo " selected=\"selected\"";
    }
    echo ">";
    echo LANGUI_PROFILE_T31;
    echo "</option>\r\n\t\t\t\t\t\t<option value=\"6\"";
    if ( $this->birthDate['month'] == 6 )
    {
        echo " selected=\"selected\"";
    }
    echo ">";
    echo LANGUI_PROFILE_T32;
    echo "</option>\r\n\t\t\t\t\t\t<option value=\"7\"";
    if ( $this->birthDate['month'] == 7 )
    {
        echo " selected=\"selected\"";
    }
    echo ">";
    echo LANGUI_PROFILE_T33;
    echo "</option>\r\n\t\t\t\t\t\t<option value=\"8\"";
    if ( $this->birthDate['month'] == 8 )
    {
        echo " selected=\"selected\"";
    }
    echo ">";
    echo LANGUI_PROFILE_T34;
    echo "</option>\r\n\t\t\t\t\t\t<option value=\"9\"";
    if ( $this->birthDate['month'] == 9 )
    {
        echo " selected=\"selected\"";
    }
    echo ">";
    echo LANGUI_PROFILE_T35;
    echo "</option>\r\n\t\t\t\t\t\t<option value=\"10\"";
    if ( $this->birthDate['month'] == 10 )
    {
        echo " selected=\"selected\"";
    }
    echo ">";
    echo LANGUI_PROFILE_T36;
    echo "</option>\r\n\t\t\t\t\t\t<option value=\"11\"";
    if ( $this->birthDate['month'] == 11 )
    {
        echo " selected=\"selected\"";
    }
    echo ">";
    echo LANGUI_PROFILE_T37;
    echo "</option>\r\n\t\t\t\t\t\t<option value=\"12\"";
    if ( $this->birthDate['month'] == 12 )
    {
        echo " selected=\"selected\"";
    }
    echo ">";
    echo LANGUI_PROFILE_T38;
    echo "</option>\r\n\t\t\t\t\t</select>\r\n\t\t\t\t\t<input tabindex=\"1\" class=\"text day\" type=\"text\" name=\"tag\" value=\"";
    if ( 0 < $this->birthDate['day'] )
    {
        echo $this->birthDate['day'];
    }
    echo "\" maxlength=\"2\">\r\n\t\t\t\t</td>\r\n\t\t\t\t<td rowspan=\"8\" class=\"desc1\"><textarea tabindex=\"7\" name=\"be1\">";
    echo $this->profileData['description1'];
    echo "</textarea></td>\r\n\t\t\t</tr>\r\n\t\t\t<tr>\r\n\t\t\t\t<th>";
    echo LANGUI_PROFILE_T16;
    echo ":</th>\r\n\t\t\t\t<td class=\"gend\">\r\n\t\t\t\t\t<label><input class=\"radio\" type=\"radio\" name=\"mw\" value=\"0\"";
    if ( $this->profileData['gender'] == 0 )
    {
        echo "  checked=\"\" tabindex=\"4\"";
    }
    echo ">";
    echo LANGUI_PROFILE_T39;
    echo "</label>\r\n\t\t\t\t\t<label><input class=\"radio\" type=\"radio\" name=\"mw\" value=\"1\"";
    if ( $this->profileData['gender'] == 1 )
    {
        echo "  checked=\"\" tabindex=\"4\"";
    }
    echo ">";
    echo LANGUI_PROFILE_T40;
    echo "</label>\r\n\t\t\t\t\t<label><input class=\"radio\" type=\"radio\" name=\"mw\" value=\"2\"";
    if ( $this->profileData['gender'] == 2 )
    {
        echo "  checked=\"\" tabindex=\"4\"";
    }
    echo ">";
    echo LANGUI_PROFILE_T41;
    echo "</label>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr>\r\n\t\t\t\t<th>";
    echo LANGUI_PROFILE_T19;
    echo ":</th>\r\n\t\t\t\t<td><input tabindex=\"5\" type=\"text\" name=\"ort\" value=\"";
    echo htmlspecialchars( $this->profileData['house_name'] );
    echo "\" maxlength=\"30\" class=\"text\" /></td>\r\n\t\t\t</tr>\r\n\t\t\t<tr><td colspan=\"2\" class=\"empty\"></td></tr>\r\n\t\t\t<tr>\r\n\t\t\t\t<th>";
    echo LANGUI_PROFILE_T42;
    echo ":</th>\r\n\t\t\t\t<td><input tabindex=\"6\" type=\"text\" name=\"dname\" value=\"";
    echo htmlspecialchars( $this->profileData['village_name'] );
    echo "\" maxlength=\"20\" class=\"text\" /></td>\r\n\t\t\t</tr>\r\n            <tr>\r\n\t\t\t  <th>";
    echo LANGUI_PROFILE_T71;
    echo ":</th>\r\n\t\t\t  <td><input tabindex=\"10\" type=\"file\" name=\"avatar\" class=\"text\" /></td>\r\n\t      </tr>\r\n\t\t\t<tr><td colspan=\"2\" class=\"empty\"></td></tr>\r\n\t\t\t<tr><td colspan=\"2\" class=\"desc2\"><textarea tabindex=\"8\" name=\"be2\">";
    echo $this->profileData['description2'];
    echo "</textarea></td></tr>\r\n\t\t</tbody>\r\n\t</table>\r\n\r\n\t<table cellpadding=\"1\" cellspacing=\"1\" id=\"medals\">\r\n\t\t<thead>\r\n\t\t\t<tr><th colspan=\"4\">";
    echo LANGUI_PROFILE_T43;
    echo "</th></tr>\r\n\t\t\t<tr>\r\n\t\t\t\t<td>";
    echo LANGUI_PROFILE_T44;
    echo "</td>\r\n\t\t\t\t<td>";
    echo LANGUI_PROFILE_T45;
    echo "</td>\r\n\t\t\t\t<td>";
    echo LANGUI_PROFILE_T46;
    echo "</td>\r\n\t\t\t\t<td>";
    echo LANGUI_PROFILE_T47;
    echo "</td>\r\n\t\t\t</tr>\r\n\t\t</thead>\r\n\t\t<tbody>\r\n\t\t\t";
    $medals = explode( ",", $this->profileData['medals'] );
    foreach ( $medals as $medal )
    {
        $week = explode( ":", $medal );
        $rank = explode( ":", $medal );
        $index = explode( ":", $medal );
        list( $index, $rank, $week ) = $index;        
        if ( !isset( $this->gameMetadata['medals'][$index] ) )
        {
            continue;
        }
        $medalData = $this->gameMetadata['medals'][$index];
        if ( $index == 0 )
        {
            $rank = 1;
        }
        echo "\t\t\t<tr>\r\n\t\t\t   <td class=\"typ\">";
        echo constant( "medal_row_".$medalData['textIndex'] );
        echo "</td>\r\n\t\t\t   <td class=\"ra\">";
        echo $rank;
        echo "</td>\r\n\t\t\t   <td class=\"we\">";
        echo $week;
        echo "</td>\r\n\t\t\t   <td class=\"bb\">[#";
        echo intval( $medalData['BBCode'] ) + intval( $week ) * 10 + ( intval( $rank ) - 1 );
        echo "]</td>\r\n\t\t\t</tr>\r\n\t\t\t";
    }
    echo "\t\t</tbody>\r\n\t</table>\r\n\t<p class=\"btn\"><input type=\"image\" value=\"\" tabindex=\"9\" name=\"s1\" id=\"btn_ok\" class=\"dynamic_img\" src=\"assets/x.gif\" alt=\"";
    echo text_okdone_lang;
    echo "\"></p>\r\n</form>\r\n";
}
else if ( $this->selectedTabIndex == 2 )
{
    echo "<form action=\"profile.php?t=2\" method=\"POST\">\r\n<input type=\"hidden\" name=\"e\" value=\"2\">\r\n\r\n<table cellpadding=\"1\" cellspacing=\"1\" id=\"change_mail\" class=\"account\">\r\n\t<thead>\r\n\t\t<tr><th colspan=\"2\">";
    echo LANGUI_PROFILE_T48;
    echo "</th></tr>\r\n\t</thead>\r\n\t<tbody>\r\n\t\t<tr><td class=\"note\" colspan=\"2\">";
    echo LANGUI_PROFILE_T49;
    echo "</td></tr>\r\n\t\t<tr>\r\n\t\t\t<th>";
    echo LANGUI_PROFILE_T50;
    echo ":</th>\r\n\t\t\t<td><input class=\"text\" type=\"password\" name=\"pw1\" maxlength=\"20\"></td>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t\t<th>";
    echo LANGUI_PROFILE_T51;
    echo ":</th>\r\n\t\t\t<td><input class=\"text\" type=\"password\" name=\"pw2\" maxlength=\"20\"></td>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t\t<th>";
    echo LANGUI_PROFILE_T51;
    echo ":</th>\r\n\t\t\t<td><input class=\"text\" type=\"password\" name=\"pw3\" maxlength=\"20\"></td>\r\n\t\t</tr>\r\n\t</tbody>\r\n</table>\r\n\r\n<table cellpadding=\"1\" cellspacing=\"1\" id=\"change_mail\" class=\"account\">\r\n\t<thead>\r\n\t\t<tr><th colspan=\"2\">";
    echo LANGUI_PROFILE_T52;
    echo "</th></tr>\r\n\t</thead>\r\n\t<tbody>\r\n\t\t<tr><td class=\"note\" colspan=\"2\">";
    echo LANGUI_PROFILE_T53;
    echo "</td></tr>\r\n\t\t<tr>\r\n\t\t\t<th>";
    echo LANGUI_PROFILE_T54;
    echo ":</th>\r\n\t\t\t<td><input class=\"text\" type=\"text\" name=\"email_alt\" maxlength=\"50\"></td>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t\t<th>";
    echo LANGUI_PROFILE_T55;
    echo ":</th>\r\n\t\t\t<td><input class=\"text\" type=\"text\" name=\"email_neu\" maxlength=\"50\"></td>\r\n\t\t</tr>\r\n\t</tbody>\r\n</table>\r\n<p class=\"btn\"><input type=\"image\" value=\"\" name=\"s1\" id=\"btn_save\" class=\"dynamic_img\" src=\"assets/x.gif\" alt=\"";
    echo text_save_lang;
    echo "\"></p>\r\n</form>\r\n";
}
else if ( $this->selectedTabIndex == 3 )
{
    if ( $this->errorText != "" )
    {
        echo "<p class=\"f10 e\">";
        echo $this->errorText;
        echo "</p>";
    }
    echo "<form action=\"profile.php?t=3\" method=\"POST\">\r\n<input type=\"hidden\" name=\"e\" value=\"3\">\r\n\r\n<table cellpadding=\"1\" cellspacing=\"1\" id=\"sitter\" class=\"account\">\r\n\t<thead>\r\n\t\t<tr><th colspan=\"2\">";
    echo LANGUI_PROFILE_T56;
    echo "</th></tr>\r\n\t</thead>\r\n\t<tbody>\r\n\t\t<tr><td class=\"note\" colspan=\"2\">";
    echo LANGUI_PROFILE_T57;
    echo "</td></tr>\r\n\t\t<tr>\r\n\t\t\t<th>";
    echo LANGUI_PROFILE_T58;
    echo ":</th>\r\n\t\t\t<td><input class=\"text\" type=\"text\" name=\"v1\" maxlength=\"15\"";
    if ( 2 <= sizeof( $this->myAgentPlayers ) )
    {
        echo " disabled=\"\"";
    }
    echo ">";
    echo "<s";
    echo "pan class=\"";
    echo 2 <= sizeof( $this->myAgentPlayers ) ? "max" : "count";
    echo "\">(";
    echo sizeof( $this->myAgentPlayers );
    echo "/2)</span></td>\r\n\t\t</tr>\r\n\t\t<tr><td colspan=\"2\" class=\"sitter\">\r\n\t\t";
    if ( sizeof( $this->myAgentPlayers ) == 0 )
    {
        echo "\t\t\t";
        echo "<s";
        echo "pan class=\"none\">";
        echo LANGUI_PROFILE_T59;
        echo "</span>\r\n\t\t";
    }
    else
    {
        foreach ( $this->myAgentPlayers as $aid => $aname )
        {
            echo "\t\t<div><a href=\"profile.php?t=3&aid=";
            echo $aid;
            echo "\"><img class=\"del\" src=\"assets/x.gif\" title=\"";
            echo LANGUI_PROFILE_T60;
            echo "\" alt=\"";
            echo LANGUI_PROFILE_T60;
            echo "\"></a> <a href=\"profile.php?uid=";
            echo $aid;
            echo "\">";
            echo $aname;
            echo "</a></div>\r\n\t\t";
        }
    }
    echo "\t\t</td></tr>\r\n\t\t\r\n\t\t<tr><td class=\"note\" colspan=\"2\">";
    echo LANGUI_PROFILE_T61;
    echo "</td></tr>\r\n\t\t<tr><td colspan=\"2\" class=\"sitter\">\r\n\t\t";
    if ( sizeof( $this->agentForPlayers ) == 0 )
    {
        echo "\t\t\t";
        echo "<s";
        echo "pan class=\"none\">";
        echo LANGUI_PROFILE_T62;
        echo "</span>\r\n\t\t";
    }
    else
    {
        foreach ( $this->agentForPlayers as $aid => $aname )
        {
            echo "\t\t<div><a href=\"profile.php?t=3&afid=";
            echo $aid;
            echo "\"><img class=\"del\" src=\"assets/x.gif\" title=\"";
            echo LANGUI_PROFILE_T63;
            echo "\" alt=\"";
            echo LANGUI_PROFILE_T63;
            echo "\"></a> <a href=\"profile.php?uid=";
            echo $aid;
            echo "\">";
            echo $aname;
            echo "</a></div>\r\n\t\t";
        }
    }
    echo "\t\t</td></tr>\r\n\t</tbody>\r\n</table>\r\n";
    if ( sizeof( $this->myAgentPlayers ) < 2 )
    {
        echo "<p class=\"btn\"><input type=\"image\" value=\"\" name=\"s1\" id=\"btn_save\" class=\"dynamic_img\" src=\"assets/x.gif\" alt=\"";
        echo text_save_lang;
        echo "\"></p>";
    }
    echo "</form>\r\n";
}
else if ( $this->selectedTabIndex == 4 )
{
    echo "<form action=\"profile.php?t=4\" method=\"POST\">\r\n<input type=\"hidden\" name=\"e\" value=\"4\">\r\n\r\n<table cellpadding=\"1\" cellspacing=\"1\" id=\"del_acc\" class=\"account\">\r\n\t<thead>\r\n\t\t<tr><th colspan=\"2\">";
    echo LANGUI_PROFILE_T6;
    echo "</th></tr>\r\n\t</thead>\r\n\t<tbody>\r\n\t\t<tr><td class=\"note\" colspan=\"2\">";
    echo LANGUI_PROFILE_T64;
    echo "</td></tr>\r\n\t\t";
    if ( $this->isPlayerInDeletionProgress( ) )
    {
        echo "\t\t<tr>\r\n\t\t\t<td colspan=\"2\" class=\"count\">\r\n\t\t\t\t";
        if ( $this->canCancelPlayerDeletionProcess( ) )
        {
            echo "<a href=\"profile.php?t=4&qid=";
            echo $this->getPlayerDeletionId( );
            echo "\"><img class=\"del\" src=\"assets/x.gif\" alt=\"";
            echo LANGUI_PROFILE_T65;
            echo "\" title=\"";
            echo LANGUI_PROFILE_T65;
            echo "\"> ";
        }
        echo "</a>";
        echo LANGUI_PROFILE_T66;
        echo " ";
        echo "<s";
        echo "pan id=\"timer1\">";
        echo $this->getPlayerDeletionTime( );
        echo "</span> ";
        echo time_hour_lang;
        echo "\t\t\t</td>\r\n\t\t</tr>\r\n\t\t";
    }
    else
    {
        echo "\t\t<tr>\r\n\t\t\t<th>";
        echo LANGUI_PROFILE_T6;
        echo "</th>\r\n\t\t\t<td class=\"del_selection\">\r\n\t\t\t\t<label><input class=\"radio\" type=\"radio\" name=\"del\" value=\"1\"> ";
        echo LANGUI_PROFILE_T67;
        echo "</label>\r\n\t\t\t\t<label><input class=\"radio\" type=\"radio\" name=\"del\" value=\"0\" checked=\"\"> ";
        echo LANGUI_PROFILE_T68;
        echo "</label>\r\n\t\t\t</td>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t\t<th>";
        echo LANGUI_PROFILE_T69;
        echo ":</th>\r\n\t\t\t<td><input class=\"text\" type=\"password\" name=\"del_pw\" maxlength=\"20\"></td>\r\n\t\t</tr>\r\n\t\t";
    }
    echo "\t</tbody>\r\n</table>\r\n";
    if ( !$this->isPlayerInDeletionProgress( ) )
    {
        echo "<p class=\"btn\"><input type=\"image\" value=\"\" name=\"s1\" id=\"btn_save\" class=\"dynamic_img\" src=\"assets/x.gif\" alt=\"";
        echo text_save_lang;
        echo "\"></p>";
    }
    echo "</form>\r\n";
} 
?>

very very thx :)
 
Upvote 0
Status
Not open for further replies.
Back
Top