Файл: DARK WARS/dark_war/taverna/reply.php
Строк: 62
<?php
include_once '../start.php';
$doc = new document();
$doc->title('Ответ');
if (!isset($_GET['id']) || !is_numeric($_GET['id'])) {
$doc->err('Ошибка, не выбран элементу');
exit();
}
$id = (int)$_GET['id'];
$q = mysql_query("SELECT * FROM `dark_war_taverna` WHERE id='$id' LIMIT 1");
if (!mysql_num_rows($q)) {
$doc->err('Запрос к не существующему элементу');
exit();
}
if (isset($_POST['smilelist'])) {
$doc->assign('post', $dispatch);
$doc->display('view_two_table.tpl');
$dispatch= array();
$dispatch[] = array ('one' => '<a href="./index.php?smile=:-O&msg='.$_POST['msg'].'"><img src='smile/angel.gif'></a>', 'two' => '<a href="./index.php?smile=*BYE*&msg='.$_POST['msg'].'"><img src='smile/bye.gif'></a>');
$dispatch[] = array ('one' => '<a href="./index.php?smile=:-D&msg='.$_POST['msg'].'"><img src='smile/biggrin.gif'></a>', 'two' => '<a href="./index.php?smile=8-)&msg='.$_POST['msg'].'"><img src='smile/cool.gif'></a>');
$dispatch[] = array ('one' => '<a href="./index.php?smile=*CRAZY*&msg='.$_POST['msg'].'"><img src='smile/crazy.gif'></a>', 'two' => '<a href="./index.php?smile=*FUCK*&msg='.$_POST['msg'].'"><img src='smile/fuck.gif'></a>');
$dispatch[] = array ('one' => '<a href="./index.php?smile=XD&msg='.$_POST['msg'] .'"><img src='smile/lol.gif'></a>', 'two' => '<a href="./index.php?smile=o_0&msg='.$_POST['msg'] .'"><img src='smile/shok.gif'></a>');
$dispatch[] = array ('one' => '<a href="./index.php?smile=*SPAM*&msg='.$_POST['msg'] .'"><img src='smile/spam_light.gif'></a>', 'two' => '<a href="./index.php?smile=*alcoholic*&msg='.$_POST['msg'] .'"><img src='smile/alcoholic.gif'></a>');
$dispatch[] = array ('one' => '<a href="./index.php?smile=*mail*&msg='.$_POST['msg'] .'"><img src='smile/mail.gif'></a>', 'two' => '<a href="./index.php?smile=*witch*&msg='.$_POST['msg'] .'"><img src='smile/girl_witch.gif'></a>');
$dispatch[] = array ('one' => '<a href="./index.php?smile=*nose*&msg='.$_POST['msg'] .'"><img src='smile/to_pick_ones_nose.gif'></a>', 'two' => '<a href="./index.php?smile=*wacko*&msg='.$_POST['msg'] .'"><img src='smile/wacko.gif'></a>');
$dispatch[] = array ('one' => '<a href="./index.php?smile=*hang*&msg='.$_POST['msg'] .'"><img src='smile/hang.gif'></a>', 'two' => '<a href="./index.php?smile=*hunter*&msg='.$_POST['msg'] .'"><img src='smile/hunter.gif'></a>');
$dispatch[] = array ('one' => '<a href="./index.php?smile=*sarcastic*&msg='.$_POST['msg'] .'"><img src='smile/sarcastic.gif'></a>');
$doc->assign('post', $dispatch);
$doc->display('view_two_table.tpl');
}
$ar = mysql_fetch_assoc($q);
$ank = new player($ar['id_player']);
$list = $ank->name;
$descrip = text::lead_text($ar['msg']);
$dispatch[] = array ('title' => $list, 'descrip' => $descrip);
$doc->assign('post', $dispatch);
$doc->display('view_list_plus_img.tpl');
$dispatch = array();
$doc->assign('method', 'post');
$doc->assign('action', '/dark_war/taverna/');
$dispatch[] = array('type' => 'textarea', 'name' => 'msg', 'title' => 'Ответ', 'value' => ''.$ank->nick.',', 'br' => 1);
$dispatch[] = array('type' => 'submit', 'name' => 'save', 'value' => 'Отправить', 'br' => 0);
$dispatch[] = array('type' => 'submit', 'name' => 'smilelist', 'value' => 'Смайлы', 'br' => 0);
$doc->assign('dis', $dispatch);
$doc->display('form.tpl');
$doc->ret("/dark_war/taverna/", 'В таверну');
?>