Public paste
RDLT
By: Xmoo | Date: Apr 1 2007 18:51 | Format: PHP | Expires: never | Size: 1.75 KB | Hits: 2279

  1. <?php
  2.                 if (($_GET['p'] == 'home') && ($_GET['a'] == 'add')) {
  3.                                 //Home toevoegen START
  4.                 if ($submit) {
  5.                 $insert = "INSERT INTO juize_home (titel, datum, bericht)
  6.                                    values ('$titel', '$datum', '$poster', '$bericht')";
  7.                 $query = mysql_query($insert)or die(mysql_error());
  8.                 echo "<font face=verdana size=2 color=green>Homeitem Succesfully Added</font>";
  9.         }
  10.         else {
  11.                 echo "<form action="content.php?p=home&a=add" method="post">";
  12.                 echo "<font face="verdana" size="2" color="#fa6627"><strong>Home Titel:</strong></font><br><input type="text" name="titel" size="30"><br>";
  13.                 echo "<font face="verdana" size="2" color="#fa6627"><strong>Home Date:</strong></font><br><input type="text" name="datum" size="30"><br>";
  14.                 echo "<font face="verdana" size="2" color="#fa6627"><strong>Home Text:</strong></font><br><textarea rows="15" name="bericht" cols="45"></textarea><br><br>";
  15.                 echo "<input type="submit" name="submit" value="Add Homepage!"></form>";
  16.         }
  17.         //Home toevoegen END
  18.                 }
  19.                 elseif  (($_GET['p'] == 'home') && ($_GET['a'] == 'edit')) {
  20.                         //Home EDIT START
  21.         $obj=mysql_query("SELECT id,titel FROM juize_home ORDER BY id DESC") or die(mysql_error());
  22.         while($info= mysql_fetch_object($obj))      
  23.                 {
  24.                         $aid = $info->id;
  25.                         $titel = $info->titel; 
  26. ?>
  27.                         <table width="350" border="0" cellspacing="0" cellpadding="0">
  28.                           <tr>
  29.                             <td width="250"><?php echo "<span class="style1">".$titel."</span>"; ?></td>
  30.                             <td width="50"><div align="center"><a href="edit.php?p=home&id=<?php echo "".$aid.""; ?>" target="_blank">edit</a></div></td>
  31.                             <td width="50"><div align="center"><a href="del.php?p=home&id=<?php echo "".$aid.""; ?>" target="_blank">delete</a></div></td>
  32.                           </tr>
  33.                         </table>