<?php
require('include/header.php');
$id = $_GET['id'];
?>


<form action="website_edit2.php?id=<?php echo $id; ?>" method="post">
<table class="table" width="100%" class="table">
	<tr class="table_header">
		<td colspan="3">Edit a website</td>
	</tr>





	<tr class="row1">
		<td>
<?php
$result = mysql_query("SELECT * FROM ".$prefix."websites WHERE id = ".$id." ORDER BY id") or die("A MySQL error has occurred.<br />Your Query: " . $your_query . "<br /> Error: (" . mysql_errno() . ") " . mysql_error());
while($row = mysql_fetch_array($result)) {
$id = $row['id'];
$website_name = $row['website_name'];
$website_url = $row['website_url'];
$website_description = $row['website_description'];
$website_banner = $row['website_banner'];
$email = $row['email'];
$date = $row['date'];
$hits_out_total = $row['hits_out_total'];
$hits_in_total = $row['hits_in_total'];
$hits_out = $row['hits_out'];
$hits_in = $row['hits_in'];
$active = $row['active'];

//read out the faqs
?>
		</td>
	</tr>




	<tr class="row2">
		<td>Website Name:</td>
		<td colspan="2"><br>
		<input type="text" name="website_name" size="30" value="<?php echo $website_name; ?>" /><br>
&nbsp;</td>
	</tr>


	<tr class="row1">
		<td>Website URL:</td>
		<td colspan="2"><br>
		<input type="text" name="website_url" size="30" value="<?php echo $website_url; ?>" /><br>
&nbsp;</td>
	</tr>


	<tr class="row2">
		<td>Website Description:<br><font color="#FF0000">Optional</font></td>
		<td colspan="2"><br>
		<input type="text" name="website_description" size="30" value="<?php echo $website_description; ?>" />
			(Visible when the mouse pointer hits the link in panel.php.)<br><br>
		</td>
	</tr>


	<tr class="row1">
		<td>Website Banner:<br><font color="#FF0000">Optional</font></td>
		<td><br>
		<input type="text" name="website_banner" size="30" value="<?php echo $website_banner; ?>" /><br>
&nbsp;</td>
		<td><img border='0' src='<?php echo $website_banner; ?>'></td>
	</tr>


	<tr class="row2">
		<td>Email:</td>
		<td colspan="2"><br>
		<input type="text" name="email" size="30" value="<?php echo $email; ?>" /><br>
&nbsp;</td>
	</tr>


	<tr class="row1">
		<td>Date:</td>
		<td colspan="2"><br><input type = "text" name="date" value="<?php echo $date; ?>" id = "datepicker-3"><br>
&nbsp;</td>
	</tr>


	<tr class="row2">
		<td>Hits Out Total:</td>
		<td colspan="2"><br>
		<input type="text" name="hits_out_total" size="30" value="<?php echo $hits_out_total; ?>" /><br>
&nbsp;</td>
	</tr>


	<tr class="row1">
		<td>Hits In Total:</td>
		<td colspan="2"><br>
		<input type="text" name="hits_in_total" size="30" value="<?php echo $hits_in_total; ?>" /><br>
&nbsp;</td>
	</tr>



	<tr class="row2">
		<td>Hits Out:</td>
		<td colspan="2"><br>
		<input type="text" name="hits_out" size="30" value="<?php echo $hits_out; ?>" /><br>
&nbsp;</td>
	</tr>


	<tr class="row1">
		<td>Hits In:</td>
		<td colspan="2"><br>
		<input type="text" name="hits_in" size="30" value="<?php echo $hits_in; ?>" /><br>
&nbsp;</td>
	</tr>


	<tr class="row2">
		<td>Active:</td>
		<td colspan="2"><br>
		<input type="text" name="active" size="3" value="<?php echo $active; ?>" /> 1=active and 0=not active<br>
	</td>
	</tr>


	<tr class="row3">
		<td>&nbsp;</td>
		<td colspan="2"><br>
		<input type="submit" value="Edit Website" /><br>
&nbsp;</td>
	</tr>


</table>
</form>




<?php

}

require('include/footer.php');

 ?>
