<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
	<title>Simple Contact Manager</title>
	<link rel="STYLESHEET" type="text/css" href="default.css">
</head>

<body>


<!---/// Load the Contact from the database ///--->
<cf_cfoCreateObject class="Contact" object="aContact">
<cf_cfoInvokeMethod object="#aContact#" method="collectFields">
<cfparam name="aContact.do_delete" default="No">


<cfif aContact.do_delete>
	
	<!---/// Do it! ///--->
	<cf_cfoInvokeMethod object="#aContact#" method="delete">
	<cflocation url="index.cfm">

<cfelse>
	<!---/// Confirm Delete ///--->
	<cf_cfoInvokeMethod object="#aContact#" method="load">
   <h1>Confirm Delete</h1>
	<cfoutput>
   
	Are you sure you want to delete <b>#aContact.firstname# #aContact.lastname#</b>?
	<form action="handler.cfm">
		<input type="hidden" name="event" value="delete">
		<input type="hidden" name="con_id" value="#aContact.con_id#">
		<input type="submit" name="do_delete" value="Yes">
		<input type="button" value="No" onclick="history.back();">
	</form>
	</cfoutput>
	
</cfif>


</body>
</html>
