<?php

session_start();
include "../config.php";
include "../header.php";
include "../style.php";
function formatDate($val) {
	$arr = explode("-", $val);
	return date("M d Y", mktime(0,0,0, $arr[1], $arr[2], $arr[0]));
}
if( session_is_registered("alogin") ) {

    	?>

<script language="JavaScript">
 function Inverse(form)
   {
    len = form.elements.length;
    var i=0;
    for( i=0; i<len; i++)
    {
     if (form.elements[i].type=='checkbox' )
     {
      form.elements[i].checked = !form.elements[i].checked;
     }
    }
	return false;
   }
</script>

		<table>
      	<tr>
        <td width="15%" valign=top><br>
        <? include("adminnavigation.php"); ?>
        </td>
        <td  valign="top" align="center"><br><br> <?
        echo "<font size=2 face='$fonttype' color='$fontcolour'><p><b><center>";

        echo "<center><H2>List of pending ads</H2></center>";

$querysolos = "select * from adminsolos where sent=0 and added=1 and approved=1";
		$resultsolos = mysql_query ($querysolos)
	     	or die ("Query failed");
        $numrowssolos = @ mysql_num_rows($resultsolos);
        if ($numrowssolos == 0) {
        	echo "<p><center>No admin ads waiting to be sent.</p></center>";
        }
        else {
         	?>
              <p><font color="red"><center>There are <? echo $numrowssolos; ?> admin ad(s) waiting to be sent, <a href="sendadminsolos.php" target="_blank">click here</a> to send one now!</center></p></font>

<?
}

        $querysolos = "select * from solos where sent=0 and added=1 and approved=1";
		$resultsolos = mysql_query ($querysolos)
	     	or die ("Query failed");
        $numrowssolos = @ mysql_num_rows($resultsolos);
        if ($numrowssolos == 0) {
        	echo "<p><center>No solo ads waiting to be sent.</center>";
        }
        else {
         	?>
              <p><font color="red"><center>There are <? echo $numrowssolos; ?> solo ad(s) waiting to be sent, <a href="sendsolos.php" target="_blank">click here</a> to send one now!</center></p></font>
            <?
        }

          $querycashsolos = "select * from cashsolos where sent=0 and added=1 and approved=1";
		$resultcashsolos = mysql_query ($querycashsolos)
	     	or die ("Query failed");
        $numrowscashsolos = @ mysql_num_rows($resultcashsolos);
        if ($numrowscashsolos == 0) {
        	echo "<p><center>No cash solo ads waiting to be sent.</p></center>";
        }
        else {
         	?>
              <p><font color="red"><center>There are <? echo $numrowscashsolos; ?> cash solo ad(s) waiting to be sent, <a href="sendcashsolos.php" target="_blank">click here</a> to send one now!</center></p></font>
            <?
        }

        $querysolos = "select * from hpsolos where sent=0 and added=1 and approved=1";
		$resultsolos = mysql_query ($querysolos)
	     	or die ("Query failed");
        $numrowssolos = @ mysql_num_rows($resultsolos);
        if ($numrowssolos == 0) {
        	echo "<p><center>No high priority solo ads waiting to be sent.</center>";
        }
        else {
         	?>
              <p><font color="red"><center>There are <? echo $numrowssolos; ?> high priority solo ad(s) waiting to be sent, <a href="sendhpsolos.php" target="_blank">click here</a> to send one now!</center></p></font>
            <?
        }

        $querysolos = "select * from hpcsolos where sent=0 and added=1 and approved=1";
		$resultsolos = mysql_query ($querysolos)
	     	or die ("Query failed");
        $numrowssolos = @ mysql_num_rows($resultsolos);
        if ($numrowssolos == 0) {
        	echo "<p><center>No high priority cash solo ads waiting to be sent.</center>";
        }
        else {
         	?>
              <p><font color="red"><center>There are <? echo $numrowssolos; ?> high priority cash solo ad(s) waiting to be sent, <a href="sendhpcsolos.php" target="_blank">click here</a> to send one now!</center></p></font>
            <?
        }



//surf
        $query = "select * from surfurls where approved =0";
		$result = mysql_query ($query)
	     	or die ("Query failed");
        $numrows = @ mysql_num_rows($result);
        if ($numrows == 0) {
        	echo "<p><center>No Surf Page awaiting approval.</p></center>";
        }
        else {
            echo "<p><center>List of Surf pages awaiting approval.</p>";
        	?>
			 <form action="approvesurf.php" method=POST name=surfpage>
	            <table width=70% border=0 cellpadding=2 cellspacing=2>
	          	        <?
	        while ($line = mysql_fetch_array($result)) {
	            $id = $line["id"];
	            $surfurl = dbget($line["surfurl"]);
	            $surfname = dbget($line["surfname"]);
	            $surfpoint = dbget($line["surfpoint"]);
	            $userid = dbget($line["userid"]);

	        ?>

			 	<input type="hidden" name="currentpoints_<? echo $id; ?>" value="<? echo $surfpoint; ?>">
			 	<input type="hidden" name="currentuserid_<? echo $id; ?>" value="<? echo $userid; ?>">

<tr>
			<td bgcolor="<? echo $basecolour; ?>"><input type="checkbox" name="id[]" value="<? echo $id; ?>"></td>
			<td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>">
<center>Userid: <a href="memberlogin.php?userid=<? echo $userid; ?>"><? echo $userid; ?></a></center>
<br>
  <font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center><br>Surf Name: <? echo $surfname; ?><br>Surf URL: <a href="sitecheck.php?url=<? echo $surfurl; ?>" target="_blank"><? echo $surfurl; ?></a>
  <br>Credit: <? echo $surfpoint; ?> points
  </font></center><br><br>
<br>
<center><table border=1 cellpadding=0 cellspacing=0 width=155 height=26><tr valign=middle><td align="center" nowrap style="background:white" onMouseDown="this.style.backgroundColor='#FFFFFF'" onMouseOver="this.style.backgroundColor='<? echo $nav_hover; ?>'" onMouseOut="this.style.backgroundColor='#FFFFFF'"><a href="email.php?Member=<? echo $userid; ?>" class="button" target="_blank" onmouseover="window.status='Email Member';return true" onMouseOut="window.status='';return true"><font color="#000000">&nbsp;&nbsp;&nbsp;Email Member&nbsp;&nbsp;&nbsp;</font></a></td></tr></table></center>

<center>
<b>==================================<br>
 <center><table border=1 cellpadding=0 cellspacing=0 width=155 height=26><tr valign=middle><td align="center" nowrap style="background:white" onMouseDown="this.style.backgroundColor='#FFFFFF'" onMouseOver="this.style.backgroundColor='<? echo $nav_hover; ?>'" onMouseOut="this.style.backgroundColor='#FFFFFF'"><a href="editsurfpage.php?id=<? echo $id; ?>" class="button" target="_blank" onmouseover="window.status='Edit Surf Page';return true" onMouseOut="window.status='';return true"><font color="#000000">&nbsp;&nbsp;&nbsp;Edit Surf Page&nbsp;&nbsp;&nbsp;</font></a></td></tr></table></center>


</td>
<tr>
<td>&nbsp;</td>
</tr>







</tr> <?
	        }
	        echo '</table><input type="button" onClick="return Inverse(document.surfpage);" value="Inverse"><input type="submit" name="submit" value="Approve"><input type="submit" name="submit" value="Delete"></form></center>';
        }


//surf end

        $query = "select * from banners where status=0 and added=1";
		$result = mysql_query ($query)
	     	or die ("Query failed");
        $numrows = @ mysql_num_rows($result);
        if ($numrows == 0) {
        	echo "<p><center>No banners awaiting approval.</p></center>";
        }
        else {
            echo "<p><center>List of banners awaiting approval.</p>";
        	?>
			 <form action="approvebanner.php" method=POST name=banner>
	            <table width=70% border=0 cellpadding=2 cellspacing=2>
	          	        <?
	        while ($line = mysql_fetch_array($result)) {
	            $id = $line["id"];
	            $bannerurl = dbget($line["bannerurl"]);
	            $targeturl = dbget($line["targeturl"]);
	            $userid = $line["userid"];

	        ?>


<tr>
			<td bgcolor="<? echo $basecolour; ?>"><input type="checkbox" name="id[]" value="<? echo $id; ?>"></td>
			<td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>">
<center>Userid: <a href="memberlogin.php?userid=<? echo $userid; ?>"><? echo $userid; ?></a></center>
<br>
  <font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center><img src="<? echo $bannerurl; ?>"><br>Banner Url: <? echo $bannerurl; ?><br>Banner Link: <a href="sitecheck.php?url=<? echo $targeturl; ?>" target="_blank"><? echo $targeturl; ?></a></font></center><br><br>
<center><a href="sitecheck.php?url=<? echo $url; ?>" target="_blank"><? echo $url; ?></a></font></center>
<br>
<center><table border=1 cellpadding=0 cellspacing=0 width=155 height=26><tr valign=middle><td align="center" nowrap style="background:white" onMouseDown="this.style.backgroundColor='#FFFFFF'" onMouseOver="this.style.backgroundColor='<? echo $nav_hover; ?>'" onMouseOut="this.style.backgroundColor='#FFFFFF'"><a href="email.php?Member=<? echo $userid; ?>" class="button" target="_blank" onmouseover="window.status='Email Member';return true" onMouseOut="window.status='';return true"><font color="#000000">&nbsp;&nbsp;&nbsp;Email Member&nbsp;&nbsp;&nbsp;</font></a></td></tr></table></center>

<center>
<b>==================================<br>
 <center><table border=1 cellpadding=0 cellspacing=0 width=155 height=26><tr valign=middle><td align="center" nowrap style="background:white" onMouseDown="this.style.backgroundColor='#FFFFFF'" onMouseOver="this.style.backgroundColor='<? echo $nav_hover; ?>'" onMouseOut="this.style.backgroundColor='#FFFFFF'"><a href="editbanner.php?id=<? echo $id; ?>" class="button" target="_blank" onmouseover="window.status='Edit Banner';return true" onMouseOut="window.status='';return true"><font color="#000000">&nbsp;&nbsp;&nbsp;Edit Banner&nbsp;&nbsp;&nbsp;</font></a></td></tr></table></center>


</td>
<tr>
<td>&nbsp;</td>
</tr>







</tr> <?
	        }
	        echo '</table><input type="button" onClick="return Inverse(document.banner);" value="Inverse"><input type="submit" name="submit" value="Approve"><input type="submit" name="submit" value="Delete"></form></center>';
        }



$query = "select * from buttons where status=0 and added=1";
		$result = mysql_query ($query)
	     	or die ("Query failed");
        $numrows = @ mysql_num_rows($result);
        if ($numrows == 0) {
        	echo "<p><center>No buttons banners awaiting approval.</p></center>";
       }
        else {
            echo "<p><center>List of <font color=#000000>BUTTON BANNERS</font> awaiting approval.</p>";
        	?>
			 <form action="approvebuttons.php" method=POST name=button>
	            <table width=70% border=0 cellpadding=2 cellspacing=2>
	           	        <?
	        while ($line = mysql_fetch_array($result)) {
	            $id = $line["id"];
	            $bannerurl = dbget($line["bannerurl"]);
	            $targeturl = dbget($line["targeturl"]);
	            $userid = $line["userid"];

	        ?>
<tr>
			<td bgcolor="<? echo $basecolour; ?>"><input type="checkbox" name="id[]" value="<? echo $id; ?>"></td>
			<td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>">
<center>Userid: <a href="memberlogin.php?userid=<? echo $userid; ?>"><? echo $userid; ?></a></center>
<br>
  <font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center><img src="<? echo $bannerurl; ?>"><br>Banner Url: <? echo $bannerurl; ?><br>Banner Link: <a href="sitecheck.php?url=<? echo $targeturl; ?>" target="_blank"><? echo $targeturl; ?></a></font></center><br><br>
<center><a href="sitecheck.php?url=<? echo $url; ?>" target="_blank"><? echo $url; ?></a></font></center>
<br>
<center><table border=1 cellpadding=0 cellspacing=0 width=155 height=26><tr valign=middle><td align="center" nowrap style="background:white" onMouseDown="this.style.backgroundColor='#FFFFFF'" onMouseOver="this.style.backgroundColor='<? echo $nav_hover; ?>'" onMouseOut="this.style.backgroundColor='#FFFFFF'"><a href="email.php?Member=<? echo $userid; ?>" class="button" target="_blank" onmouseover="window.status='Email Member';return true" onMouseOut="window.status='';return true"><font color="#000000">&nbsp;&nbsp;&nbsp;Email Member&nbsp;&nbsp;&nbsp;</font></a></td></tr></table></center>

<center>
<b>==================================<br>
 <center><table border=1 cellpadding=0 cellspacing=0 width=155 height=26><tr valign=middle><td align="center" nowrap style="background:white" onMouseDown="this.style.backgroundColor='#FFFFFF'" onMouseOver="this.style.backgroundColor='<? echo $nav_hover; ?>'" onMouseOut="this.style.backgroundColor='#FFFFFF'"><a href="editbutton.php?id=<? echo $id; ?>" class="button" target="_blank" onmouseover="window.status='Edit Button Banner';return true" onMouseOut="window.status='';return true"><font color="#000000">&nbsp;&nbsp;&nbsp;Edit Button Banner&nbsp;&nbsp;&nbsp;</font></a></td></tr></table></center>


</td>
<tr>
<td>&nbsp;</td>
</tr>







</tr> <?
	        }
	        echo '</table><input type="button" onClick="return Inverse(document.button);" value="Inverse"><input type="submit" name="submit" value="Approve"><input type="submit" name="submit" value="Delete"></form></center>';
        }

$query3 = "select * from hotlinks where approved=0 and added=1 order by date ASC";
        $result3 = mysql_query ($query3)
            or die ("Query failed");
        $numrows3 = @ mysql_num_rows($result3);
        if ($numrows3 == 0) {
            echo "<p><center>No hot link awaiting approval.</center>";

        }

        else {

            echo "<p><center>List of hot links awaiting approval.</p>";

	        ?>
                <form action="approvehotlink.php" method=POST name=hotlink>
	            <table width=70% border=1 cellpadding=2 cellspacing=2>

	            <tr>
                  <td bgcolor="<? echo $contrastcolour; ?>">&nbsp;</td>
				  <td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Username</font></center></td>
                  <td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Subject</font></center></td>
				  <td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>URL</font></center></td>
                  <td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Approve</font></center></td>

	            </tr>

	        <?

	        while ($line3 = mysql_fetch_array($result3)) {

	            $id = $line3["id"];

				$userid = $line3["userid"];

                $subject = dbget($line3["subject"]);

	            $url = dbget($line3["url"]);

				$date= $line3[".time()."];

	        ?><tr>

	          <td bgcolor="<? echo $basecolour; ?>"><input type="checkbox" name="id[]" value="<? echo $id; ?>"></td></center></td>

	          <td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center><? echo $userid; ?></font></center></td>

			  <td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center><? echo $subject; ?></font></center></td>

			  <td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center><a href="sitecheck.php?url=<? echo $url; ?>" target="_blank"><? echo $url; ?></a></font></center></td>

	          <td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>
				<a href="email.php?Member=<? echo $userid; ?>" target="_blank">Email user</a>

			  </center>
              </td></tr> <?

	        }
                echo '</table><input type="button" onClick="return Inverse(document.hotlink);" value="Inverse"><input type="submit" name="submit" value="Approve"><input type="submit" name="submit" value="Delete"></form></center>';
		}


        $query3 = "select * from tlinks where approved=0 and added=1";
	     $result3 = mysql_query ($query3) or die ("Query failed");

        $numrows3 = @ mysql_num_rows($result3);
        if ($numrows3 == 0) {
        	  echo "<br /><p><center>No traffic link ads awaiting approval.</center>";
        }
        else {
            echo "<p><center>List of traffic link ads awaiting approval.</p>";
	        ?>
				<form action="approvetlink.php" method=POST name=traffic>
	            <table width=70% border=0 cellpadding=2 cellspacing=2>
	            <tr>
				<td bgcolor="<? echo $contrastcolour; ?>">&nbsp;</td>
	              <td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Userid</font></center></td>
	              <td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Subject</font></center></td>
	              <td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Destination</font></center></td>
	              <td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Paid Views</font></center></td>
	              <td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Email</font></center></td>
	            </tr>
	        <?
	        while ($line3 = mysql_fetch_array($result3)) {
	            $id = $line3["id"];
	            $userid = $line3["userid"];
               $subject = dbget($line3["subject"]);
               $paid = dbget($line3["paid"]);
	            $url = dbget($line3["url"]);

	        ?><tr>
			  <td bgcolor="<? echo $basecolour; ?>"><input type="checkbox" name="id[]" value="<? echo $id; ?>"></td>
	          <td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center><a href="memberlogin.php?userid=<? echo $userid; ?>"><? echo $userid; ?></a></center></td>
	          <td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center><? echo $subject; ?></font></center></td>
	          <td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center><a href="sitecheck.php?url=<? echo $url; ?>" target="_blank"><? echo $url; ?></a></font></center></td>
	          <td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center><? echo $paid; ?></font></center></td>
	          <td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>

				<a href="email.php?Member=<? echo $userid; ?>" target="_blank">Email user</a>

			  </center>
	          </td></tr> <?
	        }
	        echo '</table><input type="button" onClick="return Inverse(document.traffic);" value="Inverse"><input type="submit" name="submit" value="Approve"><input type="submit" name="submit" value="Delete"></form></center>';
        }

	         $query3 = "select * from ptcads where approved=0 and added=1";
	     $result3 = mysql_query ($query3) or die ("Query failed");

        $numrows3 = @ mysql_num_rows($result3);
        if ($numrows3 == 0) {
        	  echo "<br /><p><center>No ptc link ads awaiting approval.</p></center>";
        }
        else {
            echo "<p><center>List of ptc link ads awaiting approval.</p>";
	        ?>
				<form action="approveptclink.php" method=POST name=ptc>
	            <table width=70% border=0 cellpadding=2 cellspacing=2>
	            <tr>
				<td bgcolor="<? echo $contrastcolour; ?>">&nbsp;</td>
	              <td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Userid</font></center></td>
	              <td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Subject</font></center></td>
	              <td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Destination</font></center></td>
	              <td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Paid Views</font></center></td>
	              <td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Email</font></center></td>
	            </tr>
	        <?
	        while ($line3 = mysql_fetch_array($result3)) {
	            $id = $line3["id"];
	            $userid = $line3["userid"];
               $subject = dbget($line3["subject"]);
               $paid = dbget($line3["paid"]);
	            $url = dbget($line3["url"]);

	        ?><tr>
			  <td bgcolor="<? echo $basecolour; ?>"><input type="checkbox" name="id[]" value="<? echo $id; ?>"></td>
	          <td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center><a href="memberlogin.php?userid=<? echo $userid; ?>"><? echo $userid; ?></a></center></td>
	          <td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center><? echo $subject; ?></font></center></td>
	          <td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center><a href="sitecheck.php?url=<? echo $url; ?>" target="_blank"><? echo $url; ?></a></font></center></td>
	          <td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center><? echo $paid; ?></font></center></td>
	          <td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>

				<a href="email.php?Member=<? echo $userid; ?>" target="_blank">Email user</a>

			  </center>
	          </td></tr> <?
	        }
	        echo '</table><input type="button" onClick="return Inverse(document.ptc);" value="Inverse"><input type="submit" name="submit" value="Approve"><input type="submit" name="submit" value="Delete"></form></center>';
        }


$query = "select * from headlineads where approved=0 and added=1";
		$result = mysql_query ($query)
	     	or die ("Query failed");
        $numrows = @ mysql_num_rows($result);
        if ($numrows == 0) {
        	echo "<p><center>No headline ads awaiting approval.</p></center>";
        }
        else {
            echo "<p><center>List of headline ads awaiting approval.</p>";
        	?>
                    <form method=POST action=approveheadline.php name=hld>
 	            <table width=70% border=0 cellpadding=2 cellspacing=2>
	            <tr>
                      <td bgcolor="<? echo $basecolour; ?>">&nbsp;</td>
	              <td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Userid</font></center></td>
	              <td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Ad</font></center></td>
	              <td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Email</font></center></td>
	            </tr>
	        <?
	        while ($line = mysql_fetch_array($result)) {
	            $id = $line["id"];
	            $title = dbget($line["title"]);
	            $targeturl = dbget($line["url"]);
	            $userid = $line["userid"];

	        ?><tr>
                  <td bgcolor="<? echo $basecolour; ?>"><input type="checkbox" name="id[]" value="<? echo $id; ?>"></td>
	          <td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center><a href="memberlogin.php?userid=<? echo $userid; ?>"><? echo $userid; ?></a></font></center></td>
	          <td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center><a href="sitecheck.php?url=<? echo $targeturl; ?>" target="_blank"><? echo $title; ?></a></font></center></td>
	          <td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center><br>
	         	         <a href="email.php?Member=<? echo $userid; ?>" target="_blank">Email user</a></center>
	          </td></tr> <?
	         }
	        echo '</table><input type="button" onClick="return Inverse(document.hld);" value="Inverse"><input type="submit" name="submit" value="Approve"><input type="submit" name="submit" value="Delete"></form></center>';
        }



		$query3 = "select * from topnav where status=0 and added=1";
		$result3 = mysql_query ($query3)
	     	or die ("Query failed");
        $numrows3 = @ mysql_num_rows($result3);
        if ($numrows3 == 0) {
        	echo "<p><center>No top navigation link awaiting approval.</center>";
        }
        else {
            echo "<p><center>List of top navigation links awaiting approval.</p>";
	        ?>
			    <form action="approvetopnav.php" method=POST name=topnav>
	            <table width=70% border=0 cellpadding=2 cellspacing=2>
	            <tr>
				<td bgcolor="<? echo $contrastcolour; ?>">&nbsp;</td>
	              <td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Userid</font></center></td>
	              <td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Name</font></center></td>
	              <td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Target Url</font></center></td>
	              <td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Email</font></center></td>
	            </tr>
	        <?
	        while ($line3 = mysql_fetch_array($result3)) {
	            $id = $line3["id"];
	            $userid = $line3["userid"];
                $subject = dbget($line3["name"]);
	            $targeturl = dbget($line3["targeturl"]);

	        ?><tr>
			  <td bgcolor="<? echo $basecolour; ?>"><input type="checkbox" name="id[]" value="<? echo $id; ?>"></td>
	          <td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center><? echo $userid; ?></center></td>
	          <td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center><? echo $subject; ?></font></center></td>
	          <td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center><a href="sitecheck.php?url=<? echo $url; ?>" target="_blank"><? echo $targeturl; ?></a></font></center></td>
	          <td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>
				<a href="email.php?Member=<? echo $userid; ?>" target="_blank">Email user</a>

			  </center>
	          </td></tr> <?
	        }
	        echo '</table><input type="button" onClick="return Inverse(document.topnav);" value="Inverse"><input type="submit" name="submit" value="Approve"><input type="submit" name="submit" value="Delete"></form></center>';
		}

$query3 = "select * from botnav where status=0 and added=1";
		$result3 = mysql_query ($query3)
	     	or die ("Query failed");
        $numrows3 = @ mysql_num_rows($result3);
        if ($numrows3 == 0) {
        	echo "<p><center>No bottom navigation link awaiting approval.</center>";
        }
        else {
            echo "<p><center>List of bottom navigation links awaiting approval.</p>";
	        ?>
			    <form action="approvebotnav.php" method=POST name=botnav>
	            <table width=70% border=0 cellpadding=2 cellspacing=2>
	            <tr>
				<td bgcolor="<? echo $contrastcolour; ?>">&nbsp;</td>
	              <td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Userid</font></center></td>
	              <td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Name</font></center></td>
	              <td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Target Url</font></center></td>
	              <td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Email</font></center></td>
	            </tr>
	        <?
	        while ($line3 = mysql_fetch_array($result3)) {
	            $id = $line3["id"];
	            $userid = $line3["userid"];
                $subject = dbget($line3["name"]);
	            $targeturl = dbget($line3["targeturl"]);

	        ?><tr>
			  <td bgcolor="<? echo $basecolour; ?>"><input type="checkbox" name="id[]" value="<? echo $id; ?>"></td>
	          <td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center><? echo $userid; ?></center></td>
	          <td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center><? echo $subject; ?></font></center></td>
	          <td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center><a href="sitecheck.php?url=<? echo $url; ?>" target="_blank"><? echo $targeturl; ?></a></font></center></td>
	          <td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>
				<a href="email.php?Member=<? echo $userid; ?>" target="_blank">Email user</a>

			  </center>
	          </td></tr> <?
	        }
	        echo '</table><input type="button" onClick="return Inverse(document.botnav);" value="Inverse"><input type="submit" name="submit" value="Approve"><input type="submit" name="submit" value="Delete"></form></center>';
		}


		$query3 = "select * from headerads where approved=0 and added=1";
	     $result3 = mysql_query ($query3) or die ("Query failed");

        $numrows3 = @ mysql_num_rows($result3);
        if ($numrows3 == 0) {
        	  echo "<br /><p><center>No solo header ads awaiting approval.</p></center>";
        }
        else {
            echo "<p><center>List of solo header ads awaiting approval.</p>";
	        ?>
				<form action="approveheaderad.php" method=POST name=headerad>
	            <table width=70% border=0 cellpadding=2 cellspacing=2>
	            <tr>
				<td bgcolor="<? echo $contrastcolour; ?>">&nbsp;</td>
	              <td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Userid</font></center></td>
	              <td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Subject</font></center></td>
	              <td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Destination</font></center></td>
	              <td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Paid Views</font></center></td>
	              <td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Email</font></center></td>
	            </tr>
	        <?
	        while ($line3 = mysql_fetch_array($result3)) {
	            $id = $line3["id"];
	            $userid = $line3["userid"];
               $subject = dbget($line3["subject"]);
               $paid = dbget($line3["paid"]);
	            $url = dbget($line3["url"]);

	        ?><tr>
			  <td bgcolor="<? echo $basecolour; ?>"><input type="checkbox" name="id[]" value="<? echo $id; ?>"></td>
	          <td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center><a href="memberlogin.php?userid=<? echo $userid; ?>"><? echo $userid; ?></a></center></td>
	          <td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center><? echo $subject; ?></font></center></td>
	          <td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center><a href="sitecheck.php?url=<? echo $url; ?>" target="_blank"><? echo $url; ?></a></font></center></td>
	          <td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center><? echo $paid; ?></font></center></td>
	          <td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>

				<a href="email.php?Member=<? echo $userid; ?>" target="_blank">Email user</a>

			  </center>
	          </td></tr> <?
	        }
	        echo '</table><input type="button" onClick="return Inverse(document.headerad);" value="Inverse"><input type="submit" name="submit" value="Approve"><input type="submit" name="submit" value="Delete"></form></center>';
        }


		$query3 = "select * from footerads where approved=0 and added=1";
	     $result3 = mysql_query ($query3) or die ("Query failed");

        $numrows3 = @ mysql_num_rows($result3);
        if ($numrows3 == 0) {
        	  echo "<br /><p><center>No solo footer ads awaiting approval.</p></center>";
        }
        else {
            echo "<p><center>List of solo footer ads awaiting approval.</p>";
	        ?>
				<form action="approvefooterad.php" method=POST name=footerad>
	            <table width=70% border=0 cellpadding=2 cellspacing=2>
	            <tr>
				<td bgcolor="<? echo $contrastcolour; ?>">&nbsp;</td>
	              <td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Userid</font></center></td>
	              <td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Subject</font></center></td>
	              <td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Destination</font></center></td>
	              <td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Paid Views</font></center></td>
	              <td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Email</font></center></td>
	            </tr>
	        <?
	        while ($line3 = mysql_fetch_array($result3)) {
	            $id = $line3["id"];
	            $userid = $line3["userid"];
               $subject = dbget($line3["subject"]);
               $paid = dbget($line3["paid"]);
	            $url = dbget($line3["url"]);

	        ?><tr>
			  <td bgcolor="<? echo $basecolour; ?>"><input type="checkbox" name="id[]" value="<? echo $id; ?>"></td>
	          <td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center><a href="memberlogin.php?userid=<? echo $userid; ?>"><? echo $userid; ?></a></center></td>
	          <td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center><? echo $subject; ?></font></center></td>
	          <td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center><a href="sitecheck.php?url=<? echo $url; ?>" target="_blank"><? echo $url; ?></a></font></center></td>
	          <td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center><? echo $paid; ?></font></center></td>
	          <td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>

				<a href="email.php?Member=<? echo $userid; ?>" target="_blank">Email user</a>

			  </center>
	          </td></tr> <?
	        }
	        echo '</table><input type="button" onClick="return Inverse(document.footerad);" value="Inverse"><input type="submit" name="submit" value="Approve"><input type="submit" name="submit" value="Delete"></form></center>';
        }

		$query3 = "select * from loginads where approved=0 and added=1";
		$result3 = mysql_query ($query3)
	     	or die ("Query failed");
        $numrows3 = @ mysql_num_rows($result3);
        if ($numrows3 == 0) {
        	echo "<p><center>No login ads awaiting approval.</p></center>";
        }
        else {
            echo "<p><center>List of login ads awaiting approval.</p>";
	        ?>
				<form action="approvelogin.php" method=POST name=login>
	            <table width=70% border=0 cellpadding=2 cellspacing=2>
	            <tr>
				<td bgcolor="<? echo $contrastcolour; ?>">&nbsp;</td>
	              <td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Userid</font></center></td>
	              <td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Ad body</font></center></td>
	              <td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Approve</font></center></td>
	            </tr>
	        <?
	        while ($line3 = mysql_fetch_array($result3)) {
	            $id = $line3["id"];
	            $userid = $line3["userid"];
                $subject = dbget($line3["adbody"]);

	        ?><tr>
			<td bgcolor="<? echo $basecolour; ?>"><input type="checkbox" name="id[]" value="<? echo $id; ?>"></td>
	          <td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center><? echo $userid; ?></center></td>
	          <td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center><? echo $subject; ?></font></center></td>
	          <td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>
				<a href="email.php?Member=<? echo $userid; ?>" target="_blank">Email user</a>

			  </center>
	          </td></tr> <?
	        }
	        echo '</table><input type="button" onClick="return Inverse(document.login);" value="Inverse"><input type="submit" name="submit" value="Approve"><input type="submit" name="submit" value="Delete"></form></center>';
		}
#############################################################################################
$query = "select * from hheadlineads where approved=0 and added=1";
$result = mysql_query ($query) or die (mysql_error());
        $numrows = @ mysql_num_rows($result);
        if ($numrows == 0) {
        	 echo "<p><center>No Hot Headline Adz awaiting approval.</p></center>";
        }
        else {
            echo "<p><center>List of Hot Headline Adz awaiting approval.</p>";
	        ?>
<form action="approvehheadlinead.php" method=POST name=hheadlinead>
<table width="80%" border="1" cellpadding="2" cellspacing="0" style="border: 1px solid #000000;">
<tr>
<td bgcolor="<? echo $contrastcolour; ?>">&nbsp;</td>
<td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Userid</font></center></td>
<td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Subject</font></center></td>
<td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>URL</font></center></td>
<td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Background Color</font></center></td>
<td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Text Color</font></center></td>
<td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Max Clicks</font></center></td>
<td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Email</font></center></td>
</tr>
<?
while ($hheadlineadrowz = mysql_fetch_array($result))
{
$hheadlineadid = $hheadlineadrowz["id"];
$hheadlineaduserid = $hheadlineadrowz["userid"];
$hheadlineadurl = dbget($hheadlineadrowz["url"]);
$hheadlineadtitle = dbget($hheadlineadrowz["title"]);
$hheadlineadcolor = dbget($hheadlineadrowz["color"]);
$hheadlineadbgcolor = dbget($hheadlineadrowz["bgcolor"]);
$hheadlineadclicks = dbget($hheadlineadrowz["clicks"]);
$hheadlineadmax = dbget($hheadlineadrowz["max"]);
$hheadlineadpurchase = dbget($hheadlineadrowz["purchase"]);
$hheadlineadpurchase = formatDate($hheadlineadpurchase);
?>
<tr>
<td bgcolor="<? echo $basecolour; ?>" align="center"><input type="checkbox" name="id[]" value="<? echo $hheadlineadid; ?>"></td>
<td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center><? echo $hheadlineaduserid; ?></font></center></td>
<td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center><? echo $hheadlineadtitle; ?></font></center></td>
<td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center><a href="sitecheck.php?url=<? echo $hheadlineadurl; ?>" target="_blank"><? echo $hheadlineadurl; ?></a></font></center></td>
<td bgcolor="<? echo $hheadlineadbgcolor; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center><? echo $hheadlineadbgcolor; ?></font></center></td>
<td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $hheadlineadcolor; ?>"><center><? echo $hheadlineadcolor; ?></font></center></td>
<td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center><? echo $hheadlineadmax; ?></font></center></td>
<td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>
<a href="email.php?Member=<? echo $hheadlineaduserid; ?>" target="_blank">Email user</a>
</center>
</td></tr>
<?
}
	        echo '</table><input type="button" onClick="return Inverse(document.hheadlinead);" value="Inverse"><input type="submit" name="submit" value="Approve"><input type="submit" name="submit" value="Delete"></form></center>';
        }
#############################################################################################
        $query = "select * from hheaderads where approved=0 and added=1";
		$result = mysql_query ($query)
	     	or die ("Query failed");
        $numrows = @ mysql_num_rows($result);
        if ($numrows == 0) {
        	 echo "<p><center>No Hot Header Ads awaiting approval.</p></center>";
        }
        else {
            echo "<p><center>List of Hot Header Ads awaiting approval.</p>";
	        ?>
<form action="approvehheaderad.php" method=POST name=hheaderad>
<table width="80%" border="1" cellpadding="2" cellspacing="0" style="border: 1px solid #000000;">
<tr>
<td bgcolor="<? echo $contrastcolour; ?>">&nbsp;</td>
<td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Userid</font></center></td>
<td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Heading</font></center></td>
<td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Header Text Color</font></center></td>
<td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>URL</font></center></td>
<td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Banner</font></center></td>
<td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Description</font></center></td>
<td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Description Text Color</font></center></td>
<td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Background Color</font></center></td>
<td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Max Clicks</font></center></td>
<td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Email</font></center></td>
</tr>
<?
while ($hheaderadrowz = mysql_fetch_array($result))
{
$hheaderadid = $hheaderadrowz["id"];
$hheaderaduserid = dbget($hheaderadrowz["userid"]);
$hheaderadurl = dbget($hheaderadrowz["url"]);
$hheaderadbanner = dbget($hheaderadrowz["banner"]);
$hheaderadheading = dbget($hheaderadrowz["heading"]);
$hheaderadheadingfontcolor = dbget($hheaderadrowz["headingfontcolor"]);
$hheaderadbgcolor = dbget($hheaderadrowz["bgcolor"]);
$hheaderaddescription = dbget($hheaderadrowz["description"]);
$hheaderaddescriptionfontcolor = dbget($hheaderadrowz["descriptionfontcolor"]);
$hheaderadapproved = dbget($hheaderadrowz["approved"]);
$hheaderadviews = dbget($hheaderadrowz["views"]);
$hheaderadclicks = dbget($hheaderadrowz["clicks"]);
$hheaderadmax = dbget($hheaderadrowz["max"]);
$hheaderadpurchase = dbget($hheaderadrowz["purchase"]);
$hheaderadpurchase = formatDate($hheaderadpurchase);
?>
<tr>
<td bgcolor="<? echo $basecolour; ?>" align="center"><input type="checkbox" name="id[]" value="<? echo $hheaderadid; ?>"></td>
<td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center><? echo $hheaderaduserid; ?></font></center></td>
<td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center><? echo $hheaderadheading; ?></font></center></td>
<td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $hheaderadheadingfontcolor; ?>"><center><? echo $hheaderadheadingfontcolor; ?></font></center></td>
<td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center><a href="sitecheck.php?url=<? echo $hheaderadurl; ?>" target="_blank"><? echo $hheaderadurl; ?></a></font></center></td>
<td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center><a href="sitecheck.php?url=<? echo $hheaderadurl; ?>" target="_blank"><img src="<?php echo $hheaderadbanner ?>" border="0" width="200"></a></font></center></td>
<td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center><? echo $hheaderaddescription; ?></font></center></td>
<td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $hheaderaddescriptionfontcolor; ?>"><center><? echo $hheaderaddescriptionfontcolor; ?></font></center></td>
<td bgcolor="<? echo $hheaderadbgcolor; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center><? echo $hheaderadbgcolor; ?></font></center></td>
<td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center><? echo $hheaderadmax; ?></font></center></td>
<td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>
<a href="email.php?Member=<? echo $hheaderaduserid; ?>" target="_blank">Email user</a>
</center>
</td></tr>
<?
}
	        echo '</table><input type="button" onClick="return Inverse(document.hheaderad);" value="Inverse"><input type="submit" name="submit" value="Approve"><input type="submit" name="submit" value="Delete"></form></center>';
        }
#############################################################################################
   $query3 = "select * from solos where approved=0 and added=1";
		$result3 = mysql_query ($query3)
	     	or die ("Query failed");
        $numrows3 = @ mysql_num_rows($result3);
        if ($numrows3 == 0) {
        	echo "<p><center>No solo ads awaiting approval.</center>";
        }
        else {
            echo "<p><center>List of soloads awaiting approval.</p>";
	        ?>
			    <form action="approvesolo.php" method=POST name=solo>
	            <table width=85% border=0 cellpadding=2 cellspacing=2>
	          	        <?
	        while ($line3 = mysql_fetch_array($result3)) {
	            $id = $line3["id"];
	            $userid = $line3["userid"];
                $subject = dbget($line3["subject"]);
	            $adbody = dbget($line3["adbody"]);
	            $url = dbget($line3["url"]);

	        ?>
<tr>
			<td bgcolor="<? echo $basecolour; ?>"><input type="checkbox" name="id[]" value="<? echo $id; ?>"></td>		          <td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>">
<center>Userid: <a href="memberlogin.php?userid=<? echo $userid; ?>"><? echo $userid; ?></a></center>
<br>
<center>Date Submitted: <? echo date("Y-m-d G:i", $line3["date"]); ?></font></center>
<br>
<center>Subject: <? echo $subject; ?></center>
<br>
<center><? echo $adbody; ?></center>
<br>
<center><a href="sitecheck.php?url=<? echo $url; ?>" target="_blank"><? echo $url; ?></a></font></center>
<br>
<center><table border=1 cellpadding=0 cellspacing=0 width=155 height=26><tr valign=middle><td align="center" nowrap style="background:white" onMouseDown="this.style.backgroundColor='#FFFFFF'" onMouseOver="this.style.backgroundColor='<? echo $nav_hover; ?>'" onMouseOut="this.style.backgroundColor='#FFFFFF'"><a href="email.php?Member=<? echo $userid; ?>" class="button" target="_blank" onmouseover="window.status='Email Member';return true" onMouseOut="window.status='';return true"><font color="#000000">&nbsp;&nbsp;&nbsp;Email Member&nbsp;&nbsp;&nbsp;</font></a></td></tr></table></center>

<center>
<b>==================================<br>
 <center><table border=1 cellpadding=0 cellspacing=0 width=155 height=26><tr valign=middle><td align="center" nowrap style="background:white" onMouseDown="this.style.backgroundColor='#FFFFFF'" onMouseOver="this.style.backgroundColor='<? echo $nav_hover; ?>'" onMouseOut="this.style.backgroundColor='#FFFFFF'"><a href="editsolo.php?id=<? echo $id; ?>" class="button" target="_blank" onmouseover="window.status='Edit Solo';return true" onMouseOut="window.status='';return true"><font color="#000000">&nbsp;&nbsp;&nbsp;Edit Solo&nbsp;&nbsp;&nbsp;</font></a></td></tr></table></center>


</td>
<tr>
<td>&nbsp;</td>
</tr>







</tr> <?
	        }
	        echo '</table><input type="button" onClick="return Inverse(document.solo);" value="Inverse"><input type="submit" name="submit" value="Approve"><input type="submit" name="submit" value="Delete"></form></center>';
        }

	$query3 = "select * from cashsolos where approved=0 and added=1";
		$result3 = mysql_query ($query3)
	     	or die ("Query failed");
        $numrows3 = @ mysql_num_rows($result3);
        if ($numrows3 == 0) {
        	echo "<p><center>No cash solo ads awaiting approval.</center>";
        }
        else {
            echo "<p><center>List of cash solo ads awaiting approval.</p>";
	        ?>
			    <form action="approvecashsolo.php" method=POST name=cashsolo>
	            <table width=70% border=0 cellpadding=2 cellspacing=2>
	            <tr>
				<td bgcolor="<? echo $contrastcolour; ?>">&nbsp;</td>
	              <td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Userid</font></center></td>
	              <td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Subject</font></center></td>
	              <td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>URL</font></center></td>
	              <td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Adbody</font></center></td>
				  <td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Date</font></center></td>
	              <td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Email</font></center></td>
	            </tr>
	        <?
	        while ($line3 = mysql_fetch_array($result3)) {
	            $id = $line3["id"];
	            $userid = $line3["userid"];
                $subject = dbget($line3["subject"]);
	            $adbody = dbget($line3["adbody"]);
	            $url = dbget($line3["url"]);

	        ?><tr>
				<td bgcolor="<? echo $basecolour; ?>"><input type="checkbox" name="id[]" value="<? echo $id; ?>"></td>
	          <td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center><a href="memberlogin.php?userid=<? echo $userid; ?>"><? echo $userid; ?></a></center></td>
	          <td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center><? echo $subject; ?></font></center></td>
			  <td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center><a href="sitecheck.php?url=<? echo $url; ?>" target="_blank"><? echo $url; ?></a></font></center></td>
	          <td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center><? echo $adbody; ?></font></center></td>
			  <td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center><? echo date("Y-m-d G:i", $line3["date"]); ?></font></center></td>
	          <td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>

			  <a href="email.php?Member=<? echo $userid; ?>" target="_blank">Email user</a>

			  </center>
	          </td></tr> <?
	        }
	        echo '</table><input type="button" onClick="return Inverse(document.cashsolo);" value="Inverse"><input type="submit" name="submit" value="Approve"><input type="submit" name="submit" value="Delete"></form></center>';
        }

   $query3 = "select * from hpsolos where approved=0 and added=1";
		$result3 = mysql_query ($query3)
	     	or die ("Query failed");
        $numrows3 = @ mysql_num_rows($result3);
        if ($numrows3 == 0) {
        	echo "<p><center>No high priority solo ads awaiting approval.</center>";
        }
        else {
            echo "<p><center>List of high priority soloads awaiting approval.</p>";
	        ?>
			    <form action="approvehpsolo.php" method=POST name=hpsolo>
	            <table width=85% border=0 cellpadding=2 cellspacing=2>
	          	        <?
	        while ($line3 = mysql_fetch_array($result3)) {
	            $id = $line3["id"];
	            $userid = $line3["userid"];
                $subject = dbget($line3["subject"]);
	            $adbody = dbget($line3["adbody"]);
	            $url = dbget($line3["url"]);

	        ?>
<tr>
			<td bgcolor="<? echo $basecolour; ?>"><input type="checkbox" name="id[]" value="<? echo $id; ?>"></td>		          <td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>">
<center>Userid: <a href="memberlogin.php?userid=<? echo $userid; ?>"><? echo $userid; ?></a></center>
<br>
<center>Date Submitted: <? echo date("Y-m-d G:i", $line3["date"]); ?></font></center>
<br>
<center>Subject: <? echo $subject; ?></center>
<br>
<center><? echo $adbody; ?></center>
<br>
<center><a href="sitecheck.php?url=<? echo $url; ?>" target="_blank"><? echo $url; ?></a></font></center>
<br>
<center><table border=1 cellpadding=0 cellspacing=0 width=155 height=26><tr valign=middle><td align="center" nowrap style="background:white" onMouseDown="this.style.backgroundColor='#FFFFFF'" onMouseOver="this.style.backgroundColor='<? echo $nav_hover; ?>'" onMouseOut="this.style.backgroundColor='#FFFFFF'"><a href="email.php?Member=<? echo $userid; ?>" class="button" target="_blank" onmouseover="window.status='Email Member';return true" onMouseOut="window.status='';return true"><font color="#000000">&nbsp;&nbsp;&nbsp;Email Member&nbsp;&nbsp;&nbsp;</font></a></td></tr></table></center>

<center>
<b>==================================<br>
 <center><table border=1 cellpadding=0 cellspacing=0 width=155 height=26><tr valign=middle><td align="center" nowrap style="background:white" onMouseDown="this.style.backgroundColor='#FFFFFF'" onMouseOver="this.style.backgroundColor='<? echo $nav_hover; ?>'" onMouseOut="this.style.backgroundColor='#FFFFFF'"><a href="edithpsolo.php?id=<? echo $id; ?>" class="button" target="_blank" onmouseover="window.status='Edit Solo';return true" onMouseOut="window.status='';return true"><font color="#000000">&nbsp;&nbsp;&nbsp;Edit HP Solo&nbsp;&nbsp;&nbsp;</font></a></td></tr></table></center>


</td>
<tr>
<td>&nbsp;</td>
</tr>







</tr> <?
	        }
	        echo '</table><input type="button" onClick="return Inverse(document.hpsolo);" value="Inverse"><input type="submit" name="submit" value="Approve"><input type="submit" name="submit" value="Delete"></form></center>';
        }

   $query3 = "select * from hpcsolos where approved=0 and added=1";
		$result3 = mysql_query ($query3)
	     	or die ("Query failed");
        $numrows3 = @ mysql_num_rows($result3);
        if ($numrows3 == 0) {
        	echo "<p><center>No high priority cash solo ads awaiting approval.</center>";
        }
        else {
            echo "<p><center>List of high priority cash soloads awaiting approval.</p>";
	        ?>
			    <form action="approvehpcsolo.php" method=POST name=hpcsolo>
	            <table width=85% border=0 cellpadding=2 cellspacing=2>
	          	        <?
	        while ($line3 = mysql_fetch_array($result3)) {
	            $id = $line3["id"];
	            $userid = $line3["userid"];
                $subject = dbget($line3["subject"]);
	            $adbody = dbget($line3["adbody"]);
	            $url = dbget($line3["url"]);

	        ?>
<tr>
			<td bgcolor="<? echo $basecolour; ?>"><input type="checkbox" name="id[]" value="<? echo $id; ?>"></td>		          <td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>">
<center>Userid: <a href="memberlogin.php?userid=<? echo $userid; ?>"><? echo $userid; ?></a></center>
<br>
<center>Date Submitted: <? echo date("Y-m-d G:i", $line3["date"]); ?></font></center>
<br>
<center>Subject: <? echo $subject; ?></center>
<br>
<center><? echo $adbody; ?></center>
<br>
<center><a href="sitecheck.php?url=<? echo $url; ?>" target="_blank"><? echo $url; ?></a></font></center>
<br>
<center><table border=1 cellpadding=0 cellspacing=0 width=155 height=26><tr valign=middle><td align="center" nowrap style="background:white" onMouseDown="this.style.backgroundColor='#FFFFFF'" onMouseOver="this.style.backgroundColor='<? echo $nav_hover; ?>'" onMouseOut="this.style.backgroundColor='#FFFFFF'"><a href="email.php?Member=<? echo $userid; ?>" class="button" target="_blank" onmouseover="window.status='Email Member';return true" onMouseOut="window.status='';return true"><font color="#000000">&nbsp;&nbsp;&nbsp;Email Member&nbsp;&nbsp;&nbsp;</font></a></td></tr></table></center>

<center>
<b>==================================<br>
 <center><table border=1 cellpadding=0 cellspacing=0 width=155 height=26><tr valign=middle><td align="center" nowrap style="background:white" onMouseDown="this.style.backgroundColor='#FFFFFF'" onMouseOver="this.style.backgroundColor='<? echo $nav_hover; ?>'" onMouseOut="this.style.backgroundColor='#FFFFFF'"><a href="edithpcsolo.php?id=<? echo $id; ?>" class="button" target="_blank" onmouseover="window.status='Edit HPC Solo';return true" onMouseOut="window.status='';return true"><font color="#000000">&nbsp;&nbsp;&nbsp;Edit Solo&nbsp;&nbsp;&nbsp;</font></a></td></tr></table></center>


</td>
<tr>
<td>&nbsp;</td>
</tr>







</tr> <?
	        }
	        echo '</table><input type="button" onClick="return Inverse(document.hpcsolo);" value="Inverse"><input type="submit" name="submit" value="Approve"><input type="submit" name="submit" value="Delete"></form></center>';
        }

      $query3 = "select * from snfsolos where approved=0 and added=1";
		$result3 = mysql_query ($query3)
	     	or die ("Query failed");
        $numrows3 = @ mysql_num_rows($result3);
        if ($numrows3 == 0) {
        	echo "<p><center>No SNF Solos awaiting approval.</p></center>";
        }
        else {
            echo "<p><center>List of SNF Solos awaiting approval.</p>";
	        ?>
			    <form action="approvesnfsolo.php" method=POST name=snfsolo>
	            <table width=70% border=0 cellpadding=2 cellspacing=2>
	            <tr>
				<td bgcolor="<? echo $contrastcolour; ?>">&nbsp;</td>
	              <td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Userid</font></center></td>
	              <td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Subject</font></center></td>
	              <td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>URL</font></center></td>
	              <td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Adbody</font></center></td>
	              <td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Email</font></center></td>
	            </tr>
	        <?
	        while ($line3 = mysql_fetch_array($result3)) {
	            $id = $line3["id"];
	            $userid = $line3["userid"];
                $subject = dbget($line3["subject"]);
	            $adbody = dbget($line3["adbody"]);
	            $url = dbget($line3["url"]);

	        ?><tr>
				<td bgcolor="<? echo $basecolour; ?>"><input type="checkbox" name="id[]" value="<? echo $id; ?>"></td>
	          <td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center><a href="memberlogin.php?userid=<? echo $userid; ?>"><? echo $userid; ?></a></center></td>
	          <td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center><? echo $subject; ?></font></center></td>
			  <td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center><a href="sitecheck.php?url=<? echo $url; ?>" target="_blank"><? echo $url; ?></a></font></center></td>
	          <td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center><? echo $adbody; ?></font></center></td>
	          <td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>

			  <a href="email.php?Member=<? echo $userid; ?>" target="_blank">Email user</a>

			  </center>
	          </td></tr> <?
	        }
	        echo '</table><input type="button" onClick="return Inverse(document.snfsolo);" value="Inverse"><input type="submit" name="submit" value="Approve"><input type="submit" name="submit" value="Delete"></form></center>';
        }


      $query3 = "select * from snfcsolos where approved=0 and added=1";
		$result3 = mysql_query ($query3)
	     	or die ("Query failed");
        $numrows3 = @ mysql_num_rows($result3);
        if ($numrows3 == 0) {
        	echo "<p><center>No SNF Cash Solos awaiting approval.</p></center>";
        }
        else {
            echo "<p><center>List of SNF Cash Solos awaiting approval.</p>";
	        ?>
			    <form action="approvesnfcsolo.php" method=POST name=snfcsolo>
	            <table width=70% border=0 cellpadding=2 cellspacing=2>
	            <tr>
				<td bgcolor="<? echo $contrastcolour; ?>">&nbsp;</td>
	              <td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Userid</font></center></td>
	              <td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Subject</font></center></td>
	              <td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>URL</font></center></td>
	              <td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Adbody</font></center></td>
	              <td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Email</font></center></td>
	            </tr>
	        <?
	        while ($line3 = mysql_fetch_array($result3)) {
	            $id = $line3["id"];
	            $userid = $line3["userid"];
                $subject = dbget($line3["subject"]);
	            $adbody = dbget($line3["adbody"]);
	            $url = dbget($line3["url"]);

	        ?><tr>
				<td bgcolor="<? echo $basecolour; ?>"><input type="checkbox" name="id[]" value="<? echo $id; ?>"></td>
	          <td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center><a href="memberlogin.php?userid=<? echo $userid; ?>"><? echo $userid; ?></a></center></td>
	          <td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center><? echo $subject; ?></font></center></td>
			  <td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center><a href="sitecheck.php?url=<? echo $url; ?>" target="_blank"><? echo $url; ?></a></font></center></td>
	          <td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center><? echo $adbody; ?></font></center></td>
	          <td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>

			  <a href="email.php?Member=<? echo $userid; ?>" target="_blank">Email user</a>

			  </center>
	          </td></tr> <?
	        }
	        echo '</table><input type="button" onClick="return Inverse(document.snfcsolo);" value="Inverse"><input type="submit" name="submit" value="Approve"><input type="submit" name="submit" value="Delete"></form></center>';
        }







     $query3 = "select * from dailybonus where approved=0 and added=1";
		$result3 = mysql_query ($query3)
	     	or die ("Query failed");
        $numrows3 = @ mysql_num_rows($result3);
        if ($numrows3 == 0) {
        	echo "<p><center>No Daily Bonus awaiting approval.</p></center>";
        }
        else {
            echo "<p><center>List of Daily Bonus awaiting approval.</p>";
	        ?>
	            <form action="approvebonus.php" method=POST name=bonus>
	            <table width=70% border=0 cellpadding=2 cellspacing=2>
	            <tr>
				<td bgcolor="<? echo $contrastcolour; ?>">&nbsp;</td>
	              <td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Userid</font></center></td>
				  <td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>URL</font></center></td>
				  <td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Date</font></center></td>
	              <td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Email User</font></center></td>
	              
	            </tr>
	        <?
	        while ($line3 = mysql_fetch_array($result3)) {
	            $id = $line3["id"];
	            $userid = $line3["userid"];
                $date = $line3["rented"];
	            $url = $line3["url"];
	           

	        ?><tr>
			<td bgcolor="<? echo $basecolour; ?>"><input type="checkbox" name="id[]" value="<? echo $id; ?>"></td>

			  <td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center><a href="memberlogin.php?userid=<? echo $userid; ?>"><? echo $userid; ?></a></center></td>

			  <td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center><a href="sitecheck.php?url=<? echo $url; ?>" target="_blank"><? echo $url; ?></a></font></center></td>
			  <td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center><? echo $date; ?></font></center></td>
			  

	          <td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center><br>

			  <a href="email.php?Member=<? echo $userid; ?>" target="_blank">Email user</a>

			  </center>
	          </td></tr> <?
	        }
	        echo '</table><input type="button" onClick="return Inverse(document.bonus);" value="Inverse"><input type="submit" name="submit" value="Approve"><input type="submit" name="submit" value="Delete"></form></center>';
        }
##############################################FULL LOGIN ADS START#############################################################
     $query3 = "select * from fullloginads where approved=0 and added=1";
		$result3 = mysql_query ($query3)
	     	or die ("Query failed");
        $numrows3 = @ mysql_num_rows($result3);
        if ($numrows3 == 0) {
        	echo "<p><center>No full page login ads awaiting approval.</p></center>";
        }
        else {
            echo "<p><center>List of full page login ads awaiting approval.</p>";
	        ?>
	            <form action="approvefulllogin.php" method=POST name=fulllogin>
	            <table width=70% border=0 cellpadding=2 cellspacing=2>
	            <tr>
				<td bgcolor="<? echo $contrastcolour; ?>">&nbsp;</td>
	              <td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Userid</font></center></td>
				  <td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>URL</font></center></td>
				  <td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Date</font></center></td>
	              <td bgcolor="<? echo $contrastcolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>Email User</font></center></td>
	            </tr>
	        <?
	        while ($line3 = mysql_fetch_array($result3)) {
	            $id = $line3["id"];
	            $userid = $line3["userid"];
                $date = $line3["rented"];
	            $url = $line3["url"];

	        ?><tr>
			<td bgcolor="<? echo $basecolour; ?>"><input type="checkbox" name="id[]" value="<? echo $id; ?>"></td>

			  <td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center><a href="memberlogin.php?userid=<? echo $userid; ?>"><? echo $userid; ?></a></center></td>

			  <td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center><a href="sitecheck.php?url=<? echo $url; ?>" target="_blank"><? echo $url; ?></a></font></center></td>
			  <td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center><? echo $date; ?></font></center></td>

	          <td bgcolor="<? echo $basecolour; ?>"><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><center>

			  <a href="email.php?Member=<? echo $userid; ?>" target="_blank">Email user</a>

			  </center>
	          </td></tr> <?
	        }
	        echo '</table><input type="button" onClick="return Inverse(document.fulllogin);" value="Inverse"><input type="submit" name="submit" value="Approve"><input type="submit" name="submit" value="Delete"></form></center>';
        }
##############################################FULL LOGIN ADS END#############################################################


		echo "</td></tr></table>";

  }
else
	echo "Unauthorised Access!";

include "../footer.php";

?>