ilch Forum » Ilch Clan 1.1 » Fehlersuche und Probleme » Fehler beim Aufrufen des Profils

Geschlossen
  1. #1
    User Pic
    D-G Mitglied
    Registriert seit
    11.01.2013
    Beiträge
    24
    Beitragswertungen
    0 Beitragspunkte
    Hallo ihr lieben lächeln

    Ich habe vor einiger Zeit auf meiner ilch Seite eine erweiterung einbauen lassen für die Profil Ansicht und eine erweiterung vom user Cp die ich mal in einen forum gesehen habe in diesen ich angemeldet war.

    Hat soweit auch alles Wunderbar auf der Seite von mir geklappt bis mir folgender fehler aufgefallen ist nachdem ich einen Member gelöscht hatte und im Forum einen beitrag gelesen habe den er noch Verfasst hat.

    Nachdem ich auf sein Profil geklickt habe ist folgender fehler aufgetretten:

    gesperrtes Bild

    gesperrtes Bild

    hier noch der fehlercode:

    MySQL Error:
    1064 : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
    in Query:
    SELECT * FROM ic1_grundrechte WHERE id =
    
    Debug backtrace:
    	@ mysql.php:32 -- debug_bt()
    	@ mysql.php:50 -- db_check_error(...)
    	@ user_infos.php:12 -- db_query(...)
    	@ user_details.php:6 -- include(...)
    	@ user.php:27 -- require_once(...)
    	@ index.php:48 -- require_once(...)
    
    
    Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in /home/webpages/lima-city/dmo-clan/html/ilch/include/includes/func/db/mysql.php on line 58
    MySQL Error:
    1064 : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND a.status = 1 GROUP BY a.fid, b.name ORDER BY a.status, onlinestatus DESC' at line 6
    in Query:
    SELECT a.fid as aktfid,a.status, b.name,b.avatar,b.staat,b.geschlecht,b.gebdatum,b.id as tud,b.llogin,a.freundescription, d.freundescription AS freundescription2, IF(MAX(c.uptime) > '2013-01-27 23:55:20','online','offline') as onlinestatus, a.status FROM `ic1_friends` a LEFT JOIN `ic1_user` b ON a.fid = b.id LEFT JOIN `ic1_online` c ON a.fid = c.uid LEFT JOIN `ic1_friends` d ON d.fid = a.uid AND d.uid = a.fid WHERE a.uid = AND a.status = 1 GROUP BY a.fid, b.name ORDER BY a.status, onlinestatus DESC
    
    Debug backtrace:
    	@ mysql.php:32 -- debug_bt()
    	@ mysql.php:50 -- db_check_error(...)
    	@ user_details.php:51 -- db_query(...)
    	@ user.php:27 -- require_once(...)
    	@ index.php:48 -- require_once(...)
    
    
    Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in /home/webpages/lima-city/dmo-clan/html/ilch/include/includes/func/db/mysql.php on line 67
    MySQL Error:
    1064 : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND status=1' at line 1
    in Query:
    SELECT COUNT(fid) FROM ic1_friends WHERE uid = AND status=1
    
    Debug backtrace:
    	@ mysql.php:32 -- debug_bt()
    	@ mysql.php:50 -- db_check_error(...)
    	@ user_details.php:134 -- db_query(...)
    	@ user.php:27 -- require_once(...)
    	@ index.php:48 -- require_once(...)
    
    MySQL Error:
    1064 : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY id DESC LIMIT 3' at line 1
    in Query:
    SELECT * FROM ic1_usergallery WHERE uid = ORDER BY id DESC LIMIT 3
    
    Debug backtrace:
    	@ mysql.php:32 -- debug_bt()
    	@ mysql.php:50 -- db_check_error(...)
    	@ user_details.php:166 -- db_query(...)
    	@ user.php:27 -- require_once(...)
    	@ index.php:48 -- require_once(...)
    
    
    Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /home/webpages/lima-city/dmo-clan/html/ilch/include/includes/func/db/mysql.php on line 71
    MySQL Error:
    1064 : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
    in Query:
    SELECT points FROM ic1_user WHERE id =
    
    Debug backtrace:
    	@ mysql.php:32 -- debug_bt()
    	@ mysql.php:50 -- db_check_error(...)
    	@ user_details.php:185 -- db_query(...)
    	@ user.php:27 -- require_once(...)
    	@ index.php:48 -- require_once(...)
    
    MySQL Error:
    1064 : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
    in Query:
    SELECT COUNT(id) FROM ic1_usergallery WHERE uid =
    
    Debug backtrace:
    	@ mysql.php:32 -- debug_bt()
    	@ mysql.php:50 -- db_check_error(...)
    	@ user_details.php:186 -- db_query(...)
    	@ user.php:27 -- require_once(...)
    	@ index.php:48 -- require_once(...)
    
    MySQL Error:
    1064 : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
    in Query:
    SELECT COUNT(id) FROM ic1_warn WHERE uid=
    
    Debug backtrace:
    	@ mysql.php:32 -- debug_bt()
    	@ mysql.php:50 -- db_check_error(...)
    	@ user_details.php:222 -- db_query(...)
    	@ user.php:27 -- require_once(...)
    	@ index.php:48 -- require_once(...)
    
    
    Warning: Cannot modify header information - headers already sent by (output started at /home/webpages/lima-city/dmo-clan/html/ilch/include/includes/func/db/mysql.php:32) in /home/webpages/lima-city/dmo-clan/html/ilch/include/includes/class/design.php on line 23


    und das ist der 2 Fehler Code unter den Header:

     
    MySQL Error:
    1064 : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
    in Query:
    SELECT fid FROM ic1_friends WHERE uid =
    
    Debug backtrace:
    	@ mysql.php:32 -- debug_bt()
    	@ mysql.php:50 -- db_check_error(...)
    	@ user_details.php:320 -- db_query(...)
    	@ user.php:27 -- require_once(...)
    	@ index.php:48 -- require_once(...)
    
    
    Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in /home/webpages/lima-city/dmo-clan/html/ilch/include/includes/func/db/mysql.php on line 67


    Der Fehler ist nur aufrufbar wen ich von dem gelöschten User das Profil aufrufen möchte. Würde den Fehler gerne beheben gibt es eine möglichkeit?


    Zuletzt modifiziert von D-G am 28.01.2013 - 00:02:11
    0 Mitglieder finden den Beitrag gut.
  2. #2
    User Pic
    Rock@wulf Hall Of Fame
    Registriert seit
    03.06.2004
    Beiträge
    3.282
    Beitragswertungen
    239 Beitragspunkte
    Getreu dem Motto "It's not a bug, it's a feature"

    Ist klar das das so auftritt.
    Denn der User war da, und nun fehlen die Daten denn sie sind ja gelöscht.
    Ergo liefert die abfrage Nach den Daten die bei user xY liegen keine daten und so entsteht der "Fehler"

    Nun, ist schwierig weil es mir danach aussieht das du ein Angepasstes Profil verwendest.

    Poste doch bitte mal den php code deiner user_datails.php dann bau ich ich eine abfrage ein die die Fehler verhindert
    Meine Postings repräsentieren meine Meinung wenn nicht anders gekennzeichnet.
    MFG Rock@wulf
    0 Mitglieder finden den Beitrag gut.
  3. #3
    User Pic
    D-G Mitglied
    Registriert seit
    11.01.2013
    Beiträge
    24
    Beitragswertungen
    0 Beitragspunkte
    Hallo Vielen Dank erstmal für deine schnelle Antwort lächeln

    Also das hier ist der Code der Datei userdetails.php müsste der richtige sein:)

    <?php
    // Copyright by: Manuel Staechele
    // Support: www.ilch.de
        defined('main') or die('no direct access');
        $uid = $menu->get(2);
        include ('user_infos.php');
        if ($row['llogin'] <= time() - (60 * 60 * 24 * 30)) {
            $l1 = '<font color="#FF0000">' . date("d.m.Y - H:i", $row['llogin']) . ' Uhr</font>';
        } elseif ($row['llogin'] <= time() - (60 * 60 * 24 * 14)) {
            $l1 = '<font color="#F97500">' . date("d.m.Y - H:i", $row['llogin']) . ' Uhr</font>';
        }
        else {
            $l1 = '<font color="#047410">' . date("d.m.Y - H:i", $row['llogin']) . ' Uhr</font>';
        }
        $group = @db_result(db_query('SELECT name FROM prefix_groups LEFT JOIN prefix_groupusers ON prefix_groups.id = prefix_groupusers.gid WHERE prefix_groupusers.uid = "' . $row['id'] . '"'));
        if ($group == Administration) {
            $ff = '<font style="color:#FD740E;"><b>' . $row['name'] . '</b></font>';
        } elseif ($group == Moderatoren) {
            $ff = '<font style="color:#318E1B;"><b>' . $row['name'] . '</b></font>';
        }
        else {
            $ff = $row['name'];
        }
        $selfr = array (
            'Onlinestatus'        => 'Onlinestatus',
            'Name'                => 'Name',
            'letzter Login'       => 'letzter Login',
            'abgegebener Meinung' => 'abgegebener Meinung'
        );
        foreach ($selfr as $sel) {
            $frsort .= '<option value="' . $sel . '" ' . ($sel == $_POST['frsort'] ? 'selected="selected"' : '') . '>' . $sel . '</option>';
        }
        if ($_POST['frsort'] == 'Name') {
            $sel = 'b.name ASC';
        } elseif ($_POST['frsort'] == 'letzter Login') {
            $sel = 'b.llogin DESC';
        } elseif ($_POST['frsort'] == 'abgegebener Meinung') {
            $sel = 'freundescription2 DESC';
        } elseif ($_POST['frsort'] == 'Onlinestatus') {
            $sel = 'a.status, onlinestatus DESC';
        } else {
            $sel = ' a.status, onlinestatus DESC';
        }
    // Abfrage Freunde
        $l12 = db_query("SELECT a.fid as aktfid,a.status, b.name,b.avatar,b.staat,b.geschlecht,b.gebdatum,b.id as tud,b.llogin,a.freundescription, d.freundescription AS freundescription2, IF(MAX(c.uptime) > '$dif','online','offline') as onlinestatus, a.status
                     FROM `prefix_friends` a
                     LEFT JOIN `prefix_user` b ON a.fid = b.id
                     LEFT JOIN `prefix_online` c ON a.fid = c.uid
                     LEFT JOIN `prefix_friends` d ON d.fid = a.uid AND d.uid = a.fid
                     WHERE a.uid = {$row['id']} AND a.status = 1 GROUP BY a.fid, b.name ORDER BY " . $sel
        );
        while ($row41 = db_fetch_object($l12)) {
            /*$group = @db_result(db_query('SELECT name FROM prefix_groups LEFT JOIN prefix_groupusers ON prefix_groups.id = prefix_groupusers.gid WHERE prefix_groupusers.uid = "'. $row41->aktfid.'"'));
    
           if ($group == Administration)
           $row41->name = '<font style="color:#FD740E;"><b>'.$row41->name.'</b></font>';
           elseif ($group == Moderatoren)
           $row41->name = '<font style="color:#318E1B;"><b>'.$row41->name.'</b></font>';
           else
           $row41->name = $row41->name;
           */
            if (file_exists($row41->avatar)) {
                $row41->avatar = '<img src=' . $row41->avatar . ' width="80" height="80" border=&quot;0&quot;  />';
            } else {
                if ($r['geschlecht'] == 1) {
                    $row41->avatar = '<img src=include/images/avatars/maennlich.jpg  width="80" height="80" border=&quot;0&quot;  />';
                } else {
                    if ($r['geschlecht'] == 2) {
                        $row41->avatar = '<img src=include/images/avatars/weiblich.jpg width="80" height="80" border=&quot;0&quot; />';
                    } else {
                        $row41->avatar = '<img src=include/images/avatars/wurstegal.jpg width="80" height="80" border=&quot;0&quot;  />';
                    }
                }
            }
            $diff = time() - $row41->llogin;
            $secs = $diff % 60;
            $diff = floor($diff / 60);
            $min  = $diff % 60;
            $diff = floor($diff / 60);
            $hour = $diff % 24;
            $diff = floor($diff / 24);
            if ($diff == 0 && $hour == 0) {
                $row41->llogin = 'Login vor ' . $min . " Min.<br />";
            } elseif ($diff == 0 && $hour != 0) {
                $row41->llogin = 'Login vor ' . $hour . " Std.<br />";
            }
            else {
                $row41->llogin = 'Login am ' . date("d.m.Y", $row41->llogin);
            }
            if ($row41->geschlecht == 0) {
                $row41->geschlecht = '<span></span>';
            }
            if ($row41->geschlecht == 1) {
                $row41->geschlecht = '<span><img src=include/images/icons/mann.gif border=0></span>';
            }
            if ($row41->geschlecht == 2) {
                $row41->geschlecht = '<span><img src=include/images/icons/frau.gif border=0></span>';
            }
            $nation = empty($row41->staat) ? 'n/a' : '<img src=include/images/flags/' . $row41->staat . ' border=&quot;0&quot; />';
            if ($row41->gebdatum !== "0000-00-00") {
                $row41->gebdatum = date('d.m.Y', strtotime($row41->gebdatum));
                $tag             = date('d', strtotime($row41->gebdatum));
                $monat           = date('m', strtotime($row41->gebdatum));
                $jahr            = date('Y', strtotime($row41->gebdatum));
                $jetzt           = mktime(0, 0, 0, date("m"), date("d"), date("Y"));
                $geburtstag      = mktime(0, 0, 0, $monat, $tag, $jahr);
                $row41->alter    = "(" . intval(($jetzt - $geburtstag) / (3600 * 24 * 365)) . ")";
            } else {
                $gebdatum     = '';
                $row41->alter = '(??)';
            }
            $amfr        = $row41->name;
            $row41->name = ((strlen($row41->name) < 9) ? $row41->name : substr($row41->name, 0, 8) . '..');
            if ($row41->onlinestatus == 'online') {
                $row41->ol = '<div style="-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;background-color:#037611;padding:4px;"><a href="index.php?user-details-' . $row41->aktfid . '">' . $nation . ' ' . $row41->name . ' ' . $row41->alter . ' ' . $row41->geschlecht . '</a></div>';
            } else {
                $row41->ol = '<div style="-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;background-color:#AF0000;padding:4px;"><a href="index.php?user-details-' . $row41->aktfid . '">' . $nation . ' ' . $row41->name . ' ' . $row41->alter . ' ' . $row41->geschlecht . '</a></div>';
            }
            $prf                      = ((strlen($row['name']) < 10) ? $row['name'] : substr($row['name'], 0, 9) . '..');
            $row41->freundescription2 = str_replace(array (
                                                          '"',
                                                          "'"
                                                    ), '', $row41->freundescription2
            );
            if (empty($row41->freundescription2)) {
                $mja = '<div class="Cnorm" style="font-style:italic;">keine Meinung</div>';
            } else {
                $meinung = '<div style="padding:4px;"><u><b>' . $amfr . '</b> sagt:</u><br><br>' . $row41->freundescription2 . '</div>';
                $mja     = '<div class="Cnorm" title="' . str_replace('"', '', $meinung) . '" style="cursor:pointer;color:#FFD100;font-weight:bold;">Hover für Meinung</div>';
            }
            $lala .= '<div style="float:left; padding:15px; width:20%;margin-left:3px;display:block;" align="center"><fieldset style="padding: 0px; border: 1px solid #888888;"><div class="Cnorm">' . $row41->avatar . '</div>' . $row41->ol . '<div class="Cmite" style="padding:4px;">' . $row41->llogin . '</div>
    ' . $mja . '</fieldset></div>';
        }
        $countfreunde = @db_result(db_query('SELECT COUNT(fid) FROM prefix_friends WHERE uid = ' . $row['id'] . ' AND status=1'));
    // Ende Abfrage Freunde
        $lb = db_query('SELECT a.id, a.name, a.rep, c.erst as last, c.id as pid,c.erstid, c.txt AS text,c.tid, c.time
    FROM prefix_topics a
      LEFT JOIN prefix_forums b ON b.id = a.fid
      LEFT JOIN prefix_posts c ON c.tid = a.id
      LEFT JOIN prefix_groupusers vg ON vg.uid = ' . $_SESSION['authid'] . ' AND vg.gid = b.view
      LEFT JOIN prefix_groupusers rg ON rg.uid = ' . $_SESSION['authid'] . ' AND rg.gid = b.reply
      LEFT JOIN prefix_groupusers sg ON sg.uid = ' . $_SESSION['authid'] . ' AND sg.gid = b.start
    WHERE ((' . $_SESSION['authright'] . ' <= b.view AND b.view < 1)
       OR (' . $_SESSION['authright'] . ' <= b.reply AND b.reply < 1)
       OR (' . $_SESSION['authright'] . ' <= b.start AND b.start < 1)
       	 OR rg.fid IS NOT NULL
    	 OR sg.fid IS NOT NULL
    	 OR vg.fid IS NOT NULL
    	 OR -9 >= ' . $_SESSION['authright'] . ')AND c.erst = "' . $row['name'] . '" GROUP BY c.id
    ORDER BY c.time DESC
    LIMIT 5'
        );
        while ($row42 = db_fetch_object($lb)) {
            $bei         = $row42->text;
            $bei         = BBcode($bei);
            $bei         = ((strlen($bei) < 250) ? $bei : substr($bei, 0, 250) . '...');
            $bei         = ereg_replace("\"", "", $bei);
            $bei         = ereg_replace("\'", "", $bei);
            $row42->name = ((strlen($row42->name) < 31) ? $row42->name : substr($row42->name, 0, 30) . '...');
            $time2       = $row42->time = date("d.m.Y - H:i", $row42->time);
            $rege        = @db_result(db_query('SELECT COUNT(id) FROM prefix_posts WHERE tid = ' . $row42->id . ' AND id <= ' . $row42->pid));
            $regen       = ceil(($rege) / $allgAr['Fpanz']);
            $pos         = '<div style="width:200px;word-wrap:break-word;padding:2px;"><u>Beitrag am ' . $time2 . ' Uhr</u><br><br>' . $bei . '</div>';
            $top .= '<div>Zum Thema: <a class="tip" href="index.php?forum-showposts-' . $row42->tid . '-p' . $regen . '#' . $row42->pid . '" ><b>' . $row42->name . '</b></a></div>';
        }
        $lga = db_query("SELECT * FROM prefix_usergallery WHERE uid = " . $row['id'] . " ORDER BY id DESC LIMIT 3");
        if (db_num_rows($lga) == 0) {
            $lpics = 'Derzeit noch keine Bilder hochgeladen';
        } else {
            $couf = @db_result(db_query('SELECT COUNT(id) FROM prefix_usergallery WHERE uid=' . $row['id']));
            while ($row32 = db_fetch_object($lga)) {
                //echo '<a href="index.php?user-usergallery-'.$row['id'].'-v'.$row32->id.'-z'.$n.'-img_'.$row32->id.'.'.$row32->endung.'">';
                $lpics .= ' <a href="index.php?user-usergallery-' . $row['id'] . '-v' . $row32->id . '-z' . $couf . '-img_' . $row32->id . '.' . $row32->endung . '"><img src="include/images/usergallery/img_thumb_' . $row32->id . '.' . $row32->endung . '" width="25%" border="0" class="gradualfader"></a>';
                $couf--;
            }
            /*if (){
           $award = '<tr><td align="center" class="Cmite">Besitzt leider noch keinen Award</td></tr>';}
           */
        }
        if (empty($row['txt1'])) {
            $rtxt1 = 'Noch kein Inhalt hinterlegt';
        } else {
            $rtxt1 = $row['txt1'];
        }
        $points     = @db_result(db_query('SELECT points FROM prefix_user WHERE id = ' . $row['id']));
        $countfotos = @db_result(db_query('SELECT COUNT(id) FROM prefix_usergallery WHERE uid = ' . $row['id']));
        if ($row['pc'] == 0) {
            $pc = '';
        } else {
            $pc = '<img src="include/images/icons/pc.png" title="PC">';
        }
        if ($row['ps3'] == 0) {
            $ps3 = '';
        } else {
            $ps3 = '<img src="include/images/icons/ps3.png" title="Playstation 3">';
        }
        if ($row['nds'] == 0) {
            $nds = '';
        } else {
            $nds = '<img src="include/images/icons/nds.png" title="Nintendo DSI">';
        }
        if ($row['x360'] == 0) {
            $x360 = '';
        } else {
            $x360 = '<img src="include/images/icons/x360.png" title="Xbox 360">';
        }
        if ($row['wii'] == 0) {
            $wii = '';
        } else {
            $wii = '<img src="include/images/icons/wii.png" title="Nintendo Wii">';
        }
        if (isset($_POST['pointsubs'])) {
            $points = escape($_POST['points'], 'integer');
            $id     = escape($_POST['peid'], 'integer');
            db_query('UPDATE prefix_user SET points = ' . $points . ' WHERE id = ' . $id);
        }
        if ($_SESSION['authid'] == 1) {
            $punkteedit = '<form method="post" action="?user-details-' . $row['id'] . '"><input type="text" value="' . $row['points'] . '" size="4" name="points"><input type="hidden" value="' . $row['id'] . '" name="peid"><input type="submit" name="pointsubs" value="OK"></form>';
        } else {
            $punkteedit = '';
        }
        $verwarnung = @db_result(db_query('SELECT COUNT(id) FROM prefix_warn WHERE uid=' . $row['id']));
    
        if ($verwarnung == 0) {
            $warn = ' <td class="Cnorm" rowspan="5" align="center" valign="middle">' . $avatar . '</td>
            </tr>';
        } elseif ($verwarnung == 1) {
            $warn = ' <td class="Cnorm" rowspan="6" align="center" valign="middle">' . $avatar . '</td>
            </tr><tr class="Cmite"><td align="center" colspan="2"><img src="include/images/forum/warn.gif">&nbsp;<font style="color:#FF0000;font-weight:bold">1 Verwarnung</font></td></tr>';
        } else {
            $warn = ' <td class="Cnorm" rowspan="6" align="center" valign="middle">' . $avatar . '</td>
            </tr><tr class="Cmite"><td align="center" colspan="2"><img src="include/images/forum/warn.gif">&nbsp;<font style="color:#FF0000;font-weight:bold">' . $verwarnung . ' Verwarnungen</font></td></tr>';
        }
    
        $chat = (loggedin() && $_SESSION['authid'] != $row['id']) ? '<a href="javascript:void(0)" onclick="javascript:chatWith(\'' . $row['id'] . '\',\'' . $row['name'] . '\')"><img src="include/images/icons/im_mini.png" width="16" height="16" border="0" alt="Chat" /></a>' : '';
    
        $ar     = array (
            'CONSOLE'            => $pc . ' ' . $ps3 . ' ' . $nds . ' ' . $x360 . ' ' . $wii,
            'WARN'               => $warn,
            'PEDIT'              => $punkteedit,
            'POINTS'             => $points,
            'OPFR'               => $frsort,
            'FRSORT'             => $sel,
            'ANZFR'              => $countfreunde,
            'ANZFO'              => $countfotos,
            'SIDE'               => $sidefr,
            'FREUND'             => $lala,
            'LPICS'              => $lpics,
            'NAME'               => $row['name'],
            'UTEXT'              => bbcode($rtxt1),
            'BEITRAG'            => $top,
            'SPNAME'             => $ff,
            'JOINED'             => date('d.m.Y', $row['regist']),
            'TEAM'               => user_get_groups($uid),
            'ID'                 => $row['id'],
            'LASTAK'             => $l1,
            'postpday'           => $postpday,
            'RANG'               => userrang($row['posts'], $uid),
            'AVATA'              => $avatar,
            'LASTUSER'           => last_user($uid),
            'ONLINE'             => $online,
            'MAINBOARD'          => $mainboard = $row['mainboard'],
            'ENERGIE'            => $mainboard = $row['energie'],
            'INET'               => $mainboard = $row['inet'],
            'CPU'                => $cpu = $row['cpu'],
            'RAM'                => $ram = $row['ram'],
            'MONITOR'            => $monitor = $row['monitor'],
            'OS'                 => $os = $row['os'],
            'GRAFIK'             => $grafik = $row['grafik'],
            'SOUND'              => $sound = $row['sound'],
            'MAUS'               => $maus = $row['maus'],
            'KB'                 => $kb = $row['kb'],
            'HEAD'               => $head = $row['head'],
            'HDD'                => $hdd = $row['hdd'],
            'USERTITEL'          => $usertitel,
            'EMAIL'              => $email,
            'HOMEPAGE'           => $homepage,
            'GESCHLECHT'         => $geschlecht,
            'GEBDATUM'           => $gebdatum,
            'CHAT'               => $chat,
            'ALTER'              => $alter,
            'WOHNORT'            => $wohnort,
            'TEMPLATE'           => $template = $row['template'],
            'FORUMTOPICS'        => ' <table width="100%"><tr><td width="20" align="right" style="font-family: Tahoma, Geneva, sans-serif; font-size:9px;">' . $row4['forumtopics'] . '&nbsp;</td><td  style="background: url(include/images/vote/backb.png);height:14px;width:156px;background-repeat:no-repeat;background-position:left center;"><div style="repeat-y top left; margin-left:2px; min-width:1px; background:  url(include/images/vote/balken.png);height:10px; width:' . round($row4['forumtopics'] / ($row22['forumtopicsg'] > 0 ? $row22['forumtopicsg'] : 1) * 150) . 'px; "/></div></td><td align="left" style="font-family: Tahoma, Geneva, sans-serif; font-size:9px;">&nbsp;' . $row22['forumtopicsg'] . '&nbsp;&nbsp;</td><td width="100" style="font-family: Tahoma, Geneva, sans-serif; font-size:9px;">(' . round($row4['forumtopics'] / ($row22['forumtopicsg'] > 0 ? $row22['forumtopicsg'] : 1) * 100) . '%)</td></tr></table>',
            'POSTS'              => ' <table width="100%"><tr><td width="20" align="right" style="font-family: Tahoma, Geneva, sans-serif; font-size:9px;">' . $row['posts'] . '&nbsp;</td><td style="background: url(include/images/vote/backb.png);height:14px;width:156px;background-repeat:no-repeat;background-position:left center;"><div style="repeat-y top left; margin-left:2px; min-width:1px; background:  url(include/images/vote/balken.png);height:10px; width:' . round($row['posts'] / ($row23['postsg'] > 0 ? $row23['postsg'] : 1) * 150) . 'px; "/></div></td><td align="left" style="font-family: Tahoma, Geneva, sans-serif; font-size:9px;">&nbsp;' . $row23['postsg'] . '&nbsp;&nbsp;</td><td width="100" style="font-family: Tahoma, Geneva, sans-serif; font-size:9px;">(' . round($row['posts'] / ($row23['postsg'] > 0 ? $row23['postsg'] : 1) * 100) . '%)</td></tr></table>',
            'NEWSPOSTS'          => ' <table width="100%"><tr><td width="20" align="right" style="font-family: Tahoma, Geneva, sans-serif; font-size:9px;">' . $row6['newsposts'] . '&nbsp;</td><td style="background: url(include/images/vote/backb.png);height:14px;width:156px;background-repeat:no-repeat;background-position:left center;"><div style="repeat-y top left; margin-left:2px; min-width:1px; background:  url(include/images/vote/balken.png);height:10px; width:' . round($row6['newsposts'] / ($row20['newspostsg'] > 0 ? $row20['newspostsg'] : 1) * 150) . 'px; "/></div></td><td align="left" style="font-family: Tahoma, Geneva, sans-serif; font-size:9px;" >&nbsp;' . $row20['newspostsg'] . '&nbsp;&nbsp;</td><td width="100" style="font-family: Tahoma, Geneva, sans-serif; font-size:9px;">(' . round($row6['newsposts'] / ($row20['newspostsg'] > 0 ? $row20['newspostsg'] : 1) * 100) . '%)</td></tr></table>',
            'NEWSTOPICS'         => ' <table width="100%"><tr><td width="20" align="right" style="font-family: Tahoma, Geneva, sans-serif; font-size:9px;">' . $row5['newstopics'] . '&nbsp;</td><td style="background: url(include/images/vote/backb.png);height:14px;width:156px;background-repeat:no-repeat;background-position:left center;"><div style="repeat-y top left; margin-left:2px; min-width:1px; background:  url(include/images/vote/balken.png);height:10px; width:' . round($row5['newstopics'] / ($row21['newstopicsg'] > 0 ? $row21['newstopicsg'] : 1) * 150) . 'px; "/></div></td><td align="left" style="font-family: Tahoma, Geneva, sans-serif; font-size:9px;">&nbsp;' . $row21['newstopicsg'] . '&nbsp;&nbsp;</td><td width="100" style="font-family: Tahoma, Geneva, sans-serif; font-size:9px;">(' . round($row5['newstopics'] / ($row21['newstopicsg'] > 0 ? $row21['newstopicsg'] : 1) * 100) . '%)</td></tr></table>',
            'SHOUTBOX'           => ' <table width="100%"><tr><td width="20" align="right" style="font-family: Tahoma, Geneva, sans-serif; font-size:9px;">' . $row10['shoutposts'] . '&nbsp;</td><td style="background: url(include/images/vote/backb.png);height:14px;width:156px;background-repeat:no-repeat;background-position:left center;"><div style="repeat-y top left; margin-left:2px; min-width:1px; background:  url(include/images/vote/balken.png);height:10px; width:' . round($row10['shoutposts'] / ($row18['shoutpostsg'] > 0 ? $row18['shoutpostsg'] : 1) * 150) . 'px; "/></div></td><td align="left" style="font-family: Tahoma, Geneva, sans-serif; font-size:9px;">&nbsp;' . $row18['shoutpostsg'] . '&nbsp;&nbsp;</td><td width="100" style="font-family: Tahoma, Geneva, sans-serif; font-size:9px;">(' . round($row10['shoutposts'] / ($row18['shoutpostsg'] > 0 ? $row18['shoutpostsg'] : 1) * 100) . '%)</td></tr></table>',
            'USERGBS'            => ' <table width="100%"><tr><td width="20" align="right" style="font-family: Tahoma, Geneva, sans-serif; font-size:9px;">' . $row12['usergbs'] . '&nbsp;</td><td style="background: url(include/images/vote/backb.png);height:14px;width:156px;background-repeat:no-repeat;background-position:left center;"><div style="repeat-y top left; margin-left:2px; min-width:1px; background:  url(include/images/vote/balken.png);height:10px; width:' . round($row12['usergbs'] / ($row19['usergbsg'] > 0 ? $row19['usergbsg'] : 1) * 150) . 'px; "/></div></td><td align="left" style="font-family: Tahoma, Geneva, sans-serif; font-size:9px;">&nbsp;' . $row19['usergbsg'] . '&nbsp;&nbsp;</td><td width="100" style="font-family: Tahoma, Geneva, sans-serif; font-size:9px;">(' . round($row12['usergbs'] / ($row19['usergbsg'] > 0 ? $row19['usergbsg'] : 1) * 100) . '%)</td></tr></table>',
            'PMS'                => ' <table width="100%"><tr><td width="20" align="right" style="font-family: Tahoma, Geneva, sans-serif; font-size:9px;">' . $row14['pms'] . '&nbsp;</td><td style="background: url(include/images/vote/backb.png);height:14px;width:156px;background-repeat:no-repeat;background-position:left center;"><div style="repeat-y top left; margin-left:2px; min-width:1px; background:  url(include/images/vote/balken.png);height:10px; width:' . round($row14['pms'] / ($row15['pmsg'] > 0 ? $row15['pmsg'] : 1) * 150) . 'px; "/></div></td><td align="left" style="font-family: Tahoma, Geneva, sans-serif; font-size:9px;">&nbsp;' . $row15['pmsg'] . '&nbsp;&nbsp;<td width="100" style="font-family: Tahoma, Geneva, sans-serif; font-size:9px;">(' . round($row14['pms'] / ($row15['pmsg'] > 0 ? $row15['pmsg'] : 1) * 100) . '%)</td></tr></table>',
            'VOTS'               => ' <table width="100%"><tr><td width="20" align="right" style="font-family: Tahoma, Geneva, sans-serif; font-size:9px;">' . $polluser . '&nbsp;</td><td style="background: url(include/images/vote/backb.png);height:14px;width:156px;background-repeat:no-repeat;background-position:left center;"><div style="repeat-y top left; margin-left:2px; min-width:1px; background:  url(include/images/vote/balken.png);height:10px; width:' . round($polluser / ($pollsg > 0 ? $pollsg : 1) * 150) . 'px; "/></div></td><td align="left" style="font-family: Tahoma, Geneva, sans-serif; font-size:9px;">&nbsp;' . $pollsg . '&nbsp;&nbsp;<td width="100" style="font-family: Tahoma, Geneva, sans-serif; font-size:9px;">(' . round($polluser / ($pollsg > 0 ? $pollsg : 1) * 100) . '%)</td></tr></table>',
            'STATS'              => '<table width="100%">
      <tr>
        <td align="right" style="font-family: Tahoma, Geneva, sans-serif; font-size:9px;">&nbsp;</td>
        <td style="background: url(include/images/vote/backb.png);height:14px;width:156px;background-repeat:no-repeat;background-position:left center;"><div style="repeat-y top left; margin-left:2px; min-width:1px; background:  url(include/images/vote/balken.png);height:10px; width:' . $stats . 'px;"/></div></td>
        <td align="left" style="font-family: Tahoma, Geneva, sans-serif; font-size:9px;">&nbsp;</td>
      </tr>
    <tr><td width="20" align="right" style="font-family: Tahoma, Geneva, sans-serif; font-size:9px;">&nbsp;</td><td align="center" style="font-family: Tahoma, Geneva, sans-serif; font-size:9px;">|----> <b>(' . round($stats, 2) . '%)</b> <----|</td><td align="left" style="font-family: Tahoma, Geneva, sans-serif; font-size:9px;">&nbsp;</td></tr></table>',
            'LASPOST'            => 'Diese Funktion folgt in Kürze!',
            'SIGNATUR'           => bbcode($row['sig']),
            'STAAT'              => $staat,
            'UID'                => $uid,
            'STERNZEICHEN'       => $sternzeichen,
            'GB_EINTRAEGE'       => $gb_eintraege,
            'GALLERIE_EINTRAEGE' => $gallery_eintraege,
            'ICQ'                => $icq,
            'YAHOO'              => $yahoo,
            'MSN'                => $msn,
            'AIM'                => $aim,
            'SKYPE'              => $skype,
            'XFIRE'              => $xfire,
            'STEAM'              => $steam,
            'SYSP'               => $sysp,
        );
        $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();
        $friendar = array ();
        $fr       = db_query('SELECT fid FROM prefix_friends WHERE uid = ' . $row['id']);
        while ($isfr = db_fetch_object($fr)) {
            $friendar[] = $isfr->fid;
        }
        if ($row['opt_friend'] == 1) {
            $isfriend = in_array($_SESSION['authid'], $friendar);
        } else {
            $isfriend = $_SESSION['authright'] <= $row['level'];
        }
        /*$td = @db_result(db_query('SELECT fid FROM prefix_friends WHERE uid = '.$_SESSION['authid'].' AND fid = '.$row['id'].' AND status=1'));
    
        $ud = @db_result(db_query('SELECT id FROM prefix_user INNER JOIN prefix_online ON prefix_user.id=prefix_online.uid WHERE prefix_user.id = '.$_SESSION['authid']));
    
        if($row['opt_friend'] == 1 and $_SESSION['authright'] <= $row['level'])
        $fr = $td;
        else
        $fr = $_SESSION['authright'] <= $row['level'];
    
        if ($fr or $row['id']==$ud or $_SESSION['authright'] == -9 ) {
        */
        if ($isfriend or $_SESSION['authid'] == 1 or $_SESSION['authid'] == $row['id']) {
            $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");
            }
            $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);
        } else {
            echo '<div align="center" style="margin-bottom:5px;"><b>' . $row['name'] . '</b> hat die Ansicht seines Profils eingeschr&auml;nkt</div>';
        }
        $design->footer();
    ?>
    0 Mitglieder finden den Beitrag gut.
  4. #4
    User Pic
    Rock@wulf Hall Of Fame
    Registriert seit
    03.06.2004
    Beiträge
    3.282
    Beitragswertungen
    239 Beitragspunkte
    Versuch es mal so:

    <?php
    // Copyright by: Manuel Staechele
    // Support: www.ilch.de
        defined('main') or die('no direct access');
        $uid = $menu->get(2);
    if(1 == db_count_query('SELECT COUNT(*) FROM prefix_user WHERE id='.$uid)){
        include ('user_infos.php');
        if ($row['llogin'] <= time() - (60 * 60 * 24 * 30)) {
            $l1 = '<font color="#FF0000">' . date("d.m.Y - H:i", $row['llogin']) . ' Uhr</font>';
        } elseif ($row['llogin'] <= time() - (60 * 60 * 24 * 14)) {
            $l1 = '<font color="#F97500">' . date("d.m.Y - H:i", $row['llogin']) . ' Uhr</font>';
        }
        else {
            $l1 = '<font color="#047410">' . date("d.m.Y - H:i", $row['llogin']) . ' Uhr</font>';
        }
        $group = @db_result(db_query('SELECT name FROM prefix_groups LEFT JOIN prefix_groupusers ON prefix_groups.id = prefix_groupusers.gid WHERE prefix_groupusers.uid = "' . $row['id'] . '"'));
        if ($group == Administration) {
            $ff = '<font style="color:#FD740E;"><b>' . $row['name'] . '</b></font>';
        } elseif ($group == Moderatoren) {
            $ff = '<font style="color:#318E1B;"><b>' . $row['name'] . '</b></font>';
        }
        else {
            $ff = $row['name'];
        }
        $selfr = array (
            'Onlinestatus'        => 'Onlinestatus',
            'Name'                => 'Name',
            'letzter Login'       => 'letzter Login',
            'abgegebener Meinung' => 'abgegebener Meinung'
        );
        foreach ($selfr as $sel) {
            $frsort .= '<option value="' . $sel . '" ' . ($sel == $_POST['frsort'] ? 'selected="selected"' : '') . '>' . $sel . '</option>';
        }
        if ($_POST['frsort'] == 'Name') {
            $sel = 'b.name ASC';
        } elseif ($_POST['frsort'] == 'letzter Login') {
            $sel = 'b.llogin DESC';
        } elseif ($_POST['frsort'] == 'abgegebener Meinung') {
            $sel = 'freundescription2 DESC';
        } elseif ($_POST['frsort'] == 'Onlinestatus') {
            $sel = 'a.status, onlinestatus DESC';
        } else {
            $sel = ' a.status, onlinestatus DESC';
        }
    // Abfrage Freunde
        $l12 = db_query("SELECT a.fid as aktfid,a.status, b.name,b.avatar,b.staat,b.geschlecht,b.gebdatum,b.id as tud,b.llogin,a.freundescription, d.freundescription AS freundescription2, IF(MAX(c.uptime) > '$dif','online','offline') as onlinestatus, a.status
                     FROM `prefix_friends` a
                     LEFT JOIN `prefix_user` b ON a.fid = b.id
                     LEFT JOIN `prefix_online` c ON a.fid = c.uid
                     LEFT JOIN `prefix_friends` d ON d.fid = a.uid AND d.uid = a.fid
                     WHERE a.uid = {$row['id']} AND a.status = 1 GROUP BY a.fid, b.name ORDER BY " . $sel
        );
        while ($row41 = db_fetch_object($l12)) {
            /*$group = @db_result(db_query('SELECT name FROM prefix_groups LEFT JOIN prefix_groupusers ON prefix_groups.id = prefix_groupusers.gid WHERE prefix_groupusers.uid = "'. $row41->aktfid.'"'));
     
           if ($group == Administration)
           $row41->name = '<font style="color:#FD740E;"><b>'.$row41->name.'</b></font>';
           elseif ($group == Moderatoren)
           $row41->name = '<font style="color:#318E1B;"><b>'.$row41->name.'</b></font>';
           else
           $row41->name = $row41->name;
           */
            if (file_exists($row41->avatar)) {
                $row41->avatar = '<img src=' . $row41->avatar . ' width="80" height="80" border=&quot;0&quot;  />';
            } else {
                if ($r['geschlecht'] == 1) {
                    $row41->avatar = '<img src=include/images/avatars/maennlich.jpg  width="80" height="80" border=&quot;0&quot;  />';
                } else {
                    if ($r['geschlecht'] == 2) {
                        $row41->avatar = '<img src=include/images/avatars/weiblich.jpg width="80" height="80" border=&quot;0&quot; />';
                    } else {
                        $row41->avatar = '<img src=include/images/avatars/wurstegal.jpg width="80" height="80" border=&quot;0&quot;  />';
                    }
                }
            }
            $diff = time() - $row41->llogin;
            $secs = $diff % 60;
            $diff = floor($diff / 60);
            $min  = $diff % 60;
            $diff = floor($diff / 60);
            $hour = $diff % 24;
            $diff = floor($diff / 24);
            if ($diff == 0 && $hour == 0) {
                $row41->llogin = 'Login vor ' . $min . " Min.<br />";
            } elseif ($diff == 0 && $hour != 0) {
                $row41->llogin = 'Login vor ' . $hour . " Std.<br />";
            }
            else {
                $row41->llogin = 'Login am ' . date("d.m.Y", $row41->llogin);
            }
            if ($row41->geschlecht == 0) {
                $row41->geschlecht = '<span></span>';
            }
            if ($row41->geschlecht == 1) {
                $row41->geschlecht = '<span><img src=include/images/icons/mann.gif border=0></span>';
            }
            if ($row41->geschlecht == 2) {
                $row41->geschlecht = '<span><img src=include/images/icons/frau.gif border=0></span>';
            }
            $nation = empty($row41->staat) ? 'n/a' : '<img src=include/images/flags/' . $row41->staat . ' border=&quot;0&quot; />';
            if ($row41->gebdatum !== "0000-00-00") {
                $row41->gebdatum = date('d.m.Y', strtotime($row41->gebdatum));
                $tag             = date('d', strtotime($row41->gebdatum));
                $monat           = date('m', strtotime($row41->gebdatum));
                $jahr            = date('Y', strtotime($row41->gebdatum));
                $jetzt           = mktime(0, 0, 0, date("m"), date("d"), date("Y"));
                $geburtstag      = mktime(0, 0, 0, $monat, $tag, $jahr);
                $row41->alter    = "(" . intval(($jetzt - $geburtstag) / (3600 * 24 * 365)) . ")";
            } else {
                $gebdatum     = '';
                $row41->alter = '(??)';
            }
            $amfr        = $row41->name;
            $row41->name = ((strlen($row41->name) < 9) ? $row41->name : substr($row41->name, 0, 8) . '..');
            if ($row41->onlinestatus == 'online') {
                $row41->ol = '<div style="-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;background-color:#037611;padding:4px;"><a href="index.php?user-details-' . $row41->aktfid . '">' . $nation . ' ' . $row41->name . ' ' . $row41->alter . ' ' . $row41->geschlecht . '</a></div>';
            } else {
                $row41->ol = '<div style="-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;background-color:#AF0000;padding:4px;"><a href="index.php?user-details-' . $row41->aktfid . '">' . $nation . ' ' . $row41->name . ' ' . $row41->alter . ' ' . $row41->geschlecht . '</a></div>';
            }
            $prf                      = ((strlen($row['name']) < 10) ? $row['name'] : substr($row['name'], 0, 9) . '..');
            $row41->freundescription2 = str_replace(array (
                                                          '"',
                                                          "'"
                                                    ), '', $row41->freundescription2
            );
            if (empty($row41->freundescription2)) {
                $mja = '<div class="Cnorm" style="font-style:italic;">keine Meinung</div>';
            } else {
                $meinung = '<div style="padding:4px;"><u><b>' . $amfr . '</b> sagt:</u><br><br>' . $row41->freundescription2 . '</div>';
                $mja     = '<div class="Cnorm" title="' . str_replace('"', '', $meinung) . '" style="cursor:pointer;color:#FFD100;font-weight:bold;">Hover für Meinung</div>';
            }
            $lala .= '<div style="float:left; padding:15px; width:20%;margin-left:3px;display:block;" align="center"><fieldset style="padding: 0px; border: 1px solid #888888;"><div class="Cnorm">' . $row41->avatar . '</div>' . $row41->ol . '<div class="Cmite" style="padding:4px;">' . $row41->llogin . '</div>
    ' . $mja . '</fieldset></div>';
        }
        $countfreunde = @db_result(db_query('SELECT COUNT(fid) FROM prefix_friends WHERE uid = ' . $row['id'] . ' AND status=1'));
    // Ende Abfrage Freunde
        $lb = db_query('SELECT a.id, a.name, a.rep, c.erst as last, c.id as pid,c.erstid, c.txt AS text,c.tid, c.time
    FROM prefix_topics a
      LEFT JOIN prefix_forums b ON b.id = a.fid
      LEFT JOIN prefix_posts c ON c.tid = a.id
      LEFT JOIN prefix_groupusers vg ON vg.uid = ' . $_SESSION['authid'] . ' AND vg.gid = b.view
      LEFT JOIN prefix_groupusers rg ON rg.uid = ' . $_SESSION['authid'] . ' AND rg.gid = b.reply
      LEFT JOIN prefix_groupusers sg ON sg.uid = ' . $_SESSION['authid'] . ' AND sg.gid = b.start
    WHERE ((' . $_SESSION['authright'] . ' <= b.view AND b.view < 1)
       OR (' . $_SESSION['authright'] . ' <= b.reply AND b.reply < 1)
       OR (' . $_SESSION['authright'] . ' <= b.start AND b.start < 1)
         OR rg.fid IS NOT NULL
         OR sg.fid IS NOT NULL
         OR vg.fid IS NOT NULL
         OR -9 >= ' . $_SESSION['authright'] . ')AND c.erst = "' . $row['name'] . '" GROUP BY c.id
    ORDER BY c.time DESC
    LIMIT 5'
        );
        while ($row42 = db_fetch_object($lb)) {
            $bei         = $row42->text;
            $bei         = BBcode($bei);
            $bei         = ((strlen($bei) < 250) ? $bei : substr($bei, 0, 250) . '...');
            $bei         = ereg_replace("\"", "", $bei);
            $bei         = ereg_replace("\'", "", $bei);
            $row42->name = ((strlen($row42->name) < 31) ? $row42->name : substr($row42->name, 0, 30) . '...');
            $time2       = $row42->time = date("d.m.Y - H:i", $row42->time);
            $rege        = @db_result(db_query('SELECT COUNT(id) FROM prefix_posts WHERE tid = ' . $row42->id . ' AND id <= ' . $row42->pid));
            $regen       = ceil(($rege) / $allgAr['Fpanz']);
            $pos         = '<div style="width:200px;word-wrap:break-word;padding:2px;"><u>Beitrag am ' . $time2 . ' Uhr</u><br><br>' . $bei . '</div>';
            $top .= '<div>Zum Thema: <a class="tip" href="index.php?forum-showposts-' . $row42->tid . '-p' . $regen . '#' . $row42->pid . '" ><b>' . $row42->name . '</b></a></div>';
        }
        $lga = db_query("SELECT * FROM prefix_usergallery WHERE uid = " . $row['id'] . " ORDER BY id DESC LIMIT 3");
        if (db_num_rows($lga) == 0) {
            $lpics = 'Derzeit noch keine Bilder hochgeladen';
        } else {
            $couf = @db_result(db_query('SELECT COUNT(id) FROM prefix_usergallery WHERE uid=' . $row['id']));
            while ($row32 = db_fetch_object($lga)) {
                //echo '<a href="index.php?user-usergallery-'.$row['id'].'-v'.$row32->id.'-z'.$n.'-img_'.$row32->id.'.'.$row32->endung.'">';
                $lpics .= ' <a href="index.php?user-usergallery-' . $row['id'] . '-v' . $row32->id . '-z' . $couf . '-img_' . $row32->id . '.' . $row32->endung . '"><img src="include/images/usergallery/img_thumb_' . $row32->id . '.' . $row32->endung . '" width="25%" border="0" class="gradualfader"></a>';
                $couf--;
            }
            /*if (){
           $award = '<tr><td align="center" class="Cmite">Besitzt leider noch keinen Award</td></tr>';}
           */
        }
        if (empty($row['txt1'])) {
            $rtxt1 = 'Noch kein Inhalt hinterlegt';
        } else {
            $rtxt1 = $row['txt1'];
        }
        $points     = @db_result(db_query('SELECT points FROM prefix_user WHERE id = ' . $row['id']));
        $countfotos = @db_result(db_query('SELECT COUNT(id) FROM prefix_usergallery WHERE uid = ' . $row['id']));
        if ($row['pc'] == 0) {
            $pc = '';
        } else {
            $pc = '<img src="include/images/icons/pc.png" title="PC">';
        }
        if ($row['ps3'] == 0) {
            $ps3 = '';
        } else {
            $ps3 = '<img src="include/images/icons/ps3.png" title="Playstation 3">';
        }
        if ($row['nds'] == 0) {
            $nds = '';
        } else {
            $nds = '<img src="include/images/icons/nds.png" title="Nintendo DSI">';
        }
        if ($row['x360'] == 0) {
            $x360 = '';
        } else {
            $x360 = '<img src="include/images/icons/x360.png" title="Xbox 360">';
        }
        if ($row['wii'] == 0) {
            $wii = '';
        } else {
            $wii = '<img src="include/images/icons/wii.png" title="Nintendo Wii">';
        }
        if (isset($_POST['pointsubs'])) {
            $points = escape($_POST['points'], 'integer');
            $id     = escape($_POST['peid'], 'integer');
            db_query('UPDATE prefix_user SET points = ' . $points . ' WHERE id = ' . $id);
        }
        if ($_SESSION['authid'] == 1) {
            $punkteedit = '<form method="post" action="?user-details-' . $row['id'] . '"><input type="text" value="' . $row['points'] . '" size="4" name="points"><input type="hidden" value="' . $row['id'] . '" name="peid"><input type="submit" name="pointsubs" value="OK"></form>';
        } else {
            $punkteedit = '';
        }
        $verwarnung = @db_result(db_query('SELECT COUNT(id) FROM prefix_warn WHERE uid=' . $row['id']));
     
        if ($verwarnung == 0) {
            $warn = ' <td class="Cnorm" rowspan="5" align="center" valign="middle">' . $avatar . '</td>
            </tr>';
        } elseif ($verwarnung == 1) {
            $warn = ' <td class="Cnorm" rowspan="6" align="center" valign="middle">' . $avatar . '</td>
            </tr><tr class="Cmite"><td align="center" colspan="2"><img src="include/images/forum/warn.gif">&nbsp;<font style="color:#FF0000;font-weight:bold">1 Verwarnung</font></td></tr>';
        } else {
            $warn = ' <td class="Cnorm" rowspan="6" align="center" valign="middle">' . $avatar . '</td>
            </tr><tr class="Cmite"><td align="center" colspan="2"><img src="include/images/forum/warn.gif">&nbsp;<font style="color:#FF0000;font-weight:bold">' . $verwarnung . ' Verwarnungen</font></td></tr>';
        }
     
        $chat = (loggedin() && $_SESSION['authid'] != $row['id']) ? '<a href="javascript:void(0)" onclick="javascript:chatWith(\'' . $row['id'] . '\',\'' . $row['name'] . '\')"><img src="include/images/icons/im_mini.png" width="16" height="16" border="0" alt="Chat" /></a>' : '';
     
        $ar     = array (
            'CONSOLE'            => $pc . ' ' . $ps3 . ' ' . $nds . ' ' . $x360 . ' ' . $wii,
            'WARN'               => $warn,
            'PEDIT'              => $punkteedit,
            'POINTS'             => $points,
            'OPFR'               => $frsort,
            'FRSORT'             => $sel,
            'ANZFR'              => $countfreunde,
            'ANZFO'              => $countfotos,
            'SIDE'               => $sidefr,
            'FREUND'             => $lala,
            'LPICS'              => $lpics,
            'NAME'               => $row['name'],
            'UTEXT'              => bbcode($rtxt1),
            'BEITRAG'            => $top,
            'SPNAME'             => $ff,
            'JOINED'             => date('d.m.Y', $row['regist']),
            'TEAM'               => user_get_groups($uid),
            'ID'                 => $row['id'],
            'LASTAK'             => $l1,
            'postpday'           => $postpday,
            'RANG'               => userrang($row['posts'], $uid),
            'AVATA'              => $avatar,
            'LASTUSER'           => last_user($uid),
            'ONLINE'             => $online,
            'MAINBOARD'          => $mainboard = $row['mainboard'],
            'ENERGIE'            => $mainboard = $row['energie'],
            'INET'               => $mainboard = $row['inet'],
            'CPU'                => $cpu = $row['cpu'],
            'RAM'                => $ram = $row['ram'],
            'MONITOR'            => $monitor = $row['monitor'],
            'OS'                 => $os = $row['os'],
            'GRAFIK'             => $grafik = $row['grafik'],
            'SOUND'              => $sound = $row['sound'],
            'MAUS'               => $maus = $row['maus'],
            'KB'                 => $kb = $row['kb'],
            'HEAD'               => $head = $row['head'],
            'HDD'                => $hdd = $row['hdd'],
            'USERTITEL'          => $usertitel,
            'EMAIL'              => $email,
            'HOMEPAGE'           => $homepage,
            'GESCHLECHT'         => $geschlecht,
            'GEBDATUM'           => $gebdatum,
            'CHAT'               => $chat,
            'ALTER'              => $alter,
            'WOHNORT'            => $wohnort,
            'TEMPLATE'           => $template = $row['template'],
            'FORUMTOPICS'        => ' <table width="100%"><tr><td width="20" align="right" style="font-family: Tahoma, Geneva, sans-serif; font-size:9px;">' . $row4['forumtopics'] . '&nbsp;</td><td  style="background: url(include/images/vote/backb.png);height:14px;width:156px;background-repeat:no-repeat;background-position:left center;"><div style="repeat-y top left; margin-left:2px; min-width:1px; background:  url(include/images/vote/balken.png);height:10px; width:' . round($row4['forumtopics'] / ($row22['forumtopicsg'] > 0 ? $row22['forumtopicsg'] : 1) * 150) . 'px; "/></div></td><td align="left" style="font-family: Tahoma, Geneva, sans-serif; font-size:9px;">&nbsp;' . $row22['forumtopicsg'] . '&nbsp;&nbsp;</td><td width="100" style="font-family: Tahoma, Geneva, sans-serif; font-size:9px;">(' . round($row4['forumtopics'] / ($row22['forumtopicsg'] > 0 ? $row22['forumtopicsg'] : 1) * 100) . '%)</td></tr></table>',
            'POSTS'              => ' <table width="100%"><tr><td width="20" align="right" style="font-family: Tahoma, Geneva, sans-serif; font-size:9px;">' . $row['posts'] . '&nbsp;</td><td style="background: url(include/images/vote/backb.png);height:14px;width:156px;background-repeat:no-repeat;background-position:left center;"><div style="repeat-y top left; margin-left:2px; min-width:1px; background:  url(include/images/vote/balken.png);height:10px; width:' . round($row['posts'] / ($row23['postsg'] > 0 ? $row23['postsg'] : 1) * 150) . 'px; "/></div></td><td align="left" style="font-family: Tahoma, Geneva, sans-serif; font-size:9px;">&nbsp;' . $row23['postsg'] . '&nbsp;&nbsp;</td><td width="100" style="font-family: Tahoma, Geneva, sans-serif; font-size:9px;">(' . round($row['posts'] / ($row23['postsg'] > 0 ? $row23['postsg'] : 1) * 100) . '%)</td></tr></table>',
            'NEWSPOSTS'          => ' <table width="100%"><tr><td width="20" align="right" style="font-family: Tahoma, Geneva, sans-serif; font-size:9px;">' . $row6['newsposts'] . '&nbsp;</td><td style="background: url(include/images/vote/backb.png);height:14px;width:156px;background-repeat:no-repeat;background-position:left center;"><div style="repeat-y top left; margin-left:2px; min-width:1px; background:  url(include/images/vote/balken.png);height:10px; width:' . round($row6['newsposts'] / ($row20['newspostsg'] > 0 ? $row20['newspostsg'] : 1) * 150) . 'px; "/></div></td><td align="left" style="font-family: Tahoma, Geneva, sans-serif; font-size:9px;" >&nbsp;' . $row20['newspostsg'] . '&nbsp;&nbsp;</td><td width="100" style="font-family: Tahoma, Geneva, sans-serif; font-size:9px;">(' . round($row6['newsposts'] / ($row20['newspostsg'] > 0 ? $row20['newspostsg'] : 1) * 100) . '%)</td></tr></table>',
            'NEWSTOPICS'         => ' <table width="100%"><tr><td width="20" align="right" style="font-family: Tahoma, Geneva, sans-serif; font-size:9px;">' . $row5['newstopics'] . '&nbsp;</td><td style="background: url(include/images/vote/backb.png);height:14px;width:156px;background-repeat:no-repeat;background-position:left center;"><div style="repeat-y top left; margin-left:2px; min-width:1px; background:  url(include/images/vote/balken.png);height:10px; width:' . round($row5['newstopics'] / ($row21['newstopicsg'] > 0 ? $row21['newstopicsg'] : 1) * 150) . 'px; "/></div></td><td align="left" style="font-family: Tahoma, Geneva, sans-serif; font-size:9px;">&nbsp;' . $row21['newstopicsg'] . '&nbsp;&nbsp;</td><td width="100" style="font-family: Tahoma, Geneva, sans-serif; font-size:9px;">(' . round($row5['newstopics'] / ($row21['newstopicsg'] > 0 ? $row21['newstopicsg'] : 1) * 100) . '%)</td></tr></table>',
            'SHOUTBOX'           => ' <table width="100%"><tr><td width="20" align="right" style="font-family: Tahoma, Geneva, sans-serif; font-size:9px;">' . $row10['shoutposts'] . '&nbsp;</td><td style="background: url(include/images/vote/backb.png);height:14px;width:156px;background-repeat:no-repeat;background-position:left center;"><div style="repeat-y top left; margin-left:2px; min-width:1px; background:  url(include/images/vote/balken.png);height:10px; width:' . round($row10['shoutposts'] / ($row18['shoutpostsg'] > 0 ? $row18['shoutpostsg'] : 1) * 150) . 'px; "/></div></td><td align="left" style="font-family: Tahoma, Geneva, sans-serif; font-size:9px;">&nbsp;' . $row18['shoutpostsg'] . '&nbsp;&nbsp;</td><td width="100" style="font-family: Tahoma, Geneva, sans-serif; font-size:9px;">(' . round($row10['shoutposts'] / ($row18['shoutpostsg'] > 0 ? $row18['shoutpostsg'] : 1) * 100) . '%)</td></tr></table>',
            'USERGBS'            => ' <table width="100%"><tr><td width="20" align="right" style="font-family: Tahoma, Geneva, sans-serif; font-size:9px;">' . $row12['usergbs'] . '&nbsp;</td><td style="background: url(include/images/vote/backb.png);height:14px;width:156px;background-repeat:no-repeat;background-position:left center;"><div style="repeat-y top left; margin-left:2px; min-width:1px; background:  url(include/images/vote/balken.png);height:10px; width:' . round($row12['usergbs'] / ($row19['usergbsg'] > 0 ? $row19['usergbsg'] : 1) * 150) . 'px; "/></div></td><td align="left" style="font-family: Tahoma, Geneva, sans-serif; font-size:9px;">&nbsp;' . $row19['usergbsg'] . '&nbsp;&nbsp;</td><td width="100" style="font-family: Tahoma, Geneva, sans-serif; font-size:9px;">(' . round($row12['usergbs'] / ($row19['usergbsg'] > 0 ? $row19['usergbsg'] : 1) * 100) . '%)</td></tr></table>',
            'PMS'                => ' <table width="100%"><tr><td width="20" align="right" style="font-family: Tahoma, Geneva, sans-serif; font-size:9px;">' . $row14['pms'] . '&nbsp;</td><td style="background: url(include/images/vote/backb.png);height:14px;width:156px;background-repeat:no-repeat;background-position:left center;"><div style="repeat-y top left; margin-left:2px; min-width:1px; background:  url(include/images/vote/balken.png);height:10px; width:' . round($row14['pms'] / ($row15['pmsg'] > 0 ? $row15['pmsg'] : 1) * 150) . 'px; "/></div></td><td align="left" style="font-family: Tahoma, Geneva, sans-serif; font-size:9px;">&nbsp;' . $row15['pmsg'] . '&nbsp;&nbsp;<td width="100" style="font-family: Tahoma, Geneva, sans-serif; font-size:9px;">(' . round($row14['pms'] / ($row15['pmsg'] > 0 ? $row15['pmsg'] : 1) * 100) . '%)</td></tr></table>',
            'VOTS'               => ' <table width="100%"><tr><td width="20" align="right" style="font-family: Tahoma, Geneva, sans-serif; font-size:9px;">' . $polluser . '&nbsp;</td><td style="background: url(include/images/vote/backb.png);height:14px;width:156px;background-repeat:no-repeat;background-position:left center;"><div style="repeat-y top left; margin-left:2px; min-width:1px; background:  url(include/images/vote/balken.png);height:10px; width:' . round($polluser / ($pollsg > 0 ? $pollsg : 1) * 150) . 'px; "/></div></td><td align="left" style="font-family: Tahoma, Geneva, sans-serif; font-size:9px;">&nbsp;' . $pollsg . '&nbsp;&nbsp;<td width="100" style="font-family: Tahoma, Geneva, sans-serif; font-size:9px;">(' . round($polluser / ($pollsg > 0 ? $pollsg : 1) * 100) . '%)</td></tr></table>',
            'STATS'              => '<table width="100%">
      <tr>
        <td align="right" style="font-family: Tahoma, Geneva, sans-serif; font-size:9px;">&nbsp;</td>
        <td style="background: url(include/images/vote/backb.png);height:14px;width:156px;background-repeat:no-repeat;background-position:left center;"><div style="repeat-y top left; margin-left:2px; min-width:1px; background:  url(include/images/vote/balken.png);height:10px; width:' . $stats . 'px;"/></div></td>
        <td align="left" style="font-family: Tahoma, Geneva, sans-serif; font-size:9px;">&nbsp;</td>
      </tr>
    <tr><td width="20" align="right" style="font-family: Tahoma, Geneva, sans-serif; font-size:9px;">&nbsp;</td><td align="center" style="font-family: Tahoma, Geneva, sans-serif; font-size:9px;">|----> <b>(' . round($stats, 2) . '%)</b> <----|</td><td align="left" style="font-family: Tahoma, Geneva, sans-serif; font-size:9px;">&nbsp;</td></tr></table>',
            'LASPOST'            => 'Diese Funktion folgt in Kürze!',
            'SIGNATUR'           => bbcode($row['sig']),
            'STAAT'              => $staat,
            'UID'                => $uid,
            'STERNZEICHEN'       => $sternzeichen,
            'GB_EINTRAEGE'       => $gb_eintraege,
            'GALLERIE_EINTRAEGE' => $gallery_eintraege,
            'ICQ'                => $icq,
            'YAHOO'              => $yahoo,
            'MSN'                => $msn,
            'AIM'                => $aim,
            'SKYPE'              => $skype,
            'XFIRE'              => $xfire,
            'STEAM'              => $steam,
            'SYSP'               => $sysp,
        );
        $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();
        $friendar = array ();
        $fr       = db_query('SELECT fid FROM prefix_friends WHERE uid = ' . $row['id']);
        while ($isfr = db_fetch_object($fr)) {
            $friendar[] = $isfr->fid;
        }
        if ($row['opt_friend'] == 1) {
            $isfriend = in_array($_SESSION['authid'], $friendar);
        } else {
            $isfriend = $_SESSION['authright'] <= $row['level'];
        }
        /*$td = @db_result(db_query('SELECT fid FROM prefix_friends WHERE uid = '.$_SESSION['authid'].' AND fid = '.$row['id'].' AND status=1'));
     
        $ud = @db_result(db_query('SELECT id FROM prefix_user INNER JOIN prefix_online ON prefix_user.id=prefix_online.uid WHERE prefix_user.id = '.$_SESSION['authid']));
     
        if($row['opt_friend'] == 1 and $_SESSION['authright'] <= $row['level'])
        $fr = $td;
        else
        $fr = $_SESSION['authright'] <= $row['level'];
     
        if ($fr or $row['id']==$ud or $_SESSION['authright'] == -9 ) {
        */
        if ($isfriend or $_SESSION['authid'] == 1 or $_SESSION['authid'] == $row['id']) {
            $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");
            }
            $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);
        } else {
            echo '<div align="center" style="margin-bottom:5px;"><b>' . $row['name'] . '</b> hat die Ansicht seines Profils eingeschr&auml;nkt</div>';
        }
     } else {
         $title  = $allgAr['title'] . ' :: Users :: Details :: Es ist ein Fehler Aufgetreten';
         $hmenu  = $extented_forum_menu . '<a class="smalfont" href="?user">Users</a><b> &raquo; </b> Details <b> &raquo; </b>  Es ist ein Fehler Aufgetreten' . $extented_forum_menu_sufix;
         $design = new design($title, $hmenu, 1);
         $design->header();
            echo '<div align="center" style="margin-bottom:5px;">Das gesuchte Profil existiert nicht.</div>';
     }
        $design->footer();
    ?>


    Edit (Mairu): Fehler im Code beseitigt


    Zuletzt modifiziert von Mairu am 28.01.2013 - 19:40:27
    Meine Postings repräsentieren meine Meinung wenn nicht anders gekennzeichnet.
    MFG Rock@wulf
    1 Mitglieder finden den Beitrag gut.
  5. #5
    User Pic
    D-G Mitglied
    Registriert seit
    11.01.2013
    Beiträge
    24
    Beitragswertungen
    0 Beitragspunkte
    Hi Vielen Dank erstmal für deine Antwort und für die mühe lächeln

    Bedeutet also ich ersetze den ganzen Code der Datei userdetails
    durch diesen Code den du hier reinkopiert hast??

    Ich habe das jetzt alles mal ersetzt und Hochgeladen,
    leider funktoniert das nicht da steht folgendes drin:

     Parse error: syntax error, unexpected T_STRING in /home/webpages/lima-city/dmo-clan/html/ilch/include/contents/user/user_details.php on line 375



    Ich habe mal hier die originale Datei hochgeladen vielleicht könntest
    du dir die mal anschauen.

    externer Link


    Zuletzt modifiziert von D-G am 28.01.2013 - 19:05:03
    0 Mitglieder finden den Beitrag gut.
  6. #6
    User Pic
    Mairu Coder
    Registriert seit
    16.06.2006
    Beiträge
    15.334
    Beitragswertungen
    386 Beitragspunkte
    Hab den Fehler korrigiert, war nur ein fehlerhaftes " statt einem ', passiert wenn man es selbst nicht austesten kann.
    Und auch immer mal ein Blick auf die FAQ werfen. | Mairus Ilchseite
    0 Mitglieder finden den Beitrag gut.
  7. #7
    User Pic
    Rock@wulf Hall Of Fame
    Registriert seit
    03.06.2004
    Beiträge
    3.282
    Beitragswertungen
    239 Beitragspunkte
    oh ja entschuldigung zunge

    Testen ist @ work nicht
    Meine Postings repräsentieren meine Meinung wenn nicht anders gekennzeichnet.
    MFG Rock@wulf
    0 Mitglieder finden den Beitrag gut.
  8. #8
    User Pic
    D-G Mitglied
    Registriert seit
    11.01.2013
    Beiträge
    24
    Beitragswertungen
    0 Beitragspunkte
    Vielen Dank euch beiden hat funktoniert lächeln


    Zuletzt modifiziert von D-G am 28.01.2013 - 20:09:35
    0 Mitglieder finden den Beitrag gut.
Geschlossen

Zurück zu Fehlersuche und Probleme

Optionen: Bei einer Antwort zu diesem Thema eine eMail erhalten