Advertisement
Evolutio

Untitled

Dec 22nd, 2011
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 2.67 KB | None | 0 0
  1. <?php
  2. $i = 0;
  3. $result = mysql_query("SELECT * FROM `news` ORDER BY `Date` DESC LIMIT 5;");
  4. while ( $daten = mysql_fetch_array($result) )
  5. {
  6.    $i ++;
  7.    $title = $daten["Titel"];
  8.    $name = $daten["Name"];
  9.    $time = date("H:i:s", $daten["Date"]);
  10.    $date = date("d.m.Y", $daten["Date"]);
  11.    $text = $daten["Nachricht"];
  12.    ?>
  13.     <div id="forums" class="grid2Col" style="margin-top: 10px;margin-bottom: 10px;">
  14.             <ol class="nodeList">
  15.                 <li class="bigNode">
  16.                     <div class="node-header">
  17.                         <div class="node-head">
  18.                             <h2 id="1" style="color: #308be0;"><?php echo $title; ?></h2>
  19.                         </div>
  20.                      </div>
  21.                 </li>
  22.             </ol>
  23.             <ol class="nodeList">
  24.                 <li class="node">
  25.                 <div style="background-color: rgba(0,0,0,0.05);float:right;margin-right:20px;">
  26.                 <p><img src="images/admin.png" alt="" /></p>
  27.                 <p><span>Von:</span> <a href="index.php?page=home"><b><?php echo $name; ?></b></a></p>
  28.                 <p><span>Am:</span> <font style="color: #308be0;"><?php echo $date; ?></font></p>
  29.                 <p><span>Um:</span> <font style="color: #308be0;"><?php echo $time; ?></font></p></td>
  30.                 </div>
  31.                 <div style="width:80%;">
  32.                 <?php echo $text; ?>
  33.                 </div>
  34.                 </li>
  35.             </ol>
  36.             <div class="clear"></div>
  37.     </div>
  38.     <?php
  39. }
  40. if ( @$i < 1 ) {
  41. ?>
  42. <div id="forums" class="grid2Col" style="margin-top: 10px;margin-bottom: 10px;">
  43.         <ol class="nodeList">
  44.             <li class="bigNode">
  45.                 <div class="node-header">
  46.                     <div class="node-head">
  47.                         <h2 id="1" style="color: #308be0;">News</h2>
  48.                     </div>
  49.                  </div>
  50.             </li>
  51.         </ol>
  52.        
  53.         <ol class="nodeList">
  54.             <li class="node">
  55.             <?php echo "Es sind keine News vorhanden."; ?>
  56.                 <div class="node-inner">
  57.                    <div class="right-actions right">
  58.                         <div class="left">
  59.                             <p><span>Von:</span> <a href="index.php?page=home"><b>Administrator</b></a></p>
  60.                             <p><span>Am:</span> <font style="color: #308be0;"><?php echo date("d.m.Y"); ?></font></p>
  61.                             <p><span>Um:</span> <font style="color: #308be0;"><?php echo date("H:i:s"); ?></font></p>
  62.                         </div>
  63.                     </div>
  64.                 </div>
  65.              </li>
  66.         </ol>
  67.        
  68.         <div class="clear">
  69.         </div>
  70. </div>
  71. <?php
  72. }
  73. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement