Размер файла: 1.47Kb
<?php
if ($u['id']) {
$comm_r = mysql_query("SELECT `id`, `id_".$type."`, `id_user` FROM `".$type."_comm` WHERE `id` = '$id'");
$comm = mysql_fetch_assoc($comm_r);
if ($comm['id_user']) {
if ($ok) {
if (TIME > $_SESSION['antispam']) {
if ($_POST['text']) {
$text = check($_POST['text']);
mysql_query("INSERT INTO `".$type."_comm` SET `id_".$type."` = '".$comm['id_'.$type]."', `id_user` = '$u[id]', `text` = '$text', `time` = '".TIME."'");
$_SESSION['antispam'] = TIME + $config['antispam'];
redirect('?act=comm&id='.$comm['id_'.$type]);
} else {
redirect('?act=comm_reply&id='.$id);
}
} else {
error($lang['antispam'].' '.$config['antispam'].' sec.');
nav('?act=comm&id='.$comm['id_'.$type]);
}
} else {
tp($lang['reply']);
echo '<form name="form" action="?act=comm_reply&id='.$id.'&ok=1" method="post">
'.bbpanel('form', 'text').'<textarea name="text" cols="" rows="3">[b]'.justusername($comm['id_user']).'[/b], </textarea><br />';
echo '<input name="submit" type="submit" value="Ok" />
</form>';
nav('?act=comm&id='.$comm['id_'.$type]);
}
} else {
redirect('?');
}
} else {
redirect('login.php');
}
?>