ilch Forum » Allgemein » HTML, PHP, SQL,... » Usertitel Anzeigen lassen Forum

Geschlossen
  1. #1
    User Pic
    Isalapisa Mitglied
    Registriert seit
    05.07.2012
    Beiträge
    135
    Beitragswertungen
    1 Beitragspunkte
    Guten Tag, ich möchte gerne den Usertitel, der in der Profilanzeige
    zu sehen ist, im Forum Unter dem Avatar anzeigen lassen.

    Da steht ja schon:
    • Dabei seit
    • Wohnort


    gesperrtes Bild

    Nun möchte hier noch zusätzlich den Usertitel anzeigen lassen.
    Dann würde da Admin, CoAdmin,Member,User...usw.. stehen

    (oder besser gefragt, woher holt sich Wohnort die Information aus dem Profil her?
    ZitatZitat
    #Wohnort
    if ($ort != ''){$row['details'] .= "<span class=\"info\">Wohnort:</span> ".$ort."<br>";}


    Dies war meine Idee was jedoch nicht funktionierte:
    #User Details
                    if ( $posts != '' ) {
                    $abf1 = 'SELECT * FROM prefix_user where id = '.$row["erstid"];
                    $erg1 = db_query($abf1);
                    $user = db_fetch_object($erg1);
                    $zeit = date('d',$user->regist).'. '.$monate[date('M',$user->regist)].' '.date('y',$user->regist);              
                    $llogin = date('d',$user->llogin).'. '.$monate[date('M',$user->llogin)].' '.date('y',$user->llogin);
                    $ort = $user->wohnort;
                    $titel = $user->usertitel;
                    $www = $user->homepage;
                    $email = $user->opt_mail;
                    $pm = $user->opt_pm;
                    $land = $user->staat;
    #Usertitel
                    if ($titel != ''){$row['details'] .= "<span class=\"info\">Titel:</span> ".$titel."<br>";}


    Hier ist meine komplette show_post.php
    <?php 
    #   Copyright by: Manuel Staechele
    #   Support: www.ilch.de
    
    #	Forenmod by Malte Wiatrowski alias "IRvD"  - Vorlage von Benjamin Rau & matthias-schlich.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&auml;ge zeigen';
    $hmenu  = $extented_forum_menu.'<a class="smalfont" href="index.php?forum">Forum</a><b> &raquo; </b>'.aktForumCats($aktForumRow['kat']).'<b> &raquo; </b><a class="smalfont" href="index.php?forum-showtopics-'.$fid.'">'.$aktForumRow['name'].'</a><b> &raquo; </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.'"');
    
    $erg = db_query("SELECT fid FROM `prefix_posts` WHERE tid = ".$tid);
    $row = db_fetch_assoc($erg);
    $newth = '<a href="index.php?forum-newtopic-'.$row['fid'].'"><img src="include/images/forum/newth.png" border="0"></a>';
    
    # 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) OR ($_SESSION['authright'] <= '-7' OR $forum_rights['mods'] == TRUE)) {
      $antworten = '<a href="index.php?forum-newpost-'.$tid.'"><img src="include/images/forum/antw.png" border="0"></a>';
    }
    
    
    $class = 'Cmite';
    
    $tpl = new tpl ( 'forum/showpost' );
    $ar = array (
      'SITELINK' => $MPL,
      'tid' => $tid,
            'ANTWORTEN' => $antworten,
            'TOPICNAME' => $aktTopicRow['name'],
                    'HMENU' => $hmenu,
                    'NEWTH' => $newth
    );
    $tpl->set_ar_out($ar,0);
    $i = $anfang +1;
    $ges_ar = array ('wurstegal', 'maennlich', 'weiblich');
    
                    ##################################
                    #Forenmod by Malte Wiatrowski  - Vorlage von Benjamin Rau & matthias-schlich.de
                    #Posts
    
    $erg = db_query("SELECT geschlecht, prefix_posts.id,txt,time,erstid,erst,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' );
            
    
           
    $monate = array( "Jan" => "Januar",
                     "Feb" => "Februar",
                     "Mar" => "M&auml;rz",
                     "Apr" => "April",
                     "May" => "Mai",
                     "Jun" => "Juni",
                     "Jul" => "Juli",
                     "Aug" => "August",
                     "Sept" => "September",
                     "Oct" => "Oktober",
                     "Nov" => "November",
                     "Dec" => "Dezember" );
            # define some vars.
    		$row['danke'] = '';
    $row['THX'] = '';
            $row['sig'] = ( empty($row['sig']) ? '' : '<br /><hr style="width: 80%;" align="left">'.bbcode($row['sig']) );
            $row['TID'] = $tid;
            $row['class'] = $class;
    		$row['date'] = date('d', $row['time']).'. '.$monate[date('M', $row['time'])].' '.date('Y - H:i', $row['time']);        
    		$row['delete'] = '';
            $row['change'] = '';
    		$row['erst'] = forum_farbname($row['erst']);
    
            if (file_exists($row['avatar'])) { $row['avatar'] = '<br /><img src="'.$row['avatar'].'" alt="User Pic" border="0" style="max-width:130px; max-height:180px;" /><br />'; }
                  elseif ($allgAr['forum_default_avatar']) { $row['avatar'] = '<br /><img src="include/images/avatars/'.$ges_ar[$row['geschlecht']].'.jpg" alt="User Pic" border="0" /><br />'; }
                   else { $row['avatar'] = ''; }
            $row['rang2']   = userrang ($row['posts'],$row['erstid']);
    		$rank_name = $row['rang2'];
            $row['txt']    = (isset($_GET['such']) ? markword(bbcode ($row['txt']),$_GET['such']) : bbcode ($row['txt']) );
            $row['i']      = $i;
    
                      if ( $row['erstid'] != '' ) {
                      $user_row = db_fetch_assoc(db_query("SELECT posts,regist FROM prefix_user WHERE id = ".$row['erstid']));
    
                    $posts = $row['posts'];
                    $row['posts']  = '<font style="font-weight:bold">Beiträge:</font> '.$row['posts'].'<br />';
    
                    if ( $posts == '' ) { $row['posts'] = '<br>Nicht registriert';}
    
    #Ranking Balken
                    #Grafiken definieren
                     $rank_00 = '<img src="include/images/forum/rank/0.png" alt="" border="0"><br><span class="smalfont">Beförderung bei <b>5</b> Posts</span><br>';
                      
                     $rank_01 = '<img src="include/images/forum/rank/1.png" alt="" border="0"><br><span class="smalfont">Beförderung bei <b>10</b> Posts</span><br>';
                      
                     $rank_02 = '<img src="include/images/forum/rank/2.png" alt="" border="0"><br><span class="smalfont">Beförderung bei <b>15</b> Posts</span><br>';
                      
                     $rank_03 = '<img src="include/images/forum/rank/3.png" alt="" border="0"><br><span class="smalfont">Beförderung bei <b>20</b> Posts</span><br>';
                      
                     $rank_04 = '<img src="include/images/forum/rank/4.png" alt="" border="0"><br><span class="smalfont">Beförderung bei <b>25</b> Posts</span><br>';
                      
                     $rank_05 = '<img src="include/images/forum/rank/5.png" alt="" border="0"><br><span class="smalfont">Beförderung bei <b>30</b> Posts</span><br>';
                      
                      $rank_06 = '<img src="include/images/forum/rank/6.png" alt="" border="0"><br><span class="smalfont">Beförderung bei <b>35</b> Posts</span><br>';
                      
                     $rank_07 = '<img src="include/images/forum/rank/7.png" alt="" border="0"><br><span class="smalfont">Next Level bei <b>40</b> Posts</span><br>';
                      
                     $rank_08 = '<img src="include/images/forum/rank/8.png" alt="" border="0"><br><span class="smalfont">Beförderung bei <b>45</b> Posts</span><br>';
                      
                     $rank_09 = '<img src="include/images/forum/rank/9.png" alt="" border="0"><br><span class="smalfont">Beförderung bei <b>50</b> Posts</span><br>';
                      
                     $rank_10 = '<img src="include/images/forum/rank/10.png" alt="" border="0"><br><span class="smalfont">Beförderung bei <b>60</b> Posts</span><br>';
                      
                     $rank_11 = '<img src="include/images/forum/rank/11.png" alt="" border="0"><br><span class="smalfont">Beförderung bei <b>70</b> Posts</span><br>';
                      
                      $rank_12 = '<img src="include/images/forum/rank/12.png" alt="" border="0"><br><span class="smalfont">Beförderung bei <b>80</b> Posts</span><br>';
                      
                     $rank_13 = '<img src="include/images/forum/rank/13.png" alt="" border="0"><br><span class="smalfont">Beförderung bei <b>100</b> Posts</span><br>';
                      
                     $rank_14 = '<img src="include/images/forum/rank/14.png" alt="" border="0"><br><span class="smalfont">Beförderung bei <b>120</b> Posts</span><br>';
                      
                     $rank_15 = '<img src="include/images/forum/rank/15.png" alt="" border="0"><br><span class="smalfont">Beförderung bei <b>140</b> Posts</span><br>';
                      
                     $rank_16 = '<img src="include/images/forum/rank/16.png" alt="" border="0"><br><span class="smalfont">Beförderung bei <b>160</b> Posts</span><br>';
                      
                     $rank_17 = '<img src="include/images/forum/rank/17.png" alt="" border="0"><br><span class="smalfont">Beförderung bei <b>180</b> Posts</span><br>';
                      
                      $rank_18 = '<img src="include/images/forum/rank/18.png" alt="" border="0"><br><span class="smalfont">Beförderung bei <b>200</b> Posts</span><br>';
                      
                     $rank_19 = '<img src="include/images/forum/rank/19.png" alt="" border="0"><br><span class="smalfont">Beförderung bei <b>250</b> Posts</span><br>';
                      
                     $rank_20 = '<img src="include/images/forum/rank/20.png" alt="" border="0"><br><span class="smalfont">Beförderung bei <b>300</b> Posts</span><br>';
                      
                     $rank_21 = '<img src="include/images/forum/rank/21.png" alt="" border="0"><br><span class="smalfont">Beförderung bei <b>500</b> Posts</span><br>';
                      
                     $rank_22 = '<img src="include/images/forum/rank/22.png" alt="" border="0"><br><span class="smalfont">Beförderung bei <b>1000</b> Posts</span><br>';
                      
                     $rank_23 = '<img src="include/images/forum/rank/23.png" alt="" border="0"><br><span class="smalfont">Legendär</span><br>';
                   
     
     
                    #Bezugnehmen auf das Ranking des users
                    if ( $row['posts'] != '' ) {
                    $row['rang'] = $rank_name.'<br>';
                    if ($posts <= '4') { $row['rang'] .= $rank_00; }
                    elseif ($posts <= '9') { $row['rang'] .= $rank_01;}
                    elseif ($posts <= '14') { $row['rang'] .= $rank_02; }
                    elseif ($posts <= '19') { $row['rang'] .= $rank_03; }
                    elseif ($posts <= '24') { $row['rang'] .= $rank_04; }
                    elseif ($posts <= '29') { $row['rang'] .= $rank_05;}
                    elseif ($posts <= '34') { $row['rang'] .= $rank_06; }
                    elseif ($posts <= '39') { $row['rang'] .= $rank_07; }
                    elseif ($posts <= '44') { $row['rang'] .= $rank_08; }
                    elseif ($posts <= '49') { $row['rang'] .= $rank_09;}
                    elseif ($posts <= '59') { $row['rang'] .= $rank_10; }
                    elseif ($posts <= '69') { $row['rang'] .= $rank_11; }
                    elseif ($posts <= '79') { $row['rang'] .= $rank_12; }
                    elseif ($posts <= '99') { $row['rang'] .= $rank_13;}
                    elseif ($posts <= '119') { $row['rang'] .= $rank_14; }
                    elseif ($posts <= '139') { $row['rang'] .= $rank_15; }
                    elseif ($posts <= '159') { $row['rang'] .= $rank_16; }
                    elseif ($posts <= '179') { $row['rang'] .= $rank_17;}
                    elseif ($posts <= '199') { $row['rang'] .= $rank_18; }
                    elseif ($posts <= '249') { $row['rang'] .= $rank_19; }
                    elseif ($posts <= '299') { $row['rang'] .= $rank_20; }
                    elseif ($posts <= '499') { $row['rang'] .= $rank_21;}
                    elseif ($posts <= '999') { $row['rang'] .= $rank_22; }
                    elseif ($posts >= '1000') { $row['rang'] .= $rank_23; }
                    }
            else {$row['rang'] .= ""; }
            }
    
                    #User Details
                    if ( $posts != '' ) {
                    $abf1 = 'SELECT * FROM prefix_user where id = '.$row["erstid"];
                    $erg1 = db_query($abf1);
                    $user = db_fetch_object($erg1);
    				$zeit = date('d',$user->regist).'. '.$monate[date('M',$user->regist)].' '.date('y',$user->regist);               
    				$llogin = date('d',$user->llogin).'. '.$monate[date('M',$user->llogin)].' '.date('y',$user->llogin);
                    $ort = $user->wohnort;
    				$titel = $user->usertitel; 
                    $www = $user->homepage;
                    $email = $user->opt_mail;
                    $pm = $user->opt_pm;
                    $land = $user->staat;
    				
                    #Flagge
                     if ($land != '')
                     {$row['land'] = '<img src="include/images/flags/'.$land.'" >';}
                     else{$row['land'] = '';}
                    #Dabei seit
                    $row['details'] = "<span class=\"info\">Dabei seit:</span> ".$zeit."<br>";
    				#Usertitel
                    if ($titel != ''){$row['details'] .= "<span class=\"info\">Titel:</span> ".$titel."<br>";}
    				
                    #Wohnort
                    if ($ort != ''){$row['details'] .= "<span class=\"info\">Wohnort:</span> ".$ort."<br>";}
    				
                    #Homepage
                    if ($www != ''){$row['www'] = '<a href="'.$www.'" target="_blank"><img src="include/images/forum/www.png" border="0" alt="Website des Users besuchen"></a>';}
    		
                    $llogin."<br>";
                    #PM
                    if ($pm == '1'){
                    $row['pm'] = "<a href='?forum-privmsg-new=0&empfid=".$row['erstid']."'><img src='include/images/forum/pm.png' border='0' alt='Private Nachricht an den User senden'></a>";
                    }else{$row['pm'] = '';}
                    #email
                    if ($email == '1'){
                    $row['email'] = "<a href='?user-mail-".$row['erstid']."'><img src='include/images/forum/email.png' border='0' alt='E-Mail an den User senden'></a>";
                    }else{$row['email'] = '';}
                    }
                    else {
                    $row['details'] = "";
                    $row['land'] = '';
                    $row['pm'] = '';
                    $row['email'] = '';
                    $row['www'] = '';               
                    }
                    
                    if ( $posts != '' ) {
    
    
                    #User Online o Offline
                    
                    $abf1 = "SELECT * FROM prefix_online where uid = ".$row['erstid'];
                    $erg1 = db_query($abf1);
                    $status = db_fetch_object($erg1);
                    if ($status->uid == $row['erstid']) {
                    $row['online'] = '&nbsp;<img src="include/images/forum/uonline.png" border="0">'; }
                    else {
                    $row['online'] = '&nbsp;<img src="include/images/forum/uoffline.png" border="0">'; }
                      }
                      else {$row['online'] = '';}
    
    
                    #
                    #Edit Ende
                    ##################################
      $row['page']   = $page;
      
                   if ( $row['posts'] != 0 ) {
    					$row['erst'] = '<a href="index.php?user-details-'.$row['erstid'].'"><b>'.forum_farbname($row['erst']).'</b></a>';        } 
            elseif ( $row['erstid'] == 0 ) {
            $row['rang'] = 'gel&ouml;schter User';
            }
      
            if ($forum_rights['mods'] == TRUE AND $i>1) {
              $row['delete'] = '<a class="forum" href="index.php?forum-delpost-'.$tid.'-'.$row['id'].'"><img src="include/images/forum/showpost/delete.png" width="16" height="16" alt="delete" align="absmiddle" title="löschen"/> l&ouml;schen</a>';
            }
            if ( $forum_rights['reply'] == TRUE AND loggedin() ) {
              $row['change'] = '&nbsp;<a class="forum" href="index.php?forum-editpost-'.$tid.'-'.$row['id'].'"><img src="include/images/forum/showpost/change.png" width="16" height="16" alt="change" align="absmiddle" title="ändern"/> &auml;ndern</a>';
            }
            $row['posts']  = ($row['posts']?'<br />'.$row['posts']:'').'<br />';
    		// Forumex - begin
        $row['txt'] = FE_Vote2HTML($row['id'], $row['txt']);
        // Forumex - end
    	
            $tpl->set_ar_out($row,1);
      
      $i++;
    }
    
    $tpl->set_ar_out( array ( 'SITELINK' => $MPL, 'ANTWORTEN' => $antworten ) , 2 );
     // anfang qpost
    if (loggedin()) {
    
    $dppk_time = time();
    $time = time();
    if (!isset($_SESSION['klicktime'])) { $_SESSION['klicktime'] = 0; }
    
    $topic = '';
    $txt   = '';
    $xnn   = '';
    
    if (isset($_POST['txt_qp'])) {
      $txt = trim(escape($_POST['txt_qp'], 'textarea'));
    }
    
    
    $tpl = new tpl ('forum/qpost');
       $ar = array (
         'txt_qp'    => escape_for_fields(unescape($txt)),
         'tid'    => $tid,
    
       );
    
       $tpl->set_ar_out($ar,1);
    
    if (($_SESSION['klicktime'] + 150) > $dppk_time OR empty($txt) OR !empty($_POST['priview']) OR (empty($_POST['Gname']) AND !loggedin())) {
    
    
    
    }
    else
    {
    # save qpost
      $_SESSION['klicktime'] = $dppk_time;
    
      $design = new design ( $title , $hmenu, 1);
      $design->header();
    
      if (loggedin()) {
        $uid = $_SESSION['authid'];
                    $erst = escape($_SESSION['authname'],'string');
              db_query("UPDATE `prefix_user` set posts = posts+1 WHERE id = ".$uid);
      } else  {
              $erst = $xnn;
                    $uid = 0;
      }
      db_query ("INSERT INTO `prefix_posts` (tid,fid,erst,erstid,time,txt) VALUES ( ".$tid.", ".$fid.", '".$erst."', ".$uid.", ".$time.", '".$txt."')");
      $pid = db_last_id();
    
            db_query("UPDATE `prefix_topics` SET last_post_id = ".$pid.", rep = rep + 1 WHERE id = ".$tid);
            db_query("UPDATE `prefix_forums` SET posts = posts + 1, last_post_id = ".$pid." WHERE id = ".$fid );
            $page = ceil ( ($aktTopicRow['rep']+1)  / $allgAr['Fpanz'] );
              # topic als gelesen markieren
      $_SESSION['forumSEE'][$fid][$tid] = time();
    
            wd ( array (
              $lang['backtotopic'] => 'index.php?forum-showposts-'.$tid.'-p'.$page.'#'.$pid,
                    $lang['backtotopicoverview'] => 'index.php?forum-showtopics-'.$fid
            ) , $lang['createpostsuccessful'] , 3 );
    }
    }
    
    $tpl = new tpl ( 'forum/showpost' );
    // end qpost
    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();
    ?>


    und hier meine show_post.html
    	<link rel="stylesheet" type="text/css" href="include/includes/css/forum/userfarben.css" media="screen">
    
    <span style="font-weight: bold; font-size: 22px; font-family: Verdana, Arial, Helvetica, sans-serif;">{TOPICNAME}</span><br />
    {SITELINK}
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr> 
        <td width="37%"><br />
        {NEWTH} {ANTWORTEN}&nbsp;<br /></td>
        <td width="63%" align="left" valign="bottom"><strong>{HMENU}</strong></td>
      </tr>
    </table>
    <hr />
    <br />
    <table width="100%" border="0" cellspacing="1" cellpadding="2" class="border">
    {EXPLODE}
    	<tr class="Chead" > 
    		<td height="30"><b>Author</b></td> 
    		<td height="30">Nachricht</td>    
    	</tr>
    	<tr class="{class}"> 
    		<td width="22%" align="center" valign="top"><p><a href="index.php?user-details-{erstid}"><strong>{erst}</strong></a> {land}<br />
    		  </p>
    		  <p><font class="smalfont">{rang}{posts}{avatar}</font></p>
            <p><font class="smalfont">{details}
          {pm} {email} {www}</font></p></td>
    		<td width="78%" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
    	<tr>
    		<td align="left" valign="middle" width="50%"><span class="smalfont" style="float: left;">{date} Uhr</span></td>
    		<td width="50%" align="right" valign="middle" class="smalfont">&nbsp;
    			<a class="forum" href="index.php?forum-inform-p{id}"><img src="include/images/forum/showpost/melden.png" width="16" height="16" alt="melden" align="absmiddle" title="löschen"/> melden</a>
    			{delete}
    			{change}
    			<a class="forum" href="index.php?forum-newpost-{TID}-z{id}"><img src="include/images/forum/showpost/zitieren.gif" width="16" height="16" alt="zitieren" align="absmiddle" title="zitieren"/> zitieren</a></td>
    	</tr>
    </table>
                      <hr align="left" />
          <br />{txt}{sig}
    
    </td>
      </tr>
      <tr class="{class}">
    	  <td align="center" valign="middle">{online} </td>
        <td align="left" valign="top"> 	        
    
    <script type="text/javascript">
        var open = 1;
        function dist_switch_{id}() {
            if(open == 0) {
                dist_close_{id}();
            } else {
                dist_open_{id}();
            }
        }
    
        function dist_open_{id}() {
            var plusid = 'plus' + '_{id}';
            var hwid = 'hw' + '_{id}';
            document.getElementById(plusid).style.height='0px';
            document.getElementById(hwid).style.height='50px';
            open = 0;
        }
    
        function dist_close_{id}() {
            var plusid = 'plus' + '_{id}';
            var hwid = 'hw' + '_{id}';
            document.getElementById(plusid).style.height='9px';
            document.getElementById(hwid).style.height='0px';
            open = 1;
        }
    </script>
    
    <fieldset onclick="dist_switch_{id}()" style="height: auto; border: 0px none; cursor: pointer;">
        <img id="plus_{id}" src="include/images/icons/plus.gif" />
        <small>Distanzierung</small>
        <div class="smalfont" style="overflow: hidden; height: 0px;" id="hw_{id}">
            <img id="plus_{id}" src="include/images/icons/minus.gif" />
            Der Betreiber und die Moderatoren dieses Forums distanzieren sich hiermit Ausdrücklich von dem von <a href="index.php?user-details-{erstid}">{erst}</a> am {date} Uhr verfassten Beitrag. Sollte dieser Beitrag Ihre Rechte verletzen bitten wir um eine <a href="index.php?contact">Benachrichtigung</a></div>
    </fieldset></td>
      </tr>
      
      
       
      
            {EXPLODE}
    </table>
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr><td width="24%" align="right">{SITELINK}</td></tr></table>
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr> 
        <td width="37%"><br />
        {NEWTH} {ANTWORTEN}&nbsp;<br /></td>
        <td width="63%" align="left"><strong>{HMENU}</strong></td>
    </tr></table>
    
    <br />
    {EXPLODE}
    <br />
    <strong><br />
    {_lang_administrattopic}</strong><br />
    <a href="javascript:renametopic()">{_lang_rename}</a>
    &nbsp;,&nbsp;
    <a href="index.php?forum-edittopic-{tid}-2">{_lang_delete}</a>
    &nbsp;,&nbsp;
    <a href="index.php?forum-edittopic-{tid}-3">{_lang_shift}</a>
    &nbsp;,&nbsp;
    <a href="index.php?forum-edittopic-{tid}-4-2">{status}</a>
    &nbsp;,&nbsp;
    <a href="index.php?forum-edittopic-{tid}-5">{festnorm}</a>
    
    <script language="JavaScript" type="text/javascript">
    <!--
      function renametopic () {
              var x = prompt ( "Bitte den neuen Namen vom Thema eintragen" , "" );
                    if ( x ) {
                      document.location.href="index.php?forum-edittopic-{tid}-1=0&newTopic="+x;
                    }
            }
            
    //-->
    </script>


    hier ist die user_details.php
    <?php 
    #   Copyright by: Manuel Staechele
    #   Support: www.ilch.de
    
    defined ('main') or die ( 'no direct access' );
    
    $uid = $menu->get(2);
    
    #Award Ausgabe
                   $awards = '';  $ax = 0;  
                    $sqlA = db_query("SELECT a.platz, a.text, a.wofur, a.team, a.bild, DATE_FORMAT(a.`time`, '%d.%m.%Y') AS time FROM `prefix_awards` a INNER JOIN prefix_user b ON a.team = b.name WHERE b.id = ".$uid." ORDER BY `time` ASC");
                    while($rowA = db_fetch_assoc($sqlA))
                    {
                    $ax++; if ($ax == 8) {$awards .= "<br>"; $ax = 0;}
                    $awards .= (!empty($rowA['bild']) ? '<img style="padding:1px;border:0px;" src="'.$rowA['bild'].'" alt="'.$rowA['wofur'].'" title="'.$rowA['wofur'].'"/>' : $rowA['wofur']);
                    }
                    $awards = '<b><b><br><div style="text-align:center;">'.$awards.'</div>';
    
    
    $lastbes_anz = 5; //Bei höhere Anzahl muss ggf. in der Datenbank die Größe der Felder bzw der Typ geändert werden
    if ($_SESSION['authid'] != $uid AND $_SESSION['authid'] != 0) {
      $lb = db_fetch_object(db_query('SELECT last_bes, last_user_time FROM prefix_user WHERE id = '.$uid));
      $lba = explode('#',$lb->last_bes);
      $lbt = explode('#',$lb->last_user_time);
      $i = array_search($_SESSION['authid'],$lba);
      if ($i !== false) {
        unset($lba[$i]); unset($lbt[$i]);
      } elseif (count($lba) >= $lastbes_anz) {
        $lba = array_slice($lba,0,$lastbes_anz-1);
        $lbt = array_slice($lbt,0,$lastbes_anz-1);
      }
      array_unshift($lba,$_SESSION['authid']);
      array_unshift($lbt,time());
      $i_lb = implode('#',$lba);
      $i_lbt = implode('#',$lbt);
      db_query("UPDATE prefix_user SET last_bes = '$i_lb', last_user_time = '$i_lbt' WHERE id = $uid");
    } 
    
    include('user_infos.php');
    
    $ar = array (
          'UID' => $uid,
          '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,
          'LASTUSER' => last_user($uid),
    	'STATUS2' => $online,
    	'USERTITEL' => $usertitel,
    	'EMAIL' => $email,
    	'HOMEPAGE' => $homepage,
    	'GESCHLECHT' => $geschlecht,
    	'GEBDATUM' => $gebdatum,
    	'ALTER' => $alter,
    	'WOHNORT' => $wohnort,
    	'FORUMTOPICS' => $row4['forumtopics'],
    	'NEWSTOPICS' => $row5['newstopics'],
    	'NEWSPOSTS' => $row6['newsposts'],
    	'FORUMPOSTS' => $row7['forumposts'],
    	'SIGNATUR' => bbcode($row['sig']),
    	'STAAT' => $staat,
    	'UID' => $uid,
    	'STERNZEICHEN' => $sternzeichen,
    	'GB_EINTRAEGE' => $gb_eintraege,
    	'GALLERIE_EINTRAEGE' => $gallery_eintraege,
    	'ICQ' => $icq,
    	'GAME' => $game,
          'SPIELERFAHRUNG' => $spielerfahrungen,
          'CLAN' => $clan,
          'MAP' => $map,
          'WAFFE' => $waffe,
          'ESSEN' => $essen,
          'TRINKEN' => $trinken,
          'FILM' => $film,
          'MUSIK' => $musik,
          'SPORT' => $sport,
          'CPU' => $cpu,
          'MAINBOARD' => $mainboard,
          'RAM' => $ram,
          'MONITOR' => $monitor,
          'GRAFIKKARTE' => $grafikkarte,
          'SOUNDKARTE' => $soundkarte,
          'FESTPLATTE' => $festplatte,
          'I_NET_VERBINDUNG' => $i_net_verbindung,
          'TASTATUR' => $tastatur,
          'MAUS' => $maus,
          'JAPPY' => $jappy, 
          'FACEBOOK' => $facebook, 
          'WKW' => $wkw, 
          'STUDIVZ' => $studivz, 
          'MYSPACE' => $myspace, 
          'YOUTUBE' => $youtube,
          'AWARDS' => $awards,
    
    );
    
    		
    $title = $allgAr['title'].' :: Users :: Details von '.$row['name'];
    $hmenu  = $extented_forum_menu.'<a class="smalfont" href="?user">Users</a><b> &raquo; </b> <a href=index.php?user-details-'.$uid.'>Details von '.$row['name']."</a>".$extented_forum_menu_sufix;
    $design = new design ( $title , $hmenu, 1);
    $design->header();
    
    $tpl = new tpl ( 'user/userdetails' );
    
    $l = profilefields_show ( $uid );
    
    $ar['rowspan'] = 4 + substr_count($l, '<tr><td class="');
    
    $ar['profilefields'] = $l;
    $tpl->set_ar_out($ar,0);
    $design->footer();
    
    
    ?>


    und die userdetails.hmtl
    <!--<a href="javascript:history.back(1)"><b>&laquo;</b> {_lang_back}</a>
    <br />
    <br />
    
    <table width="100%" cellpadding="3" cellspacing="1" class="border">
      <tr class="Chead"> 
        <th colspan="3"><b>{_lang_detailsfrom} {NAME}</b></th>
      </tr><tr>
        <td class="Cmite" width="30%">{_lang_nickname}</td>
        <td class="Cnorm" width="40%">{NAME}</td>
        <td class="Cnorm" width="30%" rowspan="{rowspan}" valign="top" align="center">
    		  {AVATA}
    			<br /><br />
    			<font class="smalfont">{RANG}</font>
    		</td>
      </tr><tr>
        <td class="Cmite">{_lang_regsince}</td>
        <td class="Cnorm">{JOINED}</td>
      </tr><tr>
        <td class="Cmite">{_lang_lastactivity}</td>
        <td class="Cnorm">{LASTAK}</td>
      </tr><tr>
        <td class="Cmite">{_lang_posts2}</td>
        <td class="Cnorm">{POSTS}, {_lang_perday}: {postpday}</td>
      </tr>
    	
    {profilefields}
    	
    </table>
    
    <br />
    <a href="javascript:history.back(1)"><b>&laquo;</b> {_lang_back}</a>-->
    <br />
    
    <script language="javascript" type="text/javascript">
    	function details()
    	{
    		if(document.getElementById('more_details').style.display=='block'){
    			document.getElementById('more_details').style.display='none';
    		}else{
    			document.getElementById('more_details').style.display='block';
    		}
    	}
    </script>
    
    <table border="0" cellpadding="2" cellspacing="0" width="100%">
      <tbody>
        <tr>
          <td valign="top" width="60%"><table border="0" cellpadding="2" cellspacing="0" width="80%">
            <tbody>
              <tr>
                <td colspan="2"><b>&nbsp; &bull; <u>Pers&ouml;nliche Informationen</u></b></td>
              </tr>
              <tr>
                <td colspan="2"></td>
              </tr>
              <tr>
                <td width="35%"><img src="include/images/userdetails/user.png" class="gradualfader" border="0" height="16" width="16" /> Nickname:</td>
                <td width="65%"><strong>{NAME}</strong></td>
              </tr>
              <tr>
                <td><img src="include/images/userdetails/titel.png" class="gradualfader" border="0" height="16" width="16"> Benutzertitel:</td>
                <td>{USERTITEL}</td>
              </tr>
              <tr>
                <td><img src="include/images/userdetails/email.png" class="gradualfader" border="0" height="16" width="16"> Kontakt:</td>
                <td>{EMAIL}</td>
              </tr>
              <tr>
                <td><img src="include/images/userdetails/homepage.png" class="gradualfader" border="0" height="16" width="16"> Homepage:</td>
                <td>{HOMEPAGE}</td>
              </tr>         
              </tr>
              <tr>
                <td><img src="include/images/userdetails/sex.png" class="gradualfader" border="0" height="16" width="16"> Geschlecht:</td>
                <td>{GESCHLECHT}</td>
              </tr>
              <tr>
                <td><img src="include/images/userdetails/gebdatum.png" class="gradualfader" border="0" height="16" width="16" />Geburstag:</td>
                <td>{GEBDATUM} {ALTER}</td>
              </tr>
              <tr>
                <td><img src="include/images/userdetails/sternzeichen.png" class="gradualfader" border="0" height="16" width="16" />Sternzeichen</td>
                <td>{STERNZEICHEN}</td>
              </tr>
              <tr>
                <td><img src="include/images/userdetails/land.png" class="gradualfader" border="0" height="16" width="16"> Land:</td>
                <td>{WOHNORT} {STAAT}</td>
              </tr>
              <tr>
                <td><img src="include/images/userdetails/reg.png" class="gradualfader" border="0" height="16" width="16"> Dabei seit:</td>
                <td>{JOINED}</td>
              </tr>
              <tr>
                <td><img src="include/images/userdetails/letzteakt.png" class="gradualfader" border="0" height="16" width="16"> Letzte Aktivit&auml;t:</td>
                <td>{LASTAK} Uhr</td>
              </tr>
              </tbody>
          </table>
              <br>
              <table cellpadding="2" cellspacing="0" width="100%">
                <tbody>
                  <tr>
                    <td><b><img src="include/images/userdetails/signatur.png" class="gradualfader" border="0" height="16" width="16"><u>Signatur</u></b></td>
                  </tr>
                  <tr>
                    <td></td>
                  </tr>
                  <tr>
                    <td class="gradualfader">{SIGNATUR}</td>
                  </tr>
                </tbody>
              </table>
            <br>
              <table cellpadding="2" cellspacing="0" width="100%">
                <tbody>
                  <tr>
                    <td colspan="2"><b>&nbsp; &bull; <u>Game / Sonstiges</u></b></td>
                  </tr>
                  <tr>
                    <td colspan="2"></td>
                  </tr>
    
                  <tr>
                    <td width="23%">• Favorit</td>
                  </tr>
    			            <tr>
                <td><img src="include/images/userdetails/games.png" class="gradualfader" border="0" height="16" width="16"> Game:</td>
                <td width="77%">{GAME}</td>
              </tr>
              <tr>
                <td><img src="include/images/userdetails/clan.png" class="gradualfader" border="0" height="16" width="16"> Clan:</td>
                <td>{CLAN}</td>
              </tr>
              <tr>
                <td><img src="include/images/userdetails/map.gif" class="gradualfader" border="0" height="16" width="16"> Map:</td>
                <td>{MAP}</td>
              </tr>
              <tr>
                <td><img src="include/images/userdetails/waffe.png" class="gradualfader" border="0" height="16" width="16"> Waffe:</td>
                <td>{WAFFE}</td>
              </tr>
              <tr>
                <td><img src="include/images/userdetails/essen.png" class="gradualfader" border="0" height="16" width="16"> Essen:</td>
                <td>{ESSEN}</td>
              </tr>
              <tr>
                <td><img src="include/images/userdetails/trinken.png" class="gradualfader" border="0" height="16" width="16"> Trinken:</td>
                <td>{TRINKEN}</td>
              </tr>
              <tr>
                <td><img src="include/images/userdetails/film.png" class="gradualfader" border="0" height="16" width="16"> Film:</td>
                <td>{FILM}</td>
              </tr>
              <tr>
                <td><img src="include/images/userdetails/musik.png" class="gradualfader" border="0" height="16" width="16"> Musik:</td>
                <td>{MUSIK}</td>
              </tr>
              <tr>
                <td><img src="include/images/userdetails/sport.png" class="gradualfader" border="0" height="16" width="16"> Sport:</td>
                <td>{SPORT}</td>
              </tr>
                </tbody>
              </table>
    		          <br>
              <table cellpadding="2" cellspacing="0" width="100%">
                <tbody>
                  <tr>
                    <td align="left" valign="middle" colspan="2"><b>&nbsp; &bull; <u>Computer Technik </u></b></td>
                  </tr>
                  <tr>
                    <td colspan="2"></td>
                  </tr>
                            <tr>
                <td><img src="include/images/userdetails/cpu.png" class="gradualfader" border="0" height="16" width="16"> Cpu:</td>
                <td>{CPU}</td>
              </tr>
              <tr>
                <td><img src="include/images/userdetails/mainboard.png" class="gradualfader" border="0" height="16" width="16"> Mainboard:</td>
                <td>{MAINBOARD}</td>
              </tr>
              <tr>
                <td><img src="include/images/userdetails/arbeitsspeicher.png" class="gradualfader" border="0" height="16" width="16"> Ram:</td>
                <td>{RAM}</td>
              </tr>
              <tr>
                <td><img src="include/images/userdetails/monitor.png" class="gradualfader" border="0" height="16" width="16"> Monitor:</td>
                <td>{MONITOR}</td>
              </tr>
              <tr>
                <td width="31%"><img src="include/images/userdetails/grafik.png" class="gradualfader" border="0" height="16" width="16"> Grafikkarte:</td>
                <td width="69%">{GRAFIKKARTE}</td>
              </tr>
              <tr>
                <td><img src="include/images/userdetails/soundkarte.png" class="gradualfader" border="0" height="16" width="16"> Soundkarte:</td>
                <td>{SOUNDKARTE}</td>
              </tr>
              <tr>
                <td><img src="include/images/userdetails/festplatte.png" class="gradualfader" border="0" height="16" width="16"> Festplatte:</td>
                <td>{FESTPLATTE}</td>
              </tr>
              <tr>
                <td><img src="include/images/userdetails/modem.png" class="gradualfader" border="0" height="16" width="16">Verbindung:</td>
                <td>{I_NET_VERBINDUNG}</td>
              </tr>
              <tr>
                <td><img src="include/images/userdetails/tastatur.png" class="gradualfader" border="0" height="16" width="16"> Tastatur:</td>
                <td>{TASTATUR}</td>
              </tr>
              <tr>
                <td><img src="include/images/userdetails/maus.png" class="gradualfader" border="0" height="16" width="16"> Maus:</td>
                <td>{MAUS}</td>
              </tr>
    		  </tbody>
            </table></td>
    	<td width="0%">&nbsp;</td>
          <td valign="top" width="40%"><table cellpadding="2" cellspacing="0" width="100%">
            <tbody>
              <tr>
                <td><b>&nbsp; &bull; <u>Benutzerbild:</u></b></td>
              </tr>
              <tr>
                <td></td>
              </tr>
              <tr>
                <td align="center" class="gradualfader" height="215">{AVATA}</td>
              </tr>
            </tbody>
          </table>
              <br>
    		  <table cellpadding="2" cellspacing="0" width="100%">
                <tbody>
                  <tr>
                    <td colspan="2"><b>&nbsp; &bull; <u>Specials</u></b></td>
    		      </tr>
    					<tr>
                    <td colspan="2"></td>
                  </tr>
    			         
    		  			            <tr>
                <td width="37%">Usergallerie:</td>
                <td width="63%">{GALLERIE_EINTRAEGE} (<a href="index.php?user-usergallery-{UID}">ansehen)</a></td>
              </tr>
    		  		  			            <tr>
                <td width="37%">G&auml;stebuch:</td>
                <td width="63%"><a href="index.php?user-usergb-view-{UID}">Klicke hier!</a></td>
              </tr>
    		  		  		  			            <tr>
                <td width="37%">PN:</td>
                <td width="63%"><a href="index.php?forum-privmsg-new=0&empfid={UID}">schreiben</a></td>
              </tr><tr>
    		              
                </tbody>
              </table>
    		          <br>
    		  
              <table width="100%">
                <tbody>
                  <tr>
                    <td><b>&nbsp; &bull; <u>Letzte Besucher &nbsp;</u></b></td>
                  </tr>
                  <tr>
                    <td></td>
                  </tr>
                  <tr bgcolor="">
                    <td><table cellpadding="0" cellspacing="0" width="100%">
                        <tbody>
                          <tr>
                            <td height="44">{LASTUSER}</td>
                          </tr>
                        </tbody>
                    </table></td>
                  </tr>
                </tbody>
              </table>
            <br>
    		<table width="100%">
                <tbody>
                  <tr>
                    <td><b>&nbsp; &bull; <u>Statistik&nbsp;</u></b></td>
                  </tr>
                  <tr>
                    <td></td>
                  </tr>
                  <tr bgcolor="">
                    <td><table cellpadding="0" cellspacing="0" width="100%">
                        <tbody>
                     <tr>
                     <td height="25" width="42%">Themen erstellt:</td>
    		         <td width="58%" height="25">{FORUMTOPICS}</td>
                     </tr>
    				      
    				                  <tr>
                     <td height="25" width="42%">News verfasst:</td>
    		         <td width="58%" height="25">{NEWSPOSTS}</td>
                     </tr>
    				                  <tr>
                     <td height="25" width="42%">Forum Beiträge:</td>
    		         <td width="58%" height="25">{POSTS}</td>
                     </tr>
                     </tbody>
                    </table></td>
                  </tr>
                </tbody>
            </table>
            <br>
              <table cellpadding="2" cellspacing="0" width="100%">
                <tbody>
    		  <tr>
    		  <td align="left" valign="middle" colspan="2"><b>&nbsp; &bull; <u>Community</u></b></td>
    		  </tr>
              <tr>
                <td width="45%"><img src="include/images/userdetails/steam.png" class="gradualfader" border="0" height="16" width="16"> Steam:</td>
                <td width="55%">{JAPPY}</td>
              </tr>
              <tr>
                <td><img src="include/images/userdetails/facebook.png" class="gradualfader" border="0" height="16" width="16"> Facebook:</td>
                <td>{FACEBOOK}</td>
              </tr>
              <tr>
                <td><img src="include/images/userdetails/youtube.png" class="gradualfader" border="0" height="16" width="16"> YouTube:</td>
                <td>{YOUTUBE}</td>
              </tr><tr>
    		<td colspan="4"><div id="more_details" style="display:none"><table>{profilefields}</table></div></td>
    	</tr>
                </tbody>
    	  </table></td>	  
        </tr>
      </tbody>
    </table>
    <br />
     <table width="100%" cellpadding="3" cellspacing="1" class="border">
      <tr class="Chead">
       <center> <th colspan="2"><center>Auszeichnungen von {NAME}</center></b></th></tr><tr>
        </tr></table>
    <table width="100%" cellpadding="3" cellspacing="1">
    <th colspan="2"  bgcolor="#F2F2F2">{AWARDS}</b></th>
    <tr><td colspan="4">&nbsp;</td></tr>
    </table>
    <br />
    <a href="javascript:history.back(1)"><b>&laquo;</b> {_lang_back}</a>


    betroffene Homepage: bof-clan.eu


    Zuletzt modifiziert von Isalapisa am 26.08.2012 - 17:32:45
    0 Mitglieder finden den Beitrag gut.
  2. #2
    User Pic
    Lord|Schirmer Administrator
    Registriert seit
    21.03.2007
    Beiträge
    7.675
    Beitragswertungen
    1212 Beitragspunkte
    $titel = $user->usertitel;

    Gibt es denn unter prefix_user auch usertitel?

    Wenn Du den Rang/Recht meinst, dann:
    $titel = @db_result(db_query("SELECT name FROM prefix_grundrechte WHERE id='".$user->recht."'"),0);
    rules :: doku :: faq :: linkus
    0 Mitglieder finden den Beitrag gut.
  3. #3
    User Pic
    Isalapisa Mitglied
    Registriert seit
    05.07.2012
    Beiträge
    135
    Beitragswertungen
    1 Beitragspunkte
    nein weiß ich nicht aber bei user_details.php gibt es $usertitel

    ich probiere es aus und melde mich morgen zurück

    wo müsste ich deine denn genau einfügen.. hab schon echt lange in der showpost.php rumgesucht


    Zuletzt modifiziert von Isalapisa am 26.08.2012 - 22:02:08
    0 Mitglieder finden den Beitrag gut.
  4. #4
    User Pic
    Isalapisa Mitglied
    Registriert seit
    05.07.2012
    Beiträge
    135
    Beitragswertungen
    1 Beitragspunkte
    hab das eingefügt in der showpost.php aber mir wird nix angezeigt
    habe auch (recht) in der html reingschreiben aber irgendwie fragt der das nicht ab... ich benutzte das modifizierte Userprofil 1.2 und möchte von da den Usertitel des jeweiligen User ( Admin, CoAdmin oder Member ) im Forum angezeigt bekommen
    0 Mitglieder finden den Beitrag gut.
  5. #5
    User Pic
    Lord|Schirmer Administrator
    Registriert seit
    21.03.2007
    Beiträge
    7.675
    Beitragswertungen
    1212 Beitragspunkte
    Ohne deine ganzen Dateien zu durchforsten, einfach

    $titel = $user->usertitel;


    mit

    $titel = @db_result(db_query("SELECT name FROM prefix_grundrechte WHERE id='".$user->recht."'"),0);


    ersetzen!
    rules :: doku :: faq :: linkus
    0 Mitglieder finden den Beitrag gut.
  6. #6
    User Pic
    Isalapisa Mitglied
    Registriert seit
    05.07.2012
    Beiträge
    135
    Beitragswertungen
    1 Beitragspunkte
    vielen dank hat geklappt zwinker
    0 Mitglieder finden den Beitrag gut.
Geschlossen

Zurück zu HTML, PHP, SQL,...

Optionen: Bei einer Antwort zu diesem Thema eine eMail erhalten