|
<?php
/*
-----------------------------------------
Автор: -=КотЭ=-(-=MTV=-) и Shot(Robber)
Бесплатный WAP движок: Strongcms
Контакты: 0664452670(МТС) ибо ICQ(7296000)
Файл: index.php
-------------------------------------------
*/
require_once ('../system/function.php');
//-----Подключаем вверх-----//
$id = abs(intval($_GET['id']));
$forum_r = mysql_fetch_assoc(mysql_query("SELECT * FROM `medals` WHERE `id` = '".$id."'"));
$title='Изменить ник '.$forum_r['login'].'';
require_once ('../system/header.php');
if(!$user['id'] or $user['level'] < 3) {
echo err($title, 'У вас не достаточно прав для просмотра данной страницы!');
require_once ('../system/footer.php'); exit;
}
{
echo '<div class="title">Редактирование награды</div>';
}
if($forum_r == 0) {
echo '<div class="title">Ошибка</div><div class="podmenu"><center><b>Такой награды нету!</b></center></div>';
require_once ('../system/footer.php');
exit();
}
if(isset($_REQUEST['submit'])) {
$za = strong($_POST['za']);
$medals = strong($_POST['medals']);
if(empty($za)) {
echo '<div class="podmenu"><center><b>Введите текст!</b></center></div>';
require_once ('../system/footer.php');
exit();
}
mysql_query("UPDATE `medals` SET `za` = '".$za."', num='".$medals."' WHERE `id` = '".$forum_r['id']."'");
echo '<div class="podmenu"><center><b>Успешно!</b></center></div>';
}
echo '<div class="podmenu">
<form action="" method="POST">
За:
<input type="text" name="za" value="'.$forum_r['za'].'"/>
<input type="radio" name="medals" value="1" /><img src="'.$HOME.'/images/medals/1.png" alt="8" /> 1
<input type="radio" name="medals" value="2" /><img src="'.$HOME.'/images/medals/2.png" alt="8" /> 2
<input type="radio" name="medals" value="3" /><img src="'.$HOME.'/images/medals/3.png" alt="8" /> 3
<input type="radio" name="medals" value="4" /><img src="'.$HOME.'/images/medals/4.png" alt="8" /> 4
<input type="radio" name="medals" value="5" /><img src="'.$HOME.'/images/medals/5.png" alt="8" /> 5
<input type="radio" name="medals" value="6" /><img src="'.$HOME.'/images/medals/6.png" alt="8" /> 6
<input type="radio" name="medals" value="7" /><img src="'.$HOME.'/images/medals/7.png" alt="8" /> 7
<input type="radio" name="medals" value="8" /><img src="'.$HOME.'/images/medals/8.png" alt="8" /> 8
<input type="submit" name="submit" value="Редактировать">
</form></div>';
require_once ('../system/footer.php');
?>