leider habe ich folgendes Problem festgestellt: Unter der Anzeige der Topics kann man mehrere Themen bearbeiten und administrieren (verschieben, löschen, etc)
Leider habe ich nun folgende Probleme:
Bei manchen Bereichen werden die Themen nicht angezeigt, obwohl welche im Forum enthalten sind (sprich: nicht bearbeitbar, das Löschen einzelner Themen wird dauerhaft zur Qual). Dann habe ich folgendes Problem bei der Bearbeitung der ForenID 8:
Zitat
Klar, denn die Administationsverlinkung bezieht sich auf die ForenID 18!
Scheinbar werden die IDs durcheinander gebracht, hoffe auf Hilfe!
Anlagen:
Codes
edit_topic.php
<?php # Copyright by: Manuel # Support: www.ilch.de defined ('main') or die ( 'no direct access' ); if ( $forum_rights['mods'] == FALSE ) { $forum_failure[] = 'Keine Berechtigung dieses Forum zu moderieren'; } check_forum_failure($forum_failure); $title = $allgAr['title'].' :: Forum :: '.aktForumCats($aktForumRow['kat'],'title').' :: '.$aktForumRow['name'].' :: '.$aktTopicRow['name'].' :: Thema ändern'; $hmenu = $extented_forum_menu.'<a class="smalfont" href="index.php?forum">Forum</a><b> » </b>'.aktForumCats($aktForumRow['kat']).'<b> » </b><a class="smalfont" href="index.php?forum-showtopics-'.$fid.'">'.$aktForumRow['name'].'</a><b> » </b>'; $hmenu .= '<a class="smalfont" href="index.php?forum-showposts-'.$tid.'">'.$aktTopicRow['name'].'</a> <b> » </b>Thema ändern'.$extented_forum_menu_sufix; $design = new design ( $title , $hmenu, 1); $design->header(); $uum = $menu->get(3); $tid = escape($menu->get(2), 'integer'); switch($uum) { case 1 : # change topic title db_query("UPDATE `prefix_topics` SET name = '".escape($_REQUEST['newTopic'], 'string')."' WHERE id = '".$tid."'"); wd ( array ( 'zurück zum Thema' => 'index.php?forum-showposts-'.$tid, 'zur Themen Übersicht' => 'index.php?forum-showtopics-'.$fid ) , 'Das Themas wurde umbennant' , 3 ); break; case 2 : # delete topic if (empty($_POST['sub'])) { echo '<form action="index.php?forum-edittopic-'.$tid.'-2" method="POST">'; echo 'Begründung an den Ersteller (freiwillig)<br /><textarea cols="50" rows="2" name="reason"></textarea>'; echo '<br /><br ><input type="submit" value="'.$lang['delete'].'" name="sub">'; echo '</form>'; } else { # autor benachrichtigen if (!empty($_POST['reason'])) { $uid = db_result(db_query("SELECT erstid FROM prefix_posts WHERE tid = ".$tid." ORDER BY id ASC LIMIT 1"),0); $top = db_result(db_query("SELECT name FROM prefix_topics WHERE id = ".$tid),0); $page = $_SERVER["HTTP_HOST"].$_SERVER["SCRIPT_NAME"]; $txt = "Dein Thema \"".$top."\" wurde gelöscht Begründung:\n\n".escape($_POST['reason'], 'string'); sendpm($_SESSION['authid'], $uid, 'Theme gelöscht', escape($txt, 'textarea')); } $postsMinus = $aktTopicRow['rep'] + 1; db_query("DELETE FROM `prefix_topics` WHERE id = '".$tid."' LIMIT 1"); $erg = db_query("SELECT erstid FROM prefix_posts WHERE tid = ".$tid." AND erstid > 0"); while ($row = db_fetch_object($erg) ) { db_query("UPDATE prefix_user SET posts = posts - 1 WHERE id = ".$row->erstid); } db_query("DELETE FROM `prefix_posts` WHERE tid = '".$tid."'"); $pid = db_result(db_query("SELECT MAX(id) FROM prefix_posts WHERE fid = ".$fid),0); if ( empty($pid) ) { $pid = 0; } db_query("UPDATE `prefix_forums` SET last_post_id = ".$pid.", `posts` = `posts` - ".$postsMinus.", `topics` = `topics` - 1 WHERE id = ".$fid); wd ('index.php?forum-showtopics-'.$fid, 'Das Thema wurde gelöscht' , 2 ); } break; case 3 : # move topic in another forum if ( empty ( $_POST['sub'] ) OR $_POST['nfid'] == 'cat' ) { echo '<form action="index.php?forum-edittopic-'.$tid.'-3" method="POST">'; echo '<input type="hidden" name="afid" value="'.$fid.'">neues Forum auswählen<br />'; echo '<select name="nfid">'; function stufe($anz, $t = 'f') { $z = ($t == 'f'?' ':'»'); for ($i=0; $i<$anz; $i++) { $out .= $z; } return $out; } function forum_admin_selectcats ( $id, $stufe, $sel) { $q = "SELECT * FROM prefix_forumcats WHERE cid = ".$id." ORDER BY pos"; $erg = db_query($q); if ( db_num_rows($erg) > 0 ) { while ($row = db_fetch_object($erg) ) { echo '<option style="font-weight:bold;" value="cat">'.stufe($stufe,'c').' '.$row->name.'</option>'; forum_admin_selectcats($row->id, $stufe + 1, $sel); $sql = db_query("SELECT id, name FROM prefix_forums WHERE cid = $row->id"); while ($row2 = db_fetch_object($sql)) { if (!forum_user_is_mod($row2->id)) { continue; } echo '<option value="'.$row2->id.'"'.($sel == $row2->id?' selected="selected"':'').'>'.stufe($stufe+1).' '.$row2->name.'</option>'; } } } } forum_admin_selectcats(0,0,$fid); echo '</select><br /><input type="checkbox" name="alertautor" value="yes" /> Den Autor über das verschieben informieren?<br /><input type="submit" value="Verschieben" name="sub"></form>'; } else { $_POST['nfid'] = escape($_POST['nfid'], 'integer'); $_POST['afid'] = escape($_POST['afid'], 'integer'); $postsMinus = $aktTopicRow['rep'] + 1; db_query("UPDATE `prefix_topics` SET `fid` = ".$_POST['nfid']." WHERE id = ".$tid); db_query("UPDATE prefix_posts SET `fid` = ".$_POST['nfid']." WHERE tid = ".$tid); $apid = db_result(db_query("SELECT MAX(id) FROM prefix_posts WHERE fid = ".$_POST['afid']),0); $npid = db_result(db_query("SELECT MAX(id) FROM prefix_posts WHERE fid = ".$_POST['nfid']),0); if ( empty($apid) ) { $apid = 0; } db_query("UPDATE `prefix_forums` SET last_post_id = ".$apid.", `posts` = `posts` - ".$postsMinus.", `topics` = `topics` - 1 WHERE id = ".$_POST['afid']); db_query("UPDATE `prefix_forums` SET last_post_id = ".$npid.", `posts` = `posts` + ".$postsMinus.", `topics` = `topics` + 1 WHERE id = ".$_POST['nfid']); # autor benachrichtigen if (isset($_POST['alertautor']) AND $_POST['alertautor'] == 'yes') { $uid = db_result(db_query("SELECT erstid FROM prefix_posts WHERE tid = ".$tid." ORDER BY id ASC LIMIT 1"),0); $fal = db_result(db_query("SELECT name FROM prefix_forums WHERE id = ".$_POST['afid']),0); $fne = db_result(db_query("SELECT name FROM prefix_forums WHERE id = ".$_POST['nfid']),0); $top = db_result(db_query("SELECT name FROM prefix_topics WHERE id = ".$tid),0); $page = $_SERVER["HTTP_HOST"].$_SERVER["SCRIPT_NAME"]; $txt = 'Dein Thema "'.$top.'" wurde von dem Forum "'.$fal.'" in das neue Forum "'.$fne.'" verschoben... '; $txt .= "\n\n- [url=http://".$page."?forum-showposts-".$tid."]Link zum Thema[/url]"; $txt .= "\n- [url=http://".$page."?forum-showtopics-".$_POST['nfid']."]Link zum neuen Forum[/url]"; $txt .= "\n- [url=http://".$page."?forum-showtopics-".$_POST['afid']."]Link zum alten Forum[/url]"; sendpm($_SESSION['authid'], $uid, 'Thema verschoben', escape($txt, 'textarea')); } wd ( array ( 'neue Themen Übersicht' => 'index.php?forum-showtopics-'.$_POST['nfid'], 'alte Themen Übersicht' => 'index.php?forum-showtopics-'.$_POST['afid'], 'Zum Thema' => 'index.php?forum-showposts-'.$tid ) , 'Thema erfolgreich verschoben' , 3 ); } break; case 4 : # change topic status $aktion = ( $aktTopicRow['stat'] == 1 ? 0 : 1 ); db_query("UPDATE `prefix_topics` SET stat = '".$aktion."' WHERE id = '".$tid."'"); wd ( 'index.php?forum-showposts-'.$tid , 'geändert' , 0 ); break; case 5 : # change topic art $nart = ( $aktTopicRow['art'] == 0 ? 1 : 0 ); db_query("UPDATE `prefix_topics` SET art = '".$nart."' WHERE id = ".$tid ); wd ( array ( 'zurück zum Thema' => 'index.php?forum-showposts-'.$tid, 'zur Themen Übersicht' => 'index.php?forum-showtopics-'.$fid ) , 'Die Art des Themas wurde geändert' , 3 ); break; } $design->footer(); ?>
show_topic.php
<?php # Copyright by: Manuel # Support: www.ilch.de defined ('main') or die ( 'no direct access' ); # check ob ein fehler aufgetreten ist. check_forum_failure($forum_failure); $title = $allgAr['title'].' :: Forum :: '.aktForumCats($aktForumRow['kat'],'title').' :: '.$aktForumRow['name']; $hmenu = $extented_forum_menu.'<a href="index.php?forum" title="Forum">Forum</a><strong> → </strong>'.aktForumCats($aktForumRow['kat']).'<strong> → </strong>'.$aktForumRow['name'].$extented_forum_menu_sufix; $design = new design ( $title , $hmenu, 1); $design->header(); $limit = $allgAr['Ftanz']; // Limit $page = ( $menu->getA(3) == 'p' ? $menu->getE(3) : 1 ); $MPL = db_make_sites ($page , "WHERE fid = '$fid'" , $limit , '?forum-showtopics-'.$fid , 'topics' ); $anfang = ($page - 1) * $limit; $tpl = new tpl ( 'forum/showtopic' ); if ( $forum_rights['start'] == TRUE ) { $tpl->set('NEWTOPIC', '<div class="newtopic"> <a class="link" href="index.php?forum-newtopic-'.$fid.'">'.$lang['newtopic'].'</a></div>' ); } else { $tpl->set('NEWTOPIC',''); } $tpl->set('MPL', $MPL); $tpl->set_out('FID', $fid, 0); $q = "SELECT a.id, a.name, a.rep, a.erst, a.hit, a.art, a.stat, b.time, b.erst as last, b.id as pid FROM prefix_topics a LEFT JOIN prefix_posts b ON a.last_post_id = b.id WHERE a.fid = {$fid} ORDER BY a.art DESC, b.time DESC LIMIT ".$anfang.",".$limit; $erg = db_query($q); if ( db_num_rows($erg) > 0 ) { while($row = db_fetch_assoc($erg) ) { if ($row['stat'] == 0) { $row['ORD'] = 'cord'; } else { #$row['ORD'] = get_ordner($row['time']); $row['ORD'] = forum_get_ordner($row['time'],$row['id'],$fid); } $row['date'] = date('d.m.y - H:i',$row['time']); $row['page'] = ceil ( ($row['rep']+1) / $allgAr['Fpanz'] ); $row['VORT'] = ( $row['art'] == 1 ? '<strong>Wichtig:</strong> ' : '' ); $row['IMPL'] = db_make_sites(0, '', $allgAr['Fpanz'], '?forum-showposts-'.$row['id'], '', $row['rep'] + 1); $tpl->set_ar_out($row,1); } } else { echo '<div class="noentry">keine Einträge vorhanden</div>'; } $tpl->out(2); if ( $forum_rights['mods'] == TRUE ) { $tpl->set('id', $fid); $tpl->out(3); } $design->footer(); ?>
betroffene Homepage: externer Link
Zuletzt modifiziert von sun am 04.06.2010 - 10:27:26