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

	#--------------------------------------------------------------------
	# $Id: delfilter.php3,v 1.3 2000/12/14 19:13:47 shevett Exp $
	#--------------------------------------------------------------------
	

	# Delete a slip.
	#
	# $sid should have the slip id.
	#

if ($f_yesno <> "No") {
	if ($f_func == "delfilter") { ?>
	
	<form method="post" action="nbrowse.php3">
	<input type=hidden name=f_process value="delfilter">
	<input type=hidden name=f_filter value="<? echo $f_filter ?>">
	<tr bgcolor=#BBBBBB>
	<td width=100% bgcolor=#202020 align=center>
	<table width=50% bgcolor=#bbbbbb cellspacing=2>
		<tr>
			<td colspan=2 bgcolor=#909090 align=center>
				<font color=#ffffff>
				Are you sure you want to delete<br>
				Filter # <b><? echo "$f_filter"; ?></b>
			</td>
		</tr>
		<tr>
			<td bgcolor=#90FF90 align=center width=50%>
				<input type=submit name=f_yesno value="Yes">
			</td>
			<td bgcolor=#FF9090 align=center width=50%>
				<input type=submit name=f_yesno value="No">
			</td>
		</tr>
	</table>
	</form>
	</td>
	</tr>
	
	<?
	
	} else {
	
		if ($f_process == "delfilter") {

			$dq = db_query("delete from filters where _rowid=$f_filter");
			$count = db_affected_rows($dq);

			$lastresult[0]=0;
			$lastresult[1]="Delete complete.  $count rows affected. $pstring ";
			
		} else {
			#
			# We shouldn't have gotten here.
			#
			
			$lastresult[0]=1;
			$lastresult[1]="Unexpected condition occured! [delfilter.php3]";
		}
	}
}
	
	?>
