Файл: public_html/sites.php
Строк: 83
<? include('header.php'); ?>
<h3>.::Просмотр рекламы::.</h3>
<br>
<fieldset>
<div id="fieldheader"><center>.::Сообщения от Администрации::.</center></div>
<br>
<left>
<?
require('config.php');
$sql="select * from tb_adminmess order by id desc limit 3";
$res=mysql_query($sql);
while($row=mysql_fetch_array($res))
{
echo "<img src="images/comment.png" align="middle"> <SPAN style='font-family: "Tahoma"; font-size: 10pt; font-weight: bold;'>";
echo $row["data"];
echo "</span><SPAN style='font-family: "Tahoma"; font-size: 10pt; font-weight: normal;'>";
echo " - ";
echo $row["text"];
echo "</span><br><br>";
}
?>
</left>
</fieldset>
<fieldset>
<div id="fieldheader"><center>.::Статические ссылки::.</center></div>
<br>
<left>
<? $leftblock='0'; include('statlinks.php'); ?>
</left>
</fieldset>
<fieldset>
<div id="fieldheader"><center>.::Динамические ссылки::.</center></div>
<br>
<font size="2"><b>
<?
require('config.php');
$sd=date("d.m.Y",time());
$vd=date("d.m.Y",time()-24*3600);
$s=0; $v=0;
$res=mysql_query("select kolvo from tb_adsdate where data='$sd'");
$res=mysql_fetch_array($res);
if($res["kolvo"]!='') $s=$res["kolvo"];
$res=mysql_query("select kolvo from tb_adsdate where data='$vd'");
$res=mysql_fetch_array($res);
if($res["kolvo"]!='') $v=$res["kolvo"];
mysql_close($con);
echo "Сегодня новых ссылок: $s шт.<br>Вчера было новых ссылок: $v шт.";
?>
</b></font>
<br>
<font size="2"><b>Всего ссылок для просмотра:
<?
require('config.php');
$sql="select * from tb_ads where tipo='ads'";
$res=mysql_query($sql);
$kol=0;
if(mysql_num_rows($res)>0)
{
while($cr=mysql_fetch_array($res))
{
if($cr["members"]>=$cr["plan"])
{
$id=$cr["id"];
$sql="delete from tb_ads where id='$id'";
mysql_query($sql) or die(mysql_error());
}else{
$kol=$kol+1;
}
}
}
echo "$kol шт.";
mysql_close($con);
?>
</b></font>
<br>
<center><span style="color:#ff0000;"><b>VIP реклама</b></span></center>
<div id="tables">
<table width="100%" align="center">
<tr>
<th class="top" width="55%">
<b>Описание сайта</b>
</th>
<th class="top" width="15%">
<div align="center">
<b>Таймер</b></div>
</th>
<th class="top" width="15%">
<div align="center">
<b>Просмотры (*)</b></div>
</th>
<th class="top" width="15%">
<div align="center">
<b>Заказано</b></div>
</th>
</tr>
<?
if(isset($_SESSION["username"]) && isset($_SESSION["password"])) { $tit=""; }else{ $tit="1"; }
require('config.php');
$sql = "SELECT * FROM tb_ads WHERE tipo='ads' and vip='1' ORDER BY fechainicia DESC";
$rs = mysql_query($sql, $con);
mysql_close($con);
if(mysql_num_rows($rs)>0)
{
$template = implode("", file("titulos.php"));
while($row = mysql_fetch_assoc($rs))
{
if($tit=="") $row["last"]=uc($_SESSION["username"]);
$row["total"]=$row["members"]+$row["outside"];
$highlight=$row["highlight"];
if ($highlight=="1")
{
$row["highlight"]="#ffff00";
$row["highlight"]="#ffff00";
}
$ji=$row["members"];
$jo=$row["plan"];
if ($ji < $jo)
{
mostrarTemplate($template, $row);
}
}
}
?>
</table>
</div>
<br>
<center><span style="color:#ff0000;"><b>Обычная реклама</b></span></center>
<div id="tables">
<table width="100%" align="center">
<tr>
<th class="top" width="55%">
<b>Описание сайта</b>
</th>
<th class="top" width="15%">
<div align="center">
<b>Таймер</b></div>
</th>
<th class="top" width="15%">
<div align="center">
<b>Просмотры (*)</b></div>
</th>
<th class="top" width="15%">
<div align="center">
<b>Заказано</b></div>
</th>
</tr>
<?
if(isset($_SESSION["username"]) && isset($_SESSION["password"])) { $tit=""; }else{ $tit="1"; }
require('config.php');
$sql = "SELECT * FROM tb_ads WHERE tipo='ads' and vip='0' ORDER BY fechainicia DESC";
$rs = mysql_query($sql, $con);
mysql_close($con);
if(mysql_num_rows($rs)>0)
{
$template = implode("", file("titulos.php"));
while($row = mysql_fetch_assoc($rs))
{
if($tit=="") $row["last"]=uc($_SESSION["username"]);
$row["total"]=$row["members"]+$row["outside"];
$highlight=$row["highlight"];
if ($highlight=="1")
{
$row["highlight"]="#ffff00";
$row["highlight"]="#ffff00";
}
$ji=$row["members"];
$jo=$row["plan"];
if ($ji < $jo)
{
mostrarTemplate($template, $row);
}
}
}
?>
</table>
</div>
<br>
(*) - Показано кол-во кликов пользователей / Кликов гостей / Общее кол-во кликов
</fieldset>
<fieldset>
<center>
<div id="fieldheader"><center>.::Ротатор баннеров::.</center></div>
<br>
<? include('rotator.php'); ?>
<br>
<b>Баннеров в ротаторе: <? echo $kol; ?></b>
</center>
</fieldset>
<? include('footer.php'); ?>