^^Sch....Srry
Letzte Nacht nicht Geschlafen D
die Abfragen von der Php auf die Db Welche? alle; Leider
<?php
# Copyright by: Manuel Staechele
# 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 class="smalfont" href="index.php?forum" style="color:#000000">Forum</a><b> » </b>'.aktForumCats($aktForumRow['kat']).'<b> » </b>'.$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' );
$tpl->set('CATNAME' ,$aktForumRow['name']);
$tpl->set('HMENU' ,$hmenu);
if ( $forum_rights['start'] == TRUE ) {
$tpl->set('NEWTOPIC', '<a href="index.php?forum-newtopic-'.$fid.'"><img src="include/images/forum/newth.png" border="0"></a>' );
} 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['TOP'] = 'cord';
} elseif ($row['rep'] >= 20) {
$row['TOP'] = 'hord'; }else{
#$row['ORD'] = get_ordner($row['time']);
$row['TOP'] = 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 ? 'Fest: ' : '' );
$tpl->set_ar_out($row,1);
} } else {
echo '<tr><td colspan="6" class="Cnorm"><b>keine Einträe vorhanden</b></td></tr>';
}
$tpl->out(2);
if ( $forum_rights['mods'] == TRUE ) {
$tpl->set('id', $fid);
$tpl->out(3);
}
$design->footer();
while ($r = db_fetch_assoc($erg1) ) {
$r['topicl'] = $r['topic'];
$r['topic'] = html_enc_substr($r['topic'],0,23);
$r['ORD'] = forum_get_ordner($r['time'],$r['id']);
$r['mods'] = getmods($r['id']);
$r['datum'] = date('d.m.y - H:i', $r['time']);
$r['page'] = ceil ( ($r['rep']+1) / $allgAr['Fpanz'] );
$r['cname'] = '<img src="include/contents/forum/Clan Intern.jpg/'.$r['cname'].'.jpg" alt="'.$r['cname'].'">';
$tpl->set_ar ($r);
if ($r['cid'] <> $xcid) {
$tpl->out(1);
//Unterkategorien
$sql = db_query("SELECT DISTINCT a.name as cname, a.id as cid FROM `prefix_forumcats` a LEFT JOIN `prefix_forums` b ON a.id = b.cid WHERE a.cid = {$r['cid']} AND a.id = b.cid ORDER BY a.pos, a.name");
while ($ucat = db_fetch_assoc($sql)) {
$tpl->set_ar_out($ucat,2);
}
//Unterkategorien - Ende
$xcid = $r['cid'];
}
$tpl->set_ar_out($r,3);
}
##### Moderartoren
$moda = '';
$erg= db_query("SELECT b.id as uid, b.name, b.recht,c.id FROM prefix_forummods a INNER JOIN prefix_user b ON b.id = a.uid INNER JOIN prefix_grundrechte c ON c.id = b.recht GROUP BY b.name ORDER BY b.id");
while ($row = db_fetch_object($erg)) {
$recht_name=@db_result(db_query('SELECT name FROM prefix_grundrechte WHERE id='.$row->recht),0);
switch($row->recht) {
case -9: case -8: case -7://Admins + CoAdmin + SideAdmin
$moda .= '<a href="index.php?user-details-'.$row->uid.'"><span style="color:#0000FF"><i><b><u>'.$row->name.'</u></b></i></span></a> , ';
break;
case -6: case -5://Leader + CoLeader
$moda .= '<a href="index.php?user-details-'.$row->uid.'"><span style="color:#daa520"><i><u>'.$row->name.'</u></i></span></a> , ';
break;
case -4: case -3://Member + Trialmember
$moda .= '<a href="index.php?user-details-'.$row->uid.'"><span style="color:#008000"><i><u>'.$row->name.'</u></i></span></a> , ';
break;
case -2: case -1://Superuser + User
$moda .= '<a href="index.php?user-details-'.$row->uid.'"><span style="color:#000000"><u>'.$row->name.'</u></span></a> , ';
break;
default: break;
}
}
# statistic #
$ges_online_user = ges_online();
$stats_array = array (
'privmsgpopup' => check_for_pm_popup (),
'topics' => db_result(db_query("SELECT COUNT(ID) FROM `prefix_topics`"),0),
'posts' => db_result(db_query("SELECT COUNT(ID) FROM `prefix_posts`"),0),
'users' => db_result(db_query("SELECT COUNT(ID) FROM `prefix_user`"),0),
'istsind' => ( $ges_online_user > 1 ? 'sind' : 'ist' ),
'gesonline' => $ges_online_user,
'gastonline' => ges_gast_online(),
'useronline' => ges_user_online(),
'userliste' => user_online_liste(),
'moda' => $moda
);
$tpl->set_ar_out($stats_array,4);
?>
Vlt sieht ja jemand den Fehler und kann ihn mir verraten D
Zuletzt modifiziert von bigani am 05.03.2012 - 14:53:24
Ein Xd und ^^ und LOL und D Beweist Skill wen mans nach Jedem Satz Schreibt ^^xd LOL D