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

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

	# Reset the state table for the user.
	#
	# $sid should have the slip id.
	#

if ($f_yesno <> "No") {
	if ($f_func == "statereset") { ?>
	
	<form method="post" action="nbrowse.php3">
	<input type=hidden name=f_process value="statereset">
	<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>
				This function will reset all the user state information <br>
				in Keystone.  This will remove all references to expanded <br>
				slips, your current menu configurations, and, optionally, <br>
				all your user preferences and view settings. <br>

			</td>
		</tr>
		<tr>
			<td colspan=2 bgcolor=#909090 align=center>
				<font color=#ffffff>
				<input type=checkbox name=resetprefs> Reset preferences?
			</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 == "statereset") {

			$res = db_query("delete from state where uid='$curruser'");
			$tmpres = db_query("insert into state (uid,mdataset) values ('$curruser','slips')");
	
			$lastresult[0]=0;
			$lastresult[1]="Reset complete.";
			
		} else {
			#
			# We shouldn't have gotten here.
			#
			
			$lastresult[0]=1;
			$lastresult[1]="Unexpected condition occured! [delslip.php3]";
		}
	}
}
	
	?>
