Файл: titwar.ru/gerb.php
Строк: 37
<?
include './system/common.php';
include './system/functions.php';
include './system/user.php';
if($clan['id'] == 0 || $clan_memb['rank'] < 4){
header("Location: /");
exit;
}
$title = 'Clan's coat of arms';
include './system/h.php';
$error = NULL;
if(isset($_POST['id'])) {
$id = _num($_POST['id']);
if($id > 1 || $id < 16) {
mysql_query("UPDATE `clans` SET `gerb` = '$id' WHERE `id` = '".$clan['id']."'");
header("Location: /clan/");
exit();
}
}
if($error) {
echo '<div class="player" style="color: red">
'.$error.'
</div>';
}
echo '<div class="content">
<div class="line"></div>
<form class="content" method="post" action="">
Choose coat of arms:<br /></div>';
for($i = 1; $i < 16; $i++) {
echo '<div class="content">';
echo '<input type="radio" name="id" value="'.$i.'" />
<img src="/images/icon/clan/gerb/'.$i.'.png" /> ';
echo '</div><div class="line"></div>';
}
echo '
<div class="content"/>
<input class="button" type="submit" value="Save">
</form>
</div>';
include './system/f.php';
?>