Файл: www/kontacts.php
Строк: 235
<?
include "admin/config/config.php";
include "admin/config/secur.php";
$ST = (int) $_GET['r'];
$end = (int) $_GET['e'];
if ($ST==0 or $ST<0)
{
$ST = 3;
}
$res = mysql_query("SELECT * FROM types where visits='$ST' limit 1");
if(mysql_num_rows($res)>0)
{
$cr=mysql_fetch_assoc($res);
$ST = $cr['visits'];
}
else
{
$res = mysql_query("SELECT visits FROM types limit 1");
$cr=mysql_fetch_assoc($res);
$ST = $cr['visits'];
}
$dob = "";
//Обработка добавляемой ссылки
if (isset($_POST['serf']) and isset($_POST['addurl']))
{
$type = (int) $_POST['serf'];
$res = mysql_query("SELECT * FROM types where visits='$type' limit 1");
if(mysql_num_rows($res)>0)
{
$cr=mysql_fetch_assoc($res);
$type = $cr['visits'];
}
else
{
$res = mysql_query("SELECT visits FROM types limit 1");
$cr=mysql_fetch_assoc($res);
$type = $cr['visits'];
}
$url = strtolower(uc($_POST['addurl'],200));
$rezultat = stripos($url , "http://");
if ($rezultat === false)
{
$dob = "<p class='alert'>URL должен начинаться с http://</p>";
}
else
{
function GET_DOMAIN($url)
{
$parts = parse_url($url);
$host = $parts['host'];
if (in_array("www", explode(".", $host)))
{
$just_domain = explode("www.", $host);
return $just_domain[1];
}
else
{
return $host;
}
}
$domen = GET_DOMAIN($url);
$res = mysql_query("SELECT * FROM `banned` where domen='$domen'");
if(mysql_num_rows($res)>0)
{
$dob = "<p class='alert'>Этот сайт заблокирован Администратором.</p>";
}
if(mysql_num_rows($res)==0)
{
$res = mysql_query("SELECT * FROM links where domen='$domen' and type='$type'");
if(mysql_num_rows($res)>0)
{
$dob = "<p class='alert'>Этот сайт уже есть в списке 1x$type</p>";
}
if(mysql_num_rows($res)==0)
{
$time=time();
mysql_query("INSERT INTO `reqlinks` (`id` ,`url` ,`domen` ,`time`,`types` )
VALUES (NULL , '$url', '$domen', '$time', '$type');");
$res = mysql_query("SELECT id,time FROM `reqlinks` WHERE domen='$domen' and types='$type' limit 1");
$cr=mysql_fetch_assoc($res);
$id = $cr['id'];
$te = $cr['time'];
$delt=$time-10800;
mysql_query("DELETE from `reqlinks` where time<'$delid'");
header("Location: show.php?i=$id");
exit;
}
}
}
}
if ($end>0 and $end!=101010101)
{
$res = mysql_query("SELECT types FROM `reqlinks` WHERE id='$end' limit 1");
$cr=mysql_fetch_assoc($res);
if(mysql_num_rows($res)>0)
{
$ST = $cr['types'];
$dom = $cr['domen'];
$_SESSION['typ'] = $ST;
$res2 = mysql_query("SELECT id FROM links where domen='$dom'");
if(mysql_num_rows($res2)==0)
{
mysql_query("DELETE FROM stats where domen='$dom'");
}
}
if(mysql_num_rows($res)==0)
{
$ST = (int) $_SESSION['typ'];
if($ST==0) $ST = 3;
}
$dob = "<p class='alert'>URL добавлен</p>";
$res = mysql_query("SELECT visits FROM `stats` order by visits");
if(mysql_num_rows($res)>20)
{
$cr=mysql_fetch_assoc($res);
mysql_query("DELETE FROM stats where visits<'".$cr['visits']."'");
}
mysql_query("DELETE FROM reqlinks where id='$end'");
}
if ($end==101010101)
{
$dob = "<p class='alert'>Ваша жалоба успешно добавлена!</p>";
}
///
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<meta name="description" content="<?=$SITEDESC?>">
<meta name="keywords" content="<?=$SITEKEYW?>">
<title>Система обмена показами, обмен посещениями</title>
<style type="text/css">
<!--
body {
margin-left: 20px;
margin-top: 5px;
margin-right: 20px;
margin-bottom: 5px;
}
A IMG {
border: none;
}
-->
</style>
<link rel="stylesheet" type="text/css" media="screen,projection,print" href="style.css" />
<link rel="icon" href="favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
</head>
<body>
<noindex>
<div id="nolix">
<div id=nlx>
<!-- рекламная строчка Nolix --></div>
</div>
</noindex>
<table class="aaa" border="0" cellpadding="0" cellspacing="0" align="center" width="1000px">
<tbody><tr>
<td>
<div class="share42init"></div>
<script type="text/javascript" src="/ppc.js"></script>
</td>
</tr>
</tbody></table>
<br>
<br>
<table width="980" height="100%" border="0" align="center" valign='top' cellpadding="0" cellspacing="0">
<tr>
<td valign=top><table width="100%" border="0" align="left" cellpadding="0" cellspacing="0" valign=top>
<tr>
<noindex><td id="left" width="19%" align="center" valign="top"><table width="100%" border="0" align="left" cellpadding="0" cellspacing="0">
<tr>
<td>
</td>
</tr>
<tr>
<td id="bottom" width="100%" align="center" valign="top">
<p align="center" valign="top" ><img src="img/топ 10.jpg" alt="Топ 10 самых просматриваемых сайтов"></p>
<?
$res = mysql_query("SELECT * FROM stats where visits>0 ORDER BY visits DESC limit 10");
if(mysql_num_rows($res)>0)
{
while($cr=mysql_fetch_assoc($res))
{
?>
<p align='center' valign='top'>
<input name='textfield' size=25 type='text' value='http://<?=$cr['domen']?>'/>
<noindex>
<a title='Перейти на сайт http://<?=$cr['domen']?>' href = "r.php?g=http://<?=$cr['domen']?>" rel='nofollow' target='_blank'> <img border='0' src='../img/arrow.gif' width='20' height='21' align='absbottom' title='Перейти на сайт http://<?=$cr['domen']?>'></a> <em >Просмотров: <?=$cr['visits']?></em></p></noindex>
<?
}
}
?>
</td>
</tr>
</table></td></noindex>
<td width="62%" align="center" valign="top"><table width="70%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="justify">
<h3>Контакты администратора</h3>
<p> </p><font color="green"><b>acq</b></font> - напишите аську<br><font color="#0000FF"><b>e-mail</b></font> - напишите мыло<br><font color="#458B00"><b>Skype</b></font> - укажи скайп<br><p></p>
<p> </p>
</td>
</tr>
<tr>
<td align="center"><img src="img/vnim.png"></td>
</tr>
<tr>
<td align="center"><h3>Внимание!</h3><b>Убедительная просьба, перед добавлением сайта и дальнейшим просмотре серфинга, убедитесь, что у Вас включина антивирусная защита<b></b></b></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td id="input" align="center">
<?=$dob?>
<p align="center"><font color="green">Добавление в серфинг <b>1x<?=$ST?></b></font> <br>Введите адрес вашего сайта:</p>
<form name="form1" method="post" action="/?r=<?=$ST?>">
<input name="serf" type="hidden" value="<?=$ST?>">
<input name="addurl" id="focus" size=38 type="text" value='<?=$url?>'>
<input type="submit" name="button" id="button" value="Добавить">
</form>
<br>
</td>
</tr>
<tr>
<td align="center" valign="top">
<br>
<?
$res = mysql_query("SELECT * FROM links where type='$ST' ORDER BY id DESC limit $ST");
if(mysql_num_rows($res)>0)
{
$i=0;
while($cr=mysql_fetch_assoc($res))
{
$i=++$i;
?>
<p align='center' valign='top' ><span class='style1'><?=$i?> </span>
<input name='textfield' type='text' id='textfield' value='http://<?=$cr['domen']?>' size=38>
<a rel='nofollow' target='_blank' href='report.php?x=<?=$cr['domen']?>'>
<img border='0' src='../img/del.gif' width='20' height='21' align='absbottom' title='Пожаловаться на сайт http://<?=$cr['domen']?>'></a>
<a rel='nofollow' target='_blank' href='r.php?g=<?=$cr['url']?>'>
<img border='0' src='../img/arrow.gif' width='20' height='21' align='absbottom' title='Перейти на сайт http://<?=$cr['domen']?>'></a></p>
<?
}
}
?>
<br>
</td>
</tr>
<tr>
<td> </td>
</tr>
</table></td>
<link href="../style.css" rel="stylesheet" type="text/css">
<td id="right" width="19%" align="center" valign="top"><table width="100%" border="0" align="right" cellpadding="0" cellspacing="0" valign="top">
<tr>
<td id="bottom" width="100%" align="center">
<img src="img/site.jpg"><br>
<p>Выберите число показов:</p>
<?
$res = mysql_query("SELECT * FROM types ORDER BY visits");
if(mysql_num_rows($res)>0)
{
while($cr=mysql_fetch_assoc($res))
{
?>
<a class="serftxt" title ="1x<?=$cr['visits']?>" href="/?r=<?=$cr['visits']?>">1x<?=$cr['visits']?></a>
<?
}
}
?><br><br>
</td></tr>
<tr>
<td>
</td>
</tr>
<td align='center'>
</td>
</tr>
</table></td> </tr>
</table></td>
</tr>
<tr>
<td> </td>
</tr>
<td id="top" align="center">
<p>
<br>
<a href="/">Главная</a> | <a href="/kontacts.php">Контакты</a> | <a href="/reklama.php">Реклама</a> | <a href="/faq.php">FAQ</a>
</p>
</td>
</tr> <tr>
<td> </td>
</tr>
</table>
</body>
</html>