<?php



session_start();



include "../config.php";

include "../header.php";
include "../style.php";

if( isset($_SESSION["alogin"]) ) {



    	?><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>All full page login ads in the database</H2></center>";

        $query = "select * from fullloginads";

		$result = mysql_query ($query)

	     	or die ("Query failed");

        ?>

            <center><table width=70% border=0 cellpadding=2 cellspacing=2>

        	<tr>

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

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

              <td bgcolor="<? echo $contrastcolour; ?>"><center><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>">Date</font></center></td>
				<td bgcolor="<? echo $contrastcolour; ?>"><center><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>">Clicks</font></center></td>
			  <td bgcolor="<? echo $contrastcolour; ?>"><center><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>">Approved</font></center></td>

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

	        </tr>

        <?

    	while ($line = mysql_fetch_array($result)) {

        	$id = $line["id"];

			$userid = $line["userid"];

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

			$date = $line["rented"];

            $approved = $line["approved"];

            if ($sent=="1") {

            	$sent="Yes";

            }

            else {

            	$sent="No";

            }

            if ($approved=="1") {

            	$approved="Yes";

            }

            else {

            	$approved="No";

            }

            if ($added=="1") {

            	$added="Yes";

            }

            else {

            	$added="No";

            }

        ?><tr>

          <td bgcolor="<? echo $basecolour; ?>"><center><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><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 $url; ?>" target="_blank"><? echo $url; ?></a></font></center></td>

          <td bgcolor="<? echo $basecolour; ?>"><center><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><? echo $date; ?></font></center></td>
			<td bgcolor="<? echo $basecolour; ?>"><center><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><? echo $line['clicks']; ?></font></center></td>
		  <td bgcolor="<? echo $basecolour; ?>"><center><font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><? echo $approved; ?></font></center></td>

		  <td bgcolor="<? echo $basecolour; ?>"><center>

            <form method="POST" action="deletefulllogin.php">

          	<input type="hidden" name="id" value="<? echo $id; ?>">

           	<input type="hidden" name="done" value="NO">

          	<input type="submit" value="Delete">

          	</form>

          </center>

          </td></tr> <?

        }

        echo "</table></center>" ;

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

    }

else

	echo "Unauthorised Access!";



include "../footer.php";

mysql_close($dblink);

?>