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

<html>

	<head>
		<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
		<meta name="generator" content="Adobe GoLive">
		<title>Guestbook Administration</title>
        <script type="text/javascript" language="JavaScript">
        function CheckSubmit()
        {
         check=window.confirm("Warning: This will delete all comments used within the Guestbook.");
         return check;
        }
        function ResetAll()
        {
        open("adminguestb.php?new=true", "new");
        }
        </script>
        
        <?php
              $user_data=file("data.txt", "r");
              $settings=file("settings.txt", "r");
              $new=$HTTP_GET_VARS["new"];
              for ($i=0;$i<count($user_data); $i++)
                {
                $trimmed[]=trim($user_data[$i]);
                }
        ?>
		<style type="text/css" media="screen"><!--
body    { color: black; font-family: Verdana, Arial, Helvetica, sans-serif; background-color: white; margin: 8px; padding: 12px; border-width: 0 }
td  { font-size: 11px; padding: 10px }
--></style>
	</head>

	<body bgcolor="#e6e6fa">
		<form action="Guestbook-Processing.php" method="post" name="AdminForm" onsubmit="if(document.AdminForm.delete_all.checked==true) return CheckSubmit()">
			<table width="90%" border="0" cellspacing="0" cellpadding="0" align="center">
				<tr bgcolor="#191970">
					<td colspan="5">
						<div align="center">
							<font size="2" color="white">&nbsp;<strong>Guestbook Configuration</strong></font></div>
					</td>
				</tr>
				<tr bgcolor="#e6e6fa">
					<td colspan="5" bgcolor="white"></td>
				</tr>
				<tr bgcolor="#e6e6fa">
					<td colspan="5">
						<p><font color="black"><b>Select the information to be displayed in the guestbook:</b></font></p>
					</td>
				</tr>
				<tr bgcolor="#e6e6fa">
					<td width="30%">Name</td>
					<td width="7%"><input type="checkbox" name="checkboxname" <? if($new!="true") {echo $settings[0];} ?> value="true" border="0"></td>
					<td></td>
					<td width="30%">Obligatory Field</td>
					<td width="25%"><input type="checkbox" name="name_prove" <? if($new!="true") {echo $settings[3];} ?> value="true" border="0"></td>
				</tr>
				<tr bgcolor="#e6e6fa">
					<td width="30%">City/Town</td>
					<td width="7%"><input type="checkbox" name="checkboxtown" <? if($new!="true") {echo $settings[1];} ?> value="true" border="0"></td>
					<td></td>
					<td width="30%">Obligatory Field</td>
					<td width="25%"><input type="checkbox" name="town_prove" <? if($new!="true") {echo $settings[4];} ?> value="true" border="0"></td>
				</tr>
				<tr bgcolor="#e6e6fa">
					<td width="30%">
						<p>E-mail Address</p>
					</td>
					<td width="7%"><input type="checkbox" name="checkboxmail" <? if($new!="true") {echo $settings[2];} ?> value="true" border="0"></td>
					<td></td>
					<td width="30%">Obligatory Field</td>
					<td width="25%"><input type="checkbox" name="mail_prove" <? if($new!="true") {echo $settings[5];} ?> value="true" border="0"></td>
				</tr>
				<tr bgcolor="#e6e6fa" height="15">
					<td colspan="5" bgcolor="white" height="15"></td>
				</tr>
				<tr bgcolor="#e6e6fa">
					<td colspan="4"><b>Include comment numbering:</b></td>
					<td width="25%"><input type="checkbox" name="i" <? if($new!="true") {echo $settings[6];} ?> value="true" border="0"></td>
				</tr>
				<tr bgcolor="#e6e6fa" height="15">
					<td colspan="5" bgcolor="white" height="15"></td>
				</tr>
				<tr bgcolor="#e6e6fa">
					<td colspan="4"><b>Include a timestamp for the comments:</b></td>
					<td width="25%"><input type="checkbox" name="date" <? if($new!="true") {echo $settings[7];} ?> value="true" border="0"></td>
				</tr>
				<tr bgcolor="#e6e6fa" height="15">
					<td colspan="5" bgcolor="white" height="15"></td>
				</tr>
				<tr bgcolor="#e6e6fa">
					<td colspan="4"><b>Provide your e-mail address to receive E-mail notification each time new comments are posted.</b></td>
					<td width="25%"><input type="text" name="webmaster_address" value='<? if($new!="true" && isset($trimmed[0])) {echo $trimmed[0];} ?>' size="24" border="0"></td>
				</tr>
				<tr bgcolor="#e6e6fa" height="15">
					<td colspan="5" bgcolor="white" height="15"></td>
				</tr>
				<tr bgcolor="#e6e6fa">
					<td colspan="4"><b>Maximum characters viewable for long comment postings. Long comments will be shown in a new browser window.</b></td>
					<td width="25%"><input type="text" name="count_chars" size="4" value='<? if($new!="true" && isset($trimmed[1]) && $trimmed[1] !="100000") {echo $trimmed[1];} ?>' border="0"></td>
				</tr>
				<tr bgcolor="#e6e6fa" height="15">
					<td colspan="5" bgcolor="white" height="15"></td>
				</tr>
				<tr bgcolor="#e6e6fa">
					<td colspan="5"><b>Enter those keywords that you don't want guests to use when posting comments. Separate keywords by commas.</b></td>
				</tr>
				<tr bgcolor="#e6e6fa">
					<td colspan="5" height="66"><textarea name="filter1" rows="4" cols="65"><? if($new!="true" && isset($trimmed[2])) {echo $trimmed[2];}  ?></textarea></td>
				</tr>
				<tr bgcolor="#e6e6fa" height="15">
					<td colspan="5" bgcolor="white" height="15"></td>
				</tr>
				<tr bgcolor="#e6e6fa">
					<td colspan="4"><b>Enter comment number to be deleted:</b></td>
					<td width="25%"><input type="text" name="delete_i" value="" size="4" border="0"></td>
				</tr>
				<tr bgcolor="#e6e6fa" height="15">
					<td colspan="5" bgcolor="white" height="15"></td>
				</tr>
				<tr bgcolor="#e6e6fa">
					<td colspan="4"><b>Check the following box to permanently remove all comments from your guestbook. </b></td>
					<td width="25%"><input type="checkbox" name="delete_all" value="true" border="0"></td>
				</tr>
				<tr bgcolor="#e6e6fa" height="15">
					<td colspan="5" bgcolor="white" height="15"></td>
				</tr>
				<tr bgcolor="#e6e6fa">
					<td bgcolor="white" width="30%"></td>
					<td bgcolor="white" width="7%"></td>
					<td bgcolor="white"><input type="reset" value="Reset" border="0"></td>
					<td bgcolor="white" width="30%"><input type="button" value="Clear All" onclick="ResetAll()" border="0"></td>
					<td bgcolor="white" width="25%"><input type="submit" value="Apply Modifications" border="0"></td>
				</tr>
			</table>
		</form>
		<p></p>
	</body>

</html>