<?php
require('include/header.php');

$rowcount = 1;


	echo "<table class='table' width='95%' class='table'>
		<tr class='table_header'>
			<td colspan='6'>
				Websites - Active</td>";
			echo "</td>
		</tr>";




	$query2 = mysql_query("SELECT * FROM ".$prefix."websites WHERE active='1'");
	while ($row2 = mysql_fetch_array($query2)) {
		$id = $row2['id'];
		$website_name = $row2['website_name'];
		$website_url = $row2['website_url'];
			$website_url2 = substr($website_url, 0, 40);
		$website_description = $row2['website_description'];
			$website_description2 = substr($website_description, 0, 40);
		$email = $row2['email'];
		$website_banner = $row2['website_banner'];
		$hits_out = $row2['hits_out'];
		$hits_in = $row2['hits_in'];
		$hits_out_total = $row2['hits_out_total'];
		$hits_in_total = $row2['hits_in_total'];

		echo "<tr class='row$rowcount'>
			<td width='25'>$id</td>
			<td width='250'>
				<a target='_blank' href='$website_url'>$website_name</a><br>
				<A HREF='mailto:$email'>$email</A><br>
				$website_description<br>	
			</td>
			<td width='130'>
				Hits in = $hits_in<br>
				Hits out= $hits_out<br>
				Total Hits in = $hits_in_total<br>
				Total Hits out= $hits_out_total
			</td>
			<td width='468'><a target='_blank' href='$website_url'><img border='0' src='$website_banner'></a></td>
			<td>
				<a href='website_edit1.php?id=$id'><img border='0' title='Edit Website' src='images/edit.png'></a><br>
				<a href='website_delete1.php?id=$id'><img border='0' title='Delete Website' src='images/delete.png'></a><br>
				<a href='website_off.php?id=$id'><img border='0' title='Deactivate Website' src='images/off_icon.png'></a>
			</td>
		</tr>";

		$rowcount = $rowcount + 2;
		if ($rowcount == 5) {
			$rowcount = 1;
		}


	}
	echo "</table><br><br><br>";




$rowcount = 1;


	echo "<table class='table' width='95%' class='table'>
		<tr class='table_header'>
			<td colspan='6'>
				Websites - Not active</td>";
			echo "</td>
		</tr>";




	$query2 = mysql_query("SELECT * FROM ".$prefix."websites WHERE active='0'");
	while ($row2 = mysql_fetch_array($query2)) {
		$id = $row2['id'];
		$website_name = $row2['website_name'];
		$website_url = $row2['website_url'];
			$website_url2 = substr($website_url, 0, 40);
		$website_description = $row2['website_description'];
			$website_description2 = substr($website_description, 0, 40);
		$email = $row2['email'];
		$website_banner = $row2['website_banner'];
		$hits_out = $row2['hits_out'];
		$hits_in = $row2['hits_in'];
		$hits_out_total = $row2['hits_out_total'];
		$hits_in_total = $row2['hits_in_total'];

		echo "<tr class='row$rowcount'>
			<td width='25'>$id</td>
			<td width='250'>
				<a target='_blank' href='$website_url'>$website_name</a><br>
				<A HREF='mailto:$email'>$email</A><br>
				$website_description<br>	
			</td>
			<td width='130'>
				Hits in = $hits_in<br>
				Hits out= $hits_out<br>
				Total Hits in = $hits_in_total<br>
				Total Hits out= $hits_out_total
			</td>
			<td width='468'><a target='_blank' href='$website_url'><img border='0' src='$website_banner'></a></td>
			<td>
				<a href='website_edit1.php?id=$id'><img border='0' title='Edit Website' src='images/edit.png'></a><br>
				<a href='website_delete1.php?id=$id'><img border='0' title='Delete Website' src='images/delete.png'></a><br>
				<a href='website_on.php?id=$id'><img border='0' title='Enable Website' src='images/on_icon.png'></a>
			</td>
		</tr>";

		$rowcount = $rowcount + 2;
		if ($rowcount == 5) {
			$rowcount = 1;
		}


	}
	echo "</table><br>";






require('include/footer.php');
?>
Note: keep 127,128,129,130,133,134