Ir para conteúdo
  • Cadastre-se

Posts Recomendados

Galera quando vou pesquisar um Character no meu site da o seguinte erro

 

Fatal error: Call to a member function fetchAll() on a non-object in C:\xampp\xampp\htdocs\pages\characters.php on line 249

percebi que não acontece com nome de todos os player, por exemplo Player novo que nunca morreu não da erro nenhum,

ai fui no killstatistics e também tive um erro

 

Fatal error: Call to a member function fetchAll() on a non-object in C:\xampp\xampp\htdocs\pages\killstatistics.php on line 15

fui olhar na minha database e fiz uma comparação com a original

 

ela sumiu a seguinte tabela

 

Player_killers

 

eu tentei exportar de um e importar para o outro mas da erro. alguem me ajuda...

 

vou por aqui em baixo anexo dos meus arquivos ,Killstatistics.php / character.php / player_killers.sql que exportei da outra database q fiz comparação

 

killstatistics.php

characters.php

player_killers.sql

Link para o post
Compartilhar em outros sites

Use esse script em character.php :

Spoiler

<?PHP
$name = stripslashes(ucwords(strtolower(trim($_REQUEST['name']))));
if(empty($name)) {
    $main_content .= 'Here you can get detailed information about a certain player on '.$config['server']['serverName'].'.<BR>  <FORM ACTION="?subtopic=characters" METHOD=post><TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4><TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" CLASS=white><B>Search Character</B></TD></TR><TR><TD BGCOLOR="'.$config['site']['darkborder'].'"><TABLE BORDER=0 CELLPADDING=1><TR><TD>Name:</TD><TD><INPUT NAME="name" VALUE=""SIZE=29 MAXLENGTH=29></TD><TD><INPUT TYPE=image NAME="Submit" SRC="'.$layout_name.'/images/buttons/sbutton_submit.gif" BORDER=0 WIDTH=120 HEIGHT=18></TD></TR></TABLE></TD></TR></TABLE></FORM>';
}
else
{
    if(check_name($name)) {
        $player = $ots->createObject('Player');
        $player->find($name);
        if($player->isLoaded()) {
            $account = $player->getAccount();
            $main_content .= '<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%><TR><TD><IMG SRC="'.$layout_name.'/images/general/blank.gif" WIDTH=10 HEIGHT=1 BORDER=0></TD><TD><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD COLSPAN=2 CLASS=white><B>Character Information</B></TD></TR>';
            if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
            $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD WIDTH=20%>Name:</TD><TD><font color="';
            $main_content .= ($player->isOnline()) ? 'green' : 'red';
            $main_content .= '"><b>'.$player->getName().'</b></font>';
            if($player->isDeleted())
                $main_content .= '<font color="red"> [DELETED]</font>';
            if($player->isNameLocked())
                $main_content .= '<font color="red"> [NAMELOCK]</font>';
            $main_content .= '</TD></TR>';
            if($player->getOldName())
            {
                if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
                if($player->isNameLocked())
                    $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Proposition:</TD><TD>'.$player->getOldName().'</TD></TR>';
                else
                    $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Old name:</TD><TD>'.$player->getOldName().'</TD></TR>';
            }
            /*
            $group = $player->getGroup();
            if($group->getId() != 1)
            {
                if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
                $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Position:</TD><TD>'.$group->getName().'</TD></TR>';
            }
            */
            if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
            $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Sex:</TD><TD>';
            $main_content .= ($player->getSex() == 0) ? 'female' : 'male';
            $main_content .= '</TD></TR>';
            if($config['site']['show_marriage_info'])
            {
                if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
                $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Marital status:</TD><TD>';
                $marriage = new OTS_Player();
                $marriage->load($player->getMarriage());
                if($marriage->isLoaded())
                    $main_content .= 'married to <a href="?subtopic=characters&name='.urlencode($marriage->getName()).'"><b>'.$marriage->getName().'</b></a></TD></TR>';
                else
                    $main_content .= 'single</TD></TR>';
            }
            if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
            $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Profession:</TD><TD>'.$vocation_name[$player->getWorld()][$player->getPromotion()][$player->getVocation()].'</TD></TR>';
            if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
            $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Level:</TD><TD>'.$player->getLevel().'</TD></TR>';  
            $frags = $player->getCustomField('frags');
                if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
                {
                if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
                    $main_content .= '<TR BGCOLOR='.$config['site']['lightborder'].'><TD WIDTH=20%>Total Frags:</TD><TD>'.$frags.'</TD></TR>';
                }   
            if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
            $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>World:</TD><TD>'.$config['site']['worlds'][$player->getWorld()].'</TD></TR>';
            if(!empty($towns_list[$player->getWorld()][$player->getTownId()]))
            {
                if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
                $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Residence:</TD><TD>'.$towns_list[$player->getWorld()][$player->getTownId()].'</TD></TR>';
            }
            $rank_of_player = $player->getRank();
            if(!empty($rank_of_player))
            {
            {
            $guild_id = $rank_of_player->getGuild()->getId();
            $guild_name = $rank_of_player->getGuild()->getName();
                if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
                $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Guild Membership:</TD><TD>'.$rank_of_player->getName().' of the <a href="?subtopic=guilds&action=show&guild='.$guild_id.'">'.$guild_name.'</a></TD></TR>';
            }
            }
            if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
            $lastlogin = $player->getLastLogin();
            if(empty($lastlogin))
                $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Last login:</TD><TD>Never logged in.</TD></TR>';
            else
                $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Last login:</TD><TD>'.date("j F Y, g:i a", $lastlogin).'</TD></TR>';
                if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
            if($config['site']['show_creationdate'] && $player->getCreated())
            {
                $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Created:</TD><TD>'.date("j F Y, g:i a", $player->getCreated()).'</TD></TR>';
            }
            //Skills Pics v2. Table borders optimized by Absolute Mango
$main_content .= '<br/><table cellspacing="0" cellpadding="0" border="0" width="200" align="center">
    <caption><strong>Skills</strong></caption>
    <tbody>
        <tr>
            <td align="center"><a href="?subtopic=highscores&list=experience"><img src="/skills/level.png" style="border: none;"/></a></td>
            <td align="center"><a href="?subtopic=highscores&list=magic"><img src="/skills/ml.png" style="border: none;"/></a></td>
            <td align="center"><a href="?subtopic=highscores&list=fist"><img src="/skills/fist.png" style="border: none;"/></a></td>
            <td align="center"><a href="?subtopic=highscores&list=club"><img src="/skills/club.png" style="border: none;"/></a></td>
            <td align="center"><a href="?subtopic=highscores&list=sword"><img src="/skills/sword.png" style="border: none;"/></a></td>
            <td align="center"><a href="?subtopic=highscores&list=axe"><img src="/skills/axe.png" style="border: none;"/></a></td>
            <td align="center"><a href="?subtopic=highscores&list=distance"><img src="/skills/dist.png" style="border: none;"/></a></td>
            <td align="center"><a href="?subtopic=highscores&list=shield"><img src="/skills/def.png" style="border: none;"/></a></td>
            <td align="center"><a href="?subtopic=highscores&list=fishing"><img src="/skills/fish.png" style="border: none;"/></a></td>
        </tr>
    </tbody>
</table>
<table cellspacing="0" cellpadding="0" border="1" width="360" align="center">
    <tbody>
        <tr>
        <tr bgcolor="'.$config['site']['lightborder'].'">
            <td align="center" width="38"><strong>Level</strong></td>
            <td align="center" width="38"><strong>ML</strong></td>
            <td align="center" width="42"><strong>Fist</strong></td>
            <td align="center" width="40"><strong>Club</strong></td>
            <td align="center" width="38"><strong>Swrd</strong></td>
            <td align="center" width="38"><strong>Axe</strong></td>
            <td align="center" width="38"><strong>Dist</strong></td>
            <td align="center" width="38"><strong>Shield</strong></td>
            <td align="center" width="38"><strong>Fish</strong></td></font>
        </tr>
        <tr bgcolor="'.$config['site']['darkborder'].'">
            <td align="center" width="38">'.$player->getLevel().'</td>
            <td align="center" width="38">'.$player->getMagLevel().'</td>
            <td align="center" width="38">'.$player->getSkill(0).'</td>
            <td align="center" width="38">'.$player->getSkill(1).'</td>
            <td align="center" width="38">'.$player->getSkill(2).'</td>
            <td align="center" width="38">'.$player->getSkill(3).'</td>
            <td align="center" width="38">'.$player->getSkill(4).'</td>
            <td align="center" width="38">'.$player->getSkill(5).'</td>
            <td align="center" width="38">'.$player->getSkill(6).'</td>
        </tr>
    </tbody>
</table>
<div table align="center">&nbsp;<br />
&nbsp;</div>';
//skill script end  


            //modified status scripts by Norix
            $main_content .= '<table width=100%><tr>';
                        //equipment shower by ballack13
            $id = $player->getCustomField("id");
            $number_of_items = 1;
            $main_content .= '<td align=center><table with=100% style="border: solid 1px #888888;" CELLSPACING="1"><TR>';        
                        $list = array('2','1','3','6','4','5','9','7','10','8');
                        foreach ($list as $pid => $name) {
                        $top = $SQL->query('SELECT * FROM player_items WHERE player_id = '.$id.' AND pid = '.$list[$pid].';')->fetch();
                           if($top[itemtype] == false) {
                           if($list[$pid] == '8') {
            $main_content .= '<td style="background-color: '.$config['site']['darkborder'].'; text-align: center;">Soul:<br/>'.$player->getSoul().'</td>';
            }
                if(is_int($number_of_items / 3)){
            $main_content .= '<TD style="background-color: '.$config['site']['darkborder'].'; text-align: center;"><img src="images/items/'.$list[$pid].'.gif"/></TD></tr><tr>';
                } else {
            $main_content .= '<TD style="background-color: '.$config['site']['darkborder'].'; text-align: center;"><img src="images/items/'.$list[$pid].'.gif"/></TD>';
            }
                $number_of_items++;
            }
            else
            {
                           if($list[$pid] == '8') {
            $main_content .= '<td style="background-color: '.$config['site']['darkborder'].'; text-align: center;">Soul:<br/>'.$player->getSoul().'</td>';
            }
                if(is_int($number_of_items / 3))
            $main_content .= '<TD style="background-color: '.$config['site']['darkborder'].'; text-align: center;"><img src="images/items/'.$top[itemtype].'.gif" width="45"/></TD></tr><tr>';
                else
            $main_content .= '<TD style="background-color: '.$config['site']['darkborder'].'; text-align: center;"><img src="images/items/'.$top[itemtype].'.gif" width="45"/></TD>';
                $number_of_items++;
            }
                           if($list[$pid] == '8') {
            $main_content .= '<td style="background-color: '.$config['site']['darkborder'].'; text-align: center;">Cap:<br/>'.$player->getCap().'</td>';
            }
            }
            $main_content .= '</tr></TABLE></td>';

                        //Hp/Mana/Exp Status by Norix
                        $hp = ($player->getHealth() / $player->getHealthMax() * 100);
                  $main_content .= '<td align=center ><table width=100%><tr><td align=center><table CELLSPACING="1" CELLPADDING="4"><tr><td BGCOLOR="#D4C0A1" align="left" width="20%"><b>Player Health:</b></td>
                                    <td BGCOLOR="#D4C0A1" align="left">'.$player->getHealth().'/'.$player->getHealthMax().'<div style="width: 100%; height: 3px; border: 1px solid #000;"><div style="background: red; width: '.$hp.'%; height: 3px;"></td></tr>';
            if ($player->getManaMax() > 0) {
                        $mana = ($player->getMana() / $player->getManaMax() * 100);
                  $main_content .= '<tr><td BGCOLOR="#F1E0C6" align="left"><b>Player Mana:</b></td><td BGCOLOR="#F1E0C6" align="left">'.$player->getMana().'/'.$player->getManaMax().'<div style="width: 100%; height: 3px; border: 1px solid #000;"><div style="background: blue; width: '.$mana.'%; height: 3px;"></td>';
                        } else {
            $main_content .= '<tr><td BGCOLOR="#F1E0C6" align="left"><b>Player Mana:</b></td><td BGCOLOR="#F1E0C6" align="left">0/0<div style="width: 100%; height: 3px; border: 1px solid #000;"><div style="background: blue; width: 100%; height: 3px;"></td>'; }
                  $main_content .= '</tr></table><tr>';
                        $next = ($player->getLevel() + 1);
                        $exp = ((50 / 3) * ($player->getLevel() * $player->getLevel() * $player->getLevel()) - (100 * ($player->getLevel() * $player->getLevel())) + ((850/3) * $player->getLevel()) - 200);
                        $expnext = ((50 / 3) * ($next * $next * $next) - (100 * ($next * $next)) + ((850/3) * $next) - 200 - $player->getExperience());
                        $expresult = (100 - ($expnext / (($expnext  + $player->getExperience()) - $exp) * 100));
                       $main_content .= '<tr><table CELLSPACING="1" CELLPADDING="4"><tr><td BGCOLOR="#D4C0A1" align="left" width="20%"><b>Player Level:</b></td><td BGCOLOR="#D4C0A1" align="left">'.$player->getLevel().'</td></tr>
                                  <tr><td BGCOLOR="#F1E0C6" align="left"><b>Player Experience:</b></td><td BGCOLOR="#F1E0C6" align="left">'.$player->getExperience().' EXP.</td></tr>
                                  <tr><td BGCOLOR="#D4C0A1" align="left"><b>To Next Level:</b></td><td BGCOLOR="#D4C0A1" align="left">You need <b>'.$expnext.' EXP</b> to Level <b>'.$next.'</b>.<div title="99.320604545 %" style="width: 100%; height: 3px; border: 1px solid #000;"><div style="background: red; width: '.$expresult.'%; height: 3px;"></td></tr></table></td></tr></table></tr></TABLE></td>';

            //Quest status by Norix
            $id = $player->getCustomField("id");
            $number_of_quests = 0;
            $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD align="left" COLSPAN=2 CLASS=white><B>Quests</B></TD></TD align="right"></TD></TR>';        
                        $quests = $config['site']['quests'];
                        foreach ($quests as $storage => $name) {
                if(is_int($number_of_quests / 2))
                    $bgcolor = $config['site']['darkborder'];
                else
                    $bgcolor = $config['site']['lightborder'];
                $number_of_quests++;
            $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD WIDTH=95%>'.$storage.'</TD>';
                        $quest = $SQL->query('SELECT * FROM player_storage WHERE player_id = '.$id.' AND `key` = '.$quests[$storage].';')->fetch();
                           if($quest == false) {
            $main_content .= '<TD><img src="images/false.png"/></TD></TR>';
                        } else {
            $main_content .= '<TD><img src="images/true.png"/></TD></TR>';
            } }
            $main_content .= '</TABLE></td></tr></table>';
            //deaths list
            $player_deaths = $SQL->query('SELECT `id`, `date`, `level` FROM `player_deaths` WHERE `player_id` = '.$player->getId().' ORDER BY `date` DESC LIMIT 0,10;');
            foreach($player_deaths as $death)
            {
                if(is_int($number_of_rows / 2))
                    $bgcolor = $config['site']['darkborder']; else $bgcolor = $config['site']['lightborder'];

                $number_of_rows++; $deads++;
                $dead_add_content .= "<tr bgcolor=\"".$bgcolor."\">
                <td width=\"20%\" align=\"center\">".date("j M Y, H:i", $death['date'])."</td>
                <td>";
                $killers = $SQL->query("SELECT environment_killers.name AS monster_name, players.name AS player_name, players.deleted AS player_exists FROM killers LEFT JOIN environment_killers ON killers.id = environment_killers.kill_id
LEFT JOIN player_killers ON killers.id = player_killers.kill_id LEFT JOIN players ON players.id = player_killers.player_id
WHERE killers.death_id = ".$SQL->quote($death['id'])." ORDER BY killers.final_hit DESC, killers.id ASC")->fetchAll();

                $i = 0;
                $count = count($killers);
                foreach($killers as $killer)
                {
                    $i++;
                    if(in_array($i, array(1, $count)))
                        $killer['monster_name'] = str_replace(array("an ", "a "), array("", ""), $killer['monster_name']);

                    if($killer['player_name'] != "")
                    {
                        if($i == 1)
                            $dead_add_content .= "Killed at level <b>".$death['level']."</b> by ";
                        else if($i == $count)
                            $dead_add_content .= " and by ";
                        else
                            $dead_add_content .= ", ";

                        if($killer['monster_name'] != "")
                            $dead_add_content .= $killer['monster_name']." summoned by ";

                        if($killer['player_exists'] == 0)
                            $dead_add_content .= "<a href=\"index.php?subtopic=characters&name=".urlencode($killer['player_name'])."\">";

                        $dead_add_content .= $killer['player_name'];
                        if($killer['player_exists'] == 0)
                            $dead_add_content .= "</a>";
                    }
                    else
                    {
                        if($i == 1)
                            $dead_add_content .= "Died at level <b>".$death['level']."</b> by ";
                        else if($i == $count)
                            $dead_add_content .= " and by ";
                        else
                            $dead_add_content .= ", ";

                        $dead_add_content .= $killer['monster_name'];
                    }

                    if($i == $count)
                        $dead_add_content .= ".";
                }

                $dead_add_content .= "</td></tr>";
            }

            if($deads > 0)
                $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD COLSPAN=2 CLASS=white><B>Deaths</B></TD></TR>' . $dead_add_content . '</TABLE><br />';

            //end
            if(!$player->getHideChar()) {
                $main_content .= '<br><TABLE BORDER=0><TR><TD></TD></TR></TABLE><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD COLSPAN=2 CLASS=white><B>Account Information</B></TD></TR>';
                if($account->getRLName())
                {
                    if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
                    $main_content .= '<TR BGCOLOR='.$bgcolor.'><TD WIDTH=20%>Real name:</TD><TD>'.$account->getRLName().'</TD></TR>';
                }
                if($account->getLocation())
                {
                    if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
                    $main_content .= '<TR BGCOLOR='.$bgcolor.'><TD WIDTH=20%>Location:</TD><TD>'.$account->getLocation().'</TD></TR>';
                }
                if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
                if($account->getLastLogin())
                    $main_content .= '<TR BGCOLOR='.$bgcolor.'><TD WIDTH=20%>Last login:</TD><TD>'.date("j F Y, g:i a", $account->getLastLogin()).'</TD></TR>';
                else
                    $main_content .= '<TR BGCOLOR='.$bgcolor.'><TD WIDTH=20%>Last login:</TD><TD>Never logged in.</TD></TR>';
                if($account->getCreated())
                {
                    if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
                    $main_content .= '<TR BGCOLOR='.$bgcolor.'><TD WIDTH=20%>Created:</TD><TD>'.date("j F Y, g:i a", $account->getCreated()).'</TD></TR>';
                }
                if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
                $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Account*Status:</TD><TD>';
                $main_content .= ($account->isPremium()) ? '<b><font color="green">Premium Account</font></b>' : '<b><font color="red">Free Account</font></b>';
                if($account->isBanned())
                    if($account->getBanTime() > 0)
                        $main_content .= '<font color="red"> [Banished until '.date("j F Y, G:i", $account->getBanTime()).']</font>';
                    else
                        $main_content .= '<font color="red"> [Banished FOREVER]</font>';
                $main_content .= '</TD></TR></TABLE>';
                $main_content .= '<br><TABLE BORDER=0><TR><TD></TD></TR></TABLE><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD COLSPAN=5 CLASS=white><B>Characters</B></TD></TR>
                <TR BGCOLOR='.$config['site']['darkborder'].'><TD><B>Name</B></TD><TD><B>World</B></TD><TD><B>Level</B></TD><TD><b>Status</b></TD><TD><B>*</B></TD></TR>';
                $account_players = $account->getPlayersList();
                $account_players->orderBy('name');
                $player_number = 0;
                foreach($account_players as $player_list)
                {
                    if(!$player_list->getHideChar())
                    {
                        $player_number++;
                        if(is_int($player_number / 2))
                            $bgcolor = $config['site']['darkborder'];
                        else
                            $bgcolor = $config['site']['lightborder'];
                        if(!$player_list->isOnline())
                            $player_list_status = '<font color="red">Offline</font>';
                        else
                            $player_list_status = '<font color="green">Online</font>';
                        $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD WIDTH=52%><NOBR>'.$player_number.'.*'.$player_list->getName();
                        $main_content .= ($player_list->isDeleted()) ? '<font color="red"> [DELETED]</font>' : '';
                        $main_content .= '</NOBR></TD><TD WIDTH=15%>'.$config['site']['worlds'][$player_list->getWorld()].'</TD><TD WIDTH=25%>'.$player_list->getLevel().' '.$vocation_name[$player_list->getWorld()][$player_list->getPromotion()][$player_list->getVocation()].'</TD><TD WIDTH="8%"><b>'.$player_list_status.'</b></TD><TD><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><FORM ACTION="?subtopic=characters" METHOD=post><TR><TD><INPUT TYPE=hidden NAME=name VALUE="'.$player_list->getName().'"><INPUT TYPE=image NAME="View '.$player_list->getName().'" ALT="View '.$player_list->getName().'" SRC="'.$layout_name.'/images/buttons/sbutton_view.gif" BORDER=0 WIDTH=120 HEIGHT=18></TD></TR></FORM></TABLE></TD></TR>';
                    }
                }
                $main_content .= '</TABLE></TD><TD><IMG SRC="'.$layout_name.'/images/general/blank.gif" WIDTH=10 HEIGHT=1 BORDER=0></TD></TR></TABLE>';
            }
            $main_content .= '<BR><BR><FORM ACTION="?subtopic=characters" METHOD=post><TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4><TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" CLASS=white><B>Search Character</B></TD></TR><TR><TD BGCOLOR="'.$config['site']['darkborder'].'"><TABLE BORDER=0 CELLPADDING=1><TR><TD>Name:</TD><TD><INPUT NAME="name" VALUE=""SIZE=29 MAXLENGTH=29></TD><TD><INPUT TYPE=image NAME="Submit" SRC="'.$layout_name.'/images/buttons/sbutton_submit.gif" BORDER=0 WIDTH=120 HEIGHT=18></TD></TR></TABLE></TD></TR></TABLE></FORM>';
            $main_content .= '</TABLE>';
        }
        else
            $search_errors[] = 'Character <b>'.$name.'</b> does not exist.';
    }
    else
        $search_errors[] = 'This name contains invalid letters. Please use only A-Z, a-z and space.';
    if(!empty($search_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($search_errors as $search_error)
            $main_content .= '<li>'.$search_error;
        $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/>';
        $main_content .= '<BR><FORM ACTION="?subtopic=characters" METHOD=post><TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4><TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" CLASS=white><B>Search Character</B></TD></TR><TR><TD BGCOLOR="'.$config['site']['darkborder'].'"><TABLE BORDER=0 CELLPADDING=1><TR><TD>Name:</TD><TD><INPUT NAME="name" VALUE=""SIZE=29 MAXLENGTH=29></TD><TD><INPUT TYPE=image NAME="Submit" SRC="'.$layout_name.'/images/buttons/sbutton_submit.gif" BORDER=0 WIDTH=120 HEIGHT=18></TD></TR></TABLE></TD></TR></TABLE></FORM>';
    }
}
?>

 

Link para o post
Compartilhar em outros sites
5 horas atrás, emersontb disse:

Use esse script em character.php :

  Mostrar conteúdo oculto

<?PHP
$name = stripslashes(ucwords(strtolower(trim($_REQUEST['name']))));
if(empty($name)) {
    $main_content .= 'Here you can get detailed information about a certain player on '.$config['server']['serverName'].'.<BR>  <FORM ACTION="?subtopic=characters" METHOD=post><TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4><TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" CLASS=white><B>Search Character</B></TD></TR><TR><TD BGCOLOR="'.$config['site']['darkborder'].'"><TABLE BORDER=0 CELLPADDING=1><TR><TD>Name:</TD><TD><INPUT NAME="name" VALUE=""SIZE=29 MAXLENGTH=29></TD><TD><INPUT TYPE=image NAME="Submit" SRC="'.$layout_name.'/images/buttons/sbutton_submit.gif" BORDER=0 WIDTH=120 HEIGHT=18></TD></TR></TABLE></TD></TR></TABLE></FORM>';
}
else
{
    if(check_name($name)) {
        $player = $ots->createObject('Player');
        $player->find($name);
        if($player->isLoaded()) {
            $account = $player->getAccount();
            $main_content .= '<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%><TR><TD><IMG SRC="'.$layout_name.'/images/general/blank.gif" WIDTH=10 HEIGHT=1 BORDER=0></TD><TD><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD COLSPAN=2 CLASS=white><B>Character Information</B></TD></TR>';
            if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
            $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD WIDTH=20%>Name:</TD><TD><font color="';
            $main_content .= ($player->isOnline()) ? 'green' : 'red';
            $main_content .= '"><b>'.$player->getName().'</b></font>';
            if($player->isDeleted())
                $main_content .= '<font color="red"> [DELETED]</font>';
            if($player->isNameLocked())
                $main_content .= '<font color="red"> [NAMELOCK]</font>';
            $main_content .= '</TD></TR>';
            if($player->getOldName())
            {
                if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
                if($player->isNameLocked())
                    $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Proposition:</TD><TD>'.$player->getOldName().'</TD></TR>';
                else
                    $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Old name:</TD><TD>'.$player->getOldName().'</TD></TR>';
            }
            /*
            $group = $player->getGroup();
            if($group->getId() != 1)
            {
                if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
                $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Position:</TD><TD>'.$group->getName().'</TD></TR>';
            }
            */
            if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
            $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Sex:</TD><TD>';
            $main_content .= ($player->getSex() == 0) ? 'female' : 'male';
            $main_content .= '</TD></TR>';
            if($config['site']['show_marriage_info'])
            {
                if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
                $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Marital status:</TD><TD>';
                $marriage = new OTS_Player();
                $marriage->load($player->getMarriage());
                if($marriage->isLoaded())
                    $main_content .= 'married to <a href="?subtopic=characters&name='.urlencode($marriage->getName()).'"><b>'.$marriage->getName().'</b></a></TD></TR>';
                else
                    $main_content .= 'single</TD></TR>';
            }
            if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
            $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Profession:</TD><TD>'.$vocation_name[$player->getWorld()][$player->getPromotion()][$player->getVocation()].'</TD></TR>';
            if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
            $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Level:</TD><TD>'.$player->getLevel().'</TD></TR>';  
            $frags = $player->getCustomField('frags');
                if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
                {
                if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
                    $main_content .= '<TR BGCOLOR='.$config['site']['lightborder'].'><TD WIDTH=20%>Total Frags:</TD><TD>'.$frags.'</TD></TR>';
                }   
            if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
            $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>World:</TD><TD>'.$config['site']['worlds'][$player->getWorld()].'</TD></TR>';
            if(!empty($towns_list[$player->getWorld()][$player->getTownId()]))
            {
                if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
                $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Residence:</TD><TD>'.$towns_list[$player->getWorld()][$player->getTownId()].'</TD></TR>';
            }
            $rank_of_player = $player->getRank();
            if(!empty($rank_of_player))
            {
            {
            $guild_id = $rank_of_player->getGuild()->getId();
            $guild_name = $rank_of_player->getGuild()->getName();
                if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
                $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Guild Membership:</TD><TD>'.$rank_of_player->getName().' of the <a href="?subtopic=guilds&action=show&guild='.$guild_id.'">'.$guild_name.'</a></TD></TR>';
            }
            }
            if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
            $lastlogin = $player->getLastLogin();
            if(empty($lastlogin))
                $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Last login:</TD><TD>Never logged in.</TD></TR>';
            else
                $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Last login:</TD><TD>'.date("j F Y, g:i a", $lastlogin).'</TD></TR>';
                if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
            if($config['site']['show_creationdate'] && $player->getCreated())
            {
                $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Created:</TD><TD>'.date("j F Y, g:i a", $player->getCreated()).'</TD></TR>';
            }
            //Skills Pics v2. Table borders optimized by Absolute Mango
$main_content .= '<br/><table cellspacing="0" cellpadding="0" border="0" width="200" align="center">
    <caption><strong>Skills</strong></caption>
    <tbody>
        <tr>
            <td align="center"><a href="?subtopic=highscores&list=experience"><img src="/skills/level.png" style="border: none;"/></a></td>
            <td align="center"><a href="?subtopic=highscores&list=magic"><img src="/skills/ml.png" style="border: none;"/></a></td>
            <td align="center"><a href="?subtopic=highscores&list=fist"><img src="/skills/fist.png" style="border: none;"/></a></td>
            <td align="center"><a href="?subtopic=highscores&list=club"><img src="/skills/club.png" style="border: none;"/></a></td>
            <td align="center"><a href="?subtopic=highscores&list=sword"><img src="/skills/sword.png" style="border: none;"/></a></td>
            <td align="center"><a href="?subtopic=highscores&list=axe"><img src="/skills/axe.png" style="border: none;"/></a></td>
            <td align="center"><a href="?subtopic=highscores&list=distance"><img src="/skills/dist.png" style="border: none;"/></a></td>
            <td align="center"><a href="?subtopic=highscores&list=shield"><img src="/skills/def.png" style="border: none;"/></a></td>
            <td align="center"><a href="?subtopic=highscores&list=fishing"><img src="/skills/fish.png" style="border: none;"/></a></td>
        </tr>
    </tbody>
</table>
<table cellspacing="0" cellpadding="0" border="1" width="360" align="center">
    <tbody>
        <tr>
        <tr bgcolor="'.$config['site']['lightborder'].'">
            <td align="center" width="38"><strong>Level</strong></td>
            <td align="center" width="38"><strong>ML</strong></td>
            <td align="center" width="42"><strong>Fist</strong></td>
            <td align="center" width="40"><strong>Club</strong></td>
            <td align="center" width="38"><strong>Swrd</strong></td>
            <td align="center" width="38"><strong>Axe</strong></td>
            <td align="center" width="38"><strong>Dist</strong></td>
            <td align="center" width="38"><strong>Shield</strong></td>
            <td align="center" width="38"><strong>Fish</strong></td></font>
        </tr>
        <tr bgcolor="'.$config['site']['darkborder'].'">
            <td align="center" width="38">'.$player->getLevel().'</td>
            <td align="center" width="38">'.$player->getMagLevel().'</td>
            <td align="center" width="38">'.$player->getSkill(0).'</td>
            <td align="center" width="38">'.$player->getSkill(1).'</td>
            <td align="center" width="38">'.$player->getSkill(2).'</td>
            <td align="center" width="38">'.$player->getSkill(3).'</td>
            <td align="center" width="38">'.$player->getSkill(4).'</td>
            <td align="center" width="38">'.$player->getSkill(5).'</td>
            <td align="center" width="38">'.$player->getSkill(6).'</td>
        </tr>
    </tbody>
</table>
<div table align="center">&nbsp;<br />
&nbsp;</div>';
//skill script end  


            //modified status scripts by Norix
            $main_content .= '<table width=100%><tr>';
                        //equipment shower by ballack13
            $id = $player->getCustomField("id");
            $number_of_items = 1;
            $main_content .= '<td align=center><table with=100% style="border: solid 1px #888888;" CELLSPACING="1"><TR>';        
                        $list = array('2','1','3','6','4','5','9','7','10','8');
                        foreach ($list as $pid => $name) {
                        $top = $SQL->query('SELECT * FROM player_items WHERE player_id = '.$id.' AND pid = '.$list[$pid].';')->fetch();
                           if($top[itemtype] == false) {
                           if($list[$pid] == '8') {
            $main_content .= '<td style="background-color: '.$config['site']['darkborder'].'; text-align: center;">Soul:<br/>'.$player->getSoul().'</td>';
            }
                if(is_int($number_of_items / 3)){
            $main_content .= '<TD style="background-color: '.$config['site']['darkborder'].'; text-align: center;"><img src="images/items/'.$list[$pid].'.gif"/></TD></tr><tr>';
                } else {
            $main_content .= '<TD style="background-color: '.$config['site']['darkborder'].'; text-align: center;"><img src="images/items/'.$list[$pid].'.gif"/></TD>';
            }
                $number_of_items++;
            }
            else
            {
                           if($list[$pid] == '8') {
            $main_content .= '<td style="background-color: '.$config['site']['darkborder'].'; text-align: center;">Soul:<br/>'.$player->getSoul().'</td>';
            }
                if(is_int($number_of_items / 3))
            $main_content .= '<TD style="background-color: '.$config['site']['darkborder'].'; text-align: center;"><img src="images/items/'.$top[itemtype].'.gif" width="45"/></TD></tr><tr>';
                else
            $main_content .= '<TD style="background-color: '.$config['site']['darkborder'].'; text-align: center;"><img src="images/items/'.$top[itemtype].'.gif" width="45"/></TD>';
                $number_of_items++;
            }
                           if($list[$pid] == '8') {
            $main_content .= '<td style="background-color: '.$config['site']['darkborder'].'; text-align: center;">Cap:<br/>'.$player->getCap().'</td>';
            }
            }
            $main_content .= '</tr></TABLE></td>';

                        //Hp/Mana/Exp Status by Norix
                        $hp = ($player->getHealth() / $player->getHealthMax() * 100);
                  $main_content .= '<td align=center ><table width=100%><tr><td align=center><table CELLSPACING="1" CELLPADDING="4"><tr><td BGCOLOR="#D4C0A1" align="left" width="20%"><b>Player Health:</b></td>
                                    <td BGCOLOR="#D4C0A1" align="left">'.$player->getHealth().'/'.$player->getHealthMax().'<div style="width: 100%; height: 3px; border: 1px solid #000;"><div style="background: red; width: '.$hp.'%; height: 3px;"></td></tr>';
            if ($player->getManaMax() > 0) {
                        $mana = ($player->getMana() / $player->getManaMax() * 100);
                  $main_content .= '<tr><td BGCOLOR="#F1E0C6" align="left"><b>Player Mana:</b></td><td BGCOLOR="#F1E0C6" align="left">'.$player->getMana().'/'.$player->getManaMax().'<div style="width: 100%; height: 3px; border: 1px solid #000;"><div style="background: blue; width: '.$mana.'%; height: 3px;"></td>';
                        } else {
            $main_content .= '<tr><td BGCOLOR="#F1E0C6" align="left"><b>Player Mana:</b></td><td BGCOLOR="#F1E0C6" align="left">0/0<div style="width: 100%; height: 3px; border: 1px solid #000;"><div style="background: blue; width: 100%; height: 3px;"></td>'; }
                  $main_content .= '</tr></table><tr>';
                        $next = ($player->getLevel() + 1);
                        $exp = ((50 / 3) * ($player->getLevel() * $player->getLevel() * $player->getLevel()) - (100 * ($player->getLevel() * $player->getLevel())) + ((850/3) * $player->getLevel()) - 200);
                        $expnext = ((50 / 3) * ($next * $next * $next) - (100 * ($next * $next)) + ((850/3) * $next) - 200 - $player->getExperience());
                        $expresult = (100 - ($expnext / (($expnext  + $player->getExperience()) - $exp) * 100));
                       $main_content .= '<tr><table CELLSPACING="1" CELLPADDING="4"><tr><td BGCOLOR="#D4C0A1" align="left" width="20%"><b>Player Level:</b></td><td BGCOLOR="#D4C0A1" align="left">'.$player->getLevel().'</td></tr>
                                  <tr><td BGCOLOR="#F1E0C6" align="left"><b>Player Experience:</b></td><td BGCOLOR="#F1E0C6" align="left">'.$player->getExperience().' EXP.</td></tr>
                                  <tr><td BGCOLOR="#D4C0A1" align="left"><b>To Next Level:</b></td><td BGCOLOR="#D4C0A1" align="left">You need <b>'.$expnext.' EXP</b> to Level <b>'.$next.'</b>.<div title="99.320604545 %" style="width: 100%; height: 3px; border: 1px solid #000;"><div style="background: red; width: '.$expresult.'%; height: 3px;"></td></tr></table></td></tr></table></tr></TABLE></td>';

            //Quest status by Norix
            $id = $player->getCustomField("id");
            $number_of_quests = 0;
            $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD align="left" COLSPAN=2 CLASS=white><B>Quests</B></TD></TD align="right"></TD></TR>';        
                        $quests = $config['site']['quests'];
                        foreach ($quests as $storage => $name) {
                if(is_int($number_of_quests / 2))
                    $bgcolor = $config['site']['darkborder'];
                else
                    $bgcolor = $config['site']['lightborder'];
                $number_of_quests++;
            $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD WIDTH=95%>'.$storage.'</TD>';
                        $quest = $SQL->query('SELECT * FROM player_storage WHERE player_id = '.$id.' AND `key` = '.$quests[$storage].';')->fetch();
                           if($quest == false) {
            $main_content .= '<TD><img src="images/false.png"/></TD></TR>';
                        } else {
            $main_content .= '<TD><img src="images/true.png"/></TD></TR>';
            } }
            $main_content .= '</TABLE></td></tr></table>';
            //deaths list
            $player_deaths = $SQL->query('SELECT `id`, `date`, `level` FROM `player_deaths` WHERE `player_id` = '.$player->getId().' ORDER BY `date` DESC LIMIT 0,10;');
            foreach($player_deaths as $death)
            {
                if(is_int($number_of_rows / 2))
                    $bgcolor = $config['site']['darkborder']; else $bgcolor = $config['site']['lightborder'];

                $number_of_rows++; $deads++;
                $dead_add_content .= "<tr bgcolor=\"".$bgcolor."\">
                <td width=\"20%\" align=\"center\">".date("j M Y, H:i", $death['date'])."</td>
                <td>";
                $killers = $SQL->query("SELECT environment_killers.name AS monster_name, players.name AS player_name, players.deleted AS player_exists FROM killers LEFT JOIN environment_killers ON killers.id = environment_killers.kill_id
LEFT JOIN player_killers ON killers.id = player_killers.kill_id LEFT JOIN players ON players.id = player_killers.player_id
WHERE killers.death_id = ".$SQL->quote($death['id'])." ORDER BY killers.final_hit DESC, killers.id ASC")->fetchAll();

                $i = 0;
                $count = count($killers);
                foreach($killers as $killer)
                {
                    $i++;
                    if(in_array($i, array(1, $count)))
                        $killer['monster_name'] = str_replace(array("an ", "a "), array("", ""), $killer['monster_name']);

                    if($killer['player_name'] != "")
                    {
                        if($i == 1)
                            $dead_add_content .= "Killed at level <b>".$death['level']."</b> by ";
                        else if($i == $count)
                            $dead_add_content .= " and by ";
                        else
                            $dead_add_content .= ", ";

                        if($killer['monster_name'] != "")
                            $dead_add_content .= $killer['monster_name']." summoned by ";

                        if($killer['player_exists'] == 0)
                            $dead_add_content .= "<a href=\"index.php?subtopic=characters&name=".urlencode($killer['player_name'])."\">";

                        $dead_add_content .= $killer['player_name'];
                        if($killer['player_exists'] == 0)
                            $dead_add_content .= "</a>";
                    }
                    else
                    {
                        if($i == 1)
                            $dead_add_content .= "Died at level <b>".$death['level']."</b> by ";
                        else if($i == $count)
                            $dead_add_content .= " and by ";
                        else
                            $dead_add_content .= ", ";

                        $dead_add_content .= $killer['monster_name'];
                    }

                    if($i == $count)
                        $dead_add_content .= ".";
                }

                $dead_add_content .= "</td></tr>";
            }

            if($deads > 0)
                $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD COLSPAN=2 CLASS=white><B>Deaths</B></TD></TR>' . $dead_add_content . '</TABLE><br />';

            //end
            if(!$player->getHideChar()) {
                $main_content .= '<br><TABLE BORDER=0><TR><TD></TD></TR></TABLE><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD COLSPAN=2 CLASS=white><B>Account Information</B></TD></TR>';
                if($account->getRLName())
                {
                    if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
                    $main_content .= '<TR BGCOLOR='.$bgcolor.'><TD WIDTH=20%>Real name:</TD><TD>'.$account->getRLName().'</TD></TR>';
                }
                if($account->getLocation())
                {
                    if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
                    $main_content .= '<TR BGCOLOR='.$bgcolor.'><TD WIDTH=20%>Location:</TD><TD>'.$account->getLocation().'</TD></TR>';
                }
                if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
                if($account->getLastLogin())
                    $main_content .= '<TR BGCOLOR='.$bgcolor.'><TD WIDTH=20%>Last login:</TD><TD>'.date("j F Y, g:i a", $account->getLastLogin()).'</TD></TR>';
                else
                    $main_content .= '<TR BGCOLOR='.$bgcolor.'><TD WIDTH=20%>Last login:</TD><TD>Never logged in.</TD></TR>';
                if($account->getCreated())
                {
                    if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
                    $main_content .= '<TR BGCOLOR='.$bgcolor.'><TD WIDTH=20%>Created:</TD><TD>'.date("j F Y, g:i a", $account->getCreated()).'</TD></TR>';
                }
                if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
                $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Account*Status:</TD><TD>';
                $main_content .= ($account->isPremium()) ? '<b><font color="green">Premium Account</font></b>' : '<b><font color="red">Free Account</font></b>';
                if($account->isBanned())
                    if($account->getBanTime() > 0)
                        $main_content .= '<font color="red"> [Banished until '.date("j F Y, G:i", $account->getBanTime()).']</font>';
                    else
                        $main_content .= '<font color="red"> [Banished FOREVER]</font>';
                $main_content .= '</TD></TR></TABLE>';
                $main_content .= '<br><TABLE BORDER=0><TR><TD></TD></TR></TABLE><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD COLSPAN=5 CLASS=white><B>Characters</B></TD></TR>
                <TR BGCOLOR='.$config['site']['darkborder'].'><TD><B>Name</B></TD><TD><B>World</B></TD><TD><B>Level</B></TD><TD><b>Status</b></TD><TD><B>*</B></TD></TR>';
                $account_players = $account->getPlayersList();
                $account_players->orderBy('name');
                $player_number = 0;
                foreach($account_players as $player_list)
                {
                    if(!$player_list->getHideChar())
                    {
                        $player_number++;
                        if(is_int($player_number / 2))
                            $bgcolor = $config['site']['darkborder'];
                        else
                            $bgcolor = $config['site']['lightborder'];
                        if(!$player_list->isOnline())
                            $player_list_status = '<font color="red">Offline</font>';
                        else
                            $player_list_status = '<font color="green">Online</font>';
                        $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD WIDTH=52%><NOBR>'.$player_number.'.*'.$player_list->getName();
                        $main_content .= ($player_list->isDeleted()) ? '<font color="red"> [DELETED]</font>' : '';
                        $main_content .= '</NOBR></TD><TD WIDTH=15%>'.$config['site']['worlds'][$player_list->getWorld()].'</TD><TD WIDTH=25%>'.$player_list->getLevel().' '.$vocation_name[$player_list->getWorld()][$player_list->getPromotion()][$player_list->getVocation()].'</TD><TD WIDTH="8%"><b>'.$player_list_status.'</b></TD><TD><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><FORM ACTION="?subtopic=characters" METHOD=post><TR><TD><INPUT TYPE=hidden NAME=name VALUE="'.$player_list->getName().'"><INPUT TYPE=image NAME="View '.$player_list->getName().'" ALT="View '.$player_list->getName().'" SRC="'.$layout_name.'/images/buttons/sbutton_view.gif" BORDER=0 WIDTH=120 HEIGHT=18></TD></TR></FORM></TABLE></TD></TR>';
                    }
                }
                $main_content .= '</TABLE></TD><TD><IMG SRC="'.$layout_name.'/images/general/blank.gif" WIDTH=10 HEIGHT=1 BORDER=0></TD></TR></TABLE>';
            }
            $main_content .= '<BR><BR><FORM ACTION="?subtopic=characters" METHOD=post><TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4><TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" CLASS=white><B>Search Character</B></TD></TR><TR><TD BGCOLOR="'.$config['site']['darkborder'].'"><TABLE BORDER=0 CELLPADDING=1><TR><TD>Name:</TD><TD><INPUT NAME="name" VALUE=""SIZE=29 MAXLENGTH=29></TD><TD><INPUT TYPE=image NAME="Submit" SRC="'.$layout_name.'/images/buttons/sbutton_submit.gif" BORDER=0 WIDTH=120 HEIGHT=18></TD></TR></TABLE></TD></TR></TABLE></FORM>';
            $main_content .= '</TABLE>';
        }
        else
            $search_errors[] = 'Character <b>'.$name.'</b> does not exist.';
    }
    else
        $search_errors[] = 'This name contains invalid letters. Please use only A-Z, a-z and space.';
    if(!empty($search_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($search_errors as $search_error)
            $main_content .= '<li>'.$search_error;
        $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/>';
        $main_content .= '<BR><FORM ACTION="?subtopic=characters" METHOD=post><TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4><TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" CLASS=white><B>Search Character</B></TD></TR><TR><TD BGCOLOR="'.$config['site']['darkborder'].'"><TABLE BORDER=0 CELLPADDING=1><TR><TD>Name:</TD><TD><INPUT NAME="name" VALUE=""SIZE=29 MAXLENGTH=29></TD><TD><INPUT TYPE=image NAME="Submit" SRC="'.$layout_name.'/images/buttons/sbutton_submit.gif" BORDER=0 WIDTH=120 HEIGHT=18></TD></TR></TABLE></TD></TR></TABLE></FORM>';
    }
}
?>

 

Fatal error: Call to a member function createObject() on a non-object in C:\xampp\xampp\htdocs\pages\characters.php on line 9

Link para o post
Compartilhar em outros sites
Agora, emersontb disse:

man use o Znote acc está mais atualizado !

so quero uma 'query' pra adicionar o Player_killers, acho q isso resolve. 

Link para o post
Compartilhar em outros sites
1 hora atrás, emersontb disse:

Man Utilize o Znot/ ACC é melhor que o Gessior/Acc ele funciona em qual quer versão de OT !

 

Mano problema ta na query, por tanto nem frag ta contando em meu server, tenho que conseguir adicionar a query, e nao posso colocar a database nova porque nao posso resetar o server, tem q ter outra solução pra adicionar essa query ! 

Link para o post
Compartilhar em outros sites

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

  • Conteúdo Similar

    • Por Qwizer
      MercadoPago Checkout Transparente (CC)
       
      Abaixo Segue código PHP de pagamento via cartão de credito pelo mercado pago com retorno automático para quem quiser adaptar em seus sites ter uma direção de onde ir 
      testado em Znote e MyAcc.
       

       
       
      https://mega.nz/folder/m4QkWBLS#PIvJ_scVm7w8-5FLlStTHg  
    • Por Argona2509
      Boa tarde venho por aqui pedir ajuda estou com um problema no gesior para criar conta nao aparece vocacao e o nome Nadega Sample
       
       
    • Por Magato
      Galera, boa tarde a todos.
       
      Estou iniciando um servidor com o mapa Pbot e estou com dificuldades em encontrar um website para ele.
       
      Procurei na internet toda e não achei um link que me levasse ao download do Gesior Onix para pbot exclusivo (o link estava quebrado)
       
      Tentei utilizar o Gesior 2012 mas o layout do site e todas as funcionalidades estão bugadas.
       
      Gostaria que alguém pudesse me ajudar e postasse aqui algum link de gesior para PBOT. A versão do meu servidor é 8.60.
       
      Agradeço a quem puder.
       
       
    • Por BonasxD
      Bom galera primeiramente não sei se estou na area correta ou se nao estou, se nao por favor mover para area certa, grato!
      Estou com esse erro ao tenta instalar o gesior usando a tfs 0.4 não passa dessa parte ja tentei de tudo e nao sei oque fazer ;(
       
      Testei o mesmo procedimento no meu Windows e Funcionou corretamente agora no meu VM(Ubuntu22) não passa desse erro. 
       
      Ja pesquisei por tudo e não sei oque fazer

    • Por Jordanl42ss
      Quando eu vou hospedar o site do meu poketibia ele da erro faldo q a classe do não foi encontrada 
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo