<?PHP
echo("
	<form action='".$PHP_SELF."' method='POST'>
	<input type='hidden' name='sid' value='".trim($sid)."'>
	<input type='hidden' name='xx' value='5'>
	<table width='725' cellpadding='2' cellspacing='0' border='0'>
		<tr>
			<td colspan='2' align='left' valign='top'><img src='".$http_images."/menu_arrow.gif'><b>Add Administrators</b> [all fields are required]</td>
		</tr>
		<tr>
			<td width='30%' align='left' valign='top'><img src='".$http_images."/space.gif' width='15' height='1'></td>
			<td width='70%' align='left' valign='top'><img src='".$http_images."/space.gif' width='15' height='1'></td>
		</tr>
	</table>
		");
if (isset($done))
	{
	echo("
	<table width='725' cellpadding='2' cellspacing='0' border='0'>
		<tr>
			<td colspan='2' align='left' valign='top'><img src='".$http_images."/error_arrow.gif'>The administrator was added successfully!</td>
		</tr>
		<tr>
			<td width='30%' align='left' valign='top'><img src='".$http_images."/space.gif' width='15' height='1'></td>
			<td width='70%' align='left' valign='top'><img src='".$http_images."/space.gif' width='15' height='1'></td>
		</tr>
	</table>
		");
	unset($first_name);
	unset($last_name);
	unset($email);
	unset($username);
	unset($password);
	unset($password1);
	}
if (isset($err0))
	{
	echo("
	<table width='725' cellpadding='2' cellspacing='0' border='0'>
		<tr>
			<td align='left' valign='top'><img src='".$http_images."/space.gif' width='9' height='9'><img src='".$http_images."/error_arrow.gif'><b>ERROR!</b> You must enter your <b>first name</b> to continue.</td> 
		</tr>
		<tr>
			<td><img src='".$http_images."/space.gif' width='1' height='2'></td>
		</tr>
	</table>
			");
		}
	if (isset($err1))
		{
		echo("
	<table width='725' cellpadding='2' cellspacing='0' border='0'>
		<tr>
			<td align='left' valign='top'><img src='".$http_images."/space.gif' width='9' height='9'><img src='".$http_images."/error_arrow.gif'><b>ERROR!</b> You must enter your <b>last name</b> to continue.</td> 
		</tr>
		<tr>
			<td><img src='".$http_images."/space.gif' width='1' height='2'></td>
		</tr>
	</table>
			");
		}
	if (isset($err2))
		{
		echo("
	<table width='725' cellpadding='2' cellspacing='0' border='0'>
		<tr>
			<td align='left' valign='top'><img src='".$http_images."/space.gif' width='9' height='9'><img src='".$http_images."/error_arrow.gif'><b>ERROR!</b> You must enter your <b>email address</b> to continue.</td> 
		</tr>
		<tr>
			<td><img src='".$http_images."/space.gif' width='1' height='2'></td>
		</tr>
	</table>
			");
		}
	if (isset($err3))
		{
		echo("
	<table width='725' cellpadding='2' cellspacing='0' border='0'>
		<tr>
			<td align='left' valign='top'><img src='".$http_images."/space.gif' width='9' height='9'><img src='".$http_images."/error_arrow.gif'><b>ERROR!</b> The email address <b>".trim($email)."</b> is taken.</td> 
		</tr>
		<tr>
			<td><img src='".$http_images."/space.gif' width='1' height='2'></td>
		</tr>
	</table>
			");
		}
	if (isset($err4))
		{
		echo("
	<table width='725' cellpadding='2' cellspacing='0' border='0'>
		<tr>
			<td align='left' valign='top'><img src='".$http_images."/space.gif' width='9' height='9'><img src='".$http_images."/error_arrow.gif'><b>ERROR!</b> You must choose a <b>username</b> to continue.</td> 
		</tr>
		<tr>
			<td><img src='".$http_images."/space.gif' width='1' height='2'></td>
		</tr>
	</table>
			");
		}
	if (isset($err5))
		{
		echo("
	<table width='725' cellpadding='2' cellspacing='0' border='0'>
		<tr>
			<td align='left' valign='top'><img src='".$http_images."/space.gif' width='9' height='9'><img src='".$http_images."/error_arrow.gif'><b>ERROR!</b> The username <b>".trim($username)."</b> is taken.</td> 
		</tr>
		<tr>
			<td><img src='".$http_images."/space.gif' width='1' height='2'></td>
		</tr>
	</table>
			");
		}
	if (isset($err6))
		{
		echo("
	<table width='725' cellpadding='2' cellspacing='0' border='0'>
		<tr>
			<td align='left' valign='top'><img src='".$http_images."/space.gif' width='9' height='9'><img src='".$http_images."/error_arrow.gif'><b>ERROR!</b> Your <b>passwords</b> were left blank or do not match.</td> 
		</tr>
		<tr>
			<td><img src='".$http_images."/space.gif' width='1' height='2'></td>
		</tr>
	</table>
			");
		}
echo("
	<table width='725' cellpadding='2' cellspacing='0' border='0'>
		<tr>
			<td width='30%' align='left' valign='top'><img src='".$http_images."/space.gif' width='15' height='9'>Admin First Name:</td>
			<td width='70%' align='left' valign='top'><input ".$input_style." type='text' name='first_name' value='".((isset($first_name))?"".$first_name."":"")."'></td>
		</tr>
		<tr>
			<td width='30%' align='left' valign='top'><img src='".$http_images."/space.gif' width='15' height='9'>Admin Last Name:</td>
			<td width='70%' align='left' valign='top'><input ".$input_style." type='text' name='last_name' value='".((isset($last_name))?"".$last_name."":"")."'></td>
		</tr>
		<tr>
			<td width='30%' align='left' valign='top'><img src='".$http_images."/space.gif' width='15' height='9'>Admin Email:</td>
			<td width='70%' align='left' valign='top'><input ".$input_style." type='text' name='email' value='".((isset($email))?"".$email."":"")."'></td>
		</tr>
		<tr>
			<td width='30%' align='left' valign='top'><img src='".$http_images."/space.gif' width='15' height='9'>Choose Admin Username:</td>
			<td width='70%' align='left' valign='top'><input ".$input_style." type='text' name='username' value='".((isset($username))?"".$username."":"")."'></td>
		</tr>
		<tr>
			<td width='30%' align='left' valign='top'><img src='".$http_images."/space.gif' width='15' height='9'>Choose Admin Password:</td>
			<td width='70%' align='left' valign='top'><input ".$input_style." type='text' name='password' value='".((isset($password))?"".$password."":"")."'></td>
		</tr>
		<tr>
			<td width='30%' align='left' valign='top'><img src='".$http_images."/space.gif' width='15' height='9'>Verify Admin Password:</td>
			<td width='70%' align='left' valign='top'><input ".$input_style." type='text' name='password1' value='".((isset($password1))?"".$password1."":"")."'></td>
		</tr>
		<tr>
			<td width='30%' align='left' valign='top'><img src='".$http_images."/space.gif' width='15' height='9'></td>
			<td width='70%' align='left' valign='top'><img src='".$http_images."/space.gif' width='15' height='9'></td>
		</tr>
		<tr>
			<td width='30%' align='left' valign='top'></td>
			<td width='70%' align='left' valign='top'><input ".$button_style." type='submit' name='define_admin' value='Continue &gt&gt'></td>
		</tr>
	</table>
	</form>
	");
if (!isset($not_show))
	{
	echo("
		<form action='".$PHP_SELF."' method='POST'>
		<input type='hidden' name='sid' value='".trim($sid)."'>
		<table width='725' cellpadding='2' cellspacing='0' border='0'>
			<tr>
				<td colspan='2' align='left' valign='top'><img src='".$http_images."/menu_arrow.gif'><b>Delete Administrators</b> [all fields are required]</td>
			</tr>
			<tr>
				<td width='30%' align='left' valign='top'><img src='".$http_images."/space.gif' width='15' height='1'></td>
				<td width='70%' align='left' valign='top'><img src='".$http_images."/space.gif' width='15' height='1'></td>
			</tr>
			<tr>
				<td width='30%' align='left' valign='top'><img src='".$http_images."/space.gif' width='15' height='9'>Delete Administrator:</td>
				<td width='70%' align='left' valign='top'><select name='uid' ".$input_style.">
		");
	$row=mysql_query("select uid, first_name, last_name from user where status='69'");
	while ($rsx=mysql_fetch_row($row))
		{
		if (trim($rsx[1])!=""&&trim($rsx[2])!="")
			echo"<option value='".$rsx[0]."'>".$rsx[1]." ".$rsx[2]."</option>\n";
		}
	echo("
				</select> <input ".$button_style." type='submit' name='delete_admin' value='Continue &gt&gt'></td>
			</tr>
		</table>
		</form>
		");
	}
?>