PageRenderTime 45ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/Templates/Build/27_2.tpl

https://bitbucket.org/Dzoki/travianx
Smarty Template | 217 lines | 173 code | 44 blank | 0 comment | 6 complexity | f0c4fec133ca6982d6a23b4165bb9951 MD5 | raw file
  1. <body>
  2. <div id="build" class="gid27">
  3. <a href="#" onclick="return Popup(27,4);" class="build_logo"><img class="building g27" src="img/x.gif" alt="Treasury" title="Treasury"></a>
  4. <h1>Treasury <span class="level">Level <?php
  5. echo $village->resarray['f' . $id];
  6. ?></span></h1>
  7. <p class="build_desc">The riches of your empire are kept in the treasury. The treasury has room for one treasure. After you have captured an artefact it takes 24 hours on a normal server or 12 hours on a thrice speed server to be effective.</p>
  8. <?php
  9. include ("27_menu.tpl");
  10. ?>
  11. <table id="show_artefacts" cellpadding="1" cellspacing="1">
  12. <thead>
  13. <tr>
  14. <th colspan="4">Small artefacts</th>
  15. </tr>
  16. <tr>
  17. <td></td>
  18. <td>Name</td>
  19. <td>Player</td>
  20. <td>Alliance</td>
  21. </tr>
  22. </thead>
  23. <tbody>
  24. <?php
  25. if(mysql_num_rows(mysql_query("SELECT * FROM " . TB_PREFIX . "artefacts")) == 0) {
  26. echo '<td colspan="4" class="none">There is no artefacts.</td>';
  27. } else {
  28. $artefact = mysql_query("SELECT * FROM `" . TB_PREFIX . "artefacts` WHERE size = 1 AND type = 1");
  29. while($row = mysql_fetch_array($artefact)) {
  30. echo '<tr>';
  31. echo '<td class="icon"><img class="artefact_icon_' . $row['type'] . '" src="img/x.gif" alt="" title=""></td>';
  32. echo '<td class="nam">';
  33. echo '<a href="build.php?id=' . $id . '&show='.$row['id'].'">' . $row['name'] . '</a> <span class="bon">' . $row['effect'] . '</span><div class="info">Treasury <b>10</b>, Effect <b>Village</b></div>';
  34. echo '</td>';
  35. echo '<td class="pla"><a href="karte.php?d=' . $row['vref'] . '&c=' . $generator->getMapCheck($row['vref']) . '">' . $database->getUserField($row['owner'], "username", 0) . '</a></td>';
  36. echo '<td class="al"><a href="allianz.php?aid=' . $database->getUserField($row['owner'], "alliance", 0) . '">' . $database->getAllianceName($database->getUserField($row['owner'], "alliance", 0)) . '</a></td>';
  37. echo '</tr>';
  38. }
  39. ?>
  40. <tr><td colspan="4"></td></tr>
  41. <?php
  42. unset($artefact);
  43. unset($row);
  44. $artefact = mysql_query("SELECT * FROM `" . TB_PREFIX . "artefacts` WHERE size = 1 AND type = 2");
  45. while($row = mysql_fetch_array($artefact)) {
  46. echo '<tr>';
  47. echo '<td class="icon"><img class="artefact_icon_' . $row['type'] . '" src="img/x.gif" alt="" title=""></td>';
  48. echo '<td class="nam">';
  49. echo '<a href="build.php?id=' . $id . '&show='.$row['id'].'">' . $row['name'] . '</a> <span class="bon">' . $row['effect'] . '</span><div class="info">Treasury <b>10</b>, Effect <b>Village</b></div>';
  50. echo '</td>';
  51. echo '<td class="pla"><a href="karte.php?d=' . $row['vref'] . '&c=' . $generator->getMapCheck($row['vref']) . '">' . $database->getUserField($row['owner'], "username", 0) . '</a></td>';
  52. echo '<td class="al"><a href="allianz.php?aid=' . $database->getUserField($row['owner'], "alliance", 0) . '">' . $database->getAllianceName($database->getUserField($row['owner'], "alliance", 0)) . '</a></td>';
  53. echo '</tr>';
  54. }
  55. ?>
  56. <tr><td colspan="4"></td></tr>
  57. <?php
  58. unset($artefact);
  59. unset($row);
  60. $artefact = mysql_query("SELECT * FROM `" . TB_PREFIX . "artefacts` WHERE size = 1 AND type = 3");
  61. while($row = mysql_fetch_array($artefact)) {
  62. echo '<tr>';
  63. echo '<td class="icon"><img class="artefact_icon_' . $row['type'] . '" src="img/x.gif" alt="" title=""></td>';
  64. echo '<td class="nam">';
  65. echo '<a href="build.php?id=' . $id . '&show='.$row['id'].'">' . $row['name'] . '</a> <span class="bon">' . $row['effect'] . '</span><div class="info">Treasury <b>10</b>, Effect <b>Village</b></div>';
  66. echo '</td>';
  67. echo '<td class="pla"><a href="karte.php?d=' . $row['vref'] . '&c=' . $generator->getMapCheck($row['vref']) . '">' . $database->getUserField($row['owner'], "username", 0) . '</a></td>';
  68. echo '<td class="al"><a href="allianz.php?aid=' . $database->getUserField($row['owner'], "alliance", 0) . '">' . $database->getAllianceName($database->getUserField($row['owner'], "alliance", 0)) . '</a></td>';
  69. echo '</tr>';
  70. }
  71. ?>
  72. <tr><td colspan="4"></td></tr>
  73. <?php
  74. unset($artefact);
  75. unset($row);
  76. $artefact = mysql_query("SELECT * FROM `" . TB_PREFIX . "artefacts` WHERE size = 1 AND type = 4");
  77. while($row = mysql_fetch_array($artefact)) {
  78. echo '<tr>';
  79. echo '<td class="icon"><img class="artefact_icon_' . $row['type'] . '" src="img/x.gif" alt="" title=""></td>';
  80. echo '<td class="nam">';
  81. echo '<a href="build.php?id=' . $id . '&show='.$row['id'].'">' . $row['name'] . '</a> <span class="bon">' . $row['effect'] . '</span><div class="info">Treasury <b>10</b>, Effect <b>Village</b></div>';
  82. echo '</td>';
  83. echo '<td class="pla"><a href="karte.php?d=' . $row['vref'] . '&c=' . $generator->getMapCheck($row['vref']) . '">' . $database->getUserField($row['owner'], "username", 0) . '</a></td>';
  84. echo '<td class="al"><a href="allianz.php?aid=' . $database->getUserField($row['owner'], "alliance", 0) . '">' . $database->getAllianceName($database->getUserField($row['owner'], "alliance", 0)) . '</a></td>';
  85. echo '</tr>';
  86. }
  87. ?>
  88. <tr><td colspan="4"></td></tr>
  89. <?php
  90. unset($artefact);
  91. unset($row);
  92. $artefact = mysql_query("SELECT * FROM `" . TB_PREFIX . "artefacts` WHERE size = 1 AND type = 5");
  93. while($row = mysql_fetch_array($artefact)) {
  94. echo '<tr>';
  95. echo '<td class="icon"><img class="artefact_icon_' . $row['type'] . '" src="img/x.gif" alt="" title=""></td>';
  96. echo '<td class="nam">';
  97. echo '<a href="build.php?id=' . $id . '&show='.$row['id'].'">' . $row['name'] . '</a> <span class="bon">' . $row['effect'] . '</span><div class="info">Treasury <b>10</b>, Effect <b>Village</b></div>';
  98. echo '</td>';
  99. echo '<td class="pla"><a href="karte.php?d=' . $row['vref'] . '&c=' . $generator->getMapCheck($row['vref']) . '">' . $database->getUserField($row['owner'], "username", 0) . '</a></td>';
  100. echo '<td class="al"><a href="allianz.php?aid=' . $database->getUserField($row['owner'], "alliance", 0) . '">' . $database->getAllianceName($database->getUserField($row['owner'], "alliance", 0)) . '</a></td>';
  101. echo '</tr>';
  102. }
  103. ?>
  104. <tr><td colspan="4"></td></tr>
  105. <?php
  106. unset($artefact);
  107. unset($row);
  108. $artefact = mysql_query("SELECT * FROM `" . TB_PREFIX . "artefacts` WHERE size = 1 AND type = 6");
  109. while($row = mysql_fetch_array($artefact)) {
  110. echo '<tr>';
  111. echo '<td class="icon"><img class="artefact_icon_' . $row['type'] . '" src="img/x.gif" alt="" title=""></td>';
  112. echo '<td class="nam">';
  113. echo '<a href="build.php?id=' . $id . '&show='.$row['id'].'">' . $row['name'] . '</a> <span class="bon">' . $row['effect'] . '</span><div class="info">Treasury <b>10</b>, Effect <b>Village</b></div>';
  114. echo '</td>';
  115. echo '<td class="pla"><a href="karte.php?d=' . $row['vref'] . '&c=' . $generator->getMapCheck($row['vref']) . '">' . $database->getUserField($row['owner'], "username", 0) . '</a></td>';
  116. echo '<td class="al"><a href="allianz.php?aid=' . $database->getUserField($row['owner'], "alliance", 0) . '">' . $database->getAllianceName($database->getUserField($row['owner'], "alliance", 0)) . '</a></td>';
  117. echo '</tr>';
  118. }
  119. ?>
  120. <tr><td colspan="4"></td></tr>
  121. <?php
  122. unset($artefact);
  123. unset($row);
  124. $artefact = mysql_query("SELECT * FROM `" . TB_PREFIX . "artefacts` WHERE size = 1 AND type = 7");
  125. while($row = mysql_fetch_array($artefact)) {
  126. echo '<tr>';
  127. echo '<td class="icon"><img class="artefact_icon_' . $row['type'] . '" src="img/x.gif" alt="" title=""></td>';
  128. echo '<td class="nam">';
  129. echo '<a href="build.php?id=' . $id . '&show='.$row['id'].'">' . $row['name'] . '</a> <span class="bon">' . $row['effect'] . '</span><div class="info">Treasury <b>10</b>, Effect <b>Village</b></div>';
  130. echo '</td>';
  131. echo '<td class="pla"><a href="karte.php?d=' . $row['vref'] . '&c=' . $generator->getMapCheck($row['vref']) . '">' . $database->getUserField($row['owner'], "username", 0) . '</a></td>';
  132. echo '<td class="al"><a href="allianz.php?aid=' . $database->getUserField($row['owner'], "alliance", 0) . '">' . $database->getAllianceName($database->getUserField($row['owner'], "alliance", 0)) . '</a></td>';
  133. echo '</tr>';
  134. }
  135. ?>
  136. <tr><td colspan="4"></td></tr>
  137. <?php
  138. unset($artefact);
  139. unset($row);
  140. $artefact = mysql_query("SELECT * FROM `" . TB_PREFIX . "artefacts` WHERE size = 2 AND type = 8");
  141. while($row = mysql_fetch_array($artefact)) {
  142. echo '<tr>';
  143. echo '<td class="icon"><img class="artefact_icon_' . $row['type'] . '" src="img/x.gif" alt="" title=""></td>';
  144. echo '<td class="nam">';
  145. echo '<a href="build.php?id=' . $id . '&show='.$row['id'].'">' . $row['name'] . '</a> <span class="bon">' . $row['effect'] . '</span><div class="info">Treasury <b>10</b>, Effect <b>Account</b></div>';
  146. echo '</td>';
  147. echo '<td class="pla"><a href="karte.php?d=' . $row['vref'] . '&c=' . $generator->getMapCheck($row['vref']) . '">' . $database->getUserField($row['owner'], "username", 0) . '</a></td>';
  148. echo '<td class="al"><a href="allianz.php?aid=' . $database->getUserField($row['owner'], "alliance", 0) . '">' . $database->getAllianceName($database->getUserField($row['owner'], "alliance", 0)) . '</a></td>';
  149. echo '</tr>';
  150. }
  151. unset($artefact);
  152. unset($row);
  153. $artefact = mysql_query("SELECT * FROM `" . TB_PREFIX . "artefacts` WHERE size = 1 AND type = 8");
  154. while($row = mysql_fetch_array($artefact)) {
  155. echo '<tr>';
  156. echo '<td class="icon"><img class="artefact_icon_' . $row['type'] . '" src="img/x.gif" alt="" title=""></td>';
  157. echo '<td class="nam">';
  158. echo '<a href="build.php?id=' . $id . '&show='.$row['id'].'">' . $row['name'] . '</a> <span class="bon">' . $row['effect'] . '</span><div class="info">Treasury <b>10</b>, Effect <b>Village</b></div>';
  159. echo '</td>';
  160. echo '<td class="pla"><a href="karte.php?d=' . $row['vref'] . '&c=' . $generator->getMapCheck($row['vref']) . '">' . $database->getUserField($row['owner'], "username", 0) . '</a></td>';
  161. echo '<td class="al"><a href="allianz.php?aid=' . $database->getUserField($row['owner'], "alliance", 0) . '">' . $database->getAllianceName($database->getUserField($row['owner'], "alliance", 0)) . '</a></td>';
  162. echo '</tr>';
  163. }
  164. ?>
  165. <tr><td colspan="4"></td></tr>
  166. <?php
  167. }
  168. ?>
  169. </tbody></table></div>
  170. <?php
  171. include ("upgrade.tpl");
  172. ?>
  173. </div>