diff -ur /storage01/unix.software/giftweb/edit.php ../giftweb.cvs/edit.php
--- /storage01/unix.software/giftweb/edit.php	Tue May 31 00:32:06 2005
+++ ../giftweb.cvs/edit.php	Sun Jun  5 15:50:16 2005
@@ -111,12 +111,12 @@
 			break;
 		case "edit":
 			update_items();
-			bread;
+			break;
 		case "notes":
 			update_notes();
 			break;
 		case "images":
-			upate_images();
+			update_images();
 			break;
 	}
 }
@@ -125,7 +125,7 @@
 
 function show_delete_form()
 {
-	global $conn;
+	global $conn, $cnt, $itemlist;
 	?>
 	<h2>Delete Items</h2>
 	Please <b>confirm</b> that you wish to <b>delete</b> these items.<p>
@@ -167,8 +167,7 @@
 
 function delete_items()
 {
-	global $conn;
-
+	global $conn, $cnt, $itemlist, $uid;
 	?>
 	<h2>Deleting Selected Items</h2>
 	<?php 
@@ -222,7 +221,7 @@
 
 function show_edit_form()
 {
-	global $conn;
+	global $conn, $uid, $itemlist, $cnt, $show_price;
 
 	// find all groups that this user has.
 	
@@ -331,7 +330,7 @@
 
 function update_items()
 {
-	global $conn;
+	global $conn, $show_price;
 
 	$error = 0;
 	
@@ -395,7 +394,7 @@
 
 function show_notes_form()
 {
-	global $conn;
+	global $conn, $itemlist, $cnt;
 	?>
 	<h2>Edit Item Notes</h2>
 	Please make your changes to the Item Notes below, or select those
@@ -535,7 +534,7 @@
 
 function show_images_form()
 {
-	global $conn;
+	global $conn, $cnt, $itemlist;
 
 	?>
 	<h2>Edit Item Images</h2>
@@ -634,7 +633,7 @@
 
 function hide_items()
 {
-	global $conn;
+	global $conn, $cnt, $itemlist;
 
 	for ($i=0; $i < $cnt; $i++)
 	{
@@ -653,7 +652,7 @@
 
 function unhide_items()
 {
-	global $conn;
+	global $conn, $cnt, $itemlist;
 
 	$cnt = count($itemlist);
 
diff -ur /storage01/unix.software/giftweb/editlist.php ../giftweb.cvs/editlist.php
--- /storage01/unix.software/giftweb/editlist.php	Wed May 25 14:39:43 2005
+++ ../giftweb.cvs/editlist.php	Sun Jun  5 16:42:37 2005
@@ -36,30 +36,6 @@
 
 cleanup_items();
 
-?>
-<script language="JavaScript" type="text/javascript">
-<!--
-function CheckAll()
-{
-	for (var i = 0; i < document.itemList.elements.length; i++)
-	{
-		if(document.itemList.elements[i].type == 'checkbox')
-		{
-			document.itemList.elements[i].checked = true;
-		}
-	}
-}
-
-function ViewNote(inum)
-{
-	window.open("viewnote.php?i="+inum,
-			"ViewNotes", "width=600, height=300");
-}
-
-//-->
-</script>
-<?php 
-
 if ( isset($_POST["submit1"]))
 {
 	process_form();
@@ -69,7 +45,7 @@
 
 function process_form()
 {
-	global $conn;
+	global $conn, $uid;
 	// LOOK: Do we still need this?
 	$rows = 0;
 
@@ -92,8 +68,8 @@
 			$sql = "INSERT INTO items 
 					(uid, description, url, purchased, added,
 					 	grp_id, hidden)
-					VALUES ('$uid', '$item', '$store', '-1', 'f', 
-						'$grp, 'f')";
+					VALUES ('$uid', '$item', '$store', '-1', 'FALSE', 
+						'$grp', 'f')";
 
 			$result = $conn->Execute($sql);
 
@@ -145,7 +121,7 @@
 
 function show_list()
 {
-	global $conn, $uid;
+	global $conn, $uid, $show_price;
 
 	$sql="SELECT last_name, first_name FROM users WHERE uid=$uid";
 	$result=$conn->Execute($sql);
@@ -154,6 +130,29 @@
 	$name .= ", " . $fname;
 	startpage("$fname's Wish list", 2);
 
+	?>
+	<script language="JavaScript" type="text/javascript">
+	<!--
+	function CheckAll()
+	{
+        	for (var i = 0; i < document.itemList.elements.length; i++)
+        	{
+                	if(document.itemList.elements[i].type == 'checkbox')
+                	{
+                        	document.itemList.elements[i].checked = true;
+                	}
+        	}
+	}
+
+	function ViewNote(inum)
+	{
+        	window.open("viewnote.php?i="+inum,
+                        "ViewNotes", "width=600, height=300");
+	}
+
+	//-->
+	</script>
+	<?php
 
 	echo "<h2>$fname's Wish list:</h2>";
 
@@ -201,15 +200,15 @@
 		?>
 
 			<tr>
-			<th width=5%>Select</th>
-			<th width=45%>Description</th>
-			<th width=35%>Store/Web Adress</th>
-			<th width=10%>Notes</th>
+			<th width="5%">Select</th>
+			<th width="45%">Description</th>
+			<th width="35%">Store/Web Adress</th>
+			<th width="10%">Notes</th>
 
 			<?php 
 			if ($show_price)
 			{
-				echo "<th width=5%>Avg Price</th></tr>\n";
+				echo "<th width=\"5%\">Avg Price</th></tr>\n";
 			}
 	}
 
@@ -278,6 +277,7 @@
 		if ( substr($url, 0, 7) == "http://" )
 		{
 			$parts = explode("/", $url);
+			$url = htmlentities($url);
 			$url = "<a href=\"$url\" target=\"_new\">$parts[2]</a>";
 		}
 
@@ -357,10 +357,10 @@
 		</tr></table>
 		</center></form>
 
-		<hr width=50%>
+		<hr width="50%">
 		<a name="add">	</a>
 		<h3>Add new items:</h3>
-		Go <a href="http://giftweb.org/editprefs.php?mode=item_groups">here<a/>
+		Go <a href="editprefs.php?mode=item_groups">here</a>
 		to edit your gift groups<p>
 		<?php 
 		// Build the user's groups list to be displayed with each entry line below
@@ -399,8 +399,8 @@
 		viewing your list.</font></td></tr>
 		<tr>
 			<th></th>
-			<th width=15%>Group</th>
-			<th width=15% align=center>Description</th>
+			<th width="15%">Group</th>
+			<th width="15%" align=center>Description</th>
 			<th align=center>Store/Web Address:<br>
 			(Be sure to include "http://" or<br>"www"for a Web Address)</th>
 		</tr>
diff -ur /storage01/unix.software/giftweb/myitems.php ../giftweb.cvs/myitems.php
--- /storage01/unix.software/giftweb/myitems.php	Mon May 30 23:38:35 2005
+++ ../giftweb.cvs/myitems.php	Sun Jun  5 14:57:41 2005
@@ -46,7 +46,7 @@
 
 function show_purchased_items()
 {
-	global $conn;
+	global $conn, $uid;
 
 	$sql = "SELECT DISTINCT uid FROM items WHERE purchased='$uid'";
 	$result = $conn->Execute($sql);
diff -ur /storage01/unix.software/giftweb/util.php ../giftweb.cvs/util.php
--- /storage01/unix.software/giftweb/util.php	Wed May 25 14:30:14 2005
+++ ../giftweb.cvs/util.php	Sun Jun  5 16:30:15 2005
@@ -130,15 +130,6 @@
 		</head>
 		<?php 
 
-		if ($PHP_SELF="/index.php");
-	{
-		?>
-			<script>
-			function sf(){document.f.login.focus(); }
-		</script>
-			<?php 
-	}
-
 # build <body> tag with preferences set from main.inc
 	echo "<body ";
 
@@ -156,12 +147,21 @@
 
 	echo ">\n";
 
+                if ($PHP_SELF="/index.php");
+        {
+                ?>
+                        <script type="text/javascript">
+                        function sf(){document.f.login.focus(); }
+                </script>
+                        <?php
+        }
+
 	if ($darken > -1)
 	{
 		?>
 
-			<table width=100%>
-			<tr><td width=15% valign=top><b>GiftWeb</b>
+			<table width="100%">
+			<tr><td width="15%" valign=top><b>GiftWeb</b>
 
 			<?php 
 			if ( $printuser == 1 )
@@ -178,11 +178,11 @@
 			<p>
 			<center>
 			<table cellpadding=5 cellspacing=5><tr>
-			<td><font size=+1><?php echo $main?></font></td>
-			<td><font size=+1><?php echo $edit?></font></td>
-			<td><font size=+1><?php echo $myitems?></font></td>
-			<td><font size=+1><?php echo $other?></font></td>
-			<td><font size=+1><?php echo $prefs?></font></td></tr></table></center>
+			<td><font size="+1"><?php echo $main?></font></td>
+			<td><font size="+1"><?php echo $edit?></font></td>
+			<td><font size="+1"><?php echo $myitems?></font></td>
+			<td><font size="+1"><?php echo $other?></font></td>
+			<td><font size="+1"><?php echo $prefs?></font></td></tr></table></center>
 			<?php 
 	}
 }
diff -ur /storage01/unix.software/giftweb/viewlist.php ../giftweb.cvs/viewlist.php
--- /storage01/unix.software/giftweb/viewlist.php	Tue May 31 00:32:06 2005
+++ ../giftweb.cvs/viewlist.php	Sun Jun  5 15:55:55 2005
@@ -66,9 +66,9 @@
 
 display_list();
 
-function add_items();	// add items not on the list
+function add_items()	// add items not on the list
 {
-	global $conn;
+	global $conn, $uid, $u;
 
 	$rows = 0;		// set for error checking later
 					// LOOK: Do we still need this?
@@ -81,7 +81,7 @@
 		if ( $item != "" )
 		{
 			$sql = "INSERT INTO items (uid, description, purchased, added)";
-			$sql .= "VALUES ('$u', '$item', '$uid', 't',)";
+			$sql .= "VALUES ('$u', '$item', '$uid', 't')";
 			$result = $conn->Execute($sql);
 
 			$rows += $result->RecordCount();
@@ -128,7 +128,7 @@
 
 function purchase_items()
 {
-	global $conn;
+	global $conn, $uid;
 
 	$itemlist = $_POST["itemlist"];
 	$cnt = count ($itemlist);
@@ -157,7 +157,7 @@
 
 function unpurchase_items()
 {
-	global $conn;
+	global $conn, $uid;
 
 	$itemlist = $_POST["itemlist"];
 
@@ -200,7 +200,7 @@
 
 function display_list()
 {
-	global $conn;
+	global $conn, $u, $uid;
 
 	$sql = "SELECT last_name, first_name FROM users WHERE uid='$u'";
 	$result = $conn->Execute($sql);
@@ -233,7 +233,7 @@
 	//-->
 	</script>
 	<?php 
-
+	global $show_price;
 	if ( isset($res1))
 	{
 		echo $res1;
@@ -402,6 +402,7 @@
 	global $conn;
 	global $u;
 	global $num_cols;
+	global $show_price;
 
 	if ($type == 3)
 	{
