Ir para conteúdo
  • Cadastre-se

Posts Recomendados

Pessoal, eu preciso de ajuda com a página de ranking do meu site.

 

Já tentei mudar para aparecer o nome da vocação exemplo (Elite Knight) etc, porém, ele só traz o ID da você conforme imagem.

 

Alguém pode me ajudar com um IF no PHP para trazer o nome da vocação?

 

<?php

 $skills = $SQL->query('SELECT * FROM players WHERE deleted = 0 AND group_id = 1 AND vocation > 0 AND account_id != 1 ORDER BY level DESC LIMIT 5');

?>

 

<div id="TopLvl">

 <h3 class="TopLvl_title">Top 5 Experience</h3>

 <?php

  $a = 1;

  $vocations = $config['site']['TopExperienceVoc'];

   foreach($skills as $skill) {

   $outfit = 'http://outfits.ferobraglobal.com/animoutfit.php?id='.$skill['looktype'].'&addons='.$skill['lookaddons'].'&head='.$skill['lookhead'].'&body='.$skill['lookbody'].'&legs='.$skill['looklegs'].'&feet='.$skill['lookfeet'].'';

 ?>

 <div class="tplevellayout">

  <a class="topleveltext top_offline" style="text-decoration:none" href="?subtopic=characters&name=<?=$skill['name']?>">

   <div class="outfitImgtoplevel" style="background:url(<?=$outfit?>);"></div>

   <span><?=$a?></span> - <?=$skill['name']?><br>

   <small>&nbsp;&nbsp;&nbsp;&nbsp;Level: (<?=$skill['level']?>)<br/>

 

<small>&nbsp;&nbsp;&nbsp;&nbsp;Voc: (<?=$skill['vocation']?>)<br/>

 

 </small>

   <span class="firstlevel">

    <span id="firstlevel"></span>

   </span>

 

   <div class="rankinglevel">

    <?php if($a == 1){

     echo "<span class=\"firstlevel\"></span>";

    }elseif ($a == 2){

     echo "<span class=\"secondlevel\"></span>";

    }elseif ($a == 3){

     echo "<span class=\"thirdlevel\"></span>";

    }?>

   </div>

  </a>

 </div>

 <?php $a++; } ?>        

</div>

 

Muito obrigado

Screenshot_20201125-214920.png

Link para o post
Compartilhar em outros sites
Em 29/11/2020 em 00:17, Nolis disse:

Este tópico foi movido para a seção de Suporte Otserv.

Consegue ajudar?

 

Em 29/11/2020 em 00:17, Nolis disse:

Este tópico foi movido para a seção de Suporte Otserv.

 

Em 29/11/2020 em 00:17, Nolis disse:

Este tópico foi movido para a seção de Suporte Otserv.

 

Link para o post
Compartilhar em outros sites
Spoiler

<?php

 $skills = $SQL->query('SELECT * FROM players WHERE deleted = 0 AND group_id = 1 AND vocation > 0 AND account_id != 1 ORDER BY level DESC LIMIT 5');

?>

 

<div id="TopLvl">

 <h3 class="TopLvl_title">Top 5 Experience</h3>

 <?php

  $a = 1;

  $vocations = $config['site']['TopExperienceVoc'];

   foreach($skills as $skill) {

   $outfit = 'http://outfits.ferobraglobal.com/animoutfit.php?id='.$skill['looktype'].'&addons='.$skill['lookaddons'].'&head='.$skill['lookhead'].'&body='.$skill['lookbody'].'&legs='.$skill['looklegs'].'&feet='.$skill['lookfeet'].'';

 ?>

 <div class="tplevellayout">

  <a class="topleveltext top_offline" style="text-decoration:none" href="?subtopic=characters&name=<?=$skill['name']?>">

   <div class="outfitImgtoplevel" style="background:url(<?=$outfit?>);"></div>

   <span><?=$a?></span> - <?=$skill['name']?><br>

   <small>&nbsp;&nbsp;&nbsp;&nbsp;Level: (<?=$skill['level']?>)<br/>

 

<small>&nbsp;&nbsp;&nbsp;&nbsp;Voc: (<?=$getPromotion['vocation']?>)<br/>

 

 </small>

   <span class="firstlevel">

    <span id="firstlevel"></span>

   </span>

 

   <div class="rankinglevel">

    <?php if($a == 1){

     echo "<span class=\"firstlevel\"></span>";

    }elseif ($a == 2){

     echo "<span class=\"secondlevel\"></span>";

    }elseif ($a == 3){

     echo "<span class=\"thirdlevel\"></span>";

    }?>

   </div>

  </a>

 </div>

 <?php $a++; } ?>        

</div>

Testa ai

Link para o post
Compartilhar em outros sites
59 minutos atrás, Nysman disse:
  Ocultar conteúdo

<?php

 $skills = $SQL->query('SELECT * FROM players WHERE deleted = 0 AND group_id = 1 AND vocation > 0 AND account_id != 1 ORDER BY level DESC LIMIT 5');

?>

 

<div id="TopLvl">

 <h3 class="TopLvl_title">Top 5 Experience</h3>

 <?php

  $a = 1;

  $vocations = $config['site']['TopExperienceVoc'];

   foreach($skills as $skill) {

   $outfit = 'http://outfits.ferobraglobal.com/animoutfit.php?id='.$skill['looktype'].'&addons='.$skill['lookaddons'].'&head='.$skill['lookhead'].'&body='.$skill['lookbody'].'&legs='.$skill['looklegs'].'&feet='.$skill['lookfeet'].'';

 ?>

 <div class="tplevellayout">

  <a class="topleveltext top_offline" style="text-decoration:none" href="?subtopic=characters&name=<?=$skill['name']?>">

   <div class="outfitImgtoplevel" style="background:url(<?=$outfit?>);"></div>

   <span><?=$a?></span> - <?=$skill['name']?><br>

   <small>&nbsp;&nbsp;&nbsp;&nbsp;Level: (<?=$skill['level']?>)<br/>

 

<small>&nbsp;&nbsp;&nbsp;&nbsp;Voc: (<?=$getPromotion['vocation']?>)<br/>

 

 </small>

   <span class="firstlevel">

    <span id="firstlevel"></span>

   </span>

 

   <div class="rankinglevel">

    <?php if($a == 1){

     echo "<span class=\"firstlevel\"></span>";

    }elseif ($a == 2){

     echo "<span class=\"secondlevel\"></span>";

    }elseif ($a == 3){

     echo "<span class=\"thirdlevel\"></span>";

    }?>

   </div>

  </a>

 </div>

 <?php $a++; } ?>        

</div>

Testa ai

1 hora atrás, Nysman disse:
  Ocultar conteúdo
1 hora atrás, Nysman disse:
  Ocultar conteúdo

<?php

 $skills = $SQL->query('SELECT * FROM players WHERE deleted = 0 AND group_id = 1 AND vocation > 0 AND account_id != 1 ORDER BY level DESC LIMIT 5');

?>

 

<div id="TopLvl">

 <h3 class="TopLvl_title">Top 5 Experience</h3>

 <?php

  $a = 1;

  $vocations = $config['site']['TopExperienceVoc'];

   foreach($skills as $skill) {

   $outfit = 'http://outfits.ferobraglobal.com/animoutfit.php?id='.$skill['looktype'].'&addons='.$skill['lookaddons'].'&head='.$skill['lookhead'].'&body='.$skill['lookbody'].'&legs='.$skill['looklegs'].'&feet='.$skill['lookfeet'].'';

 ?>

 <div class="tplevellayout">

  <a class="topleveltext top_offline" style="text-decoration:none" href="?subtopic=characters&name=<?=$skill['name']?>">

   <div class="outfitImgtoplevel" style="background:url(<?=$outfit?>);"></div>

   <span><?=$a?></span> - <?=$skill['name']?><br>

   <small>&nbsp;&nbsp;&nbsp;&nbsp;Level: (<?=$skill['level']?>)<br/>

 

<small>&nbsp;&nbsp;&nbsp;&nbsp;Voc: (<?=$getPromotion['vocation']?>)<br/>

 

 </small>

   <span class="firstlevel">

    <span id="firstlevel"></span>

   </span>

 

   <div class="rankinglevel">

    <?php if($a == 1){

     echo "<span class=\"firstlevel\"></span>";

    }elseif ($a == 2){

     echo "<span class=\"secondlevel\"></span>";

    }elseif ($a == 3){

     echo "<span class=\"thirdlevel\"></span>";

    }?>

   </div>

  </a>

 </div>

 <?php $a++; } ?>        

</div>

Testa ai

<?php

 $skills = $SQL->query('SELECT * FROM players WHERE deleted = 0 AND group_id = 1 AND vocation > 0 AND account_id != 1 ORDER BY level DESC LIMIT 5');

?>

 

<div id="TopLvl">

 <h3 class="TopLvl_title">Top 5 Experience</h3>

 <?php

  $a = 1;

  $vocations = $config['site']['TopExperienceVoc'];

   foreach($skills as $skill) {

   $outfit = 'http://outfits.ferobraglobal.com/animoutfit.php?id='.$skill['looktype'].'&addons='.$skill['lookaddons'].'&head='.$skill['lookhead'].'&body='.$skill['lookbody'].'&legs='.$skill['looklegs'].'&feet='.$skill['lookfeet'].'';

 ?>

 <div class="tplevellayout">

  <a class="topleveltext top_offline" style="text-decoration:none" href="?subtopic=characters&name=<?=$skill['name']?>">

   <div class="outfitImgtoplevel" style="background:url(<?=$outfit?>);"></div>

   <span><?=$a?></span> - <?=$skill['name']?><br>

   <small>&nbsp;&nbsp;&nbsp;&nbsp;Level: (<?=$skill['level']?>)<br/>

 

<small>&nbsp;&nbsp;&nbsp;&nbsp;Voc: (<?=$getPromotion['vocation']?>)<br/>

 

 </small>

   <span class="firstlevel">

    <span id="firstlevel"></span>

   </span>

 

   <div class="rankinglevel">

    <?php if($a == 1){

     echo "<span class=\"firstlevel\"></span>";

    }elseif ($a == 2){

     echo "<span class=\"secondlevel\"></span>";

    }elseif ($a == 3){

     echo "<span class=\"thirdlevel\"></span>";

    }?>

   </div>

  </a>

 </div>

 <?php $a++; } ?>        

</div>

Testa ai

Em 29/11/2020 em 00:17, Nolis disse:

Este tópico foi movido para a seção de Suporte Otserv.

Consegue ajudar?

 

Em 29/11/2020 em 00:17, Nolis disse:

Este tópico foi movido para a seção de Suporte Otserv.

 

Em 29/11/2020 em 00:17, Nolis disse:

Este tópico foi movido para a seção de Suporte Otserv.

 

 

Infelizmente não deu certo, pode avaliar se existe outra forma?

Screenshot_20201203-120904.png

Link para o post
Compartilhar em outros sites

Agora vai funcionar:

Spoiler

<?php

 $skills = $SQL->query('SELECT * FROM players WHERE deleted = 0 AND group_id = 1 AND vocation > 0 AND account_id != 1 ORDER BY level DESC LIMIT 5');

?>

 

<div id="TopLvl">

 <h3 class="TopLvl_title">Top 5 Experience</h3>

 <?php

  $a = 1;

  $vocations = $config['site']['TopExperienceVoc'];

   foreach($skills as $skill) {

   $outfit = 'http://outfits.ferobraglobal.com/animoutfit.php?id='.$skill['looktype'].'&addons='.$skill['lookaddons'].'&head='.$skill['lookhead'].'&body='.$skill['lookbody'].'&legs='.$skill['looklegs'].'&feet='.$skill['lookfeet'].'';

 ?>

 <div class="tplevellayout">

  <a class="topleveltext top_offline" style="text-decoration:none" href="?subtopic=characters&name=<?=$skill['name']?>">

   <div class="outfitImgtoplevel" style="background:url(<?=$outfit?>);"></div>

   <span><?=$a?></span> - <?=$skill['name']?><br>

   <small>&nbsp;&nbsp;&nbsp;&nbsp;Level: (<?=$skill['level']?>)<br/>

 

<small>&nbsp;&nbsp;&nbsp;&nbsp; <?php echo getVocationName($player->getVocation(), $player->getPromotion()); ?></br>

 

 </small>

   <span class="firstlevel">

    <span id="firstlevel"></span>

   </span>

 

   <div class="rankinglevel">

    <?php if($a == 1){

     echo "<span class=\"firstlevel\"></span>";

    }elseif ($a == 2){

     echo "<span class=\"secondlevel\"></span>";

    }elseif ($a == 3){

     echo "<span class=\"thirdlevel\"></span>";

    }?>

   </div>

  </a>

 </div>

 <?php $a++; } ?>        

</div>

 

Link para o post
Compartilhar em outros sites
47 minutos atrás, Nysman disse:

Agora vai funcionar:

  Mostrar conteúdo oculto

<?php

 $skills = $SQL->query('SELECT * FROM players WHERE deleted = 0 AND group_id = 1 AND vocation > 0 AND account_id != 1 ORDER BY level DESC LIMIT 5');

?>

 

<div id="TopLvl">

 <h3 class="TopLvl_title">Top 5 Experience</h3>

 <?php

  $a = 1;

  $vocations = $config['site']['TopExperienceVoc'];

   foreach($skills as $skill) {

   $outfit = 'http://outfits.ferobraglobal.com/animoutfit.php?id='.$skill['looktype'].'&addons='.$skill['lookaddons'].'&head='.$skill['lookhead'].'&body='.$skill['lookbody'].'&legs='.$skill['looklegs'].'&feet='.$skill['lookfeet'].'';

 ?>

 <div class="tplevellayout">

  <a class="topleveltext top_offline" style="text-decoration:none" href="?subtopic=characters&name=<?=$skill['name']?>">

   <div class="outfitImgtoplevel" style="background:url(<?=$outfit?>);"></div>

   <span><?=$a?></span> - <?=$skill['name']?><br>

   <small>&nbsp;&nbsp;&nbsp;&nbsp;Level: (<?=$skill['level']?>)<br/>

 

<small>&nbsp;&nbsp;&nbsp;&nbsp; <?php echo getVocationName($player->getVocation(), $player->getPromotion()); ?></br>

 

 </small>

   <span class="firstlevel">

    <span id="firstlevel"></span>

   </span>

 

   <div class="rankinglevel">

    <?php if($a == 1){

     echo "<span class=\"firstlevel\"></span>";

    }elseif ($a == 2){

     echo "<span class=\"secondlevel\"></span>";

    }elseif ($a == 3){

     echo "<span class=\"thirdlevel\"></span>";

    }?>

   </div>

  </a>

 </div>

 <?php $a++; } ?>        

</div>

 

Não foi novamente :(

Screenshot_20201203-142737~2.png

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

Não foi novamente :(

Screenshot_20201203-142737~2.png

Poxa, aqui funcionou, mas acho o site ñ é a mesma coisa que o seu.

Testa pra mim por favor:

Spoiler

<?php

 $skills = $SQL->query('SELECT * FROM players WHERE deleted = 0 AND group_id = 1 AND vocation > 0 AND account_id != 1 ORDER BY level DESC LIMIT 5');

?>

 

<div id="TopLvl">

 <h3 class="TopLvl_title">Top 5 Experience</h3>

 <?php

  $a = 1;

  $vocations = $config['site']['TopExperienceVoc'];

   foreach($skills as $skill) {

   $outfit = 'http://outfits.ferobraglobal.com/animoutfit.php?id='.$skill['looktype'].'&addons='.$skill['lookaddons'].'&head='.$skill['lookhead'].'&body='.$skill['lookbody'].'&legs='.$skill['looklegs'].'&feet='.$skill['lookfeet'].'';

 ?>

 <div class="tplevellayout">

  <a class="topleveltext top_offline" style="text-decoration:none" href="?subtopic=characters&name=<?=$skill['name']?>">

   <div class="outfitImgtoplevel" style="background:url(<?=$outfit?>);"></div>

   <span><?=$a?></span> - <?=$skill['name']?><br>

   <small>&nbsp;&nbsp;&nbsp;&nbsp;Level: (<?=$skill['level']?>)<br/>

 

<small>&nbsp;&nbsp;&nbsp;&nbsp;Voc: (<?=$getName['vocation']?>)<br/>

 

 </small>

   <span class="firstlevel">

    <span id="firstlevel"></span>

   </span>

 

   <div class="rankinglevel">

    <?php if($a == 1){

     echo "<span class=\"firstlevel\"></span>";

    }elseif ($a == 2){

     echo "<span class=\"secondlevel\"></span>";

    }elseif ($a == 3){

     echo "<span class=\"thirdlevel\"></span>";

    }?>

   </div>

  </a>

 </div>

 <?php $a++; } ?>        

</div>

Ou

Spoiler

<?php

 $skills = $SQL->query('SELECT * FROM players WHERE deleted = 0 AND group_id = 1 AND vocation > 0 AND account_id != 1 ORDER BY level DESC LIMIT 5');

?>

 

<div id="TopLvl">

 <h3 class="TopLvl_title">Top 5 Experience</h3>

 <?php

  $a = 1;

  $vocations = $config['site']['TopExperienceVoc'];

   foreach($skills as $skill) {

   $outfit = 'http://outfits.ferobraglobal.com/animoutfit.php?id='.$skill['looktype'].'&addons='.$skill['lookaddons'].'&head='.$skill['lookhead'].'&body='.$skill['lookbody'].'&legs='.$skill['looklegs'].'&feet='.$skill['lookfeet'].'';

 ?>

 <div class="tplevellayout">

  <a class="topleveltext top_offline" style="text-decoration:none" href="?subtopic=characters&name=<?=$skill['name']?>">

   <div class="outfitImgtoplevel" style="background:url(<?=$outfit?>);"></div>

   <span><?=$a?></span> - <?=$skill['name']?><br>

   <small>&nbsp;&nbsp;&nbsp;&nbsp;Level: (<?=$skill['level']?>)<br/>

 

<small>&nbsp;&nbsp;&nbsp;&nbsp;Voc: (<?=$name['vocation']?>)<br/>

 

 </small>

   <span class="firstlevel">

    <span id="firstlevel"></span>

   </span>

 

   <div class="rankinglevel">

    <?php if($a == 1){

     echo "<span class=\"firstlevel\"></span>";

    }elseif ($a == 2){

     echo "<span class=\"secondlevel\"></span>";

    }elseif ($a == 3){

     echo "<span class=\"thirdlevel\"></span>";

    }?>

   </div>

  </a>

 </div>

 <?php $a++; } ?>        

</div>

 

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

Poxa, aqui funcionou, mas acho o site ñ é a mesma coisa que o seu.

Testa pra mim por favor:

  Ocultar conteúdo

<?php

 $skills = $SQL->query('SELECT * FROM players WHERE deleted = 0 AND group_id = 1 AND vocation > 0 AND account_id != 1 ORDER BY level DESC LIMIT 5');

?>

 

<div id="TopLvl">

 <h3 class="TopLvl_title">Top 5 Experience</h3>

 <?php

  $a = 1;

  $vocations = $config['site']['TopExperienceVoc'];

   foreach($skills as $skill) {

   $outfit = 'http://outfits.ferobraglobal.com/animoutfit.php?id='.$skill['looktype'].'&addons='.$skill['lookaddons'].'&head='.$skill['lookhead'].'&body='.$skill['lookbody'].'&legs='.$skill['looklegs'].'&feet='.$skill['lookfeet'].'';

 ?>

 <div class="tplevellayout">

  <a class="topleveltext top_offline" style="text-decoration:none" href="?subtopic=characters&name=<?=$skill['name']?>">

   <div class="outfitImgtoplevel" style="background:url(<?=$outfit?>);"></div>

   <span><?=$a?></span> - <?=$skill['name']?><br>

   <small>&nbsp;&nbsp;&nbsp;&nbsp;Level: (<?=$skill['level']?>)<br/>

 

<small>&nbsp;&nbsp;&nbsp;&nbsp;Voc: (<?=$getName['vocation']?>)<br/>

 

 </small>

   <span class="firstlevel">

    <span id="firstlevel"></span>

   </span>

 

   <div class="rankinglevel">

    <?php if($a == 1){

     echo "<span class=\"firstlevel\"></span>";

    }elseif ($a == 2){

     echo "<span class=\"secondlevel\"></span>";

    }elseif ($a == 3){

     echo "<span class=\"thirdlevel\"></span>";

    }?>

   </div>

  </a>

 </div>

 <?php $a++; } ?>        

</div>

Ou

  Mostrar conteúdo oculto

<?php

 $skills = $SQL->query('SELECT * FROM players WHERE deleted = 0 AND group_id = 1 AND vocation > 0 AND account_id != 1 ORDER BY level DESC LIMIT 5');

?>

 

<div id="TopLvl">

 <h3 class="TopLvl_title">Top 5 Experience</h3>

 <?php

  $a = 1;

  $vocations = $config['site']['TopExperienceVoc'];

   foreach($skills as $skill) {

   $outfit = 'http://outfits.ferobraglobal.com/animoutfit.php?id='.$skill['looktype'].'&addons='.$skill['lookaddons'].'&head='.$skill['lookhead'].'&body='.$skill['lookbody'].'&legs='.$skill['looklegs'].'&feet='.$skill['lookfeet'].'';

 ?>

 <div class="tplevellayout">

  <a class="topleveltext top_offline" style="text-decoration:none" href="?subtopic=characters&name=<?=$skill['name']?>">

   <div class="outfitImgtoplevel" style="background:url(<?=$outfit?>);"></div>

   <span><?=$a?></span> - <?=$skill['name']?><br>

   <small>&nbsp;&nbsp;&nbsp;&nbsp;Level: (<?=$skill['level']?>)<br/>

 

<small>&nbsp;&nbsp;&nbsp;&nbsp;Voc: (<?=$name['vocation']?>)<br/>

 

 </small>

   <span class="firstlevel">

    <span id="firstlevel"></span>

   </span>

 

   <div class="rankinglevel">

    <?php if($a == 1){

     echo "<span class=\"firstlevel\"></span>";

    }elseif ($a == 2){

     echo "<span class=\"secondlevel\"></span>";

    }elseif ($a == 3){

     echo "<span class=\"thirdlevel\"></span>";

    }?>

   </div>

  </a>

 </div>

 <?php $a++; } ?>        

</div>

 

Infelizmente não, ambos não apareceu

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.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo