Вход Регистрация
Файл: archive_01122016_1136/public_html/admin/forum.php
Строк: 95
<?php

$forum 
"forum";
if(
$_GET['mode']==$forum)
{

include (
"../conf.php");
include (
"../lock.php");

if (
$user == $myrow["user"] && $pass == $myrow["pass"] && $user != '')
{
if(
$user == $adname){

include (
"../head.php");
echo 
"<link rel='stylesheet' type='text/css' href='../style.css'/>";

echo 
"<div class='nav'>";
echo 
"<form name='form' action='forum.php?mode=s&user=$user&pass=$pass' method='post'>";
echo 
"Имя форума:<br /><input name='title' type='text' value=''><br />
<input type='submit' value='Добавить'></form></div>"
;
echo 
"<a href=forum.php?mode=del&user=$user&pass=$pass>Удалить форум</a>";
echo 
"<a href=../menu.php?user=$user&pass=$pass>В меню</a>";
include (
"../foot.php");
exit();
}
}
else
{
include (
"../head.php");
echo 
"Ошибка! <br />Неверный <b>Ник</b> или <b>Пароль</b>!<br />";
echo <<<sss
<a href="../index.php">На главную</a>
sss;
exit();
}
}




$s "s";
if(
$_GET['mode']==$s)
{
include (
"../conf.php");
include (
"../lock.php");

if (
$user == $myrow["user"] && $pass == $myrow["pass"] && $user != '')
{
if(
$user == $adname){


$title $_POST['title'];
if (
$title == '')
{
unset(
$title);
}

if (isset(
$title))
{
$result mysql_query("INSERT INTO forum (title) VALUES ('$title')");

if (
$result == 'true')
{
include (
"../head.php");
echo 
"<link rel='stylesheet' type='text/css' href='../style.css'/>";
echo 
"<div class='nav'>";
echo 
"Форум успешно добавлен!";
echo 
"</div>";
echo 
"<a href=../menu.php?user=$user&pass=$pass>В меню</a>";
include (
"../foot.php");
exit();
}
else
{
include (
"../head.php");
echo 
"<link rel='stylesheet' type='text/css' href='../style.css'/>";
echo 
"<div class='nav'>";
echo 
"Форум не добавлен!<br />";
echo 
"</div>";
echo 
"<a href=../menu.php?user=$user&pass=$pass>В меню</a>";
include (
"../foot.php");
exit();
}
}
else
{
include (
"../head.php");
 echo 
"<link rel='stylesheet' type='text/css' href='../style.css'/>";
echo 
"<div class='nav'>";
echo 
"Вы ввели не всю информацию.";
echo 
"</div>";
echo 
"<a href=../menu.php?user=$user&pass=$pass>В меню</a>";
include (
"../foot.php");
exit();
}
}
}
else
{
include (
"../head.php");
echo 
"<link rel='stylesheet' type='text/css' href='../style.css'/>";
echo 
"Ошибка! <br />Неверный <b>Ник</b> или <b>Пароль</b>!<br />";
echo <<<sss
<a href="../index.php">На главную</a>
sss;
include (
"../foot.php");
exit();
}


}






$drop "drop";
if(
$_GET['mode']==$drop)
{

include (
"../conf.php");
include (
"../lock.php");

if (
$user == $myrow["user"] && $pass == $myrow["pass"] && $user != '')
{
if(
$user == $adname){

$id mysql_real_escape_string(trim($_POST['id']));

if(
$id != '')
{
$result mysql_query("DELETE FROM forum WHERE id='".$id."'");

if (
$result == 'true') {
include (
"../head.php");
echo 
"<link rel='stylesheet' type='text/css' href='../style.css'/>";
echo 
"<div class='nav'>Форум удален!</div>";
echo 
"<a href=../menu.php?user=$user&pass=$pass>В меню</a>";
include (
"../foot.php");
exit();
}
}
else {
include (
"../head.php");
echo 
"<link rel='stylesheet' type='text/css' href='../style.css'/>";
echo 
"<div class='nav'>";
echo 
"Форум не удален!</div>";
echo <<< sss
<a href=../menu.php?user=$user&pass=$pass>В меню</a>
sss;
include (
"../foot.php");
exit();
}
}
else
{
echo 
"<p>Ошибка!!!</p>";
exit();
}
}

else
{
include (
"../head.php");
echo 
"Ошибка! <br />Неверный <b>Ник</b> или <b>Пароль</b>!<br />";
echo <<<sss
<a href="../index.php">На главную</a>
sss;
include (
"../foot.php");
exit();
}
}






$del "del";
if(
$_GET['mode']==$del)
{


include (
"../conf.php");
include (
"../lock.php");

if (
$user == $myrow["user"] && $pass == $myrow["pass"] && $user != '')
{
if(
$user == $adname){

include (
"../head.php");
echo 
"<link rel='stylesheet' type='text/css' href='../style.css'/>";
echo <<<sss
<form name="" action="forum.php?mode=drop&user=$user&pass=$pass" method="post">
sss;

$result mysql_query("SELECT * FROM forum");
$myrow mysql_fetch_array($result);

do
{
echo 
"<link rel='stylesheet' type='text/css' href='../style.css'/>";
echo 
"<div class='nav'>";
echo 
" <input name='id' type='radio' value='".$myrow['id']." '>";
echo 
" ".$myrow['title']." <br /></div>";
}

while (
$myrow mysql_fetch_array($result));

echo <<< sss
<div class='nav'>
<input type="submit" value="Удалить"></form>
</div>
<a href=../menu.php?user=
$user&pass=$pass>В меню</a>
sss;
include (
"../foot.php");
}
}
else
{
include (
"../head.php");
echo 
"Ошибка! <br />Неверный <b>Ник</b> или <b>Пароль</b>!<br />";
echo <<<sss
<a href="../index.php">На главную</a>
sss;
}
}



$drop_themes "drop_themes";
if(
$_GET['mode']==$drop_themes)
{

include (
"../conf.php");
include (
"../lock.php");

if (
$user == $myrow["user"] && $pass == $myrow["pass"] && $user != '')
{
if(
$user == $adname){

$id mysql_real_escape_string(trim($_GET['id']));

if(
$id != '')
{
$result mysql_query("DELETE FROM forum_themes WHERE id='".$id."'");

if (
$result == 'true') {
include (
"../head.php");
echo 
"<link rel='stylesheet' type='text/css' href='../style.css'/>";
echo 
"<div class='nav'>Тема удалена!</div>";
echo 
"<a href=../menu.php?user=$user&pass=$pass>В меню</a>";
include (
"../foot.php");
exit();
}
}
else {
include (
"../head.php");
echo 
"<link rel='stylesheet' type='text/css' href='../style.css'/>";
echo 
"<div class='nav'>";
echo 
"Тема не удалена!</div>";
echo <<< sss
<a href=../menu.php?user=$user&pass=$pass>В меню</a>
sss;
include (
"../foot.php");
exit();
}
}
else
{
echo 
"<p>Ошибка!!!</p>";
exit();
}
}

else
{
include (
"../head.php");
echo 
"Ошибка! <br />Неверный <b>Ник</b> или <b>Пароль</b>!<br />";
echo <<<sss
<a href="../index.php">На главную</a>
sss;
include (
"../foot.php");
exit();
}
}

?>
Онлайн: 1
Реклама