Advertisement
Guest User

Cast

a guest
Apr 16th, 2013
460
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.52 KB | None | 0 0
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR...nsitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <style type="text/css">
  6. #siege{width:500px; height:300px;}
  7. .table {text-align:center; color:#000;}
  8. .rowt{font-size:17px; font-weight:normal;color:#000; font-family:"Trebuchet MS", Arial, Helvetica, sans-serif}
  9. .row {font-size:15px;font-family:"Trebuchet MS", Arial, Helvetica, sans-serif;}
  10. a:hover {background:#ffffff; text-decoration:none;} /* background-color e necessario para o IE6 */
  11. a.tooltip span {display:none; padding:2px 3px; margin-left:8px; width:auto;}
  12. a.tooltip:hover span{display:inline; position:absolute; background:#000; border:1px solid #666; color:#FFF; text-align:justify; font-size:12px; font-weight:bold;}
  13.  
  14. *{
  15. margin:0;
  16. padding:0;
  17. }
  18.  
  19. .text-cont {
  20. text-align:center;
  21. font-family:Tahoma, Geneva, sans-serif;
  22. font-size:12px;
  23. color:#000;
  24. margin-top:10px;
  25. margin-bottom:5px;
  26. }
  27.  
  28. #barra_cont {
  29. background:#0054a6;
  30. width:600px;
  31. height:35px;
  32. margin-top:10px;
  33. }
  34.  
  35. .titulo_cont {
  36. text-align:center;
  37. font-family:Tahoma, Geneva, sans-serif;
  38. font-size:14px;
  39. color:#FFF;
  40. padding:10px;
  41. }
  42.  
  43. .text-cont a {
  44. color: #09F;
  45. text-decoration:none;
  46. }
  47. .text-cont a:hover {
  48. color:#06F;
  49. }
  50.  
  51. </style>
  52. </head>
  53. <body>
  54. <div id="barra_cont">
  55. <div class="titulo_cont"># CASTLE SIEGE </div>
  56. </div>
  57. <div class="text-cont">
  58. <center>
  59. <div id="siege">
  60. <table width="500px" border="0" align="center">
  61. <tr class="rowt" align="center" height="25">
  62. <td>Castelo:</td>
  63. <td>Clan:</td>
  64. <td>Lord Castle:</td>
  65. <td>Alliança:</td>
  66. <td>Próxima Siege:</td>
  67. </tr>
  68. <?php
  69. $db['servidor'] = "localhost";//IP do dedicado
  70. $db['usuario_mysql'] = "root";// Usuario do mysql
  71. $db['senha_mysql'] = "sua senha";//Senha do mysql
  72. $db['banco_de_dados'] = "l2jdb";//Nome d banco de dados
  73. $open = mysql_connect($db['servidor'], $db['usuario_mysql'], $db['senha_mysql']) or die("Não foi possível conectar-se à database.");
  74. $select_db = mysql_select_db($db['banco_de_dados'], $open) or die("Database não encontrada ou inexistente.");
  75. $sql = mysql_query("SELECT * FROM castle ORDER BY name") or die(mysql_error());
  76. $cor = 0;
  77. while($c = mysql_fetch_array($sql)) {
  78. $cor = $cor + 1;
  79. $bg = $cor % 2 == 0 ? '#F1F1F1' : '#FFFFFF';
  80.  
  81. $cl = mysql_query("SELECT * FROM clan_data WHERE hasCastle = '".$c['id']."'") or die(mysql_error());
  82. $clan = mysql_fetch_array($cl);
  83.  
  84. $l = mysql_query("SELECT * FROM characters WHERE 'obj_id' = '".$clan['leader_id']."'") or die(mysql_error());
  85. $lord = mysql_fetch_array($l);
  86.  
  87. ?>
  88.  
  89. <tr bgcolor="<?php echo $bg; ?>" class="style8" align="center" height="23">
  90. <td><a style="color:#000;text-decoration:none;" href="#" class="tooltip" ><?php echo $c['name']; ?><span>Castle Name: <font color="#FF9900"><?php echo $c['name'];?></font><br />Tax Percent: <font color="#FF9900"><?php echo $c['taxPercent']."%"; ?></font></span> </a></td>
  91. <td><?php echo !empty($clan['clan_name']) ? $clan['clan_name'] : "No Clan"; ?></td>
  92. <td><?php echo !empty($lord['char_name']) ? $lord['char_name'] : "No Lord"; ?></td>
  93. <td><?php echo !empty($clan['ally_name']) ? $clan['ally_name'] : "No Ally"; ?></td>
  94. <td><?php echo @date('D\, j M Y H\:i',$c['siegeDate']/1000); ?></td>
  95. </tr>
  96. <?php
  97. }
  98. ?>
  99. </table>
  100. </div>
  101. </center>
  102. </div>
  103. </body>
  104. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement