<?
	require('config.php');


	$res=mysql_query("select * from tb_frameads where play = '0' ORDER BY RAND() LIMIT 1");

	$row=mysql_fetch_assoc($res);
	$id=$row["id"];
	$url=$row["link"];
	$adstext=$row["text"];
	$pokaz=$row["pokaz"];
	$clicks=$row["clicks"];

	?>
	<style>
		a { color: green; text-decoration: none; font-weight: bold; }
		a:hover {  color:red; text-decoration: none; fron-weight: bold; }
		a.s { color:#4580a1; text-decoration: none; font-weight: bold; }
		a.s:hover {  color:red; text-decoration: none; fron-weight: bold; }
span.h2 {
	font:13px/13px Arial, sans-serif;
	color:#4580a1;
        text-shadow: 1px 1px 1px #dbf0fc;
}
span.h2:hover {
	font:13px/13px Arial, sans-serif;
	color:red;
        text-shadow: 1px 1px 1px #dbf0fc;
}
span.h4 {
	font:15px/15px Arial, sans-serif;
	color:#4580a1;
        text-shadow: 1px 1px 1px #dbf0fc;
}
td.ref {
	color:#4580a1;
        text-shadow: 1px 1px 1px #dbf0
}
span.h3 {
	font:11px/14px Arial, sans-serif;
	color:#4580a1;
        text-shadow: 1px 1px 1px #dbf0fc;
}
	</style>
	<table width="100%" style="background: url(../images/menu_bg.png);height:32px;">
	<tr>
        <td align='center' width='15%'>
        <img src="/images/ok16.png" align="absmiddle" border="0"> <span class='h2'><b>РЕКЛАМА ВО ФРЕЙМЕ:</b></span>
        </td>
        <td class='ref' align='left' width='67%'>
	<span class='h4'>
        <a href="redir_frame.php?link=<?=$id;?>" target="_blank"><?=$adstext?></a></span>
        --- <span class='h2' size='1'><b>Кликов:</b> <font color='green'><b><?=$clicks;?></b></font> </span><br />
        <? $queryb = "UPDATE tb_frameads SET pokaz=pokaz+1 WHERE link='$url'";mysql_query($queryb) or die(mysql_error());?>
        </td>
        <td align='left' width='18%'>
	<a class='s' href="advertise.php?adv=frame" target="_blank">
        <span class='h2'><b>Разместить ссылку во фрейме</b></span></a>
        </td>
        </tr>
	</table>
		<script type="text/javascript">
	setTimeout('location.replace("vfa.php")', 7500);
	</script>
	<noscript>
	<meta http-equiv="refresh" content="10; url=vfa.php">
	</noscript>
