ist gerade angekommen
Ich poste hier mal meine forum/newpost.php
Hier klicken für weitere Informationen
Ich sehe hier kein Fehler. Seht ihr irgendetwas was auffällig ist?
EDIT
Ich habe gestern Abend die forum/newpost.php nochmal mit allen installierten Addons verglichen und es wurd alles wie in den readmes beschrieben bearbeitet.
EDIT
Ich habe die forum/newpost.php vom Archiv phpkit 1.6.1 von phpkit.com genommen und hochgeladen und es funktoniert immer noch nicht.
Mir fällt auf wenn ich versuche ein neues Thema zu erstellen erscheint folgender Link:
http://www.meine-domain.com/include.php?…main.php#post93
Die Homepage leitet das Thema nach forum/main.php. Es soll aber nach forum/showthread.php weiter geleitet werden. Kann mir bitte jemand helfen? Langsam bin ich schon am verzweifeln.
|
|
PHP-Quelltext |
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 |
<?php
include("forum/kopf.php");
unset($cat_option);
if ($config['forum_doublepost']!=1 && $threadid>0 && $USER['id']>0) $doublepostinfo=$DB->fetch_array($DB->query("SELECT forumpost_id, forumpost_autorid FROM ".$db_tab['forumpost']." WHERE forumpost_threadid='".$threadid."' ORDER by forumpost_time DESC LIMIT 1"));
if ($threadid==0 && $catid==0) {
if (is_array($forumcat_cache)) {
foreach ($forumcat_cache_byname as $selectcat) {
if ((userrights($selectcat['forumcat_mods'])=="true" || userrights($selectcat['forumcat_user'])=="true" || getrights($selectcat['forumcat_trights'])=="true") && $selectcat['forumcat_status']==1 && $selectcat['forumcat_threads_option']==1) $cat_option.='<option value="'.$selectcat['forumcat_id'].'">'.$selectcat['forumcat_name'].'</option>';
}
if ($cat_option) eval ("\$cat_option= \"".getTemplate("forum/newpost_cat_option")."\";");
}
}
if ($catid>0 && ($forumcat['forumcat_threads_option']!=1 || $forumcat['forumcat_status']!=1)) {$event=37; include("admin/config/event.php");}
elseif (($catid==0 || !$catid) && ($threadid==0 || !$threadid) && !$cat_option) {$event=1; include("admin/config/event.php");}
elseif ($threadid!=0 && $config['forum_doublepost']!=1 && $user_id==$doublepostinfo[forumpost_autorid] && $user_id!=0) {$event=38; include("admin/config/event.php");}
elseif ($threadid!=0 && ($forumthread['forumthread_status']==0 or $forumthread[forumthread_status]==3)) {$event=36; include("admin/config/event.php");}
elseif (($catid!=0 && (userrights($forumcat['forumcat_mods'])=="true" || userrights($forumcat['forumcat_user'])=="true" || getrights($forumcat['forumcat_trights'])=="true")) || ($catid==0 && $threadid==0 && $cat_option!='') || ($threadid!=0 && (getrights($forumcat[forumcat_wrights])=="true" || userrights($forumcat['forumcat_mods'])=="true" || userrights($forumcat['forumcat_user'])=="true"))) {
if (isset($_POST['action'])) $ACTION=$_POST['action'];
else $ACTION='view';
if ($ACTION==$_POST['save'] || $ACTION==$_POST['preview']) {
if (trim($_POST['content'])!='') $post_text=$_POST['content'];
else unset($ACTION);
if (!$_POST['threadid'] && trim($_POST['post_title'])!='') $post_title=$_POST['post_title'];
elseif (!$_POST['threadid']) unset($ACTION);
if ($USER['id']>0) $post_autor=replacehtmlentities($USER['nick']);
elseif ($USER['id']==0 && trim($_POST['post_autor'])!='' && checkusername($_POST['post_autor'],1)) $post_autor=$_POST['post_autor'];
elseif ($USER['id']==0) {
$post_autor=$_POST['post_autor'];
unset($ACTION);
}
# KNS V2 | Idee: Onkel Hotte | Umsetzung: Headless (kitnetwork.de)
if(!$CAPTCHA->validCode($_POST['inputchars']) && $ACTION!=$_POST['preview'] && !getrights('user')) unset($ACTION);
# EOS
}
if ($ACTION==$_POST['save'] && (isset($_POST['threadid']) || isset($_POST['catid']))) {
$check_time=time()-1800;
$DB->query("UPDATE ".$db_tab['forumpost']." SET forumpost_uid='' WHERE forumpost_time<'".$check_time."'");
$postuid=$DB->fetch_array($DB->query("SELECT COUNT(*) FROM ".$db_tab['forumpost']." WHERE forumpost_uid='".$_POST['post_uid']."' AND forumpost_time>'".$check_time."' LIMIT 1"));
if ($postuid[0]==0) {
unset($update_threadcount);
if ($threadid>0) $DB->query("UPDATE ".$db_tab['forumthread']." SET forumthread_replycount=forumthread_replycount+1, forumthread_lastreply_autor='".$_POST['post_autor']."',forumthread_lastreply_time='".time()."',forumthread_lastreply_autorid='".$USER['id']."' WHERE forumthread_id='".$threadid."'");
else {
$DB->query("INSERT INTO ".$db_tab['forumthread']." (forumthread_autor,forumthread_autorid,forumthread_catid,forumthread_icon,forumthread_title,forumthread_lastreply_time,forumthread_lastreply_autor,forumthread_lastreply_autorid,forumthread_votetitle) VALUES ('".$_POST['post_autor']."','".$USER['id']."','".$catid."','".$_POST['post_icon']."','".addslashes($_POST['post_title'])."','".time()."','".$_POST['post_autor']."','".$USER['id']."','".$post_vote_title."')");
$threadid=$DB->insert_id();
$update_threadcount=", forumcat_threadcount=forumcat_threadcount+1";
}
/*
if (is_array($vote_option)) {
if (is_array($vote_option) && $post_vote_title=="") $post_vote_title=$post_title;
foreach ($vote_option as $vote_option_single) {
if ($vote_option_single!="") {mysql_query("INSERT INTO $tab_forumvote (forumvote_threadid,forumvote_answer) VALUES ('$threadid','$vote_option_single')",$servercon);}
}
}
}
*/
$sqlcommand="forumcat_id='".$catid."'";
$id=$forumcat_cache[$catid]['forumcat_subcat'];
if ($id>0) {
while($id>0) {
$sqlcommand.=" OR forumcat_id='".$id."'";
$id=$forumcat_cache[$id]['forumcat_subcat'];
}
}
$DB->query("UPDATE ".$db_tab['forumcat']." SET forumcat_postcount=forumcat_postcount+1 ".$update_threadcount.",forumcat_lastreply_time='".time()."',forumcat_lastreply_threadid='".$threadid."',forumcat_lastreply_autor='".$_POST['post_autor']."',forumcat_lastreply_autorid='".$USER['id']."' WHERE ".$sqlcommand);
$DB->query("INSERT INTO ".$db_tab['forumpost']." (forumpost_threadid, forumpost_autor, forumpost_autorid, forumpost_icon, forumpost_title, forumpost_text, forumpost_time, forumpost_bbcode, forumpost_smilies, forumpost_uid, forumpost_ipaddr, forumpost_reply) VALUES ('".$threadid."','".$_POST['post_autor']."','".$USER['id']."','".$_POST['post_icon']."','".addslashes($_POST['post_title'])."','".addslashes($_POST['content'])."','".time()."','".$_POST['post_bbcode']."','".$_POST['post_smilies']."','".$_POST['post_uid']."','".$thisUSER['ipaddr']."','".$_POST['replyto']."')");
$postid=$DB->insert_id();
if ($USER['id']>0) {
$userposts=$DB->fetch_array($DB->query("SELECT COUNT(*) FROM ".$db_tab['forumpost']." WHERE forumpost_autorid='".$USER['id']."'"));
$DB->query("UPDATE ".$db_tab['user']." SET user_posts='".$userposts[0]."' WHERE user_id='".$USER['id']."'");
// *** Punktesystem Pro *** Start ***
$userinfo=$DB->fetch_array($DB->query("SELECT * FROM ".$db_tab['user']." WHERE user_id='".$USER['id']."'"));
if ($userinfo['psp_aktiv']==1) {
$psp_info = $DB->fetch_array($DB->query("SELECT * FROM ".$db_tab['psp_config'].""));
if ($psp_info['psp_aktiv']==1) {
if ($psp_info['psp_forum_aktiv']==1) {
$DB->query("UPDATE ".$db_tab['user']." SET psp_punkte=psp_punkte+'".$psp_info['psp_forum']."' WHERE user_id ='".$USER['id']."'");
}
}
}
// *** Punktesystem Pro *** Ende ***
}
}
if ($USER['id']>0) $exception=" AND forumnotify_userid!='".$USER['id']."'";
else unset($exception);
unset($mailhash);
unset($sqlcommand);
$getnotify=$DB->query("SELECT forumnotify_email, forumnotify_userid FROM ".$db_tab['forumnotify']." WHERE forumnotify_threadid='".$threadid."' ".$exception);
while ($notify=$DB->fetch_array($getnotify)) {
if ($notify['forumnotify_userid']>0) {
if ($sqlcommand) $sqlcommand.=" OR user_id='".$notify['forumnotify_userid']."'";
else $sqlcommand="SELECT user_email FROM ".$db_tab['user']." WHERE user_id='".$notify['forumnotify_userid']."'";
}
else $mailhash[$notify['forumnotify_email']]=$notify['forumnotify_email'];
}
if ($sqlcommand) {
$getmails=$DB->query($sqlcommand);
while ($userinfo=$DB->fetch_array($getmails)) {
$mailhash[$userinfo['user_email']]=$userinfo['user_email'];
}
}
$forumthread=$DB->fetch_array($DB->query("SELECT forumthread_title FROM ".$db_tab['forumthread']." WHERE forumthread_id='".$threadid."' LIMIT 1"));
$mail_title=$config['site_urls'].' - '.$lang['new_post'].': '.$forumthread['forumthread_title'];
eval ("\$mail_text= \"".getTemplate("forum/newpost_mail_notify")."\";");
notifymail('forum',$mail_title,$mail_text);
$im_title=$lang['new_post'].' '.$_POST['post_title'];
eval ("\$im_text= \"".getTemplate("forum/newpost_im_notify")."\";");
notifyim('forum',$im_title,$im_text);
if (is_array($mailhash)) {
$mail_title=$config['site_urls'].' - '.$lang['new_post'].': '.$forumthread['forumthread_title'];
eval ("\$mail_text= \"".getTemplate("forum/newpost_mail_text")."\";");
foreach ($mailhash as $email) {
mailsender($email,$mail_title,$mail_text);
}
}
if ($_POST['post_notify']==1 && $threadid>0) {
if ($USER['id']>0) $post_email=$USER['email'];
else $post_email=$_POST['post_email'];
if (emailcheck($post_email)) $DB->query("INSERT INTO ".$db_tab['forumnotify']." (forumnotify_userid,forumnotify_email,forumnotify_threadid) VALUES ('".$USER['id']."','".$post_email."','".$threadid."')");
}
header("location: include.php?path=forum/showthread.php&threadid=".$threadid."&postid=".$postid."&PHPKITSID=".session_id()."#post".$postid); exit();
}
else {
if ($ACTION==$_POST['preview']) {
$row='odd';
if ($_POST['post_icon']!='') {
$post_icon="icons/".$_POST['post_icon'];
eval ("\$post_icon= \"".getTemplate("forum/showthread_row_posticon")."\";");
}
$post_time=formattime();
$post_autor=htmlentities($post_autor);
$post_title=htmlentities(stripslashes($post_title));
$post_text=$PARSE->parse($_POST['content'],0,$_POST['post_bbcode'],$_POST['post_smilies'],$config['forum_images'],1);
eval ("\$preview_row= \"".getTemplate("forum/showthread_row")."\";");
eval ("\$site_body.= \"".getTemplate("forum/newpost_preview")."\";");
}
elseif ($ACTION!='view') {
unset($error_message);
if ($post_text=='') eval ("\$error_message.= \"".getTemplate("forum/newpost_error_text")."\";");
if (!$threadid && $post_title=="") eval ("\$error_message.= \"".getTemplate("forum/newpost_error_title")."\";");
if ($post_autor=='') eval ("\$error_message= \"".getTemplate("forum/newpost_error_autor")."\";");
# KNS V2 | Idee: Onkel Hotte | Umsetzung: Headless (kitnetwork.de)
if(!$CAPTCHA->validCode($_POST['inputchars']) && !getrights('user')) eval ("\$error_message.= \"".getTemplate("forum/newpost_error_captcha")."\";");
# EOS
elseif (!checkusername($_POST['post_autor'],1)) eval ("\$error_message= \"".getTemplate("forum/newpost_error_name")."\";");
if ($error_message) eval ("\$post_error= \"".getTemplate("forum/newpost_error")."\";");
}
if (intval($_REQUEST['quote'])>0) {
if ($forumpost=$DB->fetch_array($DB->query("SELECT forumpost_text, forumpost_title, forumpost_autor FROM ".$db_tab['forumpost']." WHERE forumpost_id='".$_REQUEST['quote']."' AND forumpost_threadid='".$threadid."' LIMIT 1"))) {
$replyto=$_REQUEST['replyto'];
$post_title='RE: '.htmlentities($forumpost['forumpost_title']);
$post_text='[quote][i]'.$lang['original_written_by'].' '.$forumpost['forumpost_autor']."[/i]\n\n".htmlentities(stripslashes($forumpost['forumpost_text'])).'[/quote]';
}
}
##### RE Antwort by burnerfm.de #####
## elseif (isset($_POST['replyto'])) $replyto=$_POST['replyto']; //Originalcode auskommentiert
if (intval($_REQUEST['threadid'])>0) {
if ($forumpost=$DB->fetch_array($DB->query("SELECT forumpost_title FROM ".$db_tab['forumpost']." WHERE forumpost_threadid='".$threadid."' LIMIT 1"))) {
$post_title='re: '.htmlentities(eregi_replace('^re: *','',$forumpost['forumpost_title']));
}
}
##### RE Antwort by burnerfm.de #####
if ($USER['id']>0) {
eval ("\$user_info= \"".getTemplate("forum/newpost_user")."\";");
}
else {
if ($post_autor=="") $post_autor=$USER['nick'];
eval ("\$user_info= \"".getTemplate("forum/newpost_guest")."\";");
eval ("\$option_notify= \"".getTemplate("forum/newpost_option_notify_form")."\";");
}
unset($sign_format);
if ($config['forum_ubb']==1) {
if ($_POST['post_bbcode']==1 || $ACTION=='view') $bbcode='checked';
eval ("\$sign_format= \"".getTemplate("format_text")."\";");
eval ("\$option_bbcode= \"".getTemplate("forum/newpost_option_bbcode")."\";");
}
if ($config['forum_smilies']==1) {
$smilies=new smilies();
$sign_format.=$smilies->getSmilies(1);
if ($_POST['post_smilies']==1 || $ACTION=='view') $smilies='checked';
eval ("\$option_smilies= \"".getTemplate("forum/newpost_option_smilies")."\";");
}
if ($sign_format) eval ("\$sign_format= \"".getTemplate("format_table")."\";");
if ($forumcat['forumcat_voteoption']==1 && !$threadid>0) {
if ($_POST['post_vote']==1) $vote='checked';
eval ("\$option_vote= \"".getTemplate("forum/newpost_option_vote")."\";");
}
// if ($forumcat['forumcat_attachments']==1) eval ("\$post_attachment= \"".getTemplate("forum/newpost_attachment")."\";");
eval ("\$theme_icon= \"".getTemplate("forum/newpost_noicon")."\";");
# KNS V2 | Idee: Onkel Hotte | Umsetzung: Headless (kitnetwork.de)
if (!getrights('user')) eval ("\$show_captcha= \"".getTemplate("forum/newpost_captcha")."\";");
# EOS
$dir='images/icons';
$width=2;
$a=opendir($dir);
while ($datei=readdir($a)) {
if (strstr($datei,".gif")) {
if ($width == 10) {$theme_icon.="</tr><tr>"; $width=1;}
if ($_POST['post_icon']==$datei) $iconoption=" checked";
eval ("\$theme_icon.= \"".getTemplate("forum/newpost_icons")."\";");
$width++;
unset($iconoption);
}
}
$cs=10-$width;
if ($cs>0) $theme_icon.='<td colspan="'.$cs.'"> </td>';
closedir($a);
if ($_POST['post_uid']=='') {srand((double) microtime()*1000000); $post_uid=md5(uniqid(rand()));}
else {
$post_uid=$_POST['post_uid'];
$post_title=htmlentities($_POST['post_title']);
$post_text=htmlentities($_POST['content']);
if ($_POST['post_notify']==1) {
$notify='checked';
}
}
/**************************************** Upload Anfang ****************************************/
if($config['upload_off']==1 AND getrights($config['upload_status'])) eval ("\$post_datei= \"".getTemplate("forum/newpost_datei")."\";");
/**************************************** Upload Ende ****************************************/
eval ("\$site_body.= \"".getTemplate("forum/newpost")."\";");
if ($config['forum_viewreply']>0 && $threadid>0) {
unset($reply_row);
$getreplys=$DB->query("SELECT * FROM ".$db_tab['forumpost']." WHERE forumpost_threadid='".$threadid."' ORDER by forumpost_time DESC LIMIT ".$config['forum_viewreply']);
while ($replypost=$DB->fetch_array($getreplys)) {
$row=rowcolor($row);
$replypost_text=$PARSE->parse($replypost['forumpost_text'],0,$replypost['forumpost_bbcode'],$replypost['forumpost_smilies'], $config['forum_images'],1);
$replypost_time=formattime($replypost['forumpost_time']);
eval ("\$reply_row.= \"".getTemplate("forum/newpost_viewreplys_row")."\";");
}
if ($reply_row) eval ("\$site_body.= \"".getTemplate("forum/newpost_viewreplys")."\";");
}
}
}
else {$event=1; include("admin/config/event.php");}
include("forum/fuss.php");
?>
|
Ich sehe hier kein Fehler. Seht ihr irgendetwas was auffällig ist?
EDIT
Ich habe gestern Abend die forum/newpost.php nochmal mit allen installierten Addons verglichen und es wurd alles wie in den readmes beschrieben bearbeitet.
EDIT
Ich habe die forum/newpost.php vom Archiv phpkit 1.6.1 von phpkit.com genommen und hochgeladen und es funktoniert immer noch nicht.
Mir fällt auf wenn ich versuche ein neues Thema zu erstellen erscheint folgender Link:
http://www.meine-domain.com/include.php?…main.php#post93
Die Homepage leitet das Thema nach forum/main.php. Es soll aber nach forum/showthread.php weiter geleitet werden. Kann mir bitte jemand helfen? Langsam bin ich schon am verzweifeln.
Markus
Dieser Beitrag wurde bereits 2 mal editiert, zuletzt von »phpkit_user« (2. April 2011, 13:12)
hört sich alles an, als wäre eine weitere SQL anbindung vorhanden..
das problem trat damals auch auf, als ich ein addon hatte was seine eigene DB anbindung hatte, diese natürlich nach deren abfragen geschlossen wurde und somit das phpkit die eigentliche threadid des erstellten thread, mittels $DB->insertid() (oder so) nicht mehr abfragen konnte.. der thread wurde erstellt, nen post wurde auch erstellt, aber bei dem erstellten post (der anfangspost) wurde als threadid eine 0 übergeben..
kontrollier mal alles dahingehend, ob du was verbaut hast was seine eigene SQL anbindung hat
das einbinden würde dann nicht in der newpost.php oder sonstigen dateien die für das frontend sind geschehen, sondern interner..
das problem trat damals auch auf, als ich ein addon hatte was seine eigene DB anbindung hatte, diese natürlich nach deren abfragen geschlossen wurde und somit das phpkit die eigentliche threadid des erstellten thread, mittels $DB->insertid() (oder so) nicht mehr abfragen konnte.. der thread wurde erstellt, nen post wurde auch erstellt, aber bei dem erstellten post (der anfangspost) wurde als threadid eine 0 übergeben..
kontrollier mal alles dahingehend, ob du was verbaut hast was seine eigene SQL anbindung hat
das einbinden würde dann nicht in der newpost.php oder sonstigen dateien die für das frontend sind geschehen, sondern interner..
|
Achtung: Dirk Kántor ist unterwegs! Er verteilt gerne Verwarnungen ohne vorher darüber diskutiert zu haben. |
Ähnliche Themen
-
alte Versionen [1.6.03|1.6.1|1.6.4] »-
PN - Systemnachricht - Problem
(24. September 2008, 19:25)
-
alte Versionen [1.6.03|1.6.1|1.6.4] »-
Problem mit Forum-Vote
(19. Juni 2008, 19:45)
-
alte Versionen [1.6.03|1.6.1|1.6.4] »-
Problem mit Forum Deaktivierung
(23. April 2008, 20:26)
-
alte Versionen [1.6.03|1.6.1|1.6.4] »-
Problem mit Hackblock v3.2 und Forum edit hack 2.0.
(13. Mai 2008, 19:57)
-
alte Versionen [1.6.03|1.6.1|1.6.4] »-
Bilder im Forum
(11. Februar 2008, 19:03)


