snyx
10-22-2002, 08:17 PM
when I try to quote someone on my site I get this error, and no quote on my reply page..
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/form-kao/public_html/board/newreply.php(47) : eval()'d code on line 1
here is the hunk of code from line 25-64
// check for valid thread or post //line25
if (isset($postid)) {
$postid=verifyid("post",$postid,0);
if ($postid!=0) {
$postinfo=getpostinfo($postid);
$threadid=$postinfo[threadid];
if ($postinfo[userid]==0) {
$originalposter=$postinfo[username];
} else {
$getusername=$DB_site->query_first("SELECT username FROM user WHERE userid='$postinfo[userid]'");
$originalposter=$getusername[username];
}
$originalposter = unhtmlspecialchars( $originalposter );
if ($postinfo[title]!="") {
$title="Re: ".unhtmlspecialchars($postinfo[title]);
}
$postdate=vbdate($dateformat,$postinfo[dateline]);
$posttime=vbdate($timeformat,$postinfo[dateline]);
$pagetext=$postinfo[pagetext];
$pagetext = trim(preg_replace("/(\[quote])(.*)(\[\/quote])/siU", "", $pagetext));
eval("\$message = \"".gettemplate("quotereply",1,0)."\";");
}
} //line49
$threadid=verifyid("thread",$threadid);
$threadinfo=getthreadinfo($threadid);
if (!$threadinfo[visible]) {
$idname="thread";
eval("standarderror(\"".gettemplate("error_invalidid")."\");");
}
if (!$threadinfo[open]) {
if (!ismoderator($threadinfo[forumid],"canopenclose")) {
eval("standardredirect(\"".gettemplate("redirect_threadclosed")."\",\"showthread.php?s=$session[sessionhash]&threadid=$threadid\");");
exit;
}
} //line64
thanks guys!
-myles
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/form-kao/public_html/board/newreply.php(47) : eval()'d code on line 1
here is the hunk of code from line 25-64
// check for valid thread or post //line25
if (isset($postid)) {
$postid=verifyid("post",$postid,0);
if ($postid!=0) {
$postinfo=getpostinfo($postid);
$threadid=$postinfo[threadid];
if ($postinfo[userid]==0) {
$originalposter=$postinfo[username];
} else {
$getusername=$DB_site->query_first("SELECT username FROM user WHERE userid='$postinfo[userid]'");
$originalposter=$getusername[username];
}
$originalposter = unhtmlspecialchars( $originalposter );
if ($postinfo[title]!="") {
$title="Re: ".unhtmlspecialchars($postinfo[title]);
}
$postdate=vbdate($dateformat,$postinfo[dateline]);
$posttime=vbdate($timeformat,$postinfo[dateline]);
$pagetext=$postinfo[pagetext];
$pagetext = trim(preg_replace("/(\[quote])(.*)(\[\/quote])/siU", "", $pagetext));
eval("\$message = \"".gettemplate("quotereply",1,0)."\";");
}
} //line49
$threadid=verifyid("thread",$threadid);
$threadinfo=getthreadinfo($threadid);
if (!$threadinfo[visible]) {
$idname="thread";
eval("standarderror(\"".gettemplate("error_invalidid")."\");");
}
if (!$threadinfo[open]) {
if (!ismoderator($threadinfo[forumid],"canopenclose")) {
eval("standardredirect(\"".gettemplate("redirect_threadclosed")."\",\"showthread.php?s=$session[sessionhash]&threadid=$threadid\");");
exit;
}
} //line64
thanks guys!
-myles