WebWork Magazin - Webseiten erstellen lassen, Online Medien, html

Webhoster, Webhosting Provider und Domain registrieren

Home | Registrieren | Einloggen | Suchen | Aktuelles | GSL-Webservice | Suleitec Webhosting
Reparatur-Forum | Elektro forum | Ersatzteilshop Haushalt und Elektronik



Im Homepage und Webhosting-Forum --- parse error

Scripte und Programme für PHP, MYSQL. Diskussionen zur Programmierung im Web. Fragen zu CMS, Blogsoftware, Shops, Newsletter und vielen weiteren Scripten.

Forum » PHP & MySQL » parse error - 03 August 2020 Antworten
parse error
renchan
Pixelschubser
Threadstarter




Beiträge: 6

Hallo,

ich habe ein Forum von Woltlab (wbb 2.3).
Wenn ich auf ein Thema antworten will, kommt folgende Fehlermeldung:

Parse error: parse error, unexpected T_ELSE in /home/www/htdocs/telenovela-site.de/wbb2/addreply.php on line 213

Woran kann das liegen? Im Woltlab Forum kann mir auch niemand helfen. Benutze einen heruntergeladenen Style von mygen24.de

  Profil   Editieren   Zitieren
languitar
Foren-Team




Beiträge: 2795

Dann muss dir der Style irgendwie in der angegebenen Datei die Syntax zerschossen haben.
Poste mal die Zeilen rund um die angegebene Stelle.

  Profil   Editieren   Zitieren
renchan
Pixelschubser
Threadstarter




Beiträge: 6

Ich hatte sie auch schon neu hochgeladen.Aber nix hat sich geändert.



Laut den Anweisung von JGS (Portal) musste ich noch ein paar Dinge hinzufügen:




Diese Nachricht wurde geändert von: renchan
  Profil   Editieren   Zitieren
languitar
Foren-Team




Beiträge: 2795

setz mal ans ende von Zeile 207 ein { und vor das else in Zeile 213 ein }

  Profil   Editieren   Zitieren
renchan
Pixelschubser
Threadstarter




Beiträge: 6

Jetzt kommt die Meldung: Parse error: parse error, unexpected T_ELSE in /home/www/htdocs/telenovela-site.de/wbb2/addreply.php on line 260


  Profil   Editieren   Zitieren
languitar
Foren-Team




Beiträge: 2795

ja dann da genau das gleiche machen.

  Profil   Editieren   Zitieren
renchan
Pixelschubser
Threadstarter




Beiträge: 6

Problem in Zeile 260 bleibt bestehen


Diese Nachricht wurde geändert von: renchan
  Profil   Editieren   Zitieren
languitar
Foren-Team




Beiträge: 2795

oh sorry, hinter das else in 260 ein {

Poste den Code doch einfach mal richtig und nicht als bild. dafür gibts es extra den [code]-tag

  Profil   Editieren   Zitieren
renchan
Pixelschubser
Threadstarter




Beiträge: 6

Wenn ich es als Quellcode mache zeigt er mir nur die Hälfte. Also ohne...


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: 
419: 
420: 
421: 
422: 
423: 
424: 
425: 
426: 
427: 
428: 
429: 
430: 
431: 
432: 
433: 
434: 
435: 
436: 
437: 
438: 
439: 
440: 
441: 
442: 
443: 
444: 
445: 
446: 
447: 
448: 
449: 
450: 
451: 
452: 
453: 
454: 
455: 
456: 
457: 
458: 
459: 
460: 
461: 
462: 
463: 
464: 
465: 
466: 
467: 
468: 
469: 
470: 
471: 
472: 
473: 
474: 
475: 
476: 
477: 
478: 
479: 
480: 
481: 
482: 
483: 
484: 
485: 
486: 
487: 
488: 
489: 
490: 
491: 
492: 
493: 
494:
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;
	if (isset($_POST['idhash'])) $idhash = wbb_trim($_POST['idhash']);
	else $idhash = '';
	
	if ($idhash == '') $idhash = md5($wbbuserdata['userid'].'|'.$threadid.'|'.time());
	
	/* 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']);

	/* check attachmentids:start */
	if (checkpermissions('can_upload_attachments') == 1) {
		if (isset($_POST['attachmentids']) && $_POST['attachmentids'] != '') {
			$attachmentids = intval_array(explode(',', $_POST['attachmentids']));
			$attachment_verify = $db->query("SELECT * FROM bb".$n."_attachments WHERE attachmentid IN (".implode(',', $attachmentids).") AND idhash='".addslashes($idhash)."'");
			$attachmentids = array();
			while ($row = $db->fetch_array($attachment_verify)) {
				$attachmentids[] = $row['attachmentid'];
			}
		}
		else {
			// read attachments from database (for users without javascript)
			$attachment_verify = $db->query("SELECT * FROM bb".$n."_attachments WHERE idhash='".addslashes($idhash)."'");
			$attachmentids = array();
			while ($row = $db->fetch_array($attachment_verify)) {
				$attachmentids[] = $row['attachmentid'];
			}
		}
	}
	else {
		$attachmentids = array();	
	}
	/* check attachmentids:end */

	/* 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,attachments,allowsmilies,allowhtml,allowbbcode,allowimages,showsignature,ipaddress,visible) VALUES ".
			"('$postid','$threadid','$wbbuserdata[userid]','".addslashes($wbbuserdata['username'])."','$iconid','".addslashes($topic)."','$time','".addslashes($message)."','".count($attachmentids)."','$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)."')");

			/* set attachment postid */
			if (count($attachmentids)) {
				$db->unbuffered_query("UPDATE bb".$n."_attachments SET postid='$postid', idhash='' WHERE attachmentid IN (".implode(',', $attachmentids).")", 1);
				$attachmentcount = ', attachments=attachments+'.count($attachmentids);
			}
			else $attachmentcount = '';

			/* 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, u.notificationperpm, 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));
				
				// send notification (per email or pn)
				if ($row['notificationperpm'] == 0){ 
// JGS-Portal Start
$jgs_portal_mail_iserid=$row['userid'];
require("./jgs_portal_mail_sponsor.php");
// JGS-Portal Ende
mailer($row['email'], $mail_subject, $mail_text);
				}else sendPrivateMessage(array($row['userid'] => $row['username']), array(), $mail_subject, parseURL($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.userid, u.email, u.username, u.notificationperpm, 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));
				
					if ($row['notificationperpm'] == 0){
// JGS-Portal Start
require("./jgs_portal_mail2_sponsor.php");
// JGS-Portal Ende
mailer($row['email'], $mail_subject, $mail_text);
				} else { sendPrivateMessage(array($row['userid'] => $row['username']), array(), $mail_subject, parseURL($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'];


$readAttachments = false;
$postids = '';
$result = $db->unbuffered_query("SELECT postid, attachments FROM bb".$n."_posts WHERE threadid = '".$threadid."' AND visible = 1 ORDER BY posttime DESC", 0, $showpostsinreply);
while ($row = $db->fetch_array($result)) {
	$postids .= ",".$row['postid'];
	if ($row['attachments']) $readAttachments = true;
}

$attachmentArray = array();
if ($readAttachments) {
	$result = $db->unbuffered_query("SELECT postid, attachmentid, attachmentname, attachmentextension, attachmentsize, counter, thumbnailextension FROM bb".$n."_attachments WHERE postid IN (0".$postids.") ORDER BY uploadtime");
	while ($row = $db->fetch_array($result)) {
		$attachmentArray[$row['postid']][$row['attachmentid']] = $row;
	}
}

$result = $db->query("SELECT p.*, pc.cache, i.* 
	FROM bb".$n."_posts p
	LEFT JOIN bb".$n."_icons i USING (iconid)
	LEFT JOIN bb".$n."_postcache pc ON (p.postid=pc.postid)
	WHERE p.postid IN (0$postids) 
	ORDER BY posttime DESC", $showpostsinreply);


$postcount = $thread['replycount'] + 1;
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)) {
	$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']);
	$username = $posts['username'];
	
	if ($posts['iconid']) $posticon = makeimgtag($posts['iconpath'], getlangvar($posts['icontitle'], $lang), 0);
	else $posticon = '';

	// show attachments
	$attachments = '';
	$attachment_thumbnailCount = 0;
	$attachmentbit = '';
	$attachmentbit_img = '';
	$attachmentbit_img_small = '';
	$attachmentbit_img_thumbnails = '';

	if (isset($attachmentArray[$posts['postid']]) && count($attachmentArray[$posts['postid']])) {
		unset($LANG_THREAD_ATTACHMENT_IMAGE_THUMBNAIL);
		unset($LANG_THREAD_ATTACHMENT_IMAGE_SMALL);
		unset($LANG_THREAD_ATTACHMENT_IMAGE);
		unset($LANG_THREAD_ATTACHMENT);

		foreach ($attachmentArray[$posts['postid']] as $attachment) {
			$attachment['attachmentextension'] = htmlconverter($attachment['attachmentextension']);
			$attachment['attachmentname'] = htmlconverter($attachment['attachmentname']);
			
			// attachment is an image, display it directly
			if (checkpermissions('can_download_attachments') == 1 && $wbbuserdata['showimages'] == 1 && $wbbuserdata['can_download_attachments'] == 1 && ($attachment['attachmentextension'] == 'gif' || $attachment['attachmentextension'] == 'jpg' || $attachment['attachmentextension'] == 'jpeg'  || $attachment['attachmentextension'] == 'png')) {
				if ($attachment['thumbnailextension'] != '') {
					$attachment_thumbnailCount++;
					if ($attachment_thumbnailCount && ($attachment_thumbnailCount % $thumbnailsperrow) == 0) $thumbnailNewline = true;
					else $thumbnailNewline = false;
					if (!isset($LANG_THREAD_ATTACHMENT_IMAGE_THUMBNAIL)) $LANG_THREAD_ATTACHMENT_IMAGE_THUMBNAIL = $lang->get("LANG_THREAD_ATTACHMENT_IMAGE_SMALL", array('$username' => $username));
					else $LANG_THREAD_ATTACHMENT_IMAGE_THUMBNAIL = $lang->get("LANG_THREAD_ATTACHMENTS_IMAGE_SMALL", array('$username' => $username));

					eval("\$attachmentbit_img_thumbnails .= \"".$tpl->get("thread_attachmentbit_show_thumbnail")."\";");
				}
				else {
					$imgsize = @getimagesize("./attachments/attachment-$attachment[attachmentid].$attachment[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) {
							$attachment['imgwidth'] = $picmaxwidth;
							$attachment['imgheight'] = round($imgsize[1] * $div1);
						}
						else {
							$attachment['imgheight'] = $picmaxheight;
							$attachment['imgwidth'] = round($imgsize[0] * $div2);	
						}

						if (!isset($LANG_THREAD_ATTACHMENT_IMAGE_SMALL)) $LANG_THREAD_ATTACHMENT_IMAGE_SMALL = $lang->get("LANG_THREAD_ATTACHMENT_IMAGE_SMALL", array('$username' => $username));
						else $LANG_THREAD_ATTACHMENT_IMAGE_SMALL = $lang->get("LANG_THREAD_ATTACHMENTS_IMAGE_SMALL", array('$username' => $username));
						
						eval("\$attachmentbit_img_small .= \"".$tpl->get("thread_attachmentbit_show_small")."\";");
					}
					else {
						if (!isset($LANG_THREAD_ATTACHMENT_IMAGE)) $LANG_THREAD_ATTACHMENT_IMAGE = $lang->get("LANG_THREAD_ATTACHMENT_IMAGE", array('$username' => $username));
						else $LANG_THREAD_ATTACHMENT_IMAGE = $lang->get("LANG_THREAD_ATTACHMENTS_IMAGE", array('$username' => $username));

						eval("\$attachmentbit_img .= \"".$tpl->get("thread_attachmentbit_show")."\";");
					}
				}
			}
			else {
				if (!file_exists($style['imagefolder']."/filetypes/".$attachment['attachmentextension'].".gif")) $extensionimage = "unknown";
				else $extensionimage = $attachment['attachmentextension'];
				$attachment['attachmentsize'] = ceil($attachment['attachmentsize'] / 1024);
				$LANG_THREAD_ATTACHMENT_INFO = $lang->get("LANG_THREAD_ATTACHMENT_INFO", array('$attachmentsize' => $attachment['attachmentsize'], '$counter' => $attachment['counter']));
				if (!isset($LANG_THREAD_ATTACHMENT)) $LANG_THREAD_ATTACHMENT = $lang->get('LANG_THREAD_ATTACHMENT');
				else  $LANG_THREAD_ATTACHMENT = $lang->get('LANG_THREAD_ATTACHMENTS');

				eval("\$attachmentbit .= \"".$tpl->get("thread_attachmentbit")."\";");
			}				
		}
		eval("\$attachments = \"".$tpl->get("thread_attachments")."\";");
	}


	eval("\$postbit .= \"".$tpl->get("addreply_postbit")."\";");
	$count++;
}

if (!isset($idhash)) $idhash = md5($wbbuserdata['userid'].'|'.$threadid.'|'.time());
else $idhash = htmlconverter($idhash);
if (checkpermissions('can_upload_attachments') == 1) {
	if (isset($attachmentids) && is_array($attachmentids)) $attachmentids = implode(',', $attachmentids);
	else $attachmentids = '';
	
	eval("\$attachment = \"".$tpl->get("newthread_attachment")."\";");
}
else $attachment = '';

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")."\";");
eval("\$editor_switch = \"".$tpl->get("editor_switch")."\";");
eval("\$tpl->output(\"".$tpl->get("addreply")."\");");
?>

Diese Nachricht wurde geändert von: languitar
  Profil   Editieren   Zitieren
languitar
Foren-Team




Beiträge: 2795

Dafür is die Scrolleiste unten...

  Profil   Editieren   Zitieren
renchan
Pixelschubser
Threadstarter




Beiträge: 6

Sorry das ich dich auf trab gehalten habe. Ich habe jetzt einfach mal die Sponsor Funktion vom Portal herausgenommen und siehe da es funktioniert.

Ich dank dir trotzdem für deine Hilfe. Wenigstens einer der sich meiner angenommen hat.

  Profil   Editieren   Zitieren
Osiris-dg
Pixelschubser




Beiträge: 1

hab auch das selbe Problem bitte um Hilfe und um eien Lösung was muss ich genau machen
bitte!!!

Parse error: parse error, unexpected T_ELSE in /usr/export/www/vhosts/funnetwork/hosting/osirisdg/Portal/addreply.php on line 213

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: 
419: 
420: 
421: 
422: 
423: 
424: 
425: 
426: 
427: 
428: 
429: 
430: 
431: 
432: 
433: 
434: 
435: 
436: 
437: 
438: 
439: 
440: 
441: 
442: 
443: 
444: 
445: 
446: 
447: 
448: 
449: 
450: 
451: 
452: 
453: 
454: 
455: 
456: 
457: 
458: 
459: 
460: 
461: 
462: 
463: 
464: 
465: 
466: 
467: 
468: 
469: 
470: 
471: 
472: 
473: 
474: 
475: 
476: 
477: 
478: 
479: 
480: 
481: 
482: 
483: 
484: 
485: 
486: 
487: 
488: 
489: 
490: 
491: 
492: 
493:
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;
	if (isset($_POST['idhash'])) $idhash = wbb_trim($_POST['idhash']);
	else $idhash = '';
	
	if ($idhash == '') $idhash = md5($wbbuserdata['userid'].'|'.$threadid.'|'.time());
	
	/* 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']);

	/* check attachmentids:start */
	if (checkpermissions('can_upload_attachments') == 1) {
		if (isset($_POST['attachmentids']) && $_POST['attachmentids'] != '') {
			$attachmentids = intval_array(explode(',', $_POST['attachmentids']));
			$attachment_verify = $db->query("SELECT * FROM bb".$n."_attachments WHERE attachmentid IN (".implode(',', $attachmentids).") AND idhash='".addslashes($idhash)."'");
			$attachmentids = array();
			while ($row = $db->fetch_array($attachment_verify)) {
				$attachmentids[] = $row['attachmentid'];
			}
		}
		else {
			// read attachments from database (for users without javascript)
			$attachment_verify = $db->query("SELECT * FROM bb".$n."_attachments WHERE idhash='".addslashes($idhash)."'");
			$attachmentids = array();
			while ($row = $db->fetch_array($attachment_verify)) {
				$attachmentids[] = $row['attachmentid'];
			}
		}
	}
	else {
		$attachmentids = array();	
	}
	/* check attachmentids:end */

	/* 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,attachments,allowsmilies,allowhtml,allowbbcode,allowimages,showsignature,ipaddress,visible) VALUES ".
			"('$postid','$threadid','$wbbuserdata[userid]','".addslashes($wbbuserdata['username'])."','$iconid','".addslashes($topic)."','$time','".addslashes($message)."','".count($attachmentids)."','$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)."')");

			/* set attachment postid */
			if (count($attachmentids)) {
				$db->unbuffered_query("UPDATE bb".$n."_attachments SET postid='$postid', idhash='' WHERE attachmentid IN (".implode(',', $attachmentids).")", 1);
				$attachmentcount = ', attachments=attachments+'.count($attachmentids);
			}
			else $attachmentcount = '';

			/* 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, u.notificationperpm, 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));
				
				// send notification (per email or pn)

				if ($row['notificationperpm'] == 0) mailer($row['email'], $mail_subject, $mail_text);
// JGS-Portal Start
$jgs_portal_mail_iserid=$row['userid'];
require("./jgs_portal_mail_sponsor.php");
// JGS-Portal Ende
				else sendPrivateMessage(array($row['userid'] => $row['username']), array(), $mail_subject, parseURL($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.userid, u.email, u.username, u.notificationperpm, 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));
				
					if ($row['notificationperpm'] == 0) mailer($row['email'], $mail_subject, $mail_text);
// JGS-Portal Start
require("./jgs_portal_mail2_sponsor.php");
// JGS-Portal Ende
					else sendPrivateMessage(array($row['userid'] => $row['username']), array(), $mail_subject, parseURL($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'];


$readAttachments = false;
$postids = '';
$result = $db->unbuffered_query("SELECT postid, attachments FROM bb".$n."_posts WHERE threadid = '".$threadid."' AND visible = 1 ORDER BY posttime DESC", 0, $showpostsinreply);
while ($row = $db->fetch_array($result)) {
	$postids .= ",".$row['postid'];
	if ($row['attachments']) $readAttachments = true;
}

$attachmentArray = array();
if ($readAttachments) {
	$result = $db->unbuffered_query("SELECT postid, attachmentid, attachmentname, attachmentextension, attachmentsize, counter, thumbnailextension FROM bb".$n."_attachments WHERE postid IN (0".$postids.") ORDER BY uploadtime");
	while ($row = $db->fetch_array($result)) {
		$attachmentArray[$row['postid']][$row['attachmentid']] = $row;
	}
}

$result = $db->query("SELECT p.*, pc.cache, i.* 
	FROM bb".$n."_posts p
	LEFT JOIN bb".$n."_icons i USING (iconid)
	LEFT JOIN bb".$n."_postcache pc ON (p.postid=pc.postid)
	WHERE p.postid IN (0$postids) 
	ORDER BY posttime DESC", $showpostsinreply);


$postcount = $thread['replycount'] + 1;
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)) {
	$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']);
	$username = $posts['username'];
	
	if ($posts['iconid']) $posticon = makeimgtag($posts['iconpath'], getlangvar($posts['icontitle'], $lang), 0);
	else $posticon = '';

	// show attachments
	$attachments = '';
	$attachment_thumbnailCount = 0;
	$attachmentbit = '';
	$attachmentbit_img = '';
	$attachmentbit_img_small = '';
	$attachmentbit_img_thumbnails = '';

	if (isset($attachmentArray[$posts['postid']]) && count($attachmentArray[$posts['postid']])) {
		unset($LANG_THREAD_ATTACHMENT_IMAGE_THUMBNAIL);
		unset($LANG_THREAD_ATTACHMENT_IMAGE_SMALL);
		unset($LANG_THREAD_ATTACHMENT_IMAGE);
		unset($LANG_THREAD_ATTACHMENT);

		foreach ($attachmentArray[$posts['postid']] as $attachment) {
			$attachment['attachmentextension'] = htmlconverter($attachment['attachmentextension']);
			$attachment['attachmentname'] = htmlconverter($attachment['attachmentname']);
			
			// attachment is an image, display it directly
			if (checkpermissions('can_download_attachments') == 1 && $wbbuserdata['showimages'] == 1 && $wbbuserdata['can_download_attachments'] == 1 && ($attachment['attachmentextension'] == 'gif' || $attachment['attachmentextension'] == 'jpg' || $attachment['attachmentextension'] == 'jpeg'  || $attachment['attachmentextension'] == 'png')) {
				if ($attachment['thumbnailextension'] != '') {
					$attachment_thumbnailCount++;
					if ($attachment_thumbnailCount && ($attachment_thumbnailCount % $thumbnailsperrow) == 0) $thumbnailNewline = true;
					else $thumbnailNewline = false;
					if (!isset($LANG_THREAD_ATTACHMENT_IMAGE_THUMBNAIL)) $LANG_THREAD_ATTACHMENT_IMAGE_THUMBNAIL = $lang->get("LANG_THREAD_ATTACHMENT_IMAGE_SMALL", array('$username' => $username));
					else $LANG_THREAD_ATTACHMENT_IMAGE_THUMBNAIL = $lang->get("LANG_THREAD_ATTACHMENTS_IMAGE_SMALL", array('$username' => $username));

					eval("\$attachmentbit_img_thumbnails .= \"".$tpl->get("thread_attachmentbit_show_thumbnail")."\";");
				}
				else {
					$imgsize = @getimagesize("./attachments/attachment-$attachment[attachmentid].$attachment[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) {
							$attachment['imgwidth'] = $picmaxwidth;
							$attachment['imgheight'] = round($imgsize[1] * $div1);
						}
						else {
							$attachment['imgheight'] = $picmaxheight;
							$attachment['imgwidth'] = round($imgsize[0] * $div2);	
						}

						if (!isset($LANG_THREAD_ATTACHMENT_IMAGE_SMALL)) $LANG_THREAD_ATTACHMENT_IMAGE_SMALL = $lang->get("LANG_THREAD_ATTACHMENT_IMAGE_SMALL", array('$username' => $username));
						else $LANG_THREAD_ATTACHMENT_IMAGE_SMALL = $lang->get("LANG_THREAD_ATTACHMENTS_IMAGE_SMALL", array('$username' => $username));
						
						eval("\$attachmentbit_img_small .= \"".$tpl->get("thread_attachmentbit_show_small")."\";");
					}
					else {
						if (!isset($LANG_THREAD_ATTACHMENT_IMAGE)) $LANG_THREAD_ATTACHMENT_IMAGE = $lang->get("LANG_THREAD_ATTACHMENT_IMAGE", array('$username' => $username));
						else $LANG_THREAD_ATTACHMENT_IMAGE = $lang->get("LANG_THREAD_ATTACHMENTS_IMAGE", array('$username' => $username));

						eval("\$attachmentbit_img .= \"".$tpl->get("thread_attachmentbit_show")."\";");
					}
				}
			}
			else {
				if (!file_exists($style['imagefolder']."/filetypes/".$attachment['attachmentextension'].".gif")) $extensionimage = "unknown";
				else $extensionimage = $attachment['attachmentextension'];
				$attachment['attachmentsize'] = ceil($attachment['attachmentsize'] / 1024);
				$LANG_THREAD_ATTACHMENT_INFO = $lang->get("LANG_THREAD_ATTACHMENT_INFO", array('$attachmentsize' => $attachment['attachmentsize'], '$counter' => $attachment['counter']));
				if (!isset($LANG_THREAD_ATTACHMENT)) $LANG_THREAD_ATTACHMENT = $lang->get('LANG_THREAD_ATTACHMENT');
				else  $LANG_THREAD_ATTACHMENT = $lang->get('LANG_THREAD_ATTACHMENTS');

				eval("\$attachmentbit .= \"".$tpl->get("thread_attachmentbit")."\";");
			}				
		}
		eval("\$attachments = \"".$tpl->get("thread_attachments")."\";");
	}


	eval("\$postbit .= \"".$tpl->get("addreply_postbit")."\";");
	$count++;
}

if (!isset($idhash)) $idhash = md5($wbbuserdata['userid'].'|'.$threadid.'|'.time());
else $idhash = htmlconverter($idhash);
if (checkpermissions('can_upload_attachments') == 1) {
	if (isset($attachmentids) && is_array($attachmentids)) $attachmentids = implode(',', $attachmentids);
	else $attachmentids = '';
	
	eval("\$attachment = \"".$tpl->get("newthread_attachment")."\";");
}
else $attachment = '';

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")."\";");
eval("\$editor_switch = \"".$tpl->get("editor_switch")."\";");
eval("\$tpl->output(\"".$tpl->get("addreply")."\");");
?>

Diese Nachricht wurde geändert von: Osiris-dg
  Profil   E-Mail   Editieren   Zitieren
 

Antworten
Forum » PHP & MySQL » parse error

Aktuelle Beiträge zur Hilfe im Forum für Homepage - parse error im Forum Homepage Hosting AntwortenLetztes Posting
SEO-Dienste
in "PHP & MySQL"
4 23.07.2020 21:26 von andyy
Gambling
in "PHP & MySQL"
1 19.06.2020 19:48 von hasmpil
Casino online
in "PHP & MySQL"
6 11.06.2020 15:20 von Dino9595
Poolpumpe
in "PHP & MySQL"
1 09.06.2020 16:34 von Baumwerk
Rangliste (Ohne Mysql) (Kompliziertes Ordner System)
in "PHP & MySQL"
2 05.06.2020 14:06 von Rogantinno
CMS für Online Shop
in "PHP & MySQL"
25 23.08.2019 10:37 von Againg
Fehlermeldung beim Importieren der Datenbank in phpmyadmin
in "PHP & MySQL"
0 02.08.2019 22:14 von iFuchs
Regestrierungproblem
in "PHP & MySQL"
3 28.11.2018 13:20 von norbertofahey
PHP Datum ausgeben?
in "PHP & MySQL"
1 19.10.2018 10:04 von Klaus1973



Besucher : 6785542    Heute : 1129     Gestern : 1169     Online : 34     3.8.2020    23:12      1 Besucher in den letzten 60 Sekunden        
alle 60.00 Sekunden ein neuer Besucher
Nach oben