Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [MySQL][PHP] Przerobienie Skryptu
rresz
post
Post #1





Grupa: Zarejestrowani
Postów: 3
Pomógł: 0
Dołączył: 14.09.2015

Ostrzeżenie: (0%)
-----


  1. <body background="/img/header.jpg"></body>
  2. <?
  3. header('Content-Type: text/html; charset=utf-8');
  4. ?>
  5. <html>
  6. <head>
  7. <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  8. <title>MultiDiaxoWorld - Lista Banow</title>
  9. </head>
  10. <body>
  11. <?php
  12.  
  13.  
  14.  
  15. // change these things
  16.  
  17. $server = "xyz";
  18. $dbuser = "xyz";
  19. $dbpass = "xyz";
  20. $dbname = "xyz";
  21.  
  22.  
  23.  
  24. mysql_connect($server, $dbuser, $dbpass);
  25. mysql_select_db($dbname);
  26.  
  27. $result = mysql_query("SELECT * FROM banlist ORDER BY time DESC");
  28.  
  29. echo "<table width=100% border=3 cellpadding=3 cellspacing=0>";
  30.  
  31. echo "<tr style=\"font-weight:bold\">
  32. <td><font color='red'>Nazwa Gracza:</font></td>
  33. <td>Powod:</td>
  34. <td>Banujacy:</td>
  35. <td>Data Zbanowania:</td>
  36. <td>Data Odbanowania:</td>
  37. </tr>";
  38.  
  39. while($row = mysql_fetch_assoc($result)){
  40.  
  41. if($col == "#eeeeee"){
  42. $col = "#ffffff";
  43. }else{
  44. $col = "#eeeeee";
  45. }
  46. echo "<tr bgcolor=$col>";
  47.  
  48. echo "<td>".$row['name']."</td>";
  49. echo "<td>".$row['reason']."</td>";
  50. echo "<td>".$row['admin']."</td>";
  51. echo "<td>".date("d M, Y g:ia",$row['time'])."</td>";
  52. if($row['temptime'] == "0"){
  53. echo "<td><font color='red'>Nigdy</font></td>";
  54. }else{
  55. echo "<td>".date("d M, Y g:ia",$row['temptime'])."</td>";
  56. }
  57.  
  58. echo "</tr>";
  59. }
  60.  
  61. echo"</table>"
  62. ?>
  63. <script type="text/javascript">
  64. document.getElementsByTagName("div")[0].style.display = "none";
  65. </script>
  66. <style type="text/css">/*<![CDATA[ */
  67. .cbalink {
  68. display:none;
  69. }
  70. /*]]>*/</style>
  71.  
  72.  
  73. </body></html>

Oto skrypt chciałbym uzyskac z niego coś takiego jak tutaj:

... < jak treść strony będzie na poziomie - możesz wkleić link

Tam gdzie jest xyz tam sa moje dane

Ten post edytował Kshyhoo 14.09.2015, 17:00:52
Powód edycji: [Kshyhoo]: usunięty link - wulgaryzmy na stronie, BB-CODE, TAGI
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 22.08.2025 - 04:52