1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
244:
245:
246:
247:
248:
249:
250:
251:
252:
253:
254:
255:
256:
257:
258:
259:
260:
261:
262:
263:
264:
265:
266:
267:
268:
269:
270:
271:
272:
273:
274:
275:
276:
277:
278:
279:
280:
281:
282:
283:
284:
285:
286:
287:
288:
289:
290:
291:
292:
293:
294:
295:
296:
297:
298:
299:
300:
301:
302:
303:
304:
305:
306:
307:
308:
309:
310:
311:
312:
313:
314:
315:
316:
317:
318:
319:
320:
321:
322:
323:
324:
325:
326:
327:
328:
329:
330:
331:
332:
333:
334:
335:
336:
337:
338:
339:
340:
341:
342:
343:
344:
345:
346:
347:
348:
349:
350:
351:
352:
353:
354:
355:
356:
357:
358:
359:
360:
361:
362:
363:
364:
365:
366:
367:
368:
369:
370:
371:
372:
373:
374:
375:
376:
377:
378:
379:
380:
381:
382:
383:
384:
385:
386:
387:
388:
389:
390:
391:
392:
393:
394:
395:
396:
397:
398:
399:
400:
401:
402:
403:
404:
405:
406:
407:
408:
409:
410:
411:
412:
413:
414:
415:
416:
417:
418:
|
<?php
$filename = 'addreply.php';
require('./global.php');
require('./acp/lib/class_parse.php');
require('./acp/lib/class_parsecode.php');
$lang->load('POST,POSTINGS,MAIL,THREAD');
if (!isset($threadid) || $thread['closed'] == 3) error($lang->get("LANG_GLOBAL_ERROR_FALSELINK", array('$adminmail' => $adminmail)));
if ($thread['visible'] == 0 || ($thread['closed'] != 0 && !checkmodpermissions('m_can_close_reply')) || $board['isboard'] != 1 || $board['closed'] == 1 || (!checkpermissions('can_reply_topic') && (!checkpermissions('can_reply_own_topic') || $thread['starterid'] != $wbbuserdata['userid']))) access_error();
// check for double post
if ($wbbuserdata['doublepost_timegap'] != 0 && $thread['lastposterid'] == $wbbuserdata['userid']) {
if ($wbbuserdata['doublepost_timegap'] == -1) error($lang->get("LANG_POST_REPLY_ERROR1"));
else if ($thread['lastposttime'] >= time() - $wbbuserdata['doublepost_timegap'] * 60 ) error($lang->get("LANG_POST_REPLY_ERROR2", array('$doublepost_timegap' => $wbbuserdata['doublepost_timegap'])));
}
unset($message);
unset($topic);
unset($guestname);
unset($result);
$preview_window = '';
$addreply_error = '';
$checked = array('', '', '', '', '', '', '', '');
/* checkbox preselect */
if ($addreply_default_checked_0 == 1) $checked[0] = 'checked="checked"';
if ($wbbuserdata['emailnotify'] == 1) $checked[1] = 'checked="checked"';
if ($addreply_default_checked_2 == 1) $checked[2] = 'checked="checked"';
if ($addreply_default_checked_3 == 1) $checked[3] = 'checked="checked"';
if ($addreply_default_checked_4 == 1) $checked[4] = 'checked="checked"';
if ($addreply_default_checked_5 == 1) $checked[5] = 'checked="checked"';
if ($addreply_default_checked_6 == 1) $checked[6] = 'checked="checked"';
if (isset($_POST['send'])) {
// post options
if (isset($_POST['parseurl'])) $parseurl = intval($_POST['parseurl']);
else $parseurl = 0;
if (isset($_POST['emailnotify'])) $emailnotify = intval($_POST['emailnotify']);
else $emailnotify = 0;
if (isset($_POST['disablesmilies'])) $disablesmilies = intval($_POST['disablesmilies']);
else $disablesmilies = 0;
if (isset($_POST['disablehtml'])) $disablehtml = intval($_POST['disablehtml']);
else $disablehtml = 0;
if (isset($_POST['disablebbcode'])) $disablebbcode = intval($_POST['disablebbcode']);
else $disablebbcode = 0;
if (isset($_POST['disableimages'])) $disableimages = intval($_POST['disableimages']);
else $disableimages = 0;
if (isset($_POST['showsignature'])) $showsignature = intval($_POST['showsignature']);
else $showsignature = 0;
if (isset($_POST['threadclose'])) $threadclose = intval($_POST['threadclose']);
else $threadclose = 0;
/* get topic & stop shooting */
$topic = wbb_trim($_POST['topic']);
if ($dostopshooting == 1) $topic = stopShooting($topic);
/* get message & strip crap */
$message = stripcrap(wbb_trim($_POST['message']));
/* get guestname */
if (!$wbbuserdata['userid']) $guestname = wbb_trim($_POST['guestname']);
/* posting feature rights:start */
if (isset($_POST['iconid']) && checkpermissions('can_use_post_icons') == 1) $iconid = intval($_POST['iconid']);
else $iconid = 0;
if (!checkpermissions('can_use_post_smilies') || $disablesmilies == 1) $allowsmilies = 0;
else $allowsmilies = 1;
if (!checkpermissions('can_use_post_html') || $disablehtml == 1) $allowhtml = 0;
else $allowhtml = 1;
if (!checkpermissions('can_use_post_bbcode') || $disablebbcode == 1) $allowbbcode = 0;
else $allowbbcode = 1;
if (!checkpermissions('can_use_post_images') || $disableimages == 1) $allowimages = 0;
else $allowimages = 1;
/* posting feature rights:end */
/* get parent postid */
if (isset($_POST['postid'])) $postid = intval($_POST['postid']);
else $postid = 0;
if (!isset($_POST['preview']) && !$_POST['change_editor']) {
$error = '';
/* verify guestname */
if (!$wbbuserdata['userid']) {
$wbbuserdata['username'] = $guestname;
if (!$wbbuserdata['username'] || !verify_username($wbbuserdata['username'])) $error .= $lang->items['LANG_POST_ERROR2'];
}
/* check message */
if (!$message) $error .= $lang->items['LANG_POSTINGS_ERROR1'];
if (flood_control($wbbuserdata['userid'], $REMOTE_ADDR, $wbbuserdata['avoid_fc'])) error($lang->get("LANG_POST_ERROR3", array('$fctime' => $fctime)));
if ($wbbuserdata['max_post_image'] != -1 && wbb_substr_count(wbb_strtolower($message), '[img]') > $wbbuserdata['max_post_image']) $error .= $lang->items['LANG_POST_ERROR4'];
if ($error) eval("\$addreply_error = \"".$tpl->get("newthread_error")."\";");
else {
/* parse url */
if ($parseurl == 1 && $allowbbcode == 1) $message = parseURL($message);
/* post already exists? */
$result = $db->query_first("SELECT postid FROM bb".$n."_posts WHERE threadid='$threadid' AND userid='$wbbuserdata[userid]' AND username='".addslashes($wbbuserdata['username'])."' AND posttopic='".addslashes($topic)."' AND posttime>='".(time() - $dpvtime)."' AND message='".addslashes($message)."'", 1);
if ($result['postid']) {
header("Location: thread.php?postid=".$result['postid'].$SID_ARG_2ND_UN."#post".$result['postid']);
exit();
}
/* avoid moderation */
if (checkpermissions('can_post_without_moderation') == 1) $board['moderatenew'] = 0;
$time = time();
/* insert post */
$db->query("INSERT INTO bb".$n."_posts (parentpostid,threadid,userid,username,iconid,posttopic,posttime,message,allowsmilies,allowhtml,allowbbcode,allowimages,showsignature,ipaddress,visible) VALUES
('$postid','$threadid','$wbbuserdata[userid]','".addslashes($wbbuserdata['username'])."','$iconid','".addslashes($topic)."','$time','".addslashes($message)."','$allowsmilies','$allowhtml','$allowbbcode','$allowimages','".$showsignature."','".addslashes($REMOTE_ADDR)."','".(($board['moderatenew'] == 1 || $board['moderatenew'] == 11) ? (0) : (1))."')");
$postid = $db->insert_id();
/* create postcache */
$parse = &new parse($docensor, 75, 1, '', $usecode, 1, 1);
$cache = $parse->doparse($message, $allowsmilies, $allowhtml, $allowbbcode, $allowimages);
$db->query("REPLACE INTO bb".$n."_postcache (postid, threadid, cache) VALUES ('".$postid."', '".$threadid."', '".addslashes($cache)."')");
## Start - Attachment-Mod v1.1 by Merides #####
/* set update attachment postid threadid */
$posthash = md5($wbbuserdata['username'] . $wbbuserdata['userid']);
list($attachcount) = $db->query_first("SELECT COUNT(*) FROM bb".$n."_attachments WHERE posthash='$posthash'");
if($attachcount) $db->unbuffered_query("UPDATE bb".$n."_attachments SET threadid='$threadid', postid='$postid', posthash='' WHERE posthash='$posthash'",1);
/* update thread attachmentcount */
list($attachment_id) = $db->query_first("SELECT COUNT(*) FROM bb".$n."_attachments WHERE threadid='$threadid'");
if($attachment_id) $db->query("UPDATE bb".$n."_threads SET attachments='$attachment_id' WHERE threadid='$threadid'");
## Ende - Attachment-Mod v1.1 by Merides #####;
/* insert subscription */
if ($emailnotify == 1 && $wbbuserdata['userid']) $db->unbuffered_query("REPLACE INTO bb".$n."_subscribethreads (userid,threadid,emailnotify,countemails) VALUES ($wbbuserdata[userid],$threadid,1,0)");
/* wordmatch */
wordmatch($postid, $message, $topic);
/* mod subscriptions */
$subscriptions = '';
$langpacks = array();
$langpacks[$lang->languagepackid] = $lang;
$result = $db->query("SELECT u.userid, u.email, u.username, l.languagepackid FROM bb".$n."_moderators m LEFT JOIN bb".$n."_users u USING(userid) LEFT JOIN bb".$n."_languagepacks l ON(l.languagepackid=u.langid) WHERE m.userid<>'$wbbuserdata[userid]' AND m.boardid ='".$boardid."' AND m.notify_newpost=1");
while ($row = $db->fetch_array($result)) {
$subscriptions .= ','.$row['userid'];
if (!isset($langpacks[$row['languagepackid']])) {
$langpacks[$row['languagepackid']] = &new language(intval($row['languagepackid']));
$langpacks[$row['languagepackid']]->load('OWN,MAIL');
}
$master_board_name_email = getlangvar($o_master_board_name, $langpacks[$row['languagepackid']], 0);
$mail_subject = $langpacks[$row['languagepackid']]->get("LANG_MAIL_MOD_NEWPOST_SUBJECT", array('$topic' => $thread['topic']));
$mail_text = $langpacks[$row['languagepackid']]->get("LANG_MAIL_MOD_NEWPOST_TEXT", array('$username' => $row['username'], '$topic' => $thread['topic'], '$author' => $wbbuserdata['username'], '$url2board' => $url2board, '$postid' => $postid, '$master_board_name_email' => $master_board_name_email));
mailer($row['email'], $mail_subject, $mail_text);
}
if ($board['moderatenew'] == 1 || $board['moderatenew'] == 11) redirect($lang->items['LANG_POST_REDIRECT'], "board.php?boardid=$boardid".$SID_ARG_2ND, 10);
else {
/* close thread option */
if ($threadclose == 1 && (checkmodpermissions('m_can_thread_close') || ($wbbuserdata['userid'] && $wbbuserdata['userid'] == $thread['starterid'] && checkpermissions('can_close_own_topic') == 1))) $threadclose = ', closed=1';
else $threadclose = '';
/* update thread info */
$db->unbuffered_query("UPDATE bb".$n."_threads SET lastposttime = '$time', lastposterid = '$wbbuserdata[userid]', lastposter = '".addslashes($wbbuserdata['username'])."', replycount = replycount+1$attachmentcount$threadclose WHERE threadid = '$threadid'", 1);
/* update board info */
$db->unbuffered_query("UPDATE bb".$n."_boards SET postcount=postcount+1, lastthreadid='$threadid', lastposttime='$time', lastposterid='$wbbuserdata[userid]', lastposter='".addslashes($wbbuserdata['username'])."' WHERE boardid IN ($board[parentlist],$boardid)", 1);
/* update global postcount */
$db->unbuffered_query("UPDATE bb".$n."_stats SET postcount=postcount+1", 1);
/* update userposts & rank */
if ($board['countuserposts'] == 1 && $wbbuserdata['userid']) {
$wbbuserdata['userposts'] += 1;
list($rankid) = $db->query_first("SELECT rankid FROM bb".$n."_ranks WHERE groupid IN ('0','$wbbuserdata[rankgroupid]') AND needposts<='$wbbuserdata[userposts]' AND gender IN ('0','$wbbuserdata[gender]') ORDER BY needposts DESC, gender DESC", 1);
$db->unbuffered_query("UPDATE bb".$n."_users SET userposts=userposts+1".(($rankid != $wbbuserdata['rankid']) ? (", rankid='$rankid'") : (""))." WHERE userid = '$wbbuserdata[userid]'", 1);
checkPosts4AI();
}
/* subscriptions */
$result = $db->query("SELECT u.email, u.username, s.countemails, l.languagepackid FROM bb".$n."_subscribethreads s LEFT JOIN bb".$n."_users u USING(userid) LEFT JOIN bb".$n."_languagepacks l ON(l.languagepackid=u.langid) WHERE s.threadid='$threadid' AND s.userid NOT IN (".$wbbuserdata['userid'].$subscriptions.") AND s.emailnotify=1 AND s.countemails<'$maxnotifymails' AND u.email is not null");
while ($row = $db->fetch_array($result)) {
if (!isset($langpacks[$row['languagepackid']])) {
$langpacks[$row['languagepackid']] = &new language(intval($row['languagepackid']));
$langpacks[$row['languagepackid']]->load('OWN,MAIL');
}
$master_board_name_email = getlangvar($o_master_board_name, $langpacks[$row['languagepackid']], 0);
$mail_subject = $langpacks[$row['languagepackid']]->get("LANG_MAIL_NEWPOST_SUBJECT", array('$topic' => $thread['topic']));
$mail_text = $langpacks[$row['languagepackid']]->get("LANG_MAIL_NEWPOST_TEXT", array('$username' => $row['username'], '$topic' => $thread['topic'], '$author' => $wbbuserdata['username'], '$url2board' => $url2board, '$postid' => $postid, '$master_board_name_email' => $master_board_name_email));
mailer($row['email'], $mail_subject, $mail_text);
}
$db->unbuffered_query("UPDATE bb".$n."_subscribethreads SET countemails=countemails+1 WHERE threadid='$threadid' AND emailnotify=1 AND countemails<'$maxnotifymails'", 1);
header("Location: thread.php?postid=$postid".$SID_ARG_2ND_UN."#post$postid");
exit();
}
}
}
else if (!$_POST['change_editor']) {
$parse = &new parse($docensor, 75, $wbbuserdata['showimages'], '', $usecode);
$preview_topic = htmlconverter(textwrap($topic));
$preview_message = $parse->doparse((($parseurl == 1 && $allowbbcode == 1) ? (parseURL($message)) : ($message)), $allowsmilies, $allowhtml, $allowbbcode, $allowimages);
if ($iconid) {
$result = $db->query_first("SELECT * FROM bb".$n."_icons WHERE iconid = '$iconid'");
$preview_posticon = makeimgtag($result['iconpath'], getlangvar($result['icontitle'], $lang), 0);
}
else $preview_posticon = '';
eval("\$preview_window = \"".$tpl->get("newthread_preview")."\";");
}
if ($parseurl == 1 && !$disablebbcode) $checked[0] = 'checked="checked"';
else $checked[0] = '';
if ($emailnotify == 1) $checked[1] = 'checked="checked"';
else $checked[1] = '';
if ($disablesmilies == 1) $checked[2] = 'checked="checked"';
else $checked[2] = '';
if ($disablehtml == 1) $checked[3] = 'checked="checked"';
else $checked[3] = '';
if ($disablebbcode == 1) $checked[4] = 'checked="checked"';
else $checked[4] = '';
if ($disableimages == 1) $checked[5] = 'checked="checked"';
else $checked[5] = '';
if ($showsignature == 1) $checked[6] = 'checked="checked"';
else $checked[6] = '';
if ($threadclose == 1) $checked[7] = 'checked="checked"';
else $checked[7] = '';
}
elseif (isset($postid)) {
if ($post['posttopic'] != '') {
$post['posttopic'] = preg_replace('/^RE: /i', '', $post['posttopic']);
$topic = $lang->get("LANG_POST_QUOTE_TOPIC", array('$posttopic' => $post['posttopic']));
}
if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'quote') {
if ($docensor == 1) {
$parse = &new parse(1);
$post['message'] = $parse->censor($post['message']);
}
$message = $lang->get("LANG_POST_QUOTE_MESSAGE", array('$username' => $post['username'], '$message' => $post['message']));
}
}
$navbar = getNavbar($board['parentlist']);
eval("\$navbar .= \"".$tpl->get("navbar_board")."\";");
$wbbuserdata['username'] = htmlconverter($wbbuserdata['username']);
if (!isset($iconid)) $iconid = 0;
if (checkpermissions('can_use_post_icons') == 1) $newthread_icons = getIcons($iconid);
if (checkpermissions('can_use_post_bbcode') == 1 && $wbbuserdata['usewysiwyg'] != 1) $bbcode_buttons = getcodebuttons();
if (checkpermissions('can_use_post_smilies') == 1) {
if ($wbbuserdata['usewysiwyg'] == 1) $smilies = getAppletSmilies();
$bbcode_smilies = getclickysmilies($smilie_table_cols, $smilie_table_rows);
}
$note = '';
if (checkpermissions('can_use_post_html') == 0) $note .= $lang->items['LANG_POSTINGS_HTML_NOT_ALLOW'];
else $note .= $lang->items['LANG_POSTINGS_HTML_ALLOW'];
if (checkpermissions('can_use_post_bbcode') == 0) $note .= $lang->items['LANG_POSTINGS_BBCODE_NOT_ALLOW'];
else $note .= $lang->items['LANG_POSTINGS_BBCODE_ALLOW'];
if (checkpermissions('can_use_post_smilies') == 0) $note .= $lang->items['LANG_POSTINGS_SMILIES_NOT_ALLOW'];
else $note .= $lang->items['LANG_POSTINGS_SMILIES_ALLOW'];
if (checkpermissions('can_use_post_images') == 0) $note .= $lang->items['LANG_POSTINGS_HTML_IMAGES_ALLOW'];
else $note .= $lang->items['LANG_POSTINGS_IMAGES_ALLOW'];
$postcount = $db->query_first("SELECT COUNT(*) FROM bb".$n."_posts WHERE threadid='$threadid'");
$result = $db->query("SELECT p.*, pc.cache, i.*, at.attachmentid, at.attachmentname, at.attachmentextension
FROM bb".$n."_posts p
LEFT JOIN bb".$n."_icons i USING (iconid)
LEFT JOIN bb".$n."_attachments at ON (at.attachmentid=p.attachmentid)
LEFT JOIN bb".$n."_postcache pc ON (p.postid=pc.postid)
WHERE p.threadid='$threadid' AND visible = 1
ORDER BY posttime DESC", $showpostsinreply);
$postcount = $postcount[0];
if ($postcount > $showpostsinreply) {
$postcount = $showpostsinreply;
$complete_thread = 1;
$lang->items['LANG_POST_MORE_POSTS'] = $lang->get("LANG_POST_MORE_POSTS", array('$threadid' => $threadid, '$SID_ARG_2ND' => $SID_ARG_2ND));
}
else $complete_thread = 0;
$lang->items['LANG_POST_LAST_X_POSTS'] = $lang->get("LANG_POST_LAST_X_POSTS", array('$postcount' => $postcount));
$count = 0;
$postbit = '';
$parse = &new parse($docensor, 75, $wbbuserdata['showimages'], '', $usecode);
while ($posts = $db->fetch_array($result)) {
$attachmentbit = '';
$tdclass = getone($count, 'tableb', 'tablea');
// use postcache if possible
if ($posts['cache']) $posts['message'] = $parse->parseCache($posts['cache']);
else $posts['message'] = $parse->doparse($posts['message'], $posts['allowsmilies'], $posts['allowhtml'], $posts['allowbbcode'], $posts['allowimages']);
$posts['posttopic'] = htmlconverter(textwrap($posts['posttopic']));
$posts['username'] = htmlconverter($posts['username']);
if ($posts['iconid']) $posticon = makeimgtag($posts['iconpath'], getlangvar($posts['icontitle'], $lang), 0);
else $posticon = '';
## Start - Attachment-Mod v1.1 by Merides #####
$attachmentbit="";
$attachment_bit_image="";
$attachment_bit_file="";
$image_zahl="";
list($attachcount) = $db->query_first("SELECT COUNT(*) FROM bb".$n."_attachments WHERE postid='$posts[postid]'");
if($attachcount){
$resultattach = $db->query("SELECT * FROM bb".$n."_attachments WHERE postid='$posts[postid]'");
while($attach = $db->fetch_array($resultattach))
{
if($attach['attachment_link']==0){
$attach['extensionview']=$attach['attachmentextension'];
if(!file_exists("images/filetypes/".$attach['attachmentextension'].".gif")) $attach['extensionview']="unknown";
$langname=$attach['attachmentname'].".".$attach['attachmentextension'];
if(strlen($attach['attachmentname'])>40) $attach['attachmentname']=substr($attach['attachmentname'],0,37)."...";
$dateispace= formatFilesize($attach['attachmentsize']);
$lang_thread_attachment_upload_views = $lang->get("LANG_THREAD_ATTACHMENT_UPLOAD_VIEWS", array('$dateispace' => $dateispace, '$attach[counter]' => $attach[counter]));
$lang_thread_attachment_upload_file = $lang->get("LANG_THREAD_ATTACHMENT_UPLOAD_FILE", array('$dateispace' => $dateispace, '$attach[counter]' => $attach[counter]));
if($attach['attachmentextension']=="gif" || $attach['attachmentextension']=="jpg" || $attach['attachmentextension']=="jpeg" || $attach['attachmentextension']=="png" || $attach['attachmentextension']=="bmp")
{
if($attach['ftppath']) $imgsize=@getimagesize($attach['ftppath']."/attachment-$attach[attachmentid].$attach[attachmentextension]");
else $imgsize=@getimagesize("./attachments/attachment-$attach[attachmentid].$attach[attachmentextension]");
if(($picmaxwidth!=0 && $imgsize[0]>$picmaxwidth) || ($picmaxheight!=0 && $imgsize[1]>$picmaxheight))
{
if($picmaxwidth!=0) $div1 = $picmaxwidth/$imgsize[0];
else $div1=1;
if($picmaxheight!=0) $div2 = $picmaxheight/$imgsize[1];
else $div2=1;
if($div1<$div2) {
$imgwidth=$picmaxwidth;
$imgheight=round($imgsize[1]*$div1);
} else {
$imgheight=$picmaxheight;
$imgwidth=round($imgsize[0]*$div2);
}
$image_small=1;
if($image_zahl=="") $LANG_THREAD_ATTACHMENT_IMAGE = $lang->get("LANG_THREAD_ATTACHMENT_IMAGE", array('$posts[username]' => $posts['username']));
else $LANG_THREAD_ATTACHMENT_IMAGE="";
$LANG_THREAD_ATTACHMENT_IMAGE_SMALL = $lang->items['LANG_THREAD_ATTACHMENT_IMAGE_SMALL'];
}else {
$image_small=0;
if($image_zahl=="") $LANG_THREAD_ATTACHMENT_IMAGE = $lang->get("LANG_THREAD_ATTACHMENT_IMAGE", array('$posts[username]' => $posts['username']));
else $LANG_THREAD_ATTACHMENT_IMAGE="";
}
eval ("\$attachment_bit_image .= \"".$tpl->get("thread_attachment_modbit")."\";");
$image_zahl=1;
}
}
}
eval ("\$attachmentbit = \"".$tpl->get("thread_attachmentbit_mod")."\";");
}
## Ende - Attachment-Mod v1.1 by Merides #####
eval("\$postbit .= \"".$tpl->get("addreply_postbit")."\";");
$count++;
}
## Start - Attachment-Mod v1.1 by Merides #####
if(checkpermissions("can_upload_attachments")==1){
$posthash = md5($wbbuserdata['username'] . $wbbuserdata['userid']);
$extensionview = getAllowedExtensions($wbbuserdata['allowed_attachment_extensions']);
$count="";
$attachpostid="";
$attachthreadid=$threadid;
$attachuserid=$wbbuserdata['userid'];
eval ("\$attachment = \"".$tpl->get("newthread_attachment")."\";");
}else $attachment="";
## Ende - Attachment-Mod v1.1 by Merides #####
if (isset($message)) $message = htmlconverter($message);
elseif ($board['posttemplateuse'] > 0) {
if ($board['posttemplateuse'] == 1) $posttemplate = $default_posttemplate;
if ($board['posttemplateuse'] == 2) $posttemplate = $board['posttemplate'];
$message = getlangvar($posttemplate, $lang);
}
if (isset($topic)) $topic = htmlconverter($topic);
if (isset($guestname)) $guestname = htmlconverter($guestname);
eval("\$newthread_username = \"".$tpl->get("newthread_username")."\";");
$thread['topic'] = htmlconverter(textwrap($thread['topic']));
eval("\$headinclude .= \"".$tpl->get("bbcode_script")."\";");
eval("\$editor = \"".$tpl->get("editor")."\";");
/* NoSelfReply */
$reply = $db->query_first("SELECT lastposterid FROM bb".$n."_threads WHERE threadid='$threadid'");
if(!$wbbuserdata['can_selfreply'] && $reply['lastposterid']==$wbbuserdata[userid])
{
eval("\$tpl->output(\"".$tpl->get("addreply_selfreply")."\");");
}
else
{
eval("\$tpl->output(\"".$tpl->get("addreply")."\");");
}
?>
|