Jump to content
Sign in to follow this  
Fabiano Alberto

Website (GESIOR) PAGINA HIGHSCORES COM OPÇÃO DE VER TOP POR VOCAÇÃO

Recommended Posts

.Qual servidor ou website você utiliza como base? 

GESIOR

 

Boa Noite!

 

Galera, queria que a pagina de ranking do meu site tivesse a opção de ranking por vocação tambem..ja pesquisei e tentei fazer mas nao consegui..alguem pode ajudar?

 

 

Você tem o código disponível? Se tiver publique-o aqui: 

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

$list = 'experience';
if(isset($_REQUEST['list']))
	$list = $_REQUEST['list'];

$page = 0;
if(isset($_REQUEST['page']))
	$page = min(50, $_REQUEST['page']);

$vocation = 'vocation';
if(isset($_REQUEST['vocation']))
	$vocation = $_REQUEST['vocation'];

switch($list)
{
	case "fist":
		$id=Highscores::SKILL_FIST;
		$list_name='Fist Fighting';
		break;
	case "club":
		$id=Highscores::SKILL_CLUB;
		$list_name='Club Fighting';
		break;
	case "sword":
		$id=Highscores::SKILL_SWORD;
		$list_name='Sword Fighting';
		break;
	case "axe":
		$id=Highscores::SKILL_AXE;
		$list_name='Axe Fighting';
		break;
	case "distance":
		$id=Highscores::SKILL_DISTANCE;
		$list_name='Distance Fighting';
		break;
	case "shield":
		$id=Highscores::SKILL_SHIELD;
		$list_name='Shielding';
		break;
	case "fishing":
		$id=Highscores::SKILL_FISHING;
		$list_name='Fishing';
		break;
	case "magic":
		$id=Highscores::SKILL__MAGLEVEL;
		$list_name='Magic';
		break;
	default:
		$id=Highscores::SKILL__LEVEL;
		$list_name='Experience';
		break;
}
$world_name = $config['server']['serverName'];

$offset = $page * 100;
$skills = new Highscores($id, 100, $page, $vocation);
$main_content .= '<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%><TR><TD><IMG SRC="'.$layout_name.'/images/blank.gif" WIDTH=10 HEIGHT=1 BORDER=0></TD><TD><CENTER><H2>Ranking for '.htmlspecialchars($list_name).' on '.htmlspecialchars($world_name).'</H2></CENTER><BR>';

$main_content .= '<br><TABLE BORDER=0 CELLPADDING=4 CELLSPACING=1 WIDTH=100%></TABLE><TABLE BORDER=0 CELLPADDING=4 CELLSPACING=1 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD CLASS=whites><B>Rank</B></TD><TD WIDTH=75% CLASS=whites><B>Name</B></TD><TD WIDTH=15% CLASS=whites><b><center>Level</center></B></TD>';
if($list == "experience")
	$main_content .= '<TD CLASS=whites><b><center>Experience</center></B></TD>';
//$main_content .= '</TR><TR>';
$main_content .= '</TR>';
$number_of_rows = 0;
foreach($skills as $skill)
{
	if($list == "magic")
		$value = $skill->getMagLevel();
	elseif($list == "experience")
		$value = $skill->getLevel();
	else
		$value = $skill->getScore();
	$bgcolor = (($number_of_rows++ % 2 == 1) ?  $config['site']['darkborder'] : $config['site']['lightborder']);
	$main_content .= '<tr bgcolor="'.$bgcolor.'"><td style="text-align:right">'.($offset + $number_of_rows).'.</td><td><a href="?subtopic=characters&name='.urlencode($skill->getName()).'">'.($skill->getOnline()>0 ? "<font color=\"green\">".htmlspecialchars($skill->getName())."</font>" : "<font color=\"red\">".htmlspecialchars($skill->getName())."</font>").'</a><br><small>'.$skill->getLevel().' '.htmlspecialchars(Website::getVocationName($skill->getVocation())).'</small></td><td><center>'.$value.'</center></td>';
	if($list == "experience")
		$main_content .= '<td><center>'.$skill->getExperience().'</center></td>';
	$main_content .= '</tr>';
}
$main_content .= '</TABLE><TABLE BORDER=0 CELLPADDING=4 CELLSPACING=1 WIDTH=100%>';
if($page > 0)
	$main_content .= '<TR><TD WIDTH=100% ALIGN=right VALIGN=bottom><A HREF="?subtopic=highscores&list='.urlencode($list).'&page='.($page - 1).'&vocation=' . urlencode($vocation) . '" CLASS="size_xxs">Previous Page</A></TD></TR>';
if($page < 50)
	$main_content .= '<TR><TD WIDTH=100% ALIGN=right VALIGN=bottom><A HREF="?subtopic=highscores&list='.urlencode($list).'&page='.($page + 1).'&vocation=' . urlencode($vocation) . '" CLASS="size_xxs">Next Page</A></TD></TR>';
$main_content .= '</TABLE></TD><TD WIDTH=5%><IMG SRC="'.$layout_name.'/images/blank.gif" WIDTH=1 HEIGHT=1 BORDER=0></TD><TD WIDTH=15% VALIGN=top ALIGN=right><TABLE BORDER=0 CELLPADDING=4 CELLSPACING=1><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD CLASS=whites><B>Choose a skill</B></TD></TR><TR BGCOLOR="'.$config['site']['lightborder'].'"><TD><A HREF="?subtopic=highscores&list=experience" CLASS="size_xs">Experience</A><BR><A HREF="?subtopic=highscores&list=magic" CLASS="size_xs">Magic</A><BR><A HREF="?subtopic=highscores&list=shield" CLASS="size_xs">Shielding</A><BR><A HREF="?subtopic=highscores&list=distance" CLASS="size_xs">Distance</A><BR><A HREF="?subtopic=highscores&list=club" CLASS="size_xs">Club</A><BR><A HREF="?subtopic=highscores&list=sword" CLASS="size_xs">Sword</A><BR><A HREF="?subtopic=highscores&list=axe" CLASS="size_xs">Axe</A><BR><A HREF="?subtopic=highscores&list=fist" CLASS="size_xs">Fist</A><BR><A HREF="?subtopic=highscores&list=fishing" CLASS="size_xs">Fishing</A><BR></TD></TR></TABLE></TD><TD><IMG SRC="'.$layout_name.'/images/blank.gif" WIDTH=10 HEIGHT=1 BORDER=0></TD></TR></TABLE>'; 

Desde ja, obrigado!

 


SE AJUDEI REP+ ;D, NÃO CUSTA NADA.

uRti.png

<a href="http://central.evenhost.net/aff.php?aff=020"><img src="http://i.imm.io/uRti.png" width="500" height="82" border="0"></a>

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Similar Content

    • By FearWar
      Opa,
       
      Estou a procura de uma page.php igual a imagem abaixo, se alguém tiver ou souber aonde encontrar.
       

       
       
    • By joaovitorbk9
      Olá amigos do TK, estou com um problema no shop do meu Gesior...
      Quando coompro um item no site, fico recebendo ele infinitamente...
       
      Tenho esse erro no log
       
      No jogo:
       
      seguindo o rastro do erro, ele se encontra na Line 56:
      db.Query("DELETE FROM `z_ots_comunication` WHERE `id` = " .. id .. ";")
       

      antes estava 'db.executeQuery'..... garimpando uma solução nos forum, varios comentários diziam para por 'db.query', porém continua a mesma coisa....
       
      meu Shop.Lua
       
      PRINT** Database z_comunication
       
      5 rep+ pra quem me ajudar!!! fé!!
       
       
       
       
    • By Adm Evolution
      Olá, tudo bem? estou com um probleminha no  meu site, que é o Gesior 2020
      fiz todo processo de extração dos arquivos diretamente no XXAMP mais recente, porém está dando o seguinte erro:
      Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting '-' or identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in C:\xampp\htdocs\config\config.php on line 4 Já fiz alterações para TRUE E FALSE e continua a mesma coisa, alguém pode me ajudar? segue abaixo o código do config.php
      <?PHP # Account Maker Config $config['site']['serverPath'] = "C:\Users\Leo\Desktop\OT\baiak_pvp\"; $config['site']['useServerConfigCache'] = true; $config['site']['worlds'] = array(0 => 'RealBaiak'); $towns_list[0] = array(1 => 'Principal'); $config['site']['newchar_towns2'] = 1; // -- AQUI COLOQUE A CITY EM QUE O PERSONAGEM IRÁ NASCER $config['site']['google_captcha_key'] = ""; $config['site']['google_captcha_secret'] = ""; $config['site']['google_captcha_enabled'] = false; $config['site']['google_captcha_host'] = 'realbaiak.com'; #Clock $config['site']['clockactive'] = true; $config['site']['outfit_images_url'] = '/outfit.php'; $config['site']['item_images_url'] = '/images/items/'; $config['site']['item_images_extension'] = '.gif'; $config['site']['flag_images_url'] = '/images/flags/'; $config['site']['flag_images_extension'] = '.png'; $config['site']['players_group_id_block'] = 3; $config['site']['limitDeath'] = 8; $config['site']['levelVideo'] = 100; # PAGE: donate.php $config['site']['usePagseguro'] = true; //true show / false hide $config['site']['usePaypal'] = false; //true show / false hide $config['site']['useDeposit'] = true; //true show / false hide $config['site']['useZaypay'] = false; //true show / false hide $config['site']['useContenidopago'] = false; //true show / false hide $config['site']['useOnebip'] = false; //true show / false hide # Pagseguro config By IVENSPONTES $config['pagSeguro']['email'] = "jairolisboa20@hotmail.com"; //Email Pagseguro $config['pagSeguro']['token'] = "c42de904-e000-43f2-9bd6-becbae40c70fc02b1c934fbdac30e8693604f8ee4691334a-5d17-44e9-a06e-ea0c2a61af53"; // TOKEN $config['pagSeguro']['urlRedirect'] = 'http://baiak-wars.com/index.php?subtopic=pagconcluido'; //turn off redirect and notifications in pagseguro.com.br $config['pagSeguro']['urlNotification'] = 'http://baiak-wars.com/retpagseguro.php'; //your return location $config['pagSeguro']['productName'] = 'Premium Points'; $config['pagSeguro']['productValue'] = 1.00; // 1.50 = R$ 1,50 etc... $config['pagSeguro']['doublePoints'] = true; ## Double points - true is on / false is off $config['pagSeguro']['host'] = 'localhost'; ## YOUR HOST $config['pagSeguro']['database'] = 'baiak'; ## DATABASE $config['pagSeguro']['databaseUser'] = 'root'; ## USER $config['pagSeguro']['databasePass'] = 'b123147456'; ## PASSWORD # Create Account Options $config['site']['one_email'] = true; $config['site']['create_account_verify_mail'] = false; $config['site']['verify_code'] = false; $config['site']['email_days_to_change'] = 3; $config['site']['newaccount_premdays'] = 0; $config['site']['send_register_email'] = false; # Create Character Options $config['site']['newchar_vocations'][0] = array(1 => 'Sorcerer Sample', 2 => 'Druid Sample', 3 => 'Paladin Sample', 4 => 'Knight Sample'); $config['site']['newchar_towns'][0] = array(9); $config['site']['max_players_per_account'] = 10; # Emails Config $config['site']['send_emails'] = true; $config['site']['mail_address'] = "xxx@xxxx.com.br"; $config['site']['smtp_enabled'] = true; $config['site']['smtp_host'] = "smtp.xxxxx.com.br"; $config['site']['smtp_port'] = 587; $config['site']['smtp_auth'] = true; $config['site']['smtp_user'] = "xxx@xxx.com.br"; $config['site']['smtp_pass'] = "xxx"; # PAGE: whoisonline.php $config['site']['private-servlist.com_server_id'] = 0; /* Server id on 'private-servlist.com' to show Players Online Chart (whoisonline.php page), set 0 to disable Chart feature. To use this feature you must register on 'private-servlist.com' and add your server. Format: number, 0 [disable] or higher */ # PAGE: characters.php $config['site']['quests'] = array('Second Promote' => 722423, 'Cursed Skull' => 722424, 'Special Bags' => 722534, 'Headsplitter' => 722420, 'Donate Quest' => 722513, 'Spiritual Aura' => 722640, '5 Level quest' => 722350, 'Hidden Donate Quest' => 722538, 'PvP Task' => 722510, 'Gonka' => 121219, 'Mega Vip' => 53567, 'Hyper Boots' => 5751, 'Ultimate Donation Ring' => 922066, 'Fast Quest' => 56123, 'Mega Ring' => 54631, 'Vip 3' => 722650, 'Under Free Set' => 722702, 'Under Free Shield' => 722701); $config['site']['show_skills_info'] = false; $config['site']['show_vip_storage'] = 0; # PAGE: accountmanagement.php $config['site']['send_mail_when_change_password'] = false; $config['site']['send_mail_when_generate_reckey'] = false; $config['site']['generate_new_reckey'] = true; $config['site']['generate_new_reckey_price'] = 10; # PAGE: guilds.php $config['site']['guild_need_level'] = 8; $config['site']['guild_need_pacc'] = false; $config['site']['guild_image_size_kb'] = 50; $config['site']['guild_description_chars_limit'] = 2000; $config['site']['guild_description_lines_limit'] = 6; $config['site']['guild_motd_chars_limit'] = 250; # PAGE: adminpanel.php $config['site']['access_admin_panel'] = 3; $config['site']['access_tickers'] = 3; $config['site']['access_admin_painel'] = 3; $config['site']['access_staff_painel'] = 3; # PAGE: latestnews.php $config['site']['news_limit'] = 5; # PAGE: killstatistics.php $config['site']['last_deaths_limit'] = 40; # PAGE: team.php $config['site']['groups_support'] = array(2, 3, 4, 5, 6, 7); # PAGE: highscores.php $config['site']['groups_hidden'] = array(4, 5, 6, 7); $config['site']['accounts_hidden'] = array(1, 2); # PAGE: shopsystem.php $config['site']['shop_system'] = true; $config['site']['shopguild_system'] = true; # PAGE: lostaccount.php $config['site']['email_lai_sec_interval'] = 180; # Layout Config $config['site']['layout'] = 'tibiarl'; $config['site']['vdarkborder'] = '#505050'; $config['site']['darkborder'] = '#D4C0A1'; $config['site']['lightborder'] = '#F1E0C6'; $config['site']['download_page'] = true; $config['site']['serverinfo_page'] = true; ///Lista de itens Characters ///exemplo //$config['site']['itensname'] = array(ID DO ITEM => 'DESCRIÇÃO DO ITEM',ID DO ITEM => 'DESCRIÇÃO DO ITEM'); $config['site']['itensname'] = array( //PvP Backpack 12628 => '(club fighting +3, sword fighting +3, axe fighting +3, distance fighting +3, shielding +3, magic level +3, protection all +3%).<br><br><font color="green"><b><big>Item VIP</big></b></font>', //PvP Amulet 11387 => '(club fighting +6, sword fighting +6, axe fighting +6, distance fighting +6, shielding +6, magic level +6, protection all +4%).<br><br><font color="green"><b><big>Item VIP</big></b></font>', //PvP Cursed 5785 => '(club fighting +6, sword fighting +6, axe fighting +6, distance fighting +6, magic level +6, protection all +4%).<br><br><font color="green"><b><big>Item VIP</big></b></font>', //PvP Mage Legs 12623 => '(Arm:26, magic level +6, protection all +4%).<br><br><font color="green"><b><big>Item VIP</big></b></font>', //PvP Elite Legs 2504 => '(Arm:26, club fighting +6, sword fighting +6, axe fighting +6, protection all +4%).<br><br><font color="green"><b><big>Item VIP</big></b></font>', //PvP Royal Legs 5918 => '(Arm:26, distance fighting +6, protection all +4%).<br><br><font color="green"><b><big>Item VIP</big></b></font>', //PvP Mage Armor 12622 => '(Arm:26, magic level +6, protection all +4%).<br><br><font color="green"><b><big>Item VIP</big></b></font>', //PvP Elite Armor 2503 => '(Arm:26, club fighting +6, sword fighting +6, axe fighting +6, protection all +4%).<br><br><font color="green"><b><big>Item VIP</big></b></font>', //PvP Royal Armor 6100 => '(Arm:26, distance fighting +6, protection all +4%).<br><br><font color="green"><b><big>Item VIP</big></b></font>', //PvP Mage Helmet 12621 => '(Arm:26, magic level +6, protection all +4%).<br><br><font color="green"><b><big>Item VIP</big></b></font>', //PvP Elite Helmet 2496 => '(Arm:26, club fighting +6, sword fighting +6, axe fighting +6, protection all +4%).<br><br><font color="green"><b><big>Item VIP</big></b></font>', //PvP Royal Helmet 6099 => '(Arm:26, distance fighting +6, protection all +4%).<br><br><font color="green"><b><big>Item VIP</big></b></font>', //PvP Mage Book 12624 => '(Def:80, protection all +4%).<br><br><font color="green"><b><big>Item VIP</big></b></font>', //PvP Elite Shield 2538 => '(Def:100, protection all +4%).<br><br><font color="green"><b><big>Item VIP</big></b></font>', //PvP Royal Shield 2527 => '(Def:100, protection all +4%).<br><br><font color="green"><b><big>Item VIP</big></b></font>', //PvP Club 7429 => '(Atk:135).<br><br><font color="green"><b><big>Item VIP</big></b></font>', //PvP Sword 7407 => '(Atk:135).<br><br><font color="green"><b><big>Item VIP</big></b></font>', //PvP Axe 2443 => '(Atk:135).<br><br><font color="green"><b><big>Item VIP</big></b></font>', //PvP Slingshot 5907 => '(Atk:140).<br><br><font color="green"><b><big>Item VIP</big></b></font>', //PvP Staff 12288 => '(870~1000).<br><br><font color="green"><b><big>Item VIP</big></b></font>', //PvP Mage Boots 7892 => '(protection physical +3%, faster regeneration).<br><br><font color="green"><b><big>Item VIP</big></b></font>', //PvP Royal Boots 5462 => '(protection physical +3%, faster regeneration).<br><br><font color="green"><b><big>Item VIP</big></b></font>', //PvP Elite Boots 2646 => '(protection physical +3%, faster regeneration).<br><br><font color="green"><b><big>Item VIP</big></b></font>', //PvP Mage Ring 2123 => '(magic level +6, protection all +4%, faster regeneration).<br><br><font color="green"><b><big>Item VIP</big></b></font>', //PvP Elite Ring 2121 => '(club fighting +6, sword fighting +6, axe fighting +6, protection all +4%, faster regeneration).<br><br><font color="green"><b><big>Item VIP</big></b></font>', //PvP Royal Ring 6300 => '(distance fighting +6, protection all +4%, faster regeneration).<br><br><font color="green"><b><big>Item VIP</big></b></font>'); $SQLlink = mysqli_connect("localhost", "root", "", "ot1"); // EDITAVEL -- Muda aqui se tu deixar essa senha nego vai conseguir usar 1 coisinha que pega senha que esqueci o nome pq vc mexeu no mouse oaskdoaskdasodksa if (!$SQLlink) { echo "Error: Unable to connect to MySQL." . PHP_EOL; echo "Debugging errno: " . mysqli_connect_errno() . PHP_EOL; echo "Debugging error: " . mysqli_connect_error() . PHP_EOL; exit; } ?> Agradecido a quem puder me ajudar. 🥰
    • By XGaduX
      Como resolver esses erros?
    • By GaspaR1
      Galera estou enfrentando um problema no meu site na hora de criação de conta
      Já procurei em tudo que é lugar, acontece qnd eu desativo os inicias do site com os iniciais ativos a conta cria 100%, mas qnd eu desativo da isso ai + a conta cria..
      quem poder me ajudar urgente eu pago
       
      wpp : 85991761786 
      Discord : AlaOGaspar
      #7077
       
      Error: Incorrect integer value: '' for column 'key' at row 1
       
       
       
       
  • Recently Browsing   0 members

    No registered users viewing this page.


Open Tibia Server

Quer aprender a criar seu próprio servidor de Tibia? Então está no lugar certo, aqui você encontrará milhares de tutorias, scripts, códigos, mapas e utilitários para que você possa fazer o seu próprio servidor de Tibia começando do zero.

Redes Sociais

Anuncie no Tibia King

Precisa de mais visibilidade em seus projetos? Quer fazer um plano publicitário para o seu servidor? Anuncie no Tibia King e faça sua divulgação, possuímos centenas de acessos simultâneos e milhares diários, com certeza será a sua solução!

Tibia King Recomenda

DokeHost - Soluções em Hospedagem

VPS Windows
VPS Linux
Servidor VPS
×
×
  • Create New...