Was ich brauche:
-Hilfe beim profil unter Forum Letzte 5 Threads
-Hilfe unter Forum Beiträge/Tag: 0 rechnet er nix aus
-Wollte wissen wie ich das mache das anstat das wort Email: ein bild kommt aber wie mach ich das?
Letzte 5 Threads mein Problem:
Da werden nicht die Letzten 5 Threads angezeigt von den User sondern uralte
Hab gesucht aber nix passendes gefunden
Code
user_details.php
<?php # Copyright by: Manuel Staechele # Support: www.ilch.de defined ('main') or die ( 'no direct access' ); $uid = $menu->get(2); $abf = 'SELECT * FROM prefix_user WHERE id = "'.$uid.'"'; $erg = db_query($abf); $row = db_fetch_assoc($erg); $omenu = ' <a href="index.php?user-details-'.$row['id'].'&show="Allgemein"><img src="/include/images/profil/Butter/allgemein.png" alt="allgemein" title="allgemein" border="0"></a> <a href="index.php?user-details-'.$row['id'].'&show=kontakt"><img src="/include/images/profil/Butter/contact.png" alt="contact" title="contact" border="0"></a> <a href="index.php?user-details-'.$row['id'].'&show=sonstiges"><img src="/include/images/profil/Butter/Bar Chart.png" alt="Sonstiges" title="Sonstiges" border="0"></a> <a href="index.php?user-details-'.$row['id'].'&show=forum"><img src="/include/images/profil/Butter/forum.png" alt="forum" title="forum" border="0"></a> <a href="index.php?user-usergallery-'.$row['id'].'&id='.$row['id'].'"Usergallery"><img src="/include/images/profil/Butter/gallerie.png" alt="Usergallery" title="Usergallery" border="0"></a> <a href="index.php?user-details-'.$row['id'].'&show=gaestebuch"><img src="/include/images/profil/Butter/gb.png" alt="gaestebuch" title="gaestebuch" border="0"></a>'; $abf8 = 'SELECT uid FROM prefix_online WHERE uid = "'.$uid.'"'; $erg8 = db_query($abf8); if (db_fetch_assoc($erg8) == FALSE) { $status = '(<font color="#ED1C24">offline</font>)'; } else { $status = '(<font color="#22B14C">online</font>)'; } if (loggedin()) { $melden = '<table border="0" width="100%"><tr><td align="right"><img src="include/images/profil/alert.gif" boder="0" alias="Profil melden" title="Profil melden"> <a href="index.php?user-details-'.$row['id'].'&show=melden"><font class="smalfont">Profil melden</font></a></td></tr></table>'; } else { $melden = ''; } $avatar = ''; if ( file_exists($row['avatar'])) { $avatar = '<img src="'.$row['avatar'].'" border="0" title="Avatar von '.$row['name'].'" alias="Avatar von '.$row['name'].'">'; } // Aufrufen was angezeigt werden soll // Allgemein if ($_GET['show'] == '') { $regsek = mktime ( 0,0,0, date('m'), date('d'), date('Y') ) - $row['regist']; $regday = round($regsek / 86400); $postpday = ( $regday == 0 ? 0 : round($row['posts'] / $regday, 2 ) ); $datum_neu .= substr($row['gebdatum'] , 8, 2) . '.'; $datum_neu .= substr($row['gebdatum'] , 5, 2) . '.'; $datum_neu .= substr($row['gebdatum'] , 0, 4); $gbs1 = @db_query("SELECT COUNT(ID) FROM prefix_koms WHERE cat = '".$row['name']."'"); $gbs = @db_result($gbs1,0); $gbself1 = @db_query("SELECT COUNT(ID) FROM prefix_koms WHERE name = '".$row['name']."'"); $gbself = @db_result($gbself1,0); $pict1 = @db_query("SELECT COUNT(ID) FROM prefix_usergallery WHERE uid = ".$row['id']); $pict = @db_result($pict1,0); $l = profilefields_show ($uid,1,0); $land = ''.substr(''.$row['staat'].'', 0, -4).''; if (empty($row['wohnort'])) {$wohnort = '<tr><td><b>Wohnort:</b></td><td>keine Angabe</td></tr>';} else {$wohnort = '<tr><td><b>Wohnort:</b></td><td>'.$row['wohnort'].'</td></tr>';} if (empty($row['homepage'])) {$homepage = '<tr><td><b>Homepage:</b></td><td>keine Angabe</td></tr>';} else {$homepage = '<tr><td><b>Homepage:</b></td><td><a href="'.$row['homepage'].'" target="_blank">'.$row['homepage'].'</a></td></tr>';} if ($row['geschlecht'] == 2) {$geschlecht = 'weiblich';} elseif ( $row['geschlecht'] == 1) {$geschlecht = 'männlich';} else {{$geschlecht = 'wurstegal';}} if (empty($row['staat'])) {$staat = 'keine Angabe';} else {$staat = '<img src="include/images/flags/'.$row['staat'].'" alt="'.$row['staat'].'" border="0"> '.$land.'';} //Geburtsdatum und Alter berechnen und ausgeben if ($row['gebdatum'] != 0000-00-00) {$age1=explode("-",$row['gebdatum']); $age2 = date("Y",time())-$age1[0]; $tag = $a[2]; $mon = $a[1]; $jah = $a[0]; if ($mon > date("m")){$t1 = 2;} if ($mon == date("m")){$t1 = 1;} if ($tag > date("d")){$t2 = 1;} $t3 = ($t1 + $t2); if ($t3 > 1) {$gebdatum = '<tr><td><b>Gebdatum:</b></td><td>'.$datum_neu.' <font class="smalfont">('.($age2 -1).' Jahre)</font></td></tr>';} else {$gebdatum = '<tr><td><b>Gebdatum:</b></td><td>'.$datum_neu.' <font class="smalfont">('.$age2.' Jahre)</font></td></tr>';}} else {$gebdatum = '<tr><td><b>Gebdatum:</b></td><td>Keine Angabe</td></tr>';} $abf1 = 'SELECT val FROM prefix_userfields WHERE uid = "'.$uid.'" AND fid = 38'; $erg1 = db_query($abf1); $row1 = db_fetch_assoc($erg1); $rp=rangcount($row['id'],$row['posts'],$row['cpoints'],$row['fwarn']); if (!empty($row1['val'])) { $userbild = '<b>Userbild:</b><br><img src="include/images/profil/userbilder/'.$row1['val'].'" alias="Userbild" title="Userbilder">'; } else { $userbild = '<b>Userbild:</b><br>Kein Bild hochgeladen'; } $ar = array ( 'NAME' => $row['name'], 'JOINED' => date('d M Y',$row['regist']), 'LASTAK' => date('d M Y - H:i',$row['llogin']), 'POSTS' => $row['posts'], 'postpday' => $postpday, 'RANG' => userrang ($row['posts'],$uid), 'AVATA' => $avatar, 'menu' => $omenu, 'land' => $staat, 'gebdatum' => $gebdatum, 'geschlecht' => $geschlecht, 'wohnort' => $wohnort, 'homepage' => $homepage, 'status' => $status, 'gbs' => ''.$gbs.' <a href="index.php?user-details-'.$row['id'].'&show=gaestebuch">(eintragen)</a>', 'gbself' => $gbself, 'pict' => ''.$pict.' <a href="index.php?user-usergallery-'.$row['id'].'&id='.$row['id'].'">(ansehen)</a>', 'felder' => $l, 'melden' => $melden, 'userbild' => $userbild, 'WIW' => wiw($uid), 'RANG' => rangbild ($rp), 'SRANK' => spezrang ($row['id']), 'RECHT' => getlistrecht($row['recht']), 'POINTS' =>$row['cpoints'], 'RPOINT' =>$rp, 'GAMES' => getteams($row['id']), 'VERW' => verwarnstu($row['fwarn'],0), 'dze'=>getmedal(1,$row['regist']), 'fze'=>getmedal(2,$row['posts']), 'wze'=>getmedal(3,$row['cpoints']), 'cme' =>getmedal(4,$row['medal']) ); $title = $allgAr['title'].' :: Users :: Details von '.$row['name']; $hmenu = $extented_forum_menu.'<a class="smalfont" href="?user">Users</a><b> » </b> Details von '.$row['name'].$extented_forum_menu_sufix; $design = new design ( $title , $hmenu, 1); $design->header(); $tpl = new tpl ( 'user/userdetails' ); $tpl->set_ar_out($ar,0); $design->footer(); } //Kontakt if ($_GET['show'] == 'kontakt') { $icqnr = str_replace("-","",$row['icq']); $icqnr3 = str_replace("-","",$row['icq']); if (empty($row['email'])) {$mail = 'Der User hat keine eMail Adresse angegeben.';} elseif (loggedin()) {$mail = '<form action="index.php?user-details-'.$uid.'&show=kontakt&action=esend" method="POST"><table width="100%" border="0" cellspacing="1" cellpadding="5" class="border"><tr class="Chead"><th colspan="2">eMail an Benutzer '.$row['name'].'</th><tr><td class="Cmite">Betreff</td><td class="Cnorm" align="left"><input type="text" name="bet" ></td></tr><tr class="Cnorm"><td class="Cmite">Deine eMail</td><td class="Cnorm" align="left"><input type="text" name="email" ></td></tr><tr class="Cnorm" ><td class="Cmite" valign="top">Nachricht</td><td class="Cnorm" align="left"><textarea cols="40" rows="10" name="txt"></textarea></td></tr><tr class="Cdark"><td></td><td><input type="submit" name="send" value="Senden"></td></tr></table></form>';} else {$mail = 'Um eine eMail zu versenden musst du dich einloggen.';} if (empty($row['icq'])) {$icq = '<tr><td><b>ICQ:</b></td><td>keine Angabe</td></tr>';} else {$icq = '<tr><td><b>ICQ:</b></td><td>'.$icqnr3.' <img src="http://online.mirabilis.com/scripts/online.dll?icq='.$icqnr.'&img=5" title="ICQ Status" alias="ICQ Status"></td></tr>';} if (empty($row['msn'])) {$msn = '<tr><td><b>MSN:</b></td><td>keine Angabe</td></tr>';} else {$msn = '<tr><td><b>MSN:</b></td><td>'.$row['msn'].'</td></tr>';} if (empty($row['yahoo'])) {$yahoo = '<tr><td><b>Yahoo:</b></td><td>keine Angabe</td></tr>';} else {$yahoo = '<tr><td><b>Yahoo:</b></td><td>'.$row['yahoo'].'</td></tr>';} if (empty($row['aim'])) {$aim = '<tr><td><b>AIM:</b></td><td>keine Angabe</td></tr>';} else {$aim = '<tr><td><b>AIM:</b></td><td>'.$row['aim'].'</td></tr>';} $l = profilefields_show ($uid,2,0); $ar = array ( 'id' => $row['id'], 'NAME' => $row['name'], 'AVATA' => $avatar, 'menu' => $omenu, 'mail' => $mail, 'pn' => $pn, 'icq' => $icq, 'msn' => $msn, 'yahoo' => $yahoo, 'aim' => $aim, 'status' => $status, 'melden' => $melden, 'felder' => $l, 'RANG' => userrang ($row['posts'],$uid), 'SMILIES' => getsmilies(), ); $title = $allgAr['title'].' :: Users :: Details von '.$row['name']; $hmenu = $extented_forum_menu.'<a class="smalfont" href="?user">Users</a><b> » </b> Details von '.$row['name'].$extented_forum_menu_sufix; $design = new design ( $title , $hmenu, 1); $design->header(); $tpl = new tpl ( 'user/userdetails' ); $ar['rowspan'] = 4 + substr_count($l, '<tr><td class="'); if ($_GET['action'] == 'esend') { if (!empty($_POST['txt']) and !empty($_POST['email']) and !empty($_POST['bet'])) { $mail = ''.$row['email'].''; $betreff = ''.$_POST['bet'].''; $text = ''.$_POST['txt'].''; $from = ''.$_POST['email'].''; icmail ($mail,$betreff,$text,$from); wd('index.php?user-details-'.$uid.'&show=kontakt','Deine eMail an <b>'.$row['name'].'</b> wurde erfolgriech versendet.'); } else { wd('index.php?user-details-'.$uid.'&show=kontakt','Deine Angaben waren nicht vollständig.'); } } if ($_GET['action'] == 'pmsend') { if (!empty($_POST['txt']) and !empty($_POST['bet'])) { $bet = ''.$_POST['bet'].''; $txt = escape($_POST['txt'], 'textarea'); sendpm($_SESSION['authid'], $uid, $bet, $txt); wd('index.php?user-details-'.$uid.'&show=kontakt','Deine Nachricht an <b>'.$row['name'].'</b> wurde erfolgriech versendet.'); } else { wd('index.php?user-details-'.$uid.'&show=kontakt','Deine Angaben waren nicht vollständig.'); } } $tpl->set_ar_out($ar,1); $design->footer(); } //Sonstiges if ($_GET['show'] == 'sonstiges') { $l = profilefields_show ($uid,4,1); $l .= profilefields_show ($uid,5,1); $ar = array ( 'NAME' => $row['name'], 'AVATA' => $avatar, 'menu' => $omenu, 'status' => $status, 'profilefields' => $l, 'melden' => $melden, 'RANG' => userrang ($row['posts'],$uid), 'GAMES' => gamespic($row['id']), ); $title = $allgAr['title'].' :: Users :: Details von '.$row['name']; $hmenu = $extented_forum_menu.'<a class="smalfont" href="?user">Users</a><b> » </b> Details von '.$row['name'].$extented_forum_menu_sufix; $design = new design ( $title , $hmenu, 1); $design->header(); $tpl = new tpl ( 'user/userdetails' ); $tpl->set_ar_out($ar,2); $design->footer(); } //Forum if ($_GET['show'] == 'forum') { $abf2 = 'SELECT * FROM prefix_topics WHERE erst = "'.$row['name'].'" order by id LIMIT 0,5'; $erg2 = db_query($abf2); while ($row2 = db_fetch_object($erg2)) { $lastposts .= '- <a href="index.php?forum-showposts-'.$row2->last_post_id.'">'.$row2->name.'</a><br>'; } $l = profilefields_show ($uid,3,0); if (empty($row['sig'])) {$signatur = '<b>Signatur:</b><br>keine Angabe';} else {$signatur = '<b>Signatur:</b><br>'.bbcode($row['sig']).'';} $postpday = ( $regday == 0 ? 0 : round($row['posts'] / $regday, 2 ) ); $ar = array ( 'NAME' => $row['name'], 'AVATA' => $avatar, 'menu' => $omenu, 'status' => $status, 'beiträge' => '<tr><td width="20%"><b>Forenbeiträge:</b></td><td>'.$row['posts'].'</td></tr>', 'signatur' => $signatur, 'lastposts' => $lastposts, 'POSTS' => $row['posts'], 'postpday' => '<tr><td><b>Beiträge/Tag:</b></td><td>'.$postpday.'</td></tr>', 'melden' => $melden, 'RANG' => userrang ($row['posts'],$uid), 'felder' => $l, ); $title = $allgAr['title'].' :: Users :: Details von '.$row['name']; $hmenu = $extented_forum_menu.'<a class="smalfont" href="?user">Users</a><b> » </b> Details von '.$row['name'].$extented_forum_menu_sufix; $design = new design ( $title , $hmenu, 1); $design->header(); $tpl = new tpl ( 'user/userdetails' ); $tpl->set_ar_out($ar,3); $design->footer(); } //Gallery if ($_GET['show'] == 'gallery') { $ar = array ( 'NAME' => $row['name'], 'AVATA' => $avatar, 'menu' => $omenu, 'status' => $status, 'RANG' => userrang ($row['posts'],$uid), ); $title = $allgAr['title'].' :: Users :: Details von '.$row['name']; $hmenu = $extented_forum_menu.'<a class="smalfont" href="?user">Users</a><b> » </b> Details von '.$row['name'].$extented_forum_menu_sufix; $design = new design ( $title , $hmenu, 1); $design->header(); $tpl = new tpl ( 'user/userdetails' ); $tpl->set_ar_out($ar,4); $design->footer(); } //Gästebuch if ($_GET['show'] == 'gaestebuch') { if (is_admin() or $_SESSION['authid'] == $uid) {$delete = '<a href="index.php?user-details-'.$uid.'-d-'.$row3->id.'&show=gaestebuch&action=delete"><img src="include/images/icons/del.gif" title="Kommentar löschen" alt="Kommentar löschen" border="0"></a>';} else {$delete = '';} #Kommentarte anzeigen $abf3 = 'SELECT * FROM prefix_koms WHERE cat = "'.$row['name'].'" order by id DESC'; $erg3 = db_query($abf3); while ($row3 = db_fetch_object($erg3)) { $abf5 = 'SELECT * FROM prefix_user WHERE name = "'.$row3->name.'"'; $erg5 = db_query($abf5); $row5 = db_fetch_assoc($erg5); if (empty($row5['avatar'])) { $showava = '<img src="include/images/avatars/wurstegal.jpg" alt="Avatare von '.$row3->name.'" title="Avatare von '.$row3->name.'" border="0">'; } else { $showava = '<img src="'.$row5['avatar'].'" alt="Avatare von '.$row5['name'].'" title="Avatare von '.$row5['name'].'" border="0">'; } if (is_admin() or $_SESSION['authid'] == $uid) {$del = '<a href="index.php?user-details-'.$uid.'&show=gaestebuch&action=delete&id='.$row3->id.'"><img src="include/images/icons/del.gif" title="Kommentar löschen" alt="Kommentar löschen" border="0"></a>';} else {$del = '';} $rang = userrang ($row5['posts'],$row5['id']); $gbs1 = @db_query("SELECT COUNT(ID) FROM prefix_koms WHERE cat = '".$row5['name']."'"); $gbs = @db_result($gbs1,0); $pict1 = @db_query("SELECT COUNT(ID) FROM prefix_usergallery WHERE uid = ".$_SESSION['authid']); $pict = @db_result($pict1,0); //Geburtsdatum und Alter berechnen und ausgeben if ($row5['gebdatum'] != 0000-00-00) {$age1=explode("-",$row5['gebdatum']); $age2 = date("Y",time())-$age1[0]; $tag = $a[2]; $mon = $a[1]; $jah = $a[0]; if ($mon > date("m")){$t1 = 2;} if ($mon == date("m")){$t1 = 1;} if ($tag > date("d")){$t2 = 1;} $t3 = ($t1 + $t2); if ($t3 > 1) {$gebdatum = '('.($age2 -1).')';} else {$gebdatum = '('.($age2 -1).')';}} else {$gebdatum = '';} $comments .= ' <table border="0" width="100%" collspann="0" cellspacing="0"> <tr> <td width="25%" class="Cmite"><b>Autor:</b></td> <td class="Cmite"><b>Eintrag:</b></td> <td align="right" width="8%" class="Cmite">'.$del.'</td> </tr> <tr> <td rowspan="4" class="Cmite"><font class="smalfont">von</font> <a href="index.php?user-details-'.$row5['id'].'">'.$row5['name'].'</a><font class="smalfont"> '.$gebdatum.'<br>'.$rang.'<br>'.$showava.'<br>GBs verfasst: '.$gbs.'<br>Userbilder: '.$pict.'</font></td> </tr> <tr> <td colspan="2" class="Cnorm"><font class="smalfont"><img src="include/images/profil/gb.gif" alt="Gästebuch" title="Gästebuch" border="0"> <a href="index.php?user-details-'.$row5['id'].'&show=gaestebuch" style="text-decoration:none;">Zum Gästebuch</a><br><hr></font></td> </tr> <tr> <td colspan="2" valign="top" class="Cnorm">'.bbcode($row3->text).'</td> </tr> </table><br> '; } if (loggedin()) { $schreiben = '<td class="Cnorm"><input type="submit" tabindex="4" accesskey="s" value="Senden" name="sub"></td>'; } else { $schreiben = '<td class="Cnorm">Bitte einloggen um einen Eintrag zu schrieben.</td>'; } $ar = array ( 'NAME' => $row['name'], 'id' => $uid, 'AVATA' => $avatar, 'menu' => $omenu, 'status' => $status, 'comments' => $comments, 'schreiben' => $schreiben, 'schreiber' => $_SESSION['authname'], 'RANG' => userrang ($row['posts'],$uid), 'SMILIES' => getsmilies(), ); #Kommentare anzeigen $abf4 = 'SELECT * FROM prefix_user WHERE id = "'.$_SESSION['authid'].'"'; $erg4 = db_query($abf4); $row4 = db_fetch_assoc($erg4); $avatar = ''.$row4['avatar'].''; $title = $allgAr['title'].' :: Users :: Details von '.$row['name']; $hmenu = $extented_forum_menu.'<a class="smalfont" href="?user">Users</a><b> » </b> Details von '.$row['name'].$extented_forum_menu_sufix; $design = new design ( $title , $hmenu, 1); $design->header(); $tpl = new tpl ( 'user/userdetails' ); # kommentar löschen if ($_GET['action'] == 'delete') { if (is_admin() or $_SESSION['authid'] == $uid) { $kommentar_id = ''.$_GET['id'].''; db_query("DELETE FROM prefix_koms WHERE id = ".$kommentar_id); wd('index.php?user-details-'.$row['id'].'&show=gaestebuch', 'Eintrag wurde erfolgreich gelöscht'); } } # kommentar add if ($_GET['action'] == 'new') { if ( (loggedin()) AND !empty($_POST['name']) AND !empty($_POST['txt']) ) { $_POST['txt'] = escape($_POST['txt'],'string'); db_query("INSERT INTO `prefix_koms` (`uid`,`cat`,`name`,`text`) VALUES ('0','".$row['name']."','".$_SESSION['authname']."','".$_POST['txt']."')"); wd('index.php?user-details-'.$row['id'].'&show=gaestebuch', 'Eintrag wurde erfolgreich gespeichert.'); } } # kommentar add $tpl->set_ar_out($ar,5); $design->footer(); } //Melden if ($_GET['show'] == 'melden' and loggedin()) { $ar = array ( 'NAME' => $row['name'], 'AVATA' => $avatar, 'menu' => $omenu, 'status' => $status, 'RANG' => userrang ($row['posts'],$uid), 'id' => $row['id'], 'user' => $_SESSION['authname'], ); $title = $allgAr['title'].' :: Users :: Details von '.$row['name']; $hmenu = $extented_forum_menu.'<a class="smalfont" href="?user">Users</a><b> » </b> Details von '.$row['name'].$extented_forum_menu_sufix; $design = new design ( $title , $hmenu, 1); $design->header(); $tpl = new tpl ( 'user/userdetails' ); if ($_GET['action'] == 'melden') { $abf1 = 'SELECT email FROM prefix_user WHERE recht = -9'; $erg1 = db_query($abf1); $row1 = db_fetch_object($erg1); $mail = ''.$row1->email.''; $betref = 'Meldung wegen Regelverstoß'; $text = 'Hallo Administrator, dies ist eine Meldung zu einem Verstoß der vom User '.$_POST['user'].' ausgeht. Der Verstoß wurde von '.$_POST['name'].' gepostet und er schrieb folgenden Sachverhalt: '.$_POST['verst'].' Bitte kümmere dich darum.'; icmail ($mail,$betref,$text); wd('index.php?user-details-'.$row['id'].'&show=', 'Du hast das Profil erfolgreich gemeldet. Ein Administrator wird sich darum kümmern.'); } $tpl->set_ar_out($ar,6); $design->footer(); } ?>
Hoffe es kann mir einer Helfen
Mfg brezel
verwendete ilchClan Version: 1.1
betroffene Homepage: externer Link
Zuletzt modifiziert von butter am 15.07.2009 - 12:00:18