Файл: admin_panel.php
Строк: 72
<?php
include("includes/config.php");
ob_start();
header("Cache-Control: no-store, no-cache, must-revalidate");
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 xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="Content-Style-Type" content="text/css"/>";
if($diz_id==1){
include("includes/style.php");
}
if($diz_id==2){
include("includes/style1.php");
}
else
{
include("includes/style.php");
}
echo "<title>$PAGE_NAME_TITLE</title>
<link rel="shortcut icon" type="image/ico" href="img/ico.png"/>
</head><body>
<div class="in">
<div class="block">
<img src="img/logo.png" alt="*"/>
</div>";
$dm = is_logged();
if(!$dm or $useris != $ADMIN) {
header("Location: index.php");
exit();
}
juosta();
if($id == "") {
echo "<div class="meniu">
[»] <a href="admin_panel.php?id=vote">Создать голосование</a>
</div>
<div class="block">
<a href="index.php" class="cc">Главная</a>
<br/>
$PAGE_SLOGAN
</div></div>";
}
elseif($id == "vote") {
echo "<form action="admin_panel.php?id=vote2" method="post">
<div class="meniu center">
Вопрос:
<br/>
<input name="kl" size="40" type="text" maxlength="70"/>
<br/>
Ответ номер 1:
<br/>
<input name="ats1" size="25" type="text" maxlength="70"/>
<br/>
Ответ номер 2:
<br/>
<input name="ats2" size="25" type="text" maxlength="70"/>
<br/>
Ответ номер 3:
<br/>
<input name="ats3" size="25" type="text" maxlength="70"/>
<br/>
Ответ номер 4:
<br/>
<input name="ats4" size="25" type="text" maxlength="70"/>
<br/>
Ответ номер 5:
<br/>
<input name="ats5" size="25" type="text" maxlength="70"/>
</div>
<div class="meniu center">
<input type="submit" value="ОК"/>
</div>
</form>
<div class="block">
<a href="admin_panel.php" class="cc">Назад</a> | <a href="index.php" class="cc">Главная</a>
<br/>
$PAGE_SLOGAN
</div></div>";
}
elseif($id == "vote2") {
$kl = filter($_POST['kl']);
$ats1 = filter($_POST['ats1']);
$ats2 = filter($_POST['ats2']);
$ats3 = filter($_POST['ats3']);
$ats4 = filter($_POST['ats4']);
$ats5 = filter($_POST['ats5']);
mysql_select_db("xwar");
mysql_query("DELETE FROM balsavimas");
mysql_query("DELETE FROM balsavimai");
mysql_query("INSERT INTO balsavimas SET klausimas='$kl',ats1='$ats1',ats2='$ats2',ats3='$ats3',ats4='$ats4',ats5='$ats5'");
header("Location: other.php?id=voting");
}
else
{
header("Location: index.php");
}
mysql_close($connect);
ob_end_flush();
?>
</body></html>