File size: 3.33Kb
<?php
# Автор: SoluS_Angelu[S] #
# ICQ: 865991 #
# Сайт: http://nkat.h2m.ru #
function antimat($a)
{
$a = str_replace(array('хуй','пизда','ублюдок','выблядок','пидар','пидарас','хуесос','гавно','блядь'), '***', $a);
return $a;
}
function up()
{
$html='<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><meta name="description" content=""/><meta name="keywords" content=""/>
<style type="text/css">
body {
color: #6d6d6d;
margin: 0;
font: 12px tahoma;
}
a:link, a:active, a:visited {
color: #fe9b00;
text-decoration: none;
}
a:hover, a:focus {
color: #939393;
}
a.ico {
padding-left: 9px;
background: url(images/arrow.gif) no-repeat left;
}
a.ico:hover {
background: url(images/arrowh.gif) no-repeat left;
}
img {
vertical-align: middle;
border-style: none;
}
.head {
text-shadow: #e6daac 1px 1px;
color: #444;
font-size: 18px;
font-weight: bold;
padding: 3px;
border-bottom: 1px solid #edaa09;
background: #fff2bf;
}
.head a {
color: #444;
}
.h {
color: #fff;
font-weight: bold;
padding: 4px;
border-top: 1px solid #ffda70;
background: #ffc229 url(images/h.gif) repeat-x top;
}
.main {
margin-top: 1px;
margin-bottom: 1px;
padding: 2px;
background: url(images/main.gif) repeat-x top;
}
.titl {
color: #fff;
margin-left: 2px;
padding: 2px 10px;
display: inline-table;
background: #ffb500 url(images/titl.gif) repeat-x top;
}
.menu {
margin: 2px;
padding: 3px;
border: 1px solid #ece9e9;
background: #f8f8f8;
}
.adv {
padding: 3px;
border-top: 1px solid #e8e8e8;
border-bottom: 1px solid #e8e8e8;
background: #f7f7f7;
}
.adv a {
color: #7b7b7b;
text-decoration: none;
}
.adv a:hover {
color: #fe9b00;
text-decoration: none;
}
.nav {
padding: 3px;
border-top: 1px solid #f5e9b8;
border-bottom: 1px solid #ffe993;
background: #fff2bf url(images/nav.gif) repeat-x top;
}
.copy {
font-size: 11px;
margin-top: 1px;
padding: 4px;
border-bottom: 1px solid #ffe684;
background: #fff2bf;
}
.copy a {
color: #868686;
}
.count {
text-align: center;
padding: 2px;
background: url(images/counter.gif) repeat-x top;
}
.titl, .menu {
border-radius: 4px;
}
</style>
<title>By AngeluS</title>
</head><body>
<div class="head"><img src="images/logo.gif" alt="LoGo" /></div>
<div class="h">Гостевая книга</div>
<div class="main">';
return $html;
}
function down()
{
$down='<div class="nav">
<a href="add.php">Добавить</a> | <a href="index.php">Обновить</a></div>
<div class="copy">© Create by <a href="http://nkat.h2m.ru">NKaT</a> :: <a href="http://wapdiz.ru">WapDiz</a></div>
<div class="foot">счетчики</div></div>
</body></html>';
return $down;
}
function f1($str)
{
return abs((int)$str);
}
function f2($str)
{
return trim(mysql_real_escape_string(htmlentities($str, ENT_QUOTES, 'UTF-8')));
}
session_start();
if(isset($_COOKIE['id']) && isset($_COOKIE['pass']))
{
$id = $_COOKIE['id'];
$pass = $_COOKIE['pass'];
$q = mysql_query('SELECT * FROM admin WHERE id = "'.$id.'" AND pass = "'.$pass.'" LIMIT 1');
if(mysql_num_rows($q) == 0)
{
$SES = false;
unset($_COOKIE['id'], $_COOKIE['pass']);
}
else
{
$SES = true;
$res = mysql_fetch_assoc($q);
}
}
else $SES = false;
?>