Location: PHPKode > scripts > phpGiftList > phpgiftlist/admindisplay.php
<html>
<body>
<style>
body{background-color:#FFFFFF}
A{color:red; text-decoration:none}
A:hover{color:red}
A:visited:{color:red}
SPAN.itemname{font-family:verdana,arial,helvetica; font-size=12pt; font-weight:bold}
DIV.itemlisting{font-family:verdana,arial,helvetica; font-size=10pt}
DIV.itemdesc{position:relative; left: 2em;}
H2{font-family:verdana,arial,helvetica; font-size=15pt; font-weight:bold}
P{font-family:verdana,arial,helvetica; font-size=10pt}
UL{font-family:verdana,arial,helvetica; font-size=10pt}
</style>
<!-- phpGiftList - a gift list manager written in PHP and using mySQL
    Copyright (C) 2000  O.M. Jenkins
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-->


<?php

$db = mysql_connect("localhost", "root");

mysql_select_db("giftlist", $db);

$result = mysql_query("SELECT * FROM item",$db);

 if ($myrow = mysql_fetch_array($result))  {
 
 ?>
 
 	<h2>phpGiftList Admin interface</h2>
 	
 
 <hr>
 <?php
 
 	do {	
 
 	
 	   printf("<div class=\"itemlisting\"><span class=\"itemname\">%s</span> - $<i>%s</i><br><div class=\"itemdesc\">%s\n", $myrow["item_name"], $myrow["item_price"], $myrow["item_desc"]);
 
 		printf("<br>Buy at: <a href=\"%s\" target=\"blank\">%s</a><br>\n", $myrow["URL"], $myrow["item_vendor"]);

		printf("<a href=\"adminadmin.php?id=%s\">Edit gift record</a>&nbsp;|&nbsp;<a href=\"adminadmin.php?id=%s&delete=yes\">Delete gift record</a></div></div><p>\n", $myrow["id"], $myrow["id"]);
 
 	 } while ($myrow = mysql_fetch_array($result));
 
 		} else {
 
 		echo "Sorry, no records were found!";
 
 	}

?>
</body>
</html>
Return current item: phpGiftList