Размер файла: 5.11Kb
<?
/////////// Powered by Giga!!! /////////
/////////// http://gwap.net.ru /////////
/////////// Disign by 3v!!! /////////
/////////// http://wap.vavan.ru /////////
Error_Reporting(E_ALL & ~E_NOTICE);
include "set.php";
echo '<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html xml:lang="ru"> <head>';
echo "<title>админ-панель</title>";
echo '<link rel="stylesheet" href="/style.css" type="text/css" />
<link rel="home" href="/"/><link rel="up" href="../"/>';
echo "<link rel=\"stylesheet\" href=\"styles/$style.css\" type=\"text/css\" />";
echo '</head><body>';
if ($act=="")
{
echo "<div class=\"top\"><a href=\"http://$site\">$site</a></div><div class=\"up\">";
echo '<form action="?act=prov" method="post">
пароль админа:<br/>
<input title="pas" name="pasvord"/>
<br/><input value="вход" name="do" type="submit"/></form>';
echo "</div><div class=\"top\"><a href=\"./\">гостевая</a></div></body></html>\n";
}
if ($act=="prov")
{
echo "<div class=\"footer\"><a href=\"http://$site\">$site</a></div><div class=\"up\">";
if($pas==$pasvord)
{
print"<p align=\"center\">
пароль верный!<br/>
<a href=\"admin.php?act=view&pass=$pasvord\">администрирование</a><br/>
</p>";}
else
{
print "<p align=\"center\">ошибка авторизации<br/><a href=\"./admin.php\">еще раз?</a></p>";
};
echo "</div><div class=\"top\"><a href=\"./\">гостевая</a></div></body></html>\n";
echo "<div class=\"footer\">© 2006 <a href=\"http://$site\">$site</a>. Design by <a>3v</a></div>";
}
if ($act=="view")
{
if($pass==$pas)
{
$dir_rec = dir("rec");
$i = 0;
while($entry = $dir_rec->read())
{
if (substr($entry,0,3)=="rec")
{
$names[$i]=substr($entry,4);
$i++;
}
}
$dir_rec->close();
@rsort($names);
$count = $i;
$count1 = $count;
if (empty($start))
{
$start = 0;
}
$start = intval($start);
if ($start < 0)
{
$start = 0;
}
echo "<div class=\"footer\"><a href=\"http://$site\">$site</a></div><div class=\"up\">";
if ($count > $start + $pp) $count = $start + $pp;
if ($start != 0)
{
print "<a href=\"admin.php?act=view&pass=$pas&start=".($start - $pp)."\">назад</a>:";
}
print "<a href=add.php>добавить</a>";
if ($count1 > $start + $pp)
{
print ":<a href=\"admin.php?act=view&pass=$pas&start=".($start + $pp)."\">далее</a> \n";
}
print "</div><div class=\"blok\">";
for ($i = $start; $i < $count; $i++)
{
$entry = $names[$i];
$data = file("rec/rec.".$entry);
$date = $entry;
$name = trim($data[0]);
$time = trim($data[1]);
$email = trim($data[2]);
$url = trim($data[3]);
$msg = trim($data[4]);
$answer = trim($data[5]);
print "<b><font color=\"yellow\">$name:</font></b>";
if (!empty($time)) print " $time";
if (!empty($email)) print ":<a href=mailto:$email>$email</a>\n";
if (!empty($url)) print ":<a href=\"http://$url\">$url</a>";
print "<br />сообщение в: $date";
print "<p>".$msg."</p>\n";
if (!empty($answer))
{
print "<p><font color=\"#FF0000\">Админ: $answer</font></p>\n";
}
print "<a href=\"del.php?rf=rec.$entry&pass=$pass\">удалить</a> :
<a href=\"admin.php?act=otv&re=rec.$entry&komu=$name&pass=$pass\">ответить</a><hr />";
}
print "<div class=\"up\">";
if ($count > $start + $pp) $count = $start + $pp;
if ($start != 0)
{
print "<a href=index.php?start=".($start - $pp).">назад</a>:";
}
print "<a href=add.php>добавить</a>";
if ($count1 > $start + $pp)
{
print ":<a href=index.php?start=".($start + $pp).">далее</a> \n";
}
print "</div><div class=\"footer\"><a href=\"http://$site\">$site</a></div>";
}
else
{
print "ошибка авторизации<br/><a href=\"./admin.php\">еще раз?</a>";
};
}
if ($act=="otv")
{
echo "<div class=\"footer\"><a href=\"http://$site\">$site</a></div><div class=\"add\">";
if($pass==$pas)
{
$rf=$re;
echo "ответ на сообщение <b>$komu</b>";
echo "<form action=\"otv.php\" metod=\"post\">
<input type=\"hidden\" name=\"rf\" value=\"$rf\">
<input type=\"hidden\" name=\"pass\" value=\"$pass\">
<br />
<input type=\"text\" name=\"answer\" maxlength=\"300\" value=\"\"><br/>
<input value=\"добавить\" name=\"do\" type=\"submit\"/></form>";
echo "</div><div class=\"top\"><a href=\"?act=view&pass=$pas\">админ-панель</a>
</div>";
}
else
{
print "<div class=\"blok\">ошибка авторизации<br/><a href=\"./admin.php\">еще раз?</a></div>";
echo "<div class=\"top\"><a href=\"./\">гостевая</a></div>";
};
}
echo '</body></html>';
?>