<?php
session_start();
include "../config.php";


if (isset ( $_SESSION ["ulogin"] )) { // members only stuff!

	$sql = mysql_query("SELECT * FROM fullloginads WHERE rented='".date('Y-m-j')."' AND added=1 AND approved=1");
	if(@mysql_num_rows($sql)) {
		mysql_query("UPDATE fullloginads SET clicks=clicks+1 WHERE rented='".date('Y-m-j')."' AND added=1 AND approved=1");
		$info = mysql_fetch_array($sql);

		$fullloginurl = dbget($info['url']);

	}


		if($userrecord['fulllogin_viewed']==date('Y-m-j')) $top = "fulllogin_top.php?message=".urlencode("You have already received points for viewing the full login ad today");
		else {


			$top = "fulllogin_top.php";

		}



} //end if ($numrows == 1)
else {
	$top = "fulllogin_top.php?message=".urlencode("Invalid click link");
}

mysql_close();
?>

  <frameset ROWS="125,*" BORDER=0 FRAMEBORDER=1 FRAMESPACING=0>
  <frame name="header" scrolling="no" noresize marginheight="1" marginwidth="1" target="main" src="<? echo $top; ?>">
  <frame name="main" src="<? echo $fullloginurl; ?>">
  </frameset>