Ok, dann hier noch mal der kompeltte show_posts.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);
# toipc als gelesen markieren
$_SESSION['forumSEE'][$fid][$tid] = time();
$title = $allgAr['title'].' :: Forum :: '.$aktTopicRow['name'].' :: Beiträge zeigen';
$hmenu = $extented_forum_menu.'<a class="smalfont" href="index.php?forum">Forum</a><b> » </b><a class="smalfont" href="index.php?forum-showcat-'.$aktForumRow['cid'].'">'.$aktForumRow['kat'].'</a><b> » </b><a class="smalfont" href="index.php?forum-showtopics-'.$fid.'">'.$aktForumRow['name'].'</a><b> » </b>';
$hmenu .= $aktTopicRow['name'].$extented_forum_menu_sufix;
$design = new design ( $title , $hmenu, 1);
$design->header();
# Topic Hits werden eins hochgesetzt.
db_query('UPDATE `prefix_topics` SET hit = hit + 1 WHERE id = "'.$tid.'"');
# mehrere seiten fals gefordert
$limit = $allgAr['Fpanz']; // Limit
$page = ($menu->getA(3) == 'p' ? $menu->getE(3) : 1 );
$MPL = db_make_sites ($page , "WHERE tid = ".$tid , $limit , 'index.php?forum-showposts-'.$tid , 'posts' );
$anfang = ($page - 1) * $limit;
$antworten = '';
if ($aktTopicRow['stat'] == 1 AND $forum_rights['reply'] == TRUE ) {
$antworten = '<a href="index.php?forum-newpost-'.$tid.'"><img src="includeimagesforumreply.gif" alt="Antwort erstellen" border="0"></a>';
}
$class = 'Cmite';
$tpl = new tpl ( 'forum/showpost' );
$ar = array (
'SITELINK' => $MPL,
'tid' => $tid,
'ANTWORTEN' => $antworten,
'TOPICNAME' => $aktTopicRow['name']
);
$tpl->set_ar_out($ar,0);
$i = $anfang +1;
$ges_ar = array ('wurstegal', 'maennlich', 'weiblich');
$erg = db_query("SELECT geschlecht, prefix_posts.id,txt,time,erstid,erst,icq,wohnort,homepage,staat,sig,avatar,posts FROM `prefix_posts` LEFT JOIN prefix_user ON prefix_posts.erstid = prefix_user.id WHERE tid = ".$tid." ORDER BY time LIMIT ".$anfang.",".$limit);
while($row = db_fetch_assoc($erg)) {
$class = ( $class == 'Cnorm' ? 'Cmite' : 'Cnorm' );
$icq1 = str_replace("-","",$row['icq']);
$icq2 = str_replace(" ","",$icq1);
###### ICQ - Anzeige ######
if (is_numeric($icq2) ){
$row['icq'] = '<a href="http://www.icq.com/whitepages/cmd.php?uin='.$icq2.'&action=add"><img src="http://web.icq.com/whitepages/online?icq='.$icq2.'&img=5" border="0"></a>';
}
###### ICQ - Anzeige Ende ######
###### Staat - Anzeige ######
#original eintrag ----->> $row['staat'] = '<img src="include/images/flags/'.$row['staat'].'">';
$staat = $row['staat'];
if (empty($staat)) {
$staat = "unbekannt";
}
$staat2 = '<img src="include/images/flags/'.$staat.'.gif">';
###### Staat - Anzeige Ende ######
######### GESCHLECHT #############
#original eintrag ----->>$gesc_ar = array ('wurstegal', 'mann', 'frau');
#$row['geschlecht'] = '<img src="include/images/icons/'.$gesc_ar[$row['geschlecht']].'.gif'.'" alt="" border="0" />';
$gesc_ar = array('wurstegal', 'mann', 'frau', 'none');
$geschlecht = $row['geschlecht'];
if (empty($geschlecht)) $geschlecht = "none";
$geschlecht2 = '<img src="include/images/icons/'.$gesc_ar[$geschlecht].'.gif'.'" alt="" border="0" />';
######### GESCHLECHT ENDE ##########
###### Wohnort - Anzeige ######
$row['wohnort'] = ($row['wohnort']?'Wohnort: <br />'.$row['wohnort']:'').'';
###### Wohnort - Anzeige Ende ######
###### Homepage - Anzeige ######
#$row['homepage'] = '<a href="'.$row['homepage'].'"><img src="includeimagesiconspage.gif" border="0"></a>';
###### Homepage - Anzeige Ende######
# define some vars.
$row['sig'] = ( empty($row['sig']) ? '' : '<br /><hr style="width: 50%;" align="left">'.bbcode($row['sig']) );
$row['TID'] = $tid;
$row['class'] = $class;
$row['date'] = date ('d.m.Y - H:i:s', $row['time'] );
$row['delete'] = '';
$row['change'] = '';
$row['avatar'] = '<br /><br /><img src="'.(file_exists($row['avatar'])?$row['avatar']:'include/images/avatars/gast.jpg').'" alt="Avatar" border="0" /><br />';
$row['rang'] = userrang ($row['posts'],$row['erstid']);
$row['posts'] = ($row['posts']?'<br />Beiträge: '.$row['posts']:'').'<br />';
$row['txt'] = (isset($_GET['such']) ? markword(bbcode ($row['txt']),$_GET['such']) : bbcode ($row['txt']) );
$row['i'] = $i;
$row['page'] = $page;
if ( $row['erstid'] != 0 ) {
$row['erst'] = '<a href="index.php?user-details-'.$row['erstid'].'"><b>'.$row['erst'].'</b></a>';
}
if ($forum_rights['mods'] == TRUE AND $i>1) {
$row['delete'] = '<a href="index.php?forum-delpost-'.$tid.'-'.$row['id'].'"><img src="includeimagesforumdelete.gif" alt="löschen" border="0"></a>';
}
if ( $forum_rights['reply'] == TRUE AND loggedin() ) {
$row['change'] = ' <a href="index.php?forum-editpost-'.$tid.'-'.$row['id'].'"><img src="includeimagesforumedit.gif" alt="editieren" border="0"></a>';
}
$tpl->set_ar_out($row,1);
$i++;
}
$tpl->set_ar_out( array ( 'SITELINK' => $MPL, 'ANTWORTEN' => $antworten ) , 2 );
if (loggedin()) {
if ($menu->get(3) == 'topicalert') {
if (1 == db_result(db_query("SELECT COUNT(*) FROM prefix_topic_alerts WHERE uid = ".$_SESSION['authid']." AND tid = ".$tid),0)) {
db_query("DELETE FROM prefix_topic_alerts WHERE uid = ".$_SESSION['authid']." AND tid = ".$tid);
} else {
db_query("INSERT INTO prefix_topic_alerts (tid,uid) VALUES (".$tid.", ".$_SESSION['authid'].")");
}
}
echo 'Optionen:';
if (1 == db_result(db_query("SELECT COUNT(*) FROM prefix_topic_alerts WHERE uid = ".$_SESSION['authid']." AND tid = ".$tid),0)) {
echo '<br />- <a href="index.php?forum-showposts-'.$tid.'-topicalert">'.$lang['nomailonreply'].'</a><br />';
} else {
echo '<br />- <a href="index.php?forum-showposts-'.$tid.'-topicalert">'.$lang['mailonreply'].'</a><br />';
}
}
if ( $forum_rights['mods'] == TRUE ) {
$tpl->set ( 'status', ($aktTopicRow['stat'] == 1 ? $lang['close'] : $lang['open'] ) );
$tpl->set ( 'festnorm', ($aktTopicRow['art'] == 0 ? $lang['fixedtopic'] : $lang['normaltopic'] ) );
$tpl->set('tid',$tid);
$tpl->out(3);
}
$design->footer();
?>
Zuletzt modifiziert von Nexilis am 11.01.2007 - 22:14:48