Public paste
Script
By: Sebastian | Date: Mar 27 2008 16:19 | Format: PHP | Expires: never | Size: 3.03 KB | Hits: 820

  1. <?php
  2. $dbhost = "mysql4.ff-weibersbrunn.de";
  3. $dbuser = "db154263_1";
  4. $dbpass = "Mk8arEAflSbLZ996";
  5. $dbname = "db154263_1";
  6. $db_connect = mysql_connect($dbhost, $dbuser, $dbpass);
  7. @mysql_select_db("$dbname") or die("Datenbank nicht gefunden1");
  8.  
  9. ?>
  10.  
  11.  
  12. <html>
  13.  
  14. <head>
  15. <meta http-equiv="Content-Language" content="de">
  16. <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
  17. <title>Einsätze 2008</title>
  18. </head>
  19.  
  20. <body background="../images/background.jpg">
  21.  
  22. <p align="center">
  23. <font face="Monotype Corsiva" style="font-size: 32pt" color="#FF0000">Einsätze 2008</font></p>
  24. <center><table style="border-style:solid; border-color:red; border-width:1" width="90%" cellpadding="3">
  25.      <tr>
  26.           <td style="border-style: solid; border-width: 1px; border-color:red">
  27.           <p align="center"><font face="Arial">Datum</font></td>
  28.           <td style="border-style: solid; border-width: 1px; border-color:red">
  29.           <p align="center"><font face="Arial">Uhrzeit</font></td>
  30.           <td style="border-style: solid; border-width: 1px; border-color:red">
  31.           <p align="center"><font face="Arial">AL</font></td>
  32.           <td style="border-style: solid; border-width: 1px; border-color:red">
  33.                   <font face="Arial">Art des Einsatzes / Einsatzort</font></td>
  34.           <td style="border-style: solid; border-width: 1px; border-color:red">
  35.           <p align="center"><font face="Arial">Bericht</font></td>
  36.      </tr>
  37. <?php
  38. $query = mysql_query("select * from einsaetze order by time desc");
  39. $monthnames = array("", "Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember");
  40.  
  41. while ($row = mysql_fetch_array($query)) {
  42.     if ($month != date("M, Y", $row['time'])) {
  43.         $month = date("M, Y", $row['time']);
  44.         echo "<tr><td style="border-style: solid; border-width: 1px; border-color:red" colspan='5'><font face="Arial"><b>" . $monthnames[round(date("m", $row['time']))] . ", " . date("Y", $row['time']) . "</b></font></td></tr>";
  45.     }
  46.  
  47.     ?>
  48.      <tr>
  49.           <td style="border-style: solid; border-width: 1px; border-color:red">
  50.           <p align="center"><font face="Arial"><?=date("d.m.Y", $row['time'])?></font></td>
  51.           <td style="border-style: solid; border-width: 1px; border-color:red">
  52.           <p align="center"><font face="Arial"><?=date("H:i", $row['time'])?> Uhr</font></td>
  53.           <td style="border-style: solid; border-width: 1px; border-color:red">
  54.           <p align="center"><font face="Arial"><?=$row['al']?></font></td>
  55.           <td style="border-style: solid; border-width: 1px; border-color:red">
  56.           <font face="Arial"><?=$row['text']?></font></td>
  57.           <td style="border-style: solid; border-width: 1px; border-color:red">
  58.           <?php if ($row['link']) {?><p align="center"><a href="<?=$row['link']?>">
  59.           <img border="0" src="../images/bericht.gif" width="14" height="17"></a><?php } ?>
  60.           </td>
  61.      </tr>
  62.  
  63.  
  64. <?php
  65. }
  66.  
  67. ?>
  68.      </table></center>
  69.  
  70. </body>
  71.  
  72. </html>
Latest pastes
7 hours ago
6 days ago
18 days ago
23 days ago
25 days ago