Hi~
My ENGLISH is no good.
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.
Make a 20161025-ShowDebris.php and Insert in includes\pages folder.....
Display All
Make a 20161025-debris.tpl and Insert in styles\templates folder.....
Display All
connect link: your server/game.php?page=showdebris
Thanks.....
My ENGLISH is no good.
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.
Make a 20161025-ShowDebris.php and Insert in includes\pages folder.....
PHP Source Code
- <?php
- if(!defined('INSIDE')) die('Hacking attempt!');
- function ShowDebris()
- {
- global $USER, $PLANET, $LNG, $UNI, $db;
- $PlanetRess = new ResourceUpdate();
- $PlanetRess->CalcResource();
- $PlanetRess->SavePlanetToDB();
- $template = new template();
- $edit = request_var('edit', '');
- switch($edit)
- {
- default:
- $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;");
- break;
- case 'met':
- $search = $db->query("SELECT `der_metal`, `der_crystal`, `galaxy`, `system`, `planet` FROM ".PLANETS." WHERE `universe` = '".$UNI."' ORDER BY `der_metal` DESC LIMIT 150;");
- break;
- case 'cry':
- $search = $db->query("SELECT `der_metal`, `der_crystal`, `galaxy`, `system`, `planet` FROM ".PLANETS." WHERE `universe` = '".$UNI."' ORDER BY `der_crystal` DESC LIMIT 150;");
- break;
- }
- if($USER['authlevel'] >= 3)
- {
- $i = 1;
- while($s = $db->fetch_array($search))
- {
- $SearchResult1[] = array(
- 'rank' => $i,
- 'der_metal' => number_format($s['der_metal']),
- 'der_crystal' => number_format($s['der_crystal']),
- 'galaxy1' => $s['galaxy'],
- 'system1' => $s['system'],
- 'planet1' => $s['planet'],
- );
- $i++;
- }
- $db->free_result($search);
- }
- $template->assign_vars(array(
- 'SearchResult' => $SearchResult1,
- 'userss' => $USER['authlevel'],
- ));
- $template->show("20161025-debris.tpl");
- }
- ?>
HTML Source Code
- {include file="overall_header.tpl"}
- {include file="overall_topnav.tpl"}
- {include file="left_menu.tpl"}
- {if $userss >= 3}
- <table border="0" cellpadding="0" cellspacing="1">
- <tr>
- <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>
- </tr>
- <tr>
- <td colspan="4" style="height:25px">choice->
- <a href="game.php?page=showdebris">【Metal+Crystal】</a>
- <a href="game.php?page=showdebris&edit=met">【Metal】</a>
- <a href="game.php?page=showdebris&edit=cry">【Crystal】</a>
- </td>
- </tr>
- <tr>
- <th height="27px">Rank</th>
- <th>coordinates</th>
- <th>Metal</th>
- <th>Crystal</th>
- </tr>
- {foreach item=SearchInfo from=$SearchResult}
- <tr>
- <td>{$SearchInfo.rank}</td>
- <td style="height:27px;">
- <a href="game.php?page=galaxy&mode=3&galaxy={$SearchInfo.galaxy1}&system={$SearchInfo.system1}">[{$SearchInfo.galaxy1}:{$SearchInfo.system1}:{$SearchInfo.planet1}]</a></td>
- <td>{$SearchInfo.der_metal}</td>
- <td>{$SearchInfo.der_crystal}</td>
- </tr>
- {/foreach}
- </table>
- {else}
- <table>
- <tr>
- <td>
- Thank you for using.
- </td>
- </tr>
- </table>
- {/if}
- </div>
- {include file="planet_menu.tpl"}
- {include file="overall_footer.tpl"}
connect link: your server/game.php?page=showdebris
Thanks.....
--------------------------------------------------------------------------------------