<?
	#---------------------------------------------------------------------#
	# This source code is (c)2000 White Pajamas, Inc                      #
	# see http://www.stonekeep.com/license.html for licensing information #
	#---------------------------------------------------------------------#

	#--------------------------------------------------------------------
	# $Id: modcontact.php3,v 1.12 2000/12/19 15:27:39 shevett Exp $
	#--------------------------------------------------------------------
	
	# Modify a contact.  This is to be called from within the normal 
	# html structure.... 

	$result = db_query("select * from contacts where tag='$f_contact'");
	$currow = db_fetch_array($result);

?>

	<form method="post" action="nbrowse.php3">
	<input type=hidden name="f_process" value="postcont">
	<input type=hidden name="f_flag" value="mod">
	<input type=hidden name="a_tag" value="<? echo $currow[tag] ?>">
	<tr>
		<td bgcolor=#cccccc align=center colspan=3>
 			Modify Contact <?echo "$f_contact"?>
		</td>
	</tr>
	<tr>
		<td align=center>
	<table bgcolor=#000000 cellspacing=2>
	<tr bgcolor=#bbbbbb valign=top>
		<td bgcolor=#808080 colspan=2>
			<i>Tag (MUST be unique!)</i><br>
			<? echo $currow[tag] ?>
		</td>
	</tr>
	<tr bgcolor=#bbbbbb valign=top>
		<td bgcolor=#808080 colspan=2>
			<i>Name</i><br>
			<!-- FIXME: needs maxsize based on database query -->
			<input type=text name=a_name size=40 value="<? echo $currow[name] ?>">
		</td>
	</tr>
	<tr bgcolor=#bbbbbb valign=top>
		<td bgcolor=#808080 colspan=2>
			<i>Company</i><br>
			<!-- FIXME: needs maxsize based on database query -->
			<input type=text name=a_company size=50 value="<? echo $currow[company] ?>">
		</td>
	</tr>
	<tr bgcolor=#bbbbbb valign=top>
		<td bgcolor=#808080 colspan=2>
			<i>E-Mail</i><br>
			<!-- FIXME: needs maxsize based on database query -->
			<input type=text name="a_email" size=30 value="<? echo $currow[email] ?>">
		</td>
	</tr>
	<tr bgcolor=#bbbbbb valign=top>
		<td bgcolor=#808080>
			<i>Password</i><br>
			<!-- FIXME: needs maxsize based on database query -->
			<input type=password name="a_passwd" size=10 value="<? echo $currow[passwd] ?>">
		</td>
		<td bgcolor=#808080>
			<?
				$csel = ($currow[ctype]=="C") ? "selected" : "";
				$msel = ($currow[ctype]=="M") ? "selected" : "";
			?>
			<i>Type</i><br>
			<select name="a_ctype">
			<option value="C" <? echo $csel ?>> Contact
			<option value="M" <? echo $msel ?>> Manufacturer
			</select>
		</td>
	</tr>
	<tr bgcolor=#bbbbbb valign=top>
		<td bgcolor=#808080 colspan=2>
			<i>Comment</i><br>
			<!-- FIXME: needs maxsize based on database query -->
			<font size=<?echo $sys_selfont?>>
			<textarea name="a_comment" rows=10 cols=60 wrap="soft"><? echo StripSlashes(htmlspecialchars($currow[comment]))?></textarea>
			</font>
		</td>
	</tr>
	<tr bgcolor=#000000 valign=top><td colspan=4>
	<?
		PostBar("Post contact");
	?>
	</tr>
	</table>
	</td>
	</tr>
	
	</form>
