[DEPRECATED] Show Debris

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • [DEPRECATED] Show Debris

      Hi~
      My ENGLISH is no good. X/
      My development mode is Galaxy show debris.
      This version is 2moons 1.3 ~ 1.6...
      But, It is easy to change to version 1.7.
      Can be viewed as a Debris Metal or Debris Crystal rank.


      Add the game.php.

      PHP Source Code

      1. case 'showdebris':
      2. include_once(ROOT_PATH . 'includes/pages/20161025-ShowDebris.php');
      3. ShowDebris();
      4. break;

      Make a 20161025-ShowDebris.php and Insert in includes\pages folder.....

      PHP Source Code

      1. <?php
      2. if(!defined('INSIDE')) die('Hacking attempt!');
      3. function ShowDebris()
      4. {
      5. global $USER, $PLANET, $LNG, $UNI, $db;
      6. $PlanetRess = new ResourceUpdate();
      7. $PlanetRess->CalcResource();
      8. $PlanetRess->SavePlanetToDB();
      9. $template = new template();
      10. $edit = request_var('edit', '');
      11. switch($edit)
      12. {
      13. default:
      14. $search = $db->query("SELECT `der_metal`, `der_crystal`, `galaxy`, `system`, `planet` FROM ".PLANETS." WHERE `universe` = '".$UNI."' ORDER BY (`der_metal` + (`der_crystal` * 2)) DESC LIMIT 150;");
      15. break;
      16. case 'met':
      17. $search = $db->query("SELECT `der_metal`, `der_crystal`, `galaxy`, `system`, `planet` FROM ".PLANETS." WHERE `universe` = '".$UNI."' ORDER BY `der_metal` DESC LIMIT 150;");
      18. break;
      19. case 'cry':
      20. $search = $db->query("SELECT `der_metal`, `der_crystal`, `galaxy`, `system`, `planet` FROM ".PLANETS." WHERE `universe` = '".$UNI."' ORDER BY `der_crystal` DESC LIMIT 150;");
      21. break;
      22. }
      23. if($USER['authlevel'] >= 3)
      24. {
      25. $i = 1;
      26. while($s = $db->fetch_array($search))
      27. {
      28. $SearchResult1[] = array(
      29. 'rank' => $i,
      30. 'der_metal' => number_format($s['der_metal']),
      31. 'der_crystal' => number_format($s['der_crystal']),
      32. 'galaxy1' => $s['galaxy'],
      33. 'system1' => $s['system'],
      34. 'planet1' => $s['planet'],
      35. );
      36. $i++;
      37. }
      38. $db->free_result($search);
      39. }
      40. $template->assign_vars(array(
      41. 'SearchResult' => $SearchResult1,
      42. 'userss' => $USER['authlevel'],
      43. ));
      44. $template->show("20161025-debris.tpl");
      45. }
      46. ?>
      Display All
      Make a 20161025-debris.tpl and Insert in styles\templates folder.....


      HTML Source Code

      1. {include file="overall_header.tpl"}
      2. {include file="overall_topnav.tpl"}
      3. {include file="left_menu.tpl"}
      4. {if $userss >= 3}
      5. <table border="0" cellpadding="0" cellspacing="1">
      6. <tr>
      7. <th colspan="4" style="text-align:center;background-color:transparent;height:30px;color:#fff;font-weight:700;font-size:14px">Show Debris(Top 1 ~ 150)</th>
      8. </tr>
      9. <tr>
      10. <td colspan="4" style="height:25px">choice->
      11. <a href="game.php?page=showdebris">【Metal+Crystal】</a>
      12. <a href="game.php?page=showdebris&edit=met">【Metal】</a>
      13. <a href="game.php?page=showdebris&edit=cry">【Crystal】</a>
      14. </td>
      15. </tr>
      16. <tr>
      17. <th height="27px">Rank</th>
      18. <th>coordinates</th>
      19. <th>Metal</th>
      20. <th>Crystal</th>
      21. </tr>
      22. {foreach item=SearchInfo from=$SearchResult}
      23. <tr>
      24. <td>{$SearchInfo.rank}</td>
      25. <td style="height:27px;">
      26. <a href="game.php?page=galaxy&mode=3&galaxy={$SearchInfo.galaxy1}&system={$SearchInfo.system1}">[{$SearchInfo.galaxy1}:{$SearchInfo.system1}:{$SearchInfo.planet1}]</a></td>
      27. <td>{$SearchInfo.der_metal}</td>
      28. <td>{$SearchInfo.der_crystal}</td>
      29. </tr>
      30. {/foreach}
      31. </table>
      32. {else}
      33. <table>
      34. <tr>
      35. <td>
      36. Thank you for using.
      37. </td>
      38. </tr>
      39. </table>
      40. {/if}
      41. </div>
      42. {include file="planet_menu.tpl"}
      43. {include file="overall_footer.tpl"}
      Display All



      connect link: your server/game.php?page=showdebris

      Thanks.....

      --------------------------------------------------------------------------------------