Không tạo được bài viết diễn đàn.

6 bài đăng
27.05.2017 / 06:40
tnit2510
Bài đăng: 966
Member

Mình nhâkp cả tá ký tự vô rồi. Nhưng nó vẫn báo lỗi. Ae xem giúp.

[IMAGE]
27.05.2017 / 10:02
MrKen
Bài đăng: 2643
Trùm!
Vẫn là A N H

dùng code của ai vậy =))

27.05.2017 / 11:08
tnit2510
Bài đăng: 966
Member
MrKen đã viết

dùng code của ai vậy =))

Thanh niên bên vina4u

27.05.2017 / 11:13
MrKen
Bài đăng: 2643
Trùm!
Vẫn là A N H

Cái này do code thôi. post file say.php xem nào

27.05.2017 / 11:20
tnit2510
Bài đăng: 966
Member
MrKen đã viết

Cái này do code thôi. post file say.php xem nào

<?php

Echo 'tao say qua quên làm file này';

?>

27.05.2017 / 11:21
tnit2510
Bài đăng: 966
Member
MrKen đã viết

Cái này do code thôi. post file say.php xem nào

PHP
  1. <?php
  2.  
  3. /**
  4.  * @package JohnCMS
  5.  * @link http://johncms.com
  6.  * @copyright Copyright (C) 2008-2011 JohnCMS Community
  7.  * @license LICENSE.txt (see attached file)
  8.  * @version VERSION.txt (see attached file)
  9.  * @author http://johncms.com/about
  10.  */
  11.  
  12. defined('_IN_JOHNCMS') or die('Error: restricted access');
  13.  
  14. /*
  15. -----------------------------------------------------------------
  16. Закрываем доступ для определенных ситуаций
  17. -----------------------------------------------------------------
  18. */
  19. if (!$id || !$user_id || isset($ban['1']) || isset($ban['11']) || (!core::$user_rights && $set['mod_forum'] == 3)) {
  20. require('../incfiles/head.php');
  21. echo functions::display_error($lng['access_forbidden']);
  22. require('../incfiles/end.php');
  23. exit;
  24. }
  25.  
  26. /*
  27. -----------------------------------------------------------------
  28. Вспомогательная Функция обработки ссылок форума
  29. -----------------------------------------------------------------
  30. */
  31. function forum_link($m)
  32. {
  33. global $set;
  34. if (!isset($m[3])) {
  35. return '[url=' . $m[1] . ']' . $m[2] . '[/url]';
  36. } else {
  37. $p = parse_url($m[3]);
  38. if ('http://' . $p['host'] . (isset($p['path']) ? $p['path'] : '') . '?id=' == $set['homeurl'] . '/forum/index.php?id=') {
  39. $thid = abs(intval(preg_replace('/(.*?)id=/si', '', $m[3])));
  40. $req = mysql_query("SELECT `text` FROM `forum` WHERE `id`= '$thid' AND `type` = 't' AND `close` != '1'");
  41. if (mysql_num_rows($req) > 0) {
  42. $res = mysql_fetch_array($req);
  43. $name = strtr($res['text'], array(
  44. '&quot;' => '',
  45. '&amp;' => '',
  46. '&lt;' => '',
  47. '&gt;' => '',
  48. '&#039;' => '',
  49. '[' => '',
  50. ']' => ''
  51. ));
  52. if (mb_strlen($name) > 40)
  53. $name = mb_substr($name, 0, 40) . '...';
  54.  
  55. return '[url=' . $m[3] . ']' . $name . '[/url]';
  56. } else {
  57. return $m[3];
  58. }
  59. } else
  60. return $m[3];
  61. }
  62. }
  63.  
  64. // Проверка на флуд
  65. $flood = functions::antiflood();
  66. if ($flood) {
  67. require('../incfiles/head.php');
  68. echo functions::display_error($lng['error_flood'] . ' ' . $flood . $lng['sec'], '<a href="index.php?id=' . $id . '&amp;start=' . $start . '">' . $lng['back'] . '</a>');
  69. require('../incfiles/end.php');
  70. exit;
  71. }
  72.  
  73. $headmod = 'forum,' . $id . ',1';
  74. if ($parser->knownbrowser) {
  75. if ($parser->browsername) {
  76. $agn1 = $parser->browsername;
  77. }else{
  78. $agn1 = $parser->fullname;
  79. }
  80. }else{
  81. $agn1 = strtok($agn, ' ');
  82. }
  83. $type = mysql_query("SELECT * FROM `forum` WHERE `id` = '$id'");
  84. $type1 = mysql_fetch_assoc($type);
  85. switch ($type1['type']) {
  86. case 't':
  87. /*
  88.   -----------------------------------------------------------------
  89.   Добавление простого сообщения
  90.   -----------------------------------------------------------------
  91.   */
  92. if (($type1['edit'] == 1 || $type1['close'] == 1) && $rights < 7) {
  93. // Проверка, закрыта ли тема
  94. require('../incfiles/head.php');
  95. echo functions::display_error($lng_forum['error_topic_closed'], '<a href="/forum/' . $id . '/'.$type1['seo'].'.html">' . $lng['back'] . '</a>');
  96. require('../incfiles/end.php');
  97. exit;
  98. }
  99. $msg = isset($_POST['msg']) ? functions::checkin(trim($_POST['msg'])) : '';
  100. $tagtv = isset($_POST['msg']) ? functions::checkin(trim($_POST['msg'])) : '';
  101. if (isset($_POST['msgtrans']))
  102. $msg = functions::trans($msg);
  103. //Обрабатываем ссылки
  104. $msg = preg_replace_callback('~\\[url=(http://.+?)\\](.+?)\\[/url\\]|(http://(www.)?[0-9a-zA-Z\.-]+\.[0-9a-zA-Z]{2,6}[0-9a-zA-Z/\?\.\~&amp;_=/%-:#]*)~', 'forum_link', $msg);
  105. $msg = functions::Auto_Link_IMG($msg);
  106. if (isset($_POST['submit'])
  107. && !empty($_POST['msg'])
  108. && isset($_POST['token'])
  109. && isset($_SESSION['token'])
  110. && $_POST['token'] == $_SESSION['token']
  111. ) {
  112. // Проверяем на минимальную длину
  113. if (mb_strlen($msg) < 4) {
  114. require('../incfiles/head.php');
  115. echo functions::display_error($lng['error_message_short'], '<a href="index.php?id=' . $id . '">' . $lng['back'] . '</a>');
  116. require('../incfiles/end.php');
  117. exit;
  118. }
  119. // Проверяем, не повторяется ли сообщение?
  120. $req = mysql_query("SELECT * FROM `forum` WHERE `user_id` = '$user_id' AND `type` = 'm' ORDER BY `time` DESC");
  121. if (mysql_num_rows($req) > 0) {
  122. $res = mysql_fetch_array($req);
  123. if ($msg == $res['text']) {
  124. require('../incfiles/head.php');
  125. echo functions::display_error($lng['error_message_exists'], '<a href="index.php?id=' . $id . '&amp;start=' . $start . '">' . $lng['back'] . '</a>');
  126. require('../incfiles/end.php');
  127. exit;
  128. }
  129. }
  130. // Удаляем фильтр, если он был
  131. if (isset($_SESSION['fsort_id']) && $_SESSION['fsort_id'] == $id) {
  132. unset($_SESSION['fsort_id']);
  133. unset($_SESSION['fsort_users']);
  134. }
  135.  
  136. unset($_SESSION['token']);
  137.  
  138. // Добавляем сообщение в базу
  139. mysql_query("INSERT INTO `forum` SET
  140. `refid` = '$id',
  141. `type` = 'm' ,
  142. `time` = '" . time() . "',
  143. `user_id` = '$user_id',
  144. `from` = '$login',
  145. `ip` = '" . core::$ip . "',
  146. `ip_via_proxy` = '" . core::$ip_via_proxy . "',
  147. `soft` = '" . mysql_real_escape_string($agn1) . "',
  148. `text` = '" . mysql_real_escape_string($msg) . "',
  149. `edit` = '',
  150. `curators` = ''
  151. ");
  152. $fadd = mysql_insert_id();
  153. // Обновляем время топика
  154. mysql_query("UPDATE `forum` SET
  155. `time` = '" . time() . "'
  156. WHERE `id` = '$id'
  157. ");
  158. // Обновляем статистику юзера
  159. mysql_query("UPDATE `users` SET
  160. `postforum`='" . ($datauser['postforum'] + 1) . "',
  161. `VND`='" . ($datauser['VND'] + 5) . "',
  162. `lastpost` = '" . time() . "'
  163. WHERE `id` = '$user_id'
  164. ");
  165. ////mod thong bao trich dan
  166. $tong=mysql_result(mysql_query("select count(*) from forum where refid = '{$th}' and type='m' order by time desc"),0);
  167. $topic=mysql_fetch_array(mysql_query("select * from forum where refid='{$th}' and type='m' order by time asc limit 1"));
  168. $sotrang=ceil($tong/$kmess);
  169. mysql_query("INSERT INTO `thongbao` SET
  170. `id_from`='".$user_id."',
  171. `id_to` = '".$type1['user_id']."',
  172. `hanhdong`='0',
  173. `id_forum`='".$th."',
  174. `text` = '".$sotrang."|".$fadd."',
  175. `type`='f',
  176. `time` = '" . time() . "'
  177. ");
  178. /////ket thuc thong bao trich dan
  179. // Вычисляем, на какую страницу попадает добавляемый пост
  180. $page = $set_forum['upfp'] ? 1 : ceil(mysql_result(mysql_query("SELECT COUNT(*) FROM `forum` WHERE `type` = 'm' AND `refid` = '$id'" . ($rights >= 7 ? '' : " AND `close` != '1'")), 0) / $kmess);
  181. if (isset($_POST['addfiles'])) {
  182. header("Location: index.php?id=$fadd&act=addfile");
  183. } else {
  184. header('Location: /forum/'.$id.'/'.$type1['seo'].'_p'.$page.'.html#post'.$fadd.'');
  185. }
  186. exit;
  187. } else {
  188. require('../incfiles/head.php');
  189. if ($datauser['postforum'] == 0) {
  190. if (!isset($_GET['yes'])) {
  191. $lng_faq = core::load_lng('faq');
  192. echo '<p>' . $lng_faq['forum_rules_text'] . '</p>' .
  193. '<p><a href="index.php?act=say&amp;id=' . $id . '&amp;yes">' . $lng_forum['agree'] . '</a> | ' .
  194. '<a href="/forum/'.$id.'/'.$type1['seo'].'.html">' . $lng_forum['not_agree'] . '</a></p>';
  195. require('../incfiles/end.php');
  196. exit;
  197. }
  198. }
  199. $msg_pre = functions::checkout($msg, 1, 1);
  200. if ($set_user['smileys']) {
  201. $msg_pre = functions::smileys($msg_pre, $datauser['rights'] ? 1 : 0);
  202. }
  203. $msg_pre = preg_replace('#\[c\](.*?)\[/c\]#si', '<div class="quote">\1</div>', $msg_pre);
  204. echo '<div class="phdr"><b>' . $lng_forum['topic'] . ':</b> ' . $type1['text'] . '</div>';
  205. if ($msg && !isset($_POST['submit'])) {
  206. echo '<div class="list1">' . functions::display_user($datauser, array('iphide' => 1, 'header' => '<span class="gray">(' . functions::display_date(time()) . ')</span>', 'body' => $msg_pre)) . '</div>';
  207. }
  208. echo '<form name="form" action="index.php?act=say&amp;id=' . $id . '&amp;start=' . $start . '" method="post"><div class="gmenu">' .
  209. '<p><h3>' . $lng_forum['post'] . '</h3>';
  210. echo '</p><p>' . bbcode::auto_bb('form', 'msg');
  211. echo '<textarea rows="' . $set_user['field_h'] . '" name="msg">' . (empty($_POST['msg']) ? '' : functions::checkout($msg)) . '</textarea></p>' .
  212. '<p><input type="checkbox" name="addfiles" value="1" ' . (isset($_POST['addfiles']) ? 'checked="checked" ' : '') . '/> ' . $lng_forum['add_file'];
  213. if ($set_user['translit']) {
  214. echo '<br /><input type="checkbox" name="msgtrans" value="1" ' . (isset($_POST['msgtrans']) ? 'checked="checked" ' : '') . '/> ' . $lng['translit'];
  215. }
  216. $token = mt_rand(1000, 100000);
  217. $_SESSION['token'] = $token;
  218. echo '</p><p>' .
  219. '<input type="submit" name="submit" value="' . $lng['sent'] . '" style="width: 107px; cursor: pointer"/> ' .
  220. ($set_forum['preview'] ? '<input type="submit" value="' . $lng['preview'] . '" style="width: 107px; cursor: pointer"/>' : '') .
  221. '<input type="hidden" name="token" value="' . $token . '"/>' .
  222. '</p></div></form>';
  223. }
  224.  
  225. echo '<div class="phdr"><a href="../pages/faq.php?act=trans">' . $lng['translit'] . '</a> | ' .
  226. '<a href="../pages/faq.php?act=smileys">' . $lng['smileys'] . '</a></div>' .
  227. '<p><a href="/forum/' . $id . '/'.$type1['seo'].'_start' . $start . '.html">' . $lng['back'] . '</a></p>';
  228. break;
  229.  
  230. case 'm':
  231. /*
  232.   -----------------------------------------------------------------
  233.   Добавление сообщения с цитированием поста
  234.   -----------------------------------------------------------------
  235.   */
  236. $th = $type1['refid'];
  237. $th2 = mysql_query("SELECT * FROM `forum` WHERE `id` = '$th'");
  238. $th1 = mysql_fetch_array($th2);
  239. if (($th1['edit'] == 1 || $th1['close'] == 1) && $rights < 7) {
  240. require('../incfiles/head.php');
  241. echo functions::display_error($lng_forum['error_topic_closed'], '<a href="/forum/' . $th1['id'] . '/'.$th1['seo'].'.html">' . $lng['back'] . '</a>');
  242. require('../incfiles/end.php');
  243. exit;
  244. }
  245. if ($type1['user_id'] == $user_id) {
  246. require('../incfiles/head.php');
  247. echo functions::display_error('Нельзя отвечать на свое же сообщение', '<a href="/forum/' . $th1['id'] . '/'.$th1['seo'].'.html">' . $lng['back'] . '</a>');
  248. require('../incfiles/end.php');
  249. exit;
  250. }
  251. $shift = (core::$system_set['timeshift'] + core::$user_set['timeshift']) * 3600;
  252. $vr = date("d.m.Y / H:i", $type1['time'] + $shift);
  253. $msg = isset($_POST['msg']) ? functions::checkin(trim($_POST['msg'])) : '';
  254. $tagtv = isset($_POST['msg']) ? functions::checkin(trim($_POST['msg'])) : '';
  255. $txt = isset($_POST['txt']) ? intval($_POST['txt']) : FALSE;
  256. if (isset($_POST['msgtrans'])) {
  257. $msg = functions::trans($msg);
  258. }
  259. if (!empty($_POST['citata'])) {
  260. // Если была цитата, форматируем ее и обрабатываем
  261. $citata = isset($_POST['citata']) ? trim($_POST['citata']) : '';
  262. $citata = bbcode::notags($citata);
  263. $citata = preg_replace('#\[c\](.*?)\[/c\]#si', '', $citata);
  264. $citata = mb_substr($citata, 0, 200);
  265. $tp = date("d.m.Y H:i", $type1['time']);
  266. $msg = '[c][url=' . $home . '/forum/index.php?act=post&id=' . $type1['id'] . ']#[/url] ' . $type1['from'] . ' ([time]' . $tp . "[/time])\n" . $citata . '[/c]' . $msg;
  267. } elseif (isset($_POST['txt'])) {
  268. // Если был ответ, обрабатываем реплику
  269. switch ($txt) {
  270. case 2:
  271. $repl = $type1['from'] . ', ' . $lng_forum['reply_1'] . ', ';
  272. break;
  273.  
  274. case 3:
  275. $repl = $type1['from'] . ', ' . $lng_forum['reply_2'] . ' ([url=' . $set['homeurl'] . '/forum/post-' . $type1['id'] . '.html]' . $vr . '[/url]) ' . $lng_forum['reply_3'] . ', ';
  276. break;
  277.  
  278. case 4:
  279. $repl = $type1['from'] . ', ' . $lng_forum['reply_4'] . ' ';
  280. break;
  281.  
  282. default :
  283. $repl = $type1['from'] . ', ';
  284. }
  285. $msg = $repl . ' ' . $msg;
  286. }
  287. //Обрабатываем ссылки
  288. $msg = preg_replace_callback('~\\[url=(http://.+?)\\](.+?)\\[/url\\]|(http://(www.)?[0-9a-zA-Z\.-]+\.[0-9a-zA-Z]{2,6}[0-9a-zA-Z/\?\.\~&amp;_=/%-:#]*)~', 'forum_link', $msg);
  289. if (isset($_POST['submit'])
  290. && isset($_POST['token'])
  291. && isset($_SESSION['token'])
  292. && $_POST['token'] == $_SESSION['token']
  293. ) {
  294. if (empty($_POST['msg'])) {
  295. require('../incfiles/head.php');
  296. echo functions::display_error($lng['error_empty_message'], '<a href="index.php?act=say&amp;id=' . $th . (isset($_GET['cyt']) ? '&amp;cyt' : '') . '">' . $lng['repeat'] . '</a>');
  297. require('../incfiles/end.php');
  298. exit;
  299. }
  300. // Проверяем на минимальную длину
  301. if (mb_strlen($msg) < 4) {
  302. require('../incfiles/head.php');
  303. echo functions::display_error($lng['error_message_short'], '<a href="/forum/' . $id . '/'.$type1['seo'].'.html">' . $lng['back'] . '</a>');
  304. require('../incfiles/end.php');
  305. exit;
  306. }
  307. // Проверяем, не повторяется ли сообщение?
  308. $req = mysql_query("SELECT * FROM `forum` WHERE `user_id` = '$user_id' AND `type` = 'm' ORDER BY `time` DESC LIMIT 1");
  309. if (mysql_num_rows($req) > 0) {
  310. $res = mysql_fetch_array($req);
  311. if ($msg == $res['text']) {
  312. require('../incfiles/head.php');
  313. echo functions::display_error($lng['error_message_exists'], '<a href="/forum/' . $th . '/'.$th1['seo'].'_start' . $start . '.html">' . $lng['back'] . '</a>');
  314. require('../incfiles/end.php');
  315. exit;
  316. }
  317. }
  318. // Удаляем фильтр, если он был
  319. if (isset($_SESSION['fsort_id']) && $_SESSION['fsort_id'] == $th) {
  320. unset($_SESSION['fsort_id']);
  321. unset($_SESSION['fsort_users']);
  322. }
  323.  
  324. unset($_SESSION['token']);
  325.  
  326. // Добавляем сообщение в базу
  327. mysql_query("INSERT INTO `forum` SET
  328. `refid` = '$th',
  329. `type` = 'm',
  330. `time` = '" . time() . "',
  331. `user_id` = '$user_id',
  332. `from` = '$login',
  333. `ip` = '" . core::$ip . "',
  334. `ip_via_proxy` = '" . core::$ip_via_proxy . "',
  335. `soft` = '" . mysql_real_escape_string($agn1) . "',
  336. `text` = '" . mysql_real_escape_string($msg) . "',
  337. `edit` = '',
  338. `curators` = ''
  339. ");
  340. ///mod tag thanh vien
  341. if(preg_match('#@([\w\d]{2,})#si',$tagtv)){
  342. preg_match_all('#@([\w\d]{2,})#si',$tagtv,$arr);
  343. foreach($arr[1] as $tag){
  344. $db=mysql_fetch_array(mysql_query("select * from users where name='{$tag}'"));
  345. if(mysql_num_rows(mysql_query("select * from users where name='{$tag}'"))==0 || $db['id']==$user_id){
  346. } else {
  347. $sobai=mysql_result(mysql_query("select count(*) from forum where refid = '{$th}' and type='m' order by time desc"),0);
  348. $sopage=ceil($sobai/$kmess);
  349. mysql_query("INSERT INTO `thongbao` SET
  350. `id_from`='".$user_id."',
  351. `id_to` = '".$db['id']."',
  352. `hanhdong`='2',
  353. `id_forum`='".$th."',
  354. `text` = '".$sopage."|',
  355. `type`='f',
  356. `time` = '" . time() . "'
  357. ");
  358. }
  359. }
  360. }
  361. ///ket thuc mod tag thanh vien
  362. $fadd = mysql_insert_id();
  363. // Обновляем время топика
  364. mysql_query("UPDATE `forum`
  365. SET `time` = '" . time() . "'
  366. WHERE `id` = '$th'
  367. ");
  368. // Обновляем статистику юзера
  369. mysql_query("UPDATE `users` SET
  370. `postforum`='" . ($datauser['postforum'] + 1) . "',
  371. `VND`='" . ($datauser['VND'] + 5) . "',
  372. `lastpost` = '" . time() . "'
  373. WHERE `id` = '$user_id'
  374. ");
  375. // Вычисляем, на какую страницу попадает добавляемый пост
  376. $page = $set_forum['upfp'] ? 1 : ceil(mysql_result(mysql_query("SELECT COUNT(*) FROM `forum` WHERE `type` = 'm' AND `refid` = '$th'" . ($rights >= 7 ? '' : " AND `close` != '1'")), 0) / $kmess);
  377. if (isset($_POST['addfiles'])) {
  378. header("Location: index.php?id=$fadd&act=addfile");
  379. } else {
  380. header('Location: /forum/'.$th.'/'.$th1['seo'].'_p'.$page.'.html#post'.$fadd.'');
  381. }
  382. exit;
  383. } else {
  384. $textl = $lng['forum'];
  385. require('../incfiles/head.php');
  386. $qt = " $type1[text]";
  387. if (($datauser['postforum'] == "" || $datauser['postforum'] == 0)) {
  388. if (!isset($_GET['yes'])) {
  389. $lng_faq = core::load_lng('faq');
  390. echo '<p>' . $lng_faq['forum_rules_text'] . '</p>';
  391. echo '<p><a href="index.php?act=say&amp;id=' . $id . '&amp;yes&amp;cyt">' . $lng_forum['agree'] . '</a> | <a href="index.php?id=' . $type1['refid'] . '">' . $lng_forum['not_agree'] . '</a></p>';
  392. require('../incfiles/end.php');
  393. exit;
  394. }
  395. }
  396. $msg_pre = functions::checkout($msg, 1, 1);
  397. if ($set_user['smileys']) {
  398. $msg_pre = functions::smileys($msg_pre, $datauser['rights'] ? 1 : 0);
  399. }
  400. $msg_pre = preg_replace('#\[c\](.*?)\[/c\]#si', '<div class="quote">\1</div>', $msg_pre);
  401. echo '<div class="phdr"><b>' . $lng_forum['topic'] . ':</b> ' . $th1['text'] . '</div>';
  402. $qt = str_replace("<br/>", "\r\n", $qt);
  403. $qt = trim(preg_replace('#\[c\](.*?)\[/c\]#si', '', $qt));
  404. $qt = functions::checkout($qt, 0, 2);
  405. if (!empty($_POST['msg']) && !isset($_POST['submit'])) {
  406. echo '<div class="list1">' . functions::display_user($datauser, array('iphide' => 1, 'header' => '<span class="gray">(' . functions::display_date(time()) . ')</span>', 'body' => $msg_pre)) . '</div>';
  407. }
  408. echo '<form name="form" action="index.php?act=say&amp;id=' . $id . '&amp;start=' . $start . (isset($_GET['cyt']) ? '&amp;cyt' : '') . '" method="post"><div class="gmenu">';
  409. if (isset($_GET['cyt'])) {
  410. // Форма с цитатой
  411. echo '<p><b>' . $type1['from'] . '</b> <span class="gray">(' . $vr . ')</span></p>' .
  412. '<p><h3>' . $lng_forum['cytate'] . '</h3>' .
  413. '<textarea rows="' . $set_user['field_h'] . '" name="citata">' . (empty($_POST['citata']) ? $qt : functions::checkout($_POST['citata'])) . '</textarea>' .
  414. '<br /><small>' . $lng_forum['cytate_help'] . '</small></p>';
  415. } else {
  416. // Форма с репликой
  417. echo '<p><h3>' . $lng_forum['reference'] . '</h3>' .
  418. '<input type="radio" value="0" ' . (!$txt ? 'checked="checked"' : '') . ' name="txt" />&#160;<b>' . $type1['from'] . '</b>,<br />' .
  419. '<input type="radio" value="2" ' . ($txt == 2 ? 'checked="checked"' : '') . ' name="txt" />&#160;<b>' . $type1['from'] . '</b>, ' . $lng_forum['reply_1'] . ',<br />' .
  420. '<input type="radio" value="3" ' . ($txt == 3 ? 'checked="checked"'
  421. : '') . ' name="txt" />&#160;<b>' . $type1['from'] . '</b>, ' . $lng_forum['reply_2'] . ' (<a href="index.php?act=post&amp;id=' . $type1['id'] . '">' . $vr . '</a>) ' . $lng_forum['reply_3'] . ',<br />' .
  422. '<input type="radio" value="4" ' . ($txt == 4 ? 'checked="checked"' : '') . ' name="txt" />&#160;<b>' . $type1['from'] . '</b>, ' . $lng_forum['reply_4'] . '</p>';
  423. }
  424. echo '<p><h3>' . $lng_forum['post'] . '</h3>';
  425. echo '</p><p>' . bbcode::auto_bb('form', 'msg');
  426. echo '<textarea rows="' . $set_user['field_h'] . '" name="msg">' . (empty($_POST['msg']) ? '' : functions::checkout($_POST['msg'])) . '</textarea></p>' .
  427. '<p><input type="checkbox" name="addfiles" value="1" ' . (isset($_POST['addfiles']) ? 'checked="checked" ' : '') . '/> ' . $lng_forum['add_file'];
  428. if ($set_user['translit']) {
  429. echo '<br /><input type="checkbox" name="msgtrans" value="1" ' . (isset($_POST['msgtrans']) ? 'checked="checked" ' : '') . '/> ' . $lng['translit'];
  430. }
  431. $token = mt_rand(1000, 100000);
  432. $_SESSION['token'] = $token;
  433. echo '</p><p><input type="submit" name="submit" value="' . $lng['sent'] . '" style="width: 107px; cursor: pointer;"/> ' .
  434. ($set_forum['preview'] ? '<input type="submit" value="' . $lng['preview'] . '" style="width: 107px; cursor: pointer;"/>' : '') .
  435. '<input type="hidden" name="token" value="' . $token . '"/>' .
  436. '</p></div></form>';
  437. }
  438. echo '<div class="phdr"><a href="../pages/faq.php?act=trans">' . $lng['translit'] . '</a> | ' .
  439. '<a href="../pages/faq.php?act=smileys">' . $lng['smileys'] . '</a></div>' .
  440. '<p><a href="/forum/' . $type1['refid'] . '/' . $th1['seo'] . '_start' . $start . '.html">' . $lng['back'] . '</a></p>';
  441. break;
  442.  
  443. default:
  444. require('../incfiles/head.php');
  445. echo functions::display_error($lng_forum['error_topic_deleted'], '<a href="index.html">' . $lng['to_forum'] . '</a>');
  446. require('../incfiles/end.php');
  447. }