Zitat geschrieben von
Mairu<?php
# Copyright by: Manuel
# Support: www.ilch.de
/**
* @name IlchBB Forum
* @version 3.1
* @author Florian Koerner
* @link http://www.koerner-ws.de/
* @license GNU General Public License
*/
defined ('main') or die ( 'no direct access' );
// IlchBB Forum 3.1 :: Loader :: Start
require_once ('include/contents/ilchbb_forum/ilchbb_loader.php');
// IlchBB Forum 3.1 :: Loader :: Ende
$title = $allgAr['title'].' :: Forum';
$hmenu = $extented_forum_menu.'Forum'.$extented_forum_menu_sufix;
$design = new design ( $title , $hmenu, 1);
$design->header();
// IlchBB Forum 3.1 :: Extensions :: Start
$ilchbb_tpl = new tpl('ilchbb_forum/load_extensions');
$ilchbb_tpl->out(0);
// IlchBB Forum 3.1 :: Extensions :: End
if ($menu->get(1) == 'markallasread') {
$ilchBB->deleteNewTopics();
}
$tpl = new tpl ( 'ilchbb_forum/showforum' );
$tpl->out (0);
$category_array = array();
$forum_array = array();
$q = "SELECT
a.id, a.cid, a.name, a.besch,
a.topics, a.posts, b.name as topic,
c.id as pid, c.tid, b.rep, c.erst, c.time,
a.cid, k.name as cname
FROM prefix_forums a
LEFT JOIN prefix_forumcats k ON k.id = a.cid
LEFT JOIN prefix_posts c ON a.last_post_id = c.id
LEFT JOIN prefix_topics b ON c.tid = b.id
LEFT JOIN prefix_groupusers vg ON vg.uid = ".$_SESSION['authid']." AND vg.gid = a.view
LEFT JOIN prefix_groupusers rg ON rg.uid = ".$_SESSION['authid']." AND rg.gid = a.reply
LEFT JOIN prefix_groupusers sg ON sg.uid = ".$_SESSION['authid']." AND sg.gid = a.start
WHERE ((".$_SESSION['authright']." <= a.view AND a.view < 1)
OR (".$_SESSION['authright']." <= a.reply AND a.reply < 1)
OR (".$_SESSION['authright']." <= a.start AND a.start < 1)
OR vg.fid IS NOT NULL
OR rg.fid IS NOT NULL
OR sg.fid IS NOT NULL
OR -9 = ".$_SESSION['authright'].")
AND k.cid = 0
ORDER BY k.pos, a.pos";
$erg1 = db_query($q);
$xcid = 0;
$cattoshow = ($menu->get(1) == 'showcat' ? unescape($menu->get(2),'integer') : 0);
$showthreads = false;
$catshown = false;
while ($r = db_fetch_assoc($erg1) ) {
if (!$catshown AND $cattoshow == 0) {
$cattoshow = $r['cid'];
$catshown = true;
}
// IlchBB Forum 3.1 :: Get Forum Status :: Start
$ord = $ilchBB->checkNewTopics($r['id']);
if ($ord === TRUE) {
$r['ORD'] = 'forum_unread';
$r['TORD'] = 'Neue Beiträge';
} else {
$r['ORD'] = 'forum_read';
$r['TORD'] = 'Keine neuen Beiträge';
}
// IlchBB Forum 3.1 :: Get Forum Status :: Ende
$r['topicl'] = $r['topic'];
$r['topic'] = html_enc_substr($r['topic'],0,23);
$r['mods'] = getmods($r['id']);
$r['datum'] = date('d.m.y - H:i', $r['time']);
$r['page'] = ceil ( ($r['rep']+1) / $allgAr['Fpanz'] );
$tpl->set_ar($r);
if ($r['cid'] <> $xcid) {
$tpl->out(1);
// IlchBB Forum 3.1 :: Set CSS Class :: Start
$class = 'ilchbb_Cmite';
// IlchBB Forum 3.1 :: Set CSS Class :: End
//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)) {
// IlchBB Forum 3.1 :: Change CSS Class :: Start
$class = ( $class == 'ilchbb_Cmite' ? 'ilchbb_Cnorm' : 'ilchbb_Cmite' );
$ucat['class'] = $class;
// IlchBB Forum 3.1 :: Change CSS Class :: Start
$tpl->set_ar_out($ucat,2);
}
//Unterkategorien - Ende
switch($cattoshow) {
case 0: case $xcid: $showthreads = true; break;
default: $showthreads = false; break;
}
$xcid = $r['cid'];
}
if ($showthreads) {
// IlchBB Forum 3.1 :: Change CSS Class :: Start
$class = ( $class == 'ilchbb_Cmite' ? 'ilchbb_Cnorm' : 'ilchbb_Cmite' );
$r['class'] = $class;
// IlchBB Forum 3.1 :: Change CSS Class :: Start
$tpl->set_ar_out($r,3);
}
}
// IlchBB Forum 3.1 :: Online Today :: Start
if ($allgAr['ilchbb_forum_dayonline'] == 1) {
$time = mktime (0,0,0,date("n"),date("j"),date("Y"));
$query = 'SELECT `id`,`name` FROM `prefix_user` WHERE llogin > '.$time;
$query = db_query($query);
$cache = '';
while ($row = db_fetch_assoc($query)) {
if (!empty($cache)) $cache .= ', ';
$cache .= '<a href="index.php?user-details-'.$row['id'].'">'.$row['name'].'</a>';
}
$tpl->set('dayonline','<br /><br />Heute waren bereits online:<br />'.$cache);
} else {
$tpl->set('dayonline','');
}
// IlchBB Forum 3.1 :: Online Today :: End
# 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()
);
$tpl->set_ar_out($stats_array,4);
// IlchBB Forum 3.1 :: Copyright :: Start
$ilchbb_tpl->out(1);
// IlchBB Forum 3.1 :: Copryright :: End
$design->footer();
?>
Ich danke dir recht Herzlich im Namen meiner Clanführung.
EDIT:
nun habe ich nur ein kleines Problem -> siehe screenshoot.
[img]http://prntscr.com/ap6n6v[/img]
Wenn ich auf World of Tanks clicke, öffnet sich darunter das Mod-Area.
Woran kann das noch liegen?
<?php
# Copyright by: Manuel
# Support: www.ilch.de
/**
* @name IlchBB Forum
* @version 3.1
* @author Florian Koerner
* @link http://www.koerner-ws.de/
* @license GNU General Public License
*/
defined ('main') or die ( 'no direct access' );
// IlchBB Forum 3.1 :: Loader :: Start
require_once ('include/contents/ilchbb_forum/ilchbb_loader.php');
// IlchBB Forum 3.1 :: Loader :: Ende
$title = $allgAr['title'].' :: Forum';
$hmenu = $extented_forum_menu.'Forum'.$extented_forum_menu_sufix;
$design = new design ( $title , $hmenu, 1);
$design->header();
// IlchBB Forum 3.1 :: Extensions :: Start
$ilchbb_tpl = new tpl('ilchbb_forum/load_extensions');
$ilchbb_tpl->out(0);
// IlchBB Forum 3.1 :: Extensions :: End
if ($menu->get(1) == 'markallasread') {
$ilchBB->deleteNewTopics();
}
$tpl = new tpl ( 'ilchbb_forum/showforum' );
$tpl->out (0);
$category_array = array();
$forum_array = array();
$q = "SELECT
a.id, a.cid, a.name, a.besch,
a.topics, a.posts, b.name as topic,
c.id as pid, c.tid, b.rep, c.erst, c.time,
a.cid, k.name as cname
FROM prefix_forums a
LEFT JOIN prefix_forumcats k ON k.id = a.cid
LEFT JOIN prefix_posts c ON a.last_post_id = c.id
LEFT JOIN prefix_topics b ON c.tid = b.id
LEFT JOIN prefix_groupusers vg ON vg.uid = ".$_SESSION['authid']." AND vg.gid = a.view
LEFT JOIN prefix_groupusers rg ON rg.uid = ".$_SESSION['authid']." AND rg.gid = a.reply
LEFT JOIN prefix_groupusers sg ON sg.uid = ".$_SESSION['authid']." AND sg.gid = a.start
WHERE ((".$_SESSION['authright']." <= a.view AND a.view < 1)
OR (".$_SESSION['authright']." <= a.reply AND a.reply < 1)
OR (".$_SESSION['authright']." <= a.start AND a.start < 1)
OR vg.fid IS NOT NULL
OR rg.fid IS NOT NULL
OR sg.fid IS NOT NULL
OR -9 = ".$_SESSION['authright'].")
AND k.cid = 0
ORDER BY k.pos, a.pos";
$erg1 = db_query($q);
$xcid = 0;
$cattoshow = ($menu->get(1) == 'showcat' ? unescape($menu->get(2),'integer') : 0);
$showthreads = false;
$catshown = false;
while ($r = db_fetch_assoc($erg1) ) {
if (!$catshown AND $cattoshow == 0) {
$cattoshow = $r['cid'];
$catshown = true;
}
// IlchBB Forum 3.1 :: Get Forum Status :: Start
$ord = $ilchBB->checkNewTopics($r['id']);
if ($ord === TRUE) {
$r['ORD'] = 'forum_unread';
$r['TORD'] = 'Neue Beiträge';
} else {
$r['ORD'] = 'forum_read';
$r['TORD'] = 'Keine neuen Beiträge';
}
// IlchBB Forum 3.1 :: Get Forum Status :: Ende
$r['topicl'] = $r['topic'];
$r['topic'] = html_enc_substr($r['topic'],0,23);
$r['mods'] = getmods($r['id']);
$r['datum'] = date('d.m.y - H:i', $r['time']);
$r['page'] = ceil ( ($r['rep']+1) / $allgAr['Fpanz'] );
$tpl->set_ar($r);
if ($r['cid'] <> $xcid) {
$tpl->out(1);
// IlchBB Forum 3.1 :: Set CSS Class :: Start
$class = 'ilchbb_Cmite';
// IlchBB Forum 3.1 :: Set CSS Class :: End
//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)) {
// IlchBB Forum 3.1 :: Change CSS Class :: Start
$class = ( $class == 'ilchbb_Cmite' ? 'ilchbb_Cnorm' : 'ilchbb_Cmite' );
$ucat['class'] = $class;
// IlchBB Forum 3.1 :: Change CSS Class :: Start
$tpl->set_ar_out($ucat,2);
}
//Unterkategorien - Ende
switch($cattoshow) {
case 0: case $xcid: $showthreads = true; break;
default: $showthreads = false; break;
}
$xcid = $r['cid'];
}
if ($showthreads) {
// IlchBB Forum 3.1 :: Change CSS Class :: Start
$class = ( $class == 'ilchbb_Cmite' ? 'ilchbb_Cnorm' : 'ilchbb_Cmite' );
$r['class'] = $class;
// IlchBB Forum 3.1 :: Change CSS Class :: Start
$tpl->set_ar_out($r,3);
}
}
// IlchBB Forum 3.1 :: Online Today :: Start
if ($allgAr['ilchbb_forum_dayonline'] == 1) {
$time = mktime (0,0,0,date("n"),date("j"),date("Y"));
$query = 'SELECT `id`,`name`,`recht` FROM `prefix_user` WHERE llogin > '.$time;
$query = db_query($query);
$cache = '';
$color = '';
while ($row = db_fetch_assoc($query)) {
if (!empty($cache)) $cache .= ', ';
switch ($row['recht']){
case -9:
$color .= '<span style="color: rgb(255, 3, 24); font-size: 12px;">';
break;
case -8:
$color .= '<span style="color: rgb(125, 1, 28); font-size: 12px;">';
break;
case -7:
$color .= '<span style="color: rgb(250, 107, 91); font-size: 12px;">';
break;
case -6:
$color .= '<span style="color: rgb(242, 138, 40); font-size: 12px;">';
break;
case -5:
$color .= '<span style="color: rgb(255, 143, 79); font-size: 12px;">';
break;
case -4:
$color .= '<span style="color: rgb(52, 64, 103); font-size: 12px;">';
break;
case -3:
$color .= '<span style="color: rgb(22, 128, 152); font-size: 12px;">';
break;
case -2:
$color .= '<span style="color: rgb(85, 173, 229); font-size: 12px;">';
break;
case -1:
$color .= '<span style="color: rgb(85, 173, 229); font-size: 12px;">';
break;
case -0:
$color .= '<span style="color: rgb(85, 173, 204); font-size: 12px;">';
break;
}
$cache .= '<a href="index.php?user-details-'.$row['id'].'">'.$color.'<b>'.$row['name'].'</b></a></span>';
}
$tpl->set('dayonline','<br /><br />Heute waren bereits online:<br />'.$cache);
$tpl->set('dayonlineNR',$cache);
} else {
$tpl->set('dayonline','');
$tpl->set('dayonlineNR','');
}
// IlchBB Forum 3.1 :: Online Today :: End
# 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()
);
# Legende #
$rechteq = db_query("SELECT id,name FROM `prefix_grundrechte` ORDER BY id ASC");
$ergRecht = '';
while ($row = db_fetch_assoc($rechteq)) {
if (!empty($ergRecht)) $ergRecht .= ' , ';
switch ($row['id']){
case -9:
$ergRecht .= '<span style="color: rgb(255, 3, 24); font-size: 12px;">[ '.$row['name'].']</span>';
break;
case -8:
$ergRecht .= '<span style="color: rgb(125, 1, 28); font-size: 12px;">[ '.$row['name'].']</span>';
break;
case -7:
$ergRecht .= '<span style="color: rgb(250, 107, 91); font-size: 12px;">[ '.$row['name'].']</span>';
break;
case -6:
$ergRecht .= '<span style="color: rgb(242, 138, 40); font-size: 12px;">[ '.$row['name'].']</span>';
break;
case -5:
$ergRecht .= '<span style="color: rgb(255, 143, 79); font-size: 12px;">[ '.$row['name'].']</span>';
break;
case -4:
$ergRecht .= '<span style="color: rgb(52, 64, 103); font-size: 12px;">[ '.$row['name'].']</span>';
break;
case -3:
$ergRecht .= '<span style="color: rgb(22, 128, 152); font-size: 12px;">[ '.$row['name'].']</span>';
break;
case -2:
$ergRecht .= '<span style="color: rgb(85, 173, 229); font-size: 12px;">[ '.$row['name'].']</span>';
break;
case -1:
$ergRecht .= '<span style="color: rgb(85, 173, 229); font-size: 12px;">[ '.$row['name'].']</span>';
break;
case -0:
$ergRecht .= '<span style="color: rgb(85, 173, 204); font-size: 12px;">[ '.$row['name'].']</span>';
break;
}
}
$tpl->set('Legende',$ergRecht);
$tpl->set_ar_out($stats_array,4);
// IlchBB Forum 3.1 :: Copyright :: Start
$ilchbb_tpl->out(1);
// IlchBB Forum 3.1 :: Copryright :: End
$design->footer();
?>
<!--
@name IlchBB Forum
@version 3.1
@author Florian Koerner
@link http://www.koerner-ws.de/
-->
<div style="display:none;">
<table>
<tr>
<td></td>
</tr>
{EXPLODE}
</table>
</div>
<div class="forum ui-corner-all">
<table cellpadding="0" cellspacing="0" class="ilchbb_border" border="0">
<tr>
<th colspan="2" width="45%">
<a href="index.php?forum-showcat-{cid}" style="color: #FFF;">{cname}</a>
</th>
<th width="13%">
<center>{_lang_topic}</center>
</th>
<th width="13%">
<center>{_lang_post}</center>
</th>
<th width="29%">
{_lang_lastpost}
</th>
</tr>
{EXPLODE}
<tr>
<td colspan="5" class="{class}" style="font-weight: bold;">
» <a href="index.php?forum-showcat-{cid}">{cname}</a>
</td>
</tr>
{EXPLODE}
<tr class="{class}">
<td width="6%">
<center><img alt="" src="include/images/ilchbb_forum/{ORD}.gif" title="{TORD}" /></center>
</td>
<td class="top" width="39%">
<a href="index.php?forum-showtopics-{id}" >{name}</a><br />
<span class="smalfont2">{besch}</span>
<span class="smallfont">{mods}</span>
</td>
<td class="middle xleft">
<div class="center">
{topics}
</div>
</td>
<td class="middle xright">
<div class="center" style="border-right-width: 1px;">
{posts}
</div>
</td>
<td class="top smallfont">
<a title="{topicl}" href="index.php?forum-showposts-{tid}-p{page}#{pid}">
{topic}
<img src="include/images/ilchbb_forum/icon_topic_latest.gif" title="Letzter Beitrag" border="0" />
</a>
<br />
{_lang_from}: {erst}
<br />
am: {datum}
</td>
</tr>
{EXPLODE}
</table>
</div>
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td width="50%" valign="top">
<a href="index.php?forum-markallasread">{_lang_markallasread}</a>
</td>
<td width="50%" style="text-align: right" valign="top">
<a href="index.php?forum-augt">{_lang_newtopicssincelastvisit}</a><br />
<a href="index.php?forum-aubt">{_lang_topicwithnoreply}</a><br />
<a href="index.php?forum-aeit">{_lang_ownposts}</a>
</td>
</tr>
</table>
<br />
<br />
<div class="forum ui-corner-all">
<table cellpadding="0" cellspacing="0" class="ilchbb_border" border="0">
<tr>
<th>
Statistiken
</th>
</tr>
<tr style="background-color: #FFF;">
<td>
<b>{users}</b> {_lang_membershaveritten} <b>{posts}</b> {_lang_postsin} <b>{topics}</b> {_lang_topics}<br />
<br />
{_lang_it} {istsind} {gesonline} {_lang_guestsonline,ofthem} {useronline} {_if_{useronline}=='1'}{_lang_registredand}{/_endif}{_if_{useronline}!='1'}{_lang_registrededand}{/_endif} {gastonline} {_lang_guests}<br />
{userliste}
{dayonline}
</td>
</tr>
</table>
<table cellpadding="0" cellspacing="1" class="ilchbb_border" border="0">
<tr>
<th>
Legende
</th>
</tr>
<tr style="background-color: #E1E7E8;">
<td>
{Legende}
</td>
</tr>
</table>
</div>
{privmsgpopup}
Zuletzt modifiziert von magicmarkus am 07.04.2016 - 11:05:41
EDIT 2:
Fehler gefunden und nun Läüft es
Fehler war:
//Unterkategorien - Ende
switch($cattoshow) {
case 0: case $xcid: $showthreads = true; break;
default: $showthreads = false; break;
}
$xcid = $r['cid'];
}
muss zu:
//Unterkategorien - Ende
$xcid = $r['cid'];
switch($cattoshow) {
case 0: case $xcid: $showthreads = true; break;
default: $showthreads = false; break;
}
}
Zuletzt modifiziert von magicmarkus am 07.04.2016 - 13:15:03