[2.3] Profil-Gästebuch

Dieses Thema im Forum "beta-hacks" wurde erstellt von rellek, 29 August 2006.

  1. Golf3forumde

    Golf3forumde New Member

    also ich habe den hack jetzt gerade einfach mal eingebaut klappt auch alles wunderbar

    allerdings habe ich das gleiche problem wie axel.

    wenn jemand einen Post macht dann bekomme ich zwar eine PN aber der eintrag wird nicht im angezeigt

    es steht alles korrekt in der Datenbank

    desweiteren bekomme ich eine Warnung beim aufrufen des Profils.

    Warning: Division by zero in /var/www/vhost/golf3forum.de/profile.php on line 494

    gebe dir mal kurz nen link zu meinem Profil
    Golf3forum.de - Das Original!!! | Ihnen wird der Zutritt zu dieser Seite verwehrt.

    hier der Inhalt meiner Profil.php

    Code:
    <?php
    // ************************************************************************************//
    // * WoltLab Burning Board 2
    // ************************************************************************************//
    // * Copyright (c) 2001-2004 WoltLab GmbH
    // * Web           [url=http://www.woltlab.de/]WoltLab® GmbH | Startseite[/url]
    // * License       [url=http://www.woltlab.de/products/burning_board/license_en.php]WoltLab® GmbH | Products | Burning Board | License agreement[/url]
    // *               [url=http://www.woltlab.de/products/burning_board/license.php]WoltLab® GmbH | Produkte | Burning Board | Lizenzbestimmungen[/url]
    // ************************************************************************************//
    // * WoltLab Burning Board 2 is NOT free software.
    // * You may not redistribute this package or any of it's files.
    // ************************************************************************************//
    // * $Date: 2004-10-20 13:24:57 +0200 (Wed, 20 Oct 2004) $
    // * $Author: Burntime $
    // * $Rev: 1453 $
    // ************************************************************************************//
    
    $filename = 'profile.php';
    require('./global.php');
    include('./includes/map_functions.php');
    require("./jgs_galerie_showeverywhere.php");
    if ($wbbuserdata['can_view_profile'] == 0) access_error();
    require('./acp/lib/class_parse.php');
    $lang->load('MEMBERS,THREAD,POSTINGS');
    $userid = intval($_GET['userid']);
    if (!$userid) error($lang->get("LANG_GLOBAL_ERROR_FALSELINK", array('$adminmail' => $adminmail)));
    $user_info = $db->query_first("SELECT ".
    "u.*, ".
    "uf.*, ".
    "r.rankimages, r.ranktitle, ".
    "a.avatarextension, a.width, a.height, ".
    "s.lastactivity AS s_lastactivity, s.boardid, s.threadid, s.request_uri ".
    ($showlanguageinprofile == 1 ? ", l.languagepackname " : "").
    "FROM bb".$n."_users u ".
    "LEFT JOIN bb".$n."_userfields uf USING (userid) ".
    "LEFT JOIN bb".$n."_avatars a ON (a.avatarid=u.avatarid) ".
    "LEFT JOIN bb".$n."_ranks r ON (r.rankid=u.rankid) ".
    "LEFT JOIN bb".$n."_sessions s ON (s.userid=u.userid) ".
    ($showlanguageinprofile == 1 ? "LEFT JOIN bb".$n."_languagepacks l ON (l.languagepackid=u.langid) " : "").
    "WHERE u.userid='$userid'");
    if (!$user_info['userid']) error($lang->get("LANG_GLOBAL_ERROR_FALSELINK", array('$adminmail' => $adminmail)));
    $user_info['username'] = htmlconverter($user_info['username']);
    $lang->items['LANG_MEMBERS_PROFILE_TITLE'] = $lang->get("LANG_MEMBERS_PROFILE_TITLE", array('$username' => $user_info['username']));
    //=========================================================================================
    //   Visitor-Hack by speedy Version 1.4
    //=========================================================================================
    // .....................................
    // PARAMETER ZUM SPEICHERN DER BESUCHER
    // ............. ========= .............
    // Anzahl Sekunden, die vergehen müssen, bevor der Benutzer erneut eingetragen wird
    // 0 -> kein Timeout
    $timeout = 1800 ;
    // Deaktiviert den Timeout nach einem Datumswechsel
    // 0 - kein Timeout-Reset
    // 1 - Timeout wird wird bei Datumswechsel außer Kraft gesetzt.
    $timeout_reset = 0 ;
    // Nicht zu speichernde User-IDs: array( 1,2,6,12)
    $idexclude = array();
    // ....................................
    // PARAMETER ZUM ANZEIGEN DER BESUCHER
    // ............. ======== .............
    // Anzahl anzuzeigender Sätze
    $limit = 10 ;
    // 0-Besucher NICHT anzeigen / 1-Besucher anzeigen
    $display_guests = 1 ;
    // Anzeigen Besucher der letzten X Stunden. 0 - alle anzeigen
    $timewindow = 0 ;
    // Liste nur für Profilbesitzer sichtbar: 1 - ja / 0 - nein, für alle sichtbar
    $profileowner = 0;
    // Diese User-IDs können die Liste AUF JEDEN FALL einsehen: array( 1,12)
    $idinclude = array();
    /*----------------------------------------------------------------------------------------*/
    // Arbeitsvariablen
    // Dateiname
    $datei = "bb" . $n . "_profilevisits" ;
    // Ausgabefeld
    $output = "<table>" ;
    // Besucher
    $visitor = $wbbuserdata['userid'];
    // Template anzeigen?
    $showit = 1 ;
    $period = date( "YmdHis", date('U') - $timewindow * 3600 ) ;
    /*----------------------------------------------------------------------------------------*/
    if ( ( $userid != $visitor ) and ( !in_array($visitor, $idexclude ) ) ) :
     if ( $timeout == 0 ) :   // Kein TimeOut
        $doit = 1 ;
       else:                    // TimeOut gesetzt
        $result = $db->query_first("Select datum from $datei where profile_id='$userid' and visitor_id='$visitor' and art='V' ORDER BY datum DESC");
          $tag  = substr( $result[0],6,2 ) ;
          $mon  = substr( $result[0],4,2 ) ;
          $jahr = substr( $result[0],0,4 ) ;
          $std  = substr( $result[0],8,2 ) ;
          $min  = substr( $result[0],10,2 ) ;
          $sec  = substr( $result[0],12,2 ) ;
          $last = mktime($std,$min,$sec,$mon,$tag,$jahr) ;
          $diff = mktime() - $last ;
      // TimeOut noch nicht abgelaufen?
          if ( $diff < $timeout ):
           // TimeOut nach Datumswechsel resetten?
           if ( $timeout_reset == 1 ):
              if ( date("Ymd") == substr($result[0],0,8) ):  // same date
                 $doit = 0 ;   // kein Eintrag
              else:    // date changed
               $doit = 1 ;
                endif;
             else:
              $doit = 0 ;
             endif;
          else:
           $doit = 1 ;
          endif;
       endif;
       // Eintrag wird geschrieben
     if ($doit>0) :
        $db->query("INSERT INTO $datei set profile_id='$userid',visitor_id='$visitor',art='V'") ;
        $result = $db->query_first("Select visitor_id from $datei where profile_id='$userid' and art='C'");
        if (!$result) :
           $db->query("Insert into $datei set profile_id=$userid,visitor_id=1,art='C'") ;
        else:
           $counter = $result[0] + 1 ;
           $db->query("Update $datei set visitor_id=$counter where profile_id=$userid and art='C'") ;
      endif;
       endif;
    endif;
    $result = $db->query_first("Select visitor_id from $datei where profile_id=$userid and art='C'");
    $visitorcounter = $result[0] ;
    $abfrage = "SELECT v.profile_id, v.visitor_id, v.art, v.datum, date_format(v.datum,'%d.%m.%Y %H:%i'), u.username FROM $datei v LEFT JOIN bb" . $n . "_users u ON (u.userid=v.visitor_id) WHERE v.profile_id=$userid AND v.art='V' ".(($display_guests==0) ? ("AND v.visitor_id>0 ") : ("")).
    (($timewindow>0) ? ("AND date_format(v.datum,'%Y%m%d%H%i%s')>$period ") : ("")).
    "ORDER BY v.datum desc LIMIT 0,$limit" ;
    $x = 0 ;                        /* interner Zähler  */
    $result=$db->query($abfrage);
    while ($row = $db->fetch_array($result)) :
     $visitor = $row[1];
     $ldate   = $row[3];
     $datum   = $row[4];
       if ($row[5]=="") :
        ($visitor==0) ? $name="Besucher" : $name="" ;
       else:
        $name="<a href='profile.php?userid=$visitor'>" . $row[5] . "</a>" ;
       endif;
       if ( $name!="" ):
        $x++ ;
        $output .= "<tr><td><span class='normalfont'>".$name."</span></td>" ;
        $output .= "<td><span class='normalfont'>".$datum."</span></td></tr>" ;
       endif;
    endwhile;
    $result = $db->query_first("Select visitor_id from $datei where profile_id=$userid and art='D'");
    if (!$result) :
       $db->query("Insert into $datei set profile_id=$userid,visitor_id=1,art='D'") ;
       $displaylist = "yes" ;
    else:
       $displaylist = ($result[0]==0) ? "no" : "yes" ;
    endif;
    $ownprofil = ( $userid==$wbbuserdata['userid']) ;
    $showit = ($ownprofil OR ($profileowner==0 AND $displaylist=="yes") OR in_array($visitor, $idinclude) ) ; 
    if ($x>=$limit) :
     $db->query("Delete from $datei where profile_id=$userid and art='V' and datum<'$ldate'") ;
    endif;
    $output .= "</table>" ;
    //=========================================================================================
    //   Visitor-Hack by speedy
    //=========================================================================================
    /* regdate */
    $regdate = formatdate($wbbuserdata['dateformat'], $user_info['regdate']);
    /* last activity */
    if ($user_info['invisible'] == 0 || $wbbuserdata['a_can_view_ghosts'] == 1) {
     $la_date = formatdate($wbbuserdata['dateformat'], $user_info['lastactivity'], 1);
     $la_time = formatdate($wbbuserdata['timeformat'], $user_info['lastactivity']);
    }
    else {
     $la_date = $lang->items['LANG_MEMBERS_PROFILE_NODECLARATION'];
     $la_time = '';
    }
    /* posts per day */
    $regdays = (time() - $user_info['regdate']) / 86400;
    if ($regdays < 1) $postperday = $user_info['userposts'];
    else $postperday = $user_info['userposts'] / $regdays;
    $postperday = number_format($postperday, 2, $lang->get("LANG_GLOBAL_DEC_POINT"), $lang->get("LANG_GLOBAL_THOUSANDS_SEP"));
    $lang->items['LANG_MEMBERS_PROFILE_POSTSPERDAY'] = $lang->get("LANG_MEMBERS_PROFILE_POSTSPERDAY", array('$postperday' => $postperday));
    /* usertext */
    if ($user_info['usertext']) $user_text = nl2br(htmlconverter(textwrap($user_info['usertext'], 40)));
    else $user_text = '';
    /* gender */
    if ($user_info['gender']) {
     if ($user_info['gender'] == 1) $gender = $lang->items['LANG_MEMBERS_PROFILE_MALE'];
     else $gender = $lang->items['LANG_MEMBERS_PROFILE_FEMALE'];
    }
    else $gender = $lang->items['LANG_MEMBERS_PROFILE_NODECLARATION'];
    /* usertitle */
    if ($user_info['title']) $user_info['ranktitle'] = htmlconverter($user_info['title']);
    else $user_info['ranktitle'] = getlangvar($user_info['ranktitle'], $lang);
    $rankimages = formatRI($user_info['rankimages']);
    if($user_info['userid']) {
     // Showeverywhere Bild laden
     $showeverywhere = getsew($user_info['userid']);
    }
    /* avatar */
    if ($user_info['avatarid'] && $showavatar == 1 && $wbbuserdata['showavatars'] == 1) {
     $avatarname = "images/avatars/avatar-$user_info[avatarid].".htmlconverter($user_info['avatarextension']);
     $avatarwidth = $user_info['width'];
     $avatarheight = $user_info['height'];
     if ($user_info['avatarextension'] == "swf" && $allowflashavatar == 1) {
      eval("\$useravatar = \"".$tpl->get("avatar_flash")."\";");
     }
     elseif ($user_info['avatarextension'] != "swf") eval("\$useravatar = \"".$tpl->get("avatar_image")."\";");
    }
    else {
    $useravatar = "<img src=\"{$style['imagefolder']}/noavatar.gif\" border=\"0\" alt=\"\" />";
    }
    /* useremail */
    if ($user_info['showemail'] == 1) {
     $user_info['email'] = getASCIICodeString($user_info['email']);
     $useremail = makehreftag("[EMAIL="&quot;.$user_info"]mailto:".$user_info[/EMAIL]['email'], $user_info['email']);
    }
    else $useremail = $lang->items['LANG_MEMBERS_PROFILE_NODECLARATION'];
    /* homepage */
    if ($user_info['homepage']) {
     $user_info['homepage'] = htmlconverter($user_info['homepage']);
     $userhomepage = makehreftag($user_info['homepage'], $user_info['homepage'], "_blank");
    }
    else $userhomepage = $lang->items['LANG_MEMBERS_PROFILE_NODECLARATION'];
    /* ubu */
    if ($user_info['ubu']) {
     $user_info['ubu'] = htmlconverter($user_info['ubu']);
     $userubu = makehreftag($user_info['ubu'], $user_info['ubu'], "_blank");
    }
    else $userubu = $lang->items['LANG_MEMBERS_PROFILE_NODECLARATION'];
    /* icq, aim, yim, msn */
    if (!$user_info['icq']) $user_info['icq'] = $lang->items['LANG_MEMBERS_PROFILE_NODECLARATION'];
    if (!$user_info['aim']) $user_info['aim'] = $lang->items['LANG_MEMBERS_PROFILE_NODECLARATION'];
    else $user_info['aim'] = htmlconverter($user_info['aim']);
    if (!$user_info['yim']) $user_info['yim'] = $lang->items['LANG_MEMBERS_PROFILE_NODECLARATION'];
    else $user_info['yim'] = htmlconverter($user_info['yim']);
    if (!$user_info['msn']) $user_info['msn'] = $lang->items['LANG_MEMBERS_PROFILE_NODECLARATION'];
    else $user_info['msn'] = htmlconverter($user_info['msn']);
    /* birthday */
    if ($user_info['birthday'] && $user_info['birthday'] != '0000-00-00') {
     $birthday_array = explode('-', $user_info['birthday']);
     if ($birthday_array[0] == '0000') $birthday =  $birthday_array[2].".".$birthday_array[1].".";
     else $birthday =  $birthday_array[2].".".$birthday_array[1].".".$birthday_array[0];
    }
    else $birthday = $lang->items['LANG_MEMBERS_PROFILE_NODECLARATION'];
    
    /* profilefields */
    $profilefields = '';
    $result = $db->unbuffered_query("SELECT profilefieldid, title, fieldtype FROM bb".$n."_profilefields".(($wbbuserdata['a_can_view_hidden'] == 0) ? (" WHERE hidden=0") : (""))." ORDER BY fieldorder ASC");
    while ($row = $db->fetch_array($result)) {
     $fieldid = "field".$row['profilefieldid'];
     if (!$user_info[$fieldid] || $user_info[$fieldid] == "0000-00-00") $user_info[$fieldid] = $lang->items['LANG_MEMBERS_PROFILE_NODECLARATION'];
     else {
      if ($row['fieldtype'] == "multiselect") $user_info[$fieldid] = htmlconverter(textwrap(str_replace("\n", "; ", $user_info[$fieldid]), 50));
      elseif ($row['fieldtype'] == "date") {
       $row_datearray = explode("-", $user_info[$fieldid]);
       if ($row_datearray[0] == "0000") $user_info[$fieldid] = $row_datearray[2].".".$row_datearray[1].".";
       else $user_info[$fieldid] = $row_datearray[2].".".$row_datearray[1].".".$row_datearray[0];
      }
      else $user_info[$fieldid] = htmlconverter(textwrap($user_info[$fieldid], 50));
     }
     $row['title'] = getlangvar($row['title'], $lang);
     eval("\$profilefields .= \"".$tpl->get("profile_userfield")."\";");
    }
    
    /* users lastpost */
    $showlastpost = 0;
    if ($showlastpostinprofile == 1 && $wbbuserdata['can_enter_board'] == 1) {
     $boardids = '';
     $permissioncache = getPermissions();
     $result = $db->unbuffered_query("SELECT boardid, password, invisible FROM bb".$n."_boards");
     while ($row = $db->fetch_array($result)) {
      if ($row['password'] != '' || $row['invisible'] == 2) continue;
      if (!isset($permissioncache[$row['boardid']]['can_enter_board']) || $permissioncache[$row['boardid']]['can_enter_board'] != 0) $boardids .= ",".$row['boardid'];
     }
     if ($boardids != '') {
      $lastpost = $db->query_first("SELECT p.postid, p.posttime, p.edittime, IF( p.edittime > p.posttime, p.edittime, p.posttime ) AS lasttime, t.topic, t.boardid, b.title FROM bb".$n."_posts p, bb".$n."_threads t
      LEFT JOIN bb".$n."_boards b ON (t.boardid=b.boardid)
      WHERE p.threadid=t.threadid AND t.boardid IN (0$boardids) AND p.userid = '$userid' AND p.visible=1
      ORDER BY p.posttime DESC", 1);
      if ($lastpost['postid']) {
       $lastpostdate = formatdate($wbbuserdata['dateformat'], $lastpost['posttime'], 1);
       $lastposttime = formatdate($wbbuserdata['timeformat'], $lastpost['posttime']);
       $lastpost['topic'] = htmlconverter(textwrap($lastpost['topic']));
       $lastpost['title'] = getlangvar($lastpost['title'], $lang);
       $showlastpost = 1;
      }
     }
    }
    /* buttons for search, buddy, pm, email */
    $username = $user_info['username'];
    $lang->items['LANG_MEMBERS_SEARCH'] = $lang->get("LANG_MEMBERS_SEARCH", array('$username' => $username));
    $lang->items['LANG_MEMBERS_BUDDY'] = $lang->get("LANG_MEMBERS_BUDDY", array('$username' => $username));
    if ($user_info['receivepm'] == 1 && $wbbuserdata['can_use_pms'] == 1) $lang->items['LANG_MEMBERS_PM'] = $lang->get("LANG_MEMBERS_PM", array('$username' => $username));
    if ($user_info['showemail'] == 0 && $user_info['usercanemail'] == 1) $lang->items['LANG_MEMBERS_SENDEMAIL'] = $lang->get("LANG_MEMBERS_SENDEMAIL", array('$username' => $username));
    /* user online */
    if (($user_info['invisible'] == 0 || $wbbuserdata['a_can_view_ghosts'] == 1) && $user_info['lastactivity'] >= time() - $useronlinetimeout * 60) {
     $user_online = 1;
     $lang->items['LANG_MEMBERS_USERONLINE'] = $lang->get("LANG_MEMBERS_USERONLINE", array('$username' => $username));
    }
    else {
     $user_online = 0;
     $lang->items['LANG_MEMBERS_USEROFFLINE'] = $lang->get("LANG_MEMBERS_USEROFFLINE", array('$username' => $username));
    }
    /* wiw */
    $userlocation = '';
    if ($showuserlocation == 1 && $user_info['s_lastactivity'] >= (time() - 60 * $useronlinetimeout)) {
     include('./acp/lib/class_useronline.php');
     include('./acp/lib/class_wiw.php');
     $lang->load('WIW');
     $wiw = &new WIW($wbbuserdata['a_can_view_ghosts']);
     $wiw->insert($user_info);
     $wiw->cache();
     if ($row = $wiw->get()) $userlocation = $row['location'];
    }
    /* userrating */
    if ($userratings == 1) $userrating = userrating($user_info['ratingcount'], $user_info['ratingpoints'], $user_info['userid']);
    else $userrating = '';
    /* userlevel */
    if ($userlevels == 1) $userlevel = userlevel($user_info['userposts'], $user_info['regdate']);
    else $userlevel = '';
    if ($user_info['userposts'] >= 1000) $user_info['userposts'] = number_format($user_info['userposts'], 0, "", $lang->get("LANG_GLOBAL_THOUSANDS_SEP"));
    /* languagepack */
    if ($showlanguageinprofile == 1) {
     $languagepackname = getlangvar($user_info['languagepackname'], $lang);
    }
    else $languagepackname = '';
    ////// para-scripts.de Verwarn-Hack START //////
    require("acp/lib/ver_profile.inc.php");
    ////// para-scripts.de Verwarn-Hack ENDE //////
     // ##### Kennzeichen Hack by Snoopy of Web-dynamic #####
     require("./kennzeichen.php");
     $kennzbit = kennzeichen_image($user_info['kennzeichen']);
     // ##### Kennzeichen Hack by Snoopy of Web-dynamic #####
     /* Begin User-Map by Viktor */
    $result = $db->query("SELECT * FROM bb".$n."_map_mod_user WHERE user_id = '$userid'");
    $row = $db->fetch_array($result);
    $userplace = $row['zipcode'];
    if($row['user_id']) {
      if($wbbuserdata[userid]) {
     $result_auf = $db->query("SELECT * FROM bb".$n."_map_mod_user WHERE user_id = '$wbbuserdata[userid]'");
     $row_auf = $db->fetch_array($result_auf);
     $entfernung =  round(geo_distance($row['longitude'], $row['latitude'], $row_auf['longitude'], $row_auf['latitude']) /1000);
           $lang->items['LANG_GLOBAL_USER_MAP_POSTBIT_KM'] = $lang->get("LANG_GLOBAL_USER_MAP_POSTBIT_KM", array('$entfernung' => $entfernung));
           eval ("\$mod_map_profile_anz_km = \"".$tpl->get("mod_map_profile_anz_km")."\";");
      }
      $username_map = $user_info['username'];
      $lang->items['LANG_GLOBAL_USER_MAP_POSTBIT'] = $lang->get("LANG_GLOBAL_USER_MAP_POSTBIT", array('$username_map' => $username_map));
      eval ("\$mod_map_profile_anz = \"".$tpl->get("mod_map_profile_anz")."\";");
    }
    /* End User-Map by Viktor */
    // ### Begin User-Pic by Viktor
    if($wbbuserdata['can_use_userpicupload_show']) {
      $ownuserpic = $db->query_first("SELECT userpicid, userpicextension, width, height FROM bb".$n."_userpic WHERE userid = '".$userid."'");
      if ($ownuserpic['userpicid']) {
        $lang->load('USERCP');
        $userpicid          = $ownuserpic['userpicid'];
        $userpicname        = "userpic/userpic-".$ownuserpic['userpicid'].".".$ownuserpic['userpicextension'];
        if($ownuserpic['width']>$wbbuserdata['max_avatar_width'] && $ownuserpic['height']>$wbbuserdata['max_avatar_height']) {
          $userpicwidth       = $wbbuserdata['max_avatar_width'];
          $userpicheight      = $wbbuserdata['max_avatar_height'];
        } else {
          $userpicwidth       = $ownuserpic['width'];
          $userpicheight      = $ownuserpic['height'];
        }
        $userpicwidth_pop   = $ownuserpic['width']+40;
        $userpicheight_pop  = $ownuserpic['height']+40;
        if ($ownuserpic['userpicextension'] == "swf") {
          eval("\$userpic_ausgabe = \"".$tpl->get("userpic_flash")."\";");
        }
        elseif ($ownuserpic['userpicextension'] != "swf") eval("\$userpic_ausgabe = \"".$tpl->get("userpic_image")."\";");
        eval("\$userpicausgabe = \"".$tpl->get("userpic_profile")."\";");
        eval("\$userpicausgabe_text = \"".$tpl->get("userpic_profile_text")."\";");
      }
    }
    // ### End User-Pic by Viktor
    if($wbbuserdata['userid'] && $user_info['usegb'] == 1) {
     
     if($_POST['gbentrysend'] == "send") {
      $db->query("UPDATE bb".$n."_users SET gbentries=gbentries+1 WHERE userid=$userid;");
      $db->query("INSERT INTO bb".$n."_users_gb (date,foruser,fromuser,message,ip,browser) VALUES (".time().", ".intval($_POST['userid']).", $wbbuserdata[userid], '".addslashes($_POST['message'])."', '".addslashes(getIpAddress())."', '".addslashes(wbb_substr($_SERVER['HTTP_USER_AGENT'], 0, 200))."')");
      
      // Mail, PN oder gar nix - Abfragen -> senden
      
      $mail_subject = $lang->get("LANG_MEMBERS_PROFILE_GB_NOTIFICATION_SUBJECT", array('$master_board_name' => $master_board_name));
      $mail_text = $lang->get("LANG_MEMBERS_PROFILE_GB_NOTIFICATION_MESSAGE", array('$username' => $user_info['username'], '$from' => $wbbuserdata['username'], '$userid' => $userid, '$url2board' => $url2board, '$master_board_name' => $master_board_name));
      
      require "./acp/lib/class_parsecode.php";
      
      if(!isset($parse)) $parse = new parse($docensor,75,1,"",$usecode);
      
      if($user_info['notifygb'] == 1) {
       sendPrivateMessage(array($userid => $user_info['username']), array(), $mail_subject, parseURL($mail_text));
      } elseif($user_info['notifygb'] == 2) {
       mailer($user_info['email'], $mail_subject, $mail_text);
      }
      
      header("Location: profile.php?userid=".intval($_POST['userid'])."&msg=thx");
      exit;
     } else {
      
      if($_GET['action'] == "delete" && intval($_GET['gbentryid'])) {
       
       $id = intval($_GET['gbentryid']);
       
       $temp = $db->query_first("SELECT entryid, foruser FROM bb".$n."_users_gb WHERE entryid=$id;");
       
       if(!$temp['entryid'] || (($temp['foruser'] != $wbbuserdata['userid']) && !$wbbuserdata['a_can_use_acp'])) access_error();
       else {
        // löschen
        
        $db->query("DELETE FROM bb".$n."_users_gb WHERE entryid=$id;");
        $db->query("UPDATE bb".$n."_users SET gbentries=gbentries-1 WHERE userid=$userid;");
        
        header("Location: profile.php?userid=$userid&msg=del");
        exit;
       }
       
       
      } else {
       
       if(!intval($_GET['page']) || intval($_GET['page']) < 1) $page = 1;
       else $page = intval($_GET['page']);
       
       $pages = ceil($user_info['gbentries']/$gb_perpage);
       
       if ($pages > 1) $pagelink = makePageLink("profile.php?userid=".$userid.$SID_ARG_2ND, $page, $pages, $showpagelinks - 1);
       else $pagelink = '&nbsp;';
       
       $startat = ($page-1)*$gb_perpage;
       $endat = $page*$gb_perpage;
       
       $res = $db->query("SELECT 
       gb.*, 
       fromu.username, fromu.receivepm,
       fromu.userid, av.avatarid, av.avatarextension, av.width, av.height
       FROM bb".$n."_users_gb AS gb
       LEFT JOIN bb".$n."_users AS fromu ON (gb.fromuser=fromu.userid)
       LEFT JOIN bb".$n."_avatars AS av ON (fromu.avatarid=av.avatarid)
       WHERE foruser=$userid ORDER BY date DESC LIMIT $startat, $endat;");
       
       $i = 0;
       unset($msgs, $row);
       
       while($row = $db->fetch_array($res)) {
        unset($gbava);
        $i++;
        $tdclass = getone($i, "tablea", "tableb");
        $time = formatdate($wbbuserdata['dateformat'], $row['date'],1);
        $time .= " <span class=\"time\">".formatdate($wbbuserdata['timeformat'], $row['date'])."</span>";
        
        $username = htmlconverter($row['username']);
        
        if ($row['avatarid'] && $showavatar == 1 && $wbbuserdata['showavatars'] == 1) {
         $avatarname = "images/avatars/avatar-$row[avatarid].".htmlconverter($row['avatarextension']);
         $avatarwidth = $row['width'];
         $avatarheight = $row['height'];
         if ($row['avatarextension'] == "swf" && $allowflashavatar == 1) eval("\$gbava = \"".$tpl->get("avatar_flash")."\";");
         eval("\$gbava = \"".$tpl->get("avatar_image")."\";");
        }
        
        if(!isset($parse)) $parse = new parse($docensor,75,1,"",$usecode);
         $message = $parse->doparse($row['message'],1,0,1,1);
         
         eval("\$msgs .= \"".$tpl->get("profile_gb_entrybit")."\";");
       }
       
       
       if($_GET['msg'] != "thx") {
        $gb_bbcode_nessarry = "1";
        eval ("\$headinclude .= \"".$tpl->get("bbcode_script")."\";");
        $bbcode_buttons = getcodebuttons();
        $bbcode_smilies = getclickysmilies($smilie_table_cols,$smilie_table_rows);
        
        eval("\$addentry = \"".$tpl->get("profile_gb_addentry")."\";");
       }
      }
      
      eval("\$guestbook = \"".$tpl->get("profile_gb")."\";");
      
     }
    }
    // *************************** Guestbook in Profile by rellek
     eval("\$tpl->output(\"".$tpl->get("profile")."\");");
    ?>
    weißt du da die lösung?
     
  2. rellek

    rellek relativ sensationell Mitarbeiter

    Zeile 494? So viele Zeilen hat die Datei doch gar nicht?
     
  3. Golf3forumde

    Golf3forumde New Member

    hehe doch ist schon sehr viel drin geändert

    ist diese Zeile

    $pages = ceil($user_info['gbentries']/$gb_perpage);
     
  4. rellek

    rellek relativ sensationell Mitarbeiter

    dann probiers mal damit

    Code:
    <?php
    // ************************************************************************************//
    // * WoltLab Burning Board 2
    // ************************************************************************************//
    // * Copyright (c) 2001-2004 WoltLab GmbH
    // * Web           WoltLab® GmbH | Startseite
    // * License       WoltLab® GmbH | Products | Burning Board | License agreement
    // *               WoltLab® GmbH | Produkte | Burning Board | Lizenzbestimmungen
    // ************************************************************************************//
    // * WoltLab Burning Board 2 is NOT free software.
    // * You may not redistribute this package or any of it's files.
    // ************************************************************************************//
    // * $Date: 2004-10-20 13:24:57 +0200 (Wed, 20 Oct 2004) $
    // * $Author: Burntime $
    // * $Rev: 1453 $
    // ************************************************************************************//
    
    $filename = 'profile.php';
    require('./global.php');
    include('./includes/map_functions.php');
    require("./jgs_galerie_showeverywhere.php");
    if ($wbbuserdata['can_view_profile'] == 0) access_error();
    require('./acp/lib/class_parse.php');
    $lang->load('MEMBERS,THREAD,POSTINGS');
    $userid = intval($_GET['userid']);
    if (!$userid) error($lang->get("LANG_GLOBAL_ERROR_FALSELINK", array('$adminmail' => $adminmail)));
    $user_info = $db->query_first("SELECT ".
    "u.*, ".
    "uf.*, ".
    "r.rankimages, r.ranktitle, ".
    "a.avatarextension, a.width, a.height, ".
    "s.lastactivity AS s_lastactivity, s.boardid, s.threadid, s.request_uri ".
    ($showlanguageinprofile == 1 ? ", l.languagepackname " : "").
    "FROM bb".$n."_users u ".
    "LEFT JOIN bb".$n."_userfields uf USING (userid) ".
    "LEFT JOIN bb".$n."_avatars a ON (a.avatarid=u.avatarid) ".
    "LEFT JOIN bb".$n."_ranks r ON (r.rankid=u.rankid) ".
    "LEFT JOIN bb".$n."_sessions s ON (s.userid=u.userid) ".
    ($showlanguageinprofile == 1 ? "LEFT JOIN bb".$n."_languagepacks l ON (l.languagepackid=u.langid) " : "").
    "WHERE u.userid='$userid'");
    if (!$user_info['userid']) error($lang->get("LANG_GLOBAL_ERROR_FALSELINK", array('$adminmail' => $adminmail)));
    $user_info['username'] = htmlconverter($user_info['username']);
    $lang->items['LANG_MEMBERS_PROFILE_TITLE'] = $lang->get("LANG_MEMBERS_PROFILE_TITLE", array('$username' => $user_info['username']));
    //=========================================================================================
    //   Visitor-Hack by speedy Version 1.4
    //=========================================================================================
    // .....................................
    // PARAMETER ZUM SPEICHERN DER BESUCHER
    // ............. ========= .............
    // Anzahl Sekunden, die vergehen müssen, bevor der Benutzer erneut eingetragen wird
    // 0 -> kein Timeout
    $timeout = 1800 ;
    // Deaktiviert den Timeout nach einem Datumswechsel
    // 0 - kein Timeout-Reset
    // 1 - Timeout wird wird bei Datumswechsel außer Kraft gesetzt.
    $timeout_reset = 0 ;
    // Nicht zu speichernde User-IDs: array( 1,2,6,12)
    $idexclude = array();
    // ....................................
    // PARAMETER ZUM ANZEIGEN DER BESUCHER
    // ............. ======== .............
    // Anzahl anzuzeigender Sätze
    $limit = 10 ;
    // 0-Besucher NICHT anzeigen / 1-Besucher anzeigen
    $display_guests = 1 ;
    // Anzeigen Besucher der letzten X Stunden. 0 - alle anzeigen
    $timewindow = 0 ;
    // Liste nur für Profilbesitzer sichtbar: 1 - ja / 0 - nein, für alle sichtbar
    $profileowner = 0;
    // Diese User-IDs können die Liste AUF JEDEN FALL einsehen: array( 1,12)
    $idinclude = array();
    /*----------------------------------------------------------------------------------------*/
    // Arbeitsvariablen
    // Dateiname
    $datei = "bb" . $n . "_profilevisits" ;
    // Ausgabefeld
    $output = "<table>" ;
    // Besucher
    $visitor = $wbbuserdata['userid'];
    // Template anzeigen?
    $showit = 1 ;
    $period = date( "YmdHis", date('U') - $timewindow * 3600 ) ;
    /*----------------------------------------------------------------------------------------*/
    if ( ( $userid != $visitor ) and ( !in_array($visitor, $idexclude ) ) ) :
     if ( $timeout == 0 ) :   // Kein TimeOut
        $doit = 1 ;
       else:                    // TimeOut gesetzt
        $result = $db->query_first("Select datum from $datei where profile_id='$userid' and visitor_id='$visitor' and art='V' ORDER BY datum DESC");
          $tag  = substr( $result[0],6,2 ) ;
          $mon  = substr( $result[0],4,2 ) ;
          $jahr = substr( $result[0],0,4 ) ;
          $std  = substr( $result[0],8,2 ) ;
          $min  = substr( $result[0],10,2 ) ;
          $sec  = substr( $result[0],12,2 ) ;
          $last = mktime($std,$min,$sec,$mon,$tag,$jahr) ;
          $diff = mktime() - $last ;
      // TimeOut noch nicht abgelaufen?
          if ( $diff < $timeout ):
           // TimeOut nach Datumswechsel resetten?
           if ( $timeout_reset == 1 ):
              if ( date("Ymd") == substr($result[0],0,8) ):  // same date
                 $doit = 0 ;   // kein Eintrag
              else:    // date changed
               $doit = 1 ;
                endif;
             else:
              $doit = 0 ;
             endif;
          else:
           $doit = 1 ;
          endif;
       endif;
       // Eintrag wird geschrieben
     if ($doit>0) :
        $db->query("INSERT INTO $datei set profile_id='$userid',visitor_id='$visitor',art='V'") ;
        $result = $db->query_first("Select visitor_id from $datei where profile_id='$userid' and art='C'");
        if (!$result) :
           $db->query("Insert into $datei set profile_id=$userid,visitor_id=1,art='C'") ;
        else:
           $counter = $result[0] + 1 ;
           $db->query("Update $datei set visitor_id=$counter where profile_id=$userid and art='C'") ;
      endif;
       endif;
    endif;
    $result = $db->query_first("Select visitor_id from $datei where profile_id=$userid and art='C'");
    $visitorcounter = $result[0] ;
    $abfrage = "SELECT v.profile_id, v.visitor_id, v.art, v.datum, date_format(v.datum,'%d.%m.%Y %H:%i'), u.username FROM $datei v LEFT JOIN bb" . $n . "_users u ON (u.userid=v.visitor_id) WHERE v.profile_id=$userid AND v.art='V' ".(($display_guests==0) ? ("AND v.visitor_id>0 ") : ("")).
    (($timewindow>0) ? ("AND date_format(v.datum,'%Y%m%d%H%i%s')>$period ") : ("")).
    "ORDER BY v.datum desc LIMIT 0,$limit" ;
    $x = 0 ;                        /* interner Zähler  */
    $result=$db->query($abfrage);
    while ($row = $db->fetch_array($result)) :
     $visitor = $row[1];
     $ldate   = $row[3];
     $datum   = $row[4];
       if ($row[5]=="") :
        ($visitor==0) ? $name="Besucher" : $name="" ;
       else:
        $name="<a href='profile.php?userid=$visitor'>" . $row[5] . "</a>" ;
       endif;
       if ( $name!="" ):
        $x++ ;
        $output .= "<tr><td><span class='normalfont'>".$name."</span></td>" ;
        $output .= "<td><span class='normalfont'>".$datum."</span></td></tr>" ;
       endif;
    endwhile;
    $result = $db->query_first("Select visitor_id from $datei where profile_id=$userid and art='D'");
    if (!$result) :
       $db->query("Insert into $datei set profile_id=$userid,visitor_id=1,art='D'") ;
       $displaylist = "yes" ;
    else:
       $displaylist = ($result[0]==0) ? "no" : "yes" ;
    endif;
    $ownprofil = ( $userid==$wbbuserdata['userid']) ;
    $showit = ($ownprofil OR ($profileowner==0 AND $displaylist=="yes") OR in_array($visitor, $idinclude) ) ; 
    if ($x>=$limit) :
     $db->query("Delete from $datei where profile_id=$userid and art='V' and datum<'$ldate'") ;
    endif;
    $output .= "</table>" ;
    //=========================================================================================
    //   Visitor-Hack by speedy
    //=========================================================================================
    /* regdate */
    $regdate = formatdate($wbbuserdata['dateformat'], $user_info['regdate']);
    /* last activity */
    if ($user_info['invisible'] == 0 || $wbbuserdata['a_can_view_ghosts'] == 1) {
     $la_date = formatdate($wbbuserdata['dateformat'], $user_info['lastactivity'], 1);
     $la_time = formatdate($wbbuserdata['timeformat'], $user_info['lastactivity']);
    }
    else {
     $la_date = $lang->items['LANG_MEMBERS_PROFILE_NODECLARATION'];
     $la_time = '';
    }
    /* posts per day */
    $regdays = (time() - $user_info['regdate']) / 86400;
    if ($regdays < 1) $postperday = $user_info['userposts'];
    else $postperday = $user_info['userposts'] / $regdays;
    $postperday = number_format($postperday, 2, $lang->get("LANG_GLOBAL_DEC_POINT"), $lang->get("LANG_GLOBAL_THOUSANDS_SEP"));
    $lang->items['LANG_MEMBERS_PROFILE_POSTSPERDAY'] = $lang->get("LANG_MEMBERS_PROFILE_POSTSPERDAY", array('$postperday' => $postperday));
    /* usertext */
    if ($user_info['usertext']) $user_text = nl2br(htmlconverter(textwrap($user_info['usertext'], 40)));
    else $user_text = '';
    /* gender */
    if ($user_info['gender']) {
     if ($user_info['gender'] == 1) $gender = $lang->items['LANG_MEMBERS_PROFILE_MALE'];
     else $gender = $lang->items['LANG_MEMBERS_PROFILE_FEMALE'];
    }
    else $gender = $lang->items['LANG_MEMBERS_PROFILE_NODECLARATION'];
    /* usertitle */
    if ($user_info['title']) $user_info['ranktitle'] = htmlconverter($user_info['title']);
    else $user_info['ranktitle'] = getlangvar($user_info['ranktitle'], $lang);
    $rankimages = formatRI($user_info['rankimages']);
    if($user_info['userid']) {
     // Showeverywhere Bild laden
     $showeverywhere = getsew($user_info['userid']);
    }
    /* avatar */
    if ($user_info['avatarid'] && $showavatar == 1 && $wbbuserdata['showavatars'] == 1) {
     $avatarname = "images/avatars/avatar-$user_info[avatarid].".htmlconverter($user_info['avatarextension']);
     $avatarwidth = $user_info['width'];
     $avatarheight = $user_info['height'];
     if ($user_info['avatarextension'] == "swf" && $allowflashavatar == 1) {
      eval("\$useravatar = \"".$tpl->get("avatar_flash")."\";");
     }
     elseif ($user_info['avatarextension'] != "swf") eval("\$useravatar = \"".$tpl->get("avatar_image")."\";");
    }
    else {
    $useravatar = "<img src=\"{$style['imagefolder']}/noavatar.gif\" border=\"0\" alt=\"\" />";
    }
    /* useremail */
    if ($user_info['showemail'] == 1) {
     $user_info['email'] = getASCIICodeString($user_info['email']);
     $useremail = makehreftag("mailto:".$user_info['email'], $user_info['email']);
    }
    else $useremail = $lang->items['LANG_MEMBERS_PROFILE_NODECLARATION'];
    /* homepage */
    if ($user_info['homepage']) {
     $user_info['homepage'] = htmlconverter($user_info['homepage']);
     $userhomepage = makehreftag($user_info['homepage'], $user_info['homepage'], "_blank");
    }
    else $userhomepage = $lang->items['LANG_MEMBERS_PROFILE_NODECLARATION'];
    /* ubu */
    if ($user_info['ubu']) {
     $user_info['ubu'] = htmlconverter($user_info['ubu']);
     $userubu = makehreftag($user_info['ubu'], $user_info['ubu'], "_blank");
    }
    else $userubu = $lang->items['LANG_MEMBERS_PROFILE_NODECLARATION'];
    /* icq, aim, yim, msn */
    if (!$user_info['icq']) $user_info['icq'] = $lang->items['LANG_MEMBERS_PROFILE_NODECLARATION'];
    if (!$user_info['aim']) $user_info['aim'] = $lang->items['LANG_MEMBERS_PROFILE_NODECLARATION'];
    else $user_info['aim'] = htmlconverter($user_info['aim']);
    if (!$user_info['yim']) $user_info['yim'] = $lang->items['LANG_MEMBERS_PROFILE_NODECLARATION'];
    else $user_info['yim'] = htmlconverter($user_info['yim']);
    if (!$user_info['msn']) $user_info['msn'] = $lang->items['LANG_MEMBERS_PROFILE_NODECLARATION'];
    else $user_info['msn'] = htmlconverter($user_info['msn']);
    /* birthday */
    if ($user_info['birthday'] && $user_info['birthday'] != '0000-00-00') {
     $birthday_array = explode('-', $user_info['birthday']);
     if ($birthday_array[0] == '0000') $birthday =  $birthday_array[2].".".$birthday_array[1].".";
     else $birthday =  $birthday_array[2].".".$birthday_array[1].".".$birthday_array[0];
    }
    else $birthday = $lang->items['LANG_MEMBERS_PROFILE_NODECLARATION'];
    
    /* profilefields */
    $profilefields = '';
    $result = $db->unbuffered_query("SELECT profilefieldid, title, fieldtype FROM bb".$n."_profilefields".(($wbbuserdata['a_can_view_hidden'] == 0) ? (" WHERE hidden=0") : (""))." ORDER BY fieldorder ASC");
    while ($row = $db->fetch_array($result)) {
     $fieldid = "field".$row['profilefieldid'];
     if (!$user_info[$fieldid] || $user_info[$fieldid] == "0000-00-00") $user_info[$fieldid] = $lang->items['LANG_MEMBERS_PROFILE_NODECLARATION'];
     else {
      if ($row['fieldtype'] == "multiselect") $user_info[$fieldid] = htmlconverter(textwrap(str_replace("\n", "; ", $user_info[$fieldid]), 50));
      elseif ($row['fieldtype'] == "date") {
       $row_datearray = explode("-", $user_info[$fieldid]);
       if ($row_datearray[0] == "0000") $user_info[$fieldid] = $row_datearray[2].".".$row_datearray[1].".";
       else $user_info[$fieldid] = $row_datearray[2].".".$row_datearray[1].".".$row_datearray[0];
      }
      else $user_info[$fieldid] = htmlconverter(textwrap($user_info[$fieldid], 50));
     }
     $row['title'] = getlangvar($row['title'], $lang);
     eval("\$profilefields .= \"".$tpl->get("profile_userfield")."\";");
    }
    
    /* users lastpost */
    $showlastpost = 0;
    if ($showlastpostinprofile == 1 && $wbbuserdata['can_enter_board'] == 1) {
     $boardids = '';
     $permissioncache = getPermissions();
     $result = $db->unbuffered_query("SELECT boardid, password, invisible FROM bb".$n."_boards");
     while ($row = $db->fetch_array($result)) {
      if ($row['password'] != '' || $row['invisible'] == 2) continue;
      if (!isset($permissioncache[$row['boardid']]['can_enter_board']) || $permissioncache[$row['boardid']]['can_enter_board'] != 0) $boardids .= ",".$row['boardid'];
     }
     if ($boardids != '') {
      $lastpost = $db->query_first("SELECT p.postid, p.posttime, p.edittime, IF( p.edittime > p.posttime, p.edittime, p.posttime ) AS lasttime, t.topic, t.boardid, b.title FROM bb".$n."_posts p, bb".$n."_threads t
      LEFT JOIN bb".$n."_boards b ON (t.boardid=b.boardid)
      WHERE p.threadid=t.threadid AND t.boardid IN (0$boardids) AND p.userid = '$userid' AND p.visible=1
      ORDER BY p.posttime DESC", 1);
      if ($lastpost['postid']) {
       $lastpostdate = formatdate($wbbuserdata['dateformat'], $lastpost['posttime'], 1);
       $lastposttime = formatdate($wbbuserdata['timeformat'], $lastpost['posttime']);
       $lastpost['topic'] = htmlconverter(textwrap($lastpost['topic']));
       $lastpost['title'] = getlangvar($lastpost['title'], $lang);
       $showlastpost = 1;
      }
     }
    }
    /* buttons for search, buddy, pm, email */
    $username = $user_info['username'];
    $lang->items['LANG_MEMBERS_SEARCH'] = $lang->get("LANG_MEMBERS_SEARCH", array('$username' => $username));
    $lang->items['LANG_MEMBERS_BUDDY'] = $lang->get("LANG_MEMBERS_BUDDY", array('$username' => $username));
    if ($user_info['receivepm'] == 1 && $wbbuserdata['can_use_pms'] == 1) $lang->items['LANG_MEMBERS_PM'] = $lang->get("LANG_MEMBERS_PM", array('$username' => $username));
    if ($user_info['showemail'] == 0 && $user_info['usercanemail'] == 1) $lang->items['LANG_MEMBERS_SENDEMAIL'] = $lang->get("LANG_MEMBERS_SENDEMAIL", array('$username' => $username));
    /* user online */
    if (($user_info['invisible'] == 0 || $wbbuserdata['a_can_view_ghosts'] == 1) && $user_info['lastactivity'] >= time() - $useronlinetimeout * 60) {
     $user_online = 1;
     $lang->items['LANG_MEMBERS_USERONLINE'] = $lang->get("LANG_MEMBERS_USERONLINE", array('$username' => $username));
    }
    else {
     $user_online = 0;
     $lang->items['LANG_MEMBERS_USEROFFLINE'] = $lang->get("LANG_MEMBERS_USEROFFLINE", array('$username' => $username));
    }
    /* wiw */
    $userlocation = '';
    if ($showuserlocation == 1 && $user_info['s_lastactivity'] >= (time() - 60 * $useronlinetimeout)) {
     include('./acp/lib/class_useronline.php');
     include('./acp/lib/class_wiw.php');
     $lang->load('WIW');
     $wiw = &new WIW($wbbuserdata['a_can_view_ghosts']);
     $wiw->insert($user_info);
     $wiw->cache();
     if ($row = $wiw->get()) $userlocation = $row['location'];
    }
    /* userrating */
    if ($userratings == 1) $userrating = userrating($user_info['ratingcount'], $user_info['ratingpoints'], $user_info['userid']);
    else $userrating = '';
    /* userlevel */
    if ($userlevels == 1) $userlevel = userlevel($user_info['userposts'], $user_info['regdate']);
    else $userlevel = '';
    if ($user_info['userposts'] >= 1000) $user_info['userposts'] = number_format($user_info['userposts'], 0, "", $lang->get("LANG_GLOBAL_THOUSANDS_SEP"));
    /* languagepack */
    if ($showlanguageinprofile == 1) {
     $languagepackname = getlangvar($user_info['languagepackname'], $lang);
    }
    else $languagepackname = '';
    ////// para-scripts.de Verwarn-Hack START //////
    require("acp/lib/ver_profile.inc.php");
    ////// para-scripts.de Verwarn-Hack ENDE //////
     // ##### Kennzeichen Hack by Snoopy of Web-dynamic #####
     require("./kennzeichen.php");
     $kennzbit = kennzeichen_image($user_info['kennzeichen']);
     // ##### Kennzeichen Hack by Snoopy of Web-dynamic #####
     /* Begin User-Map by Viktor */
    $result = $db->query("SELECT * FROM bb".$n."_map_mod_user WHERE user_id = '$userid'");
    $row = $db->fetch_array($result);
    $userplace = $row['zipcode'];
    if($row['user_id']) {
      if($wbbuserdata[userid]) {
     $result_auf = $db->query("SELECT * FROM bb".$n."_map_mod_user WHERE user_id = '$wbbuserdata[userid]'");
     $row_auf = $db->fetch_array($result_auf);
     $entfernung =  round(geo_distance($row['longitude'], $row['latitude'], $row_auf['longitude'], $row_auf['latitude']) /1000);
           $lang->items['LANG_GLOBAL_USER_MAP_POSTBIT_KM'] = $lang->get("LANG_GLOBAL_USER_MAP_POSTBIT_KM", array('$entfernung' => $entfernung));
           eval ("\$mod_map_profile_anz_km = \"".$tpl->get("mod_map_profile_anz_km")."\";");
      }
      $username_map = $user_info['username'];
      $lang->items['LANG_GLOBAL_USER_MAP_POSTBIT'] = $lang->get("LANG_GLOBAL_USER_MAP_POSTBIT", array('$username_map' => $username_map));
      eval ("\$mod_map_profile_anz = \"".$tpl->get("mod_map_profile_anz")."\";");
    }
    /* End User-Map by Viktor */
    // ### Begin User-Pic by Viktor
    if($wbbuserdata['can_use_userpicupload_show']) {
      $ownuserpic = $db->query_first("SELECT userpicid, userpicextension, width, height FROM bb".$n."_userpic WHERE userid = '".$userid."'");
      if ($ownuserpic['userpicid']) {
        $lang->load('USERCP');
        $userpicid          = $ownuserpic['userpicid'];
        $userpicname        = "userpic/userpic-".$ownuserpic['userpicid'].".".$ownuserpic['userpicextension'];
        if($ownuserpic['width']>$wbbuserdata['max_avatar_width'] && $ownuserpic['height']>$wbbuserdata['max_avatar_height']) {
          $userpicwidth       = $wbbuserdata['max_avatar_width'];
          $userpicheight      = $wbbuserdata['max_avatar_height'];
        } else {
          $userpicwidth       = $ownuserpic['width'];
          $userpicheight      = $ownuserpic['height'];
        }
        $userpicwidth_pop   = $ownuserpic['width']+40;
        $userpicheight_pop  = $ownuserpic['height']+40;
        if ($ownuserpic['userpicextension'] == "swf") {
          eval("\$userpic_ausgabe = \"".$tpl->get("userpic_flash")."\";");
        }
        elseif ($ownuserpic['userpicextension'] != "swf") eval("\$userpic_ausgabe = \"".$tpl->get("userpic_image")."\";");
        eval("\$userpicausgabe = \"".$tpl->get("userpic_profile")."\";");
        eval("\$userpicausgabe_text = \"".$tpl->get("userpic_profile_text")."\";");
      }
    }
    // ### End User-Pic by Viktor
    
    // *************************** Guestbook in Profile by rellek
    
    // HARDCODED DATA... FIX ME
    $gb_perpage = 5;
    $user_info['usegb'] = 1;
    $user_info['notifygb'] = 1;  // 0 = aus
                                 // 1 = PN
                                 // 2 = eMail
    
    if($wbbuserdata['userid'] && $user_info['usegb'] == 1) {
     
     if($_POST['gbentrysend'] == "send") {
      $db->query("UPDATE bb".$n."_users SET gbentries=gbentries+1 WHERE userid=$userid;");
      $db->query("INSERT INTO bb".$n."_users_gb (date,foruser,fromuser,message,ip,browser) VALUES (".time().", ".intval($_POST['userid']).", $wbbuserdata[userid], '".addslashes($_POST['message'])."', '".addslashes(getIpAddress())."', '".addslashes(wbb_substr($_SERVER['HTTP_USER_AGENT'], 0, 200))."')");
      
      // Mail, PN oder gar nix - Abfragen -> senden
      
      $mail_subject = $lang->get("LANG_MEMBERS_PROFILE_GB_NOTIFICATION_SUBJECT", array('$master_board_name' => $master_board_name));
      $mail_text = $lang->get("LANG_MEMBERS_PROFILE_GB_NOTIFICATION_MESSAGE", array('$username' => $user_info['username'], '$from' => $wbbuserdata['username'], '$userid' => $userid, '$url2board' => $url2board, '$master_board_name' => $master_board_name));
      
      require "./acp/lib/class_parsecode.php";
      
      if(!isset($parse)) $parse = new parse($docensor,75,1,"",$usecode);
      
      if($user_info['notifygb'] == 1) {
       sendPrivateMessage(array($userid => $user_info['username']), array(), $mail_subject, parseURL($mail_text));
      } elseif($user_info['notifygb'] == 2) {
       mailer($user_info['email'], $mail_subject, $mail_text);
      }
      
      header("Location: profile.php?userid=".intval($_POST['userid'])."&msg=thx");
      exit;
     } else {
      
      if($_GET['action'] == "delete" && intval($_GET['gbentryid'])) {
       
       $id = intval($_GET['gbentryid']);
       
       $temp = $db->query_first("SELECT entryid, foruser FROM bb".$n."_users_gb WHERE entryid=$id;");
       
       if(!$temp['entryid'] || (($temp['foruser'] != $wbbuserdata['userid']) && !$wbbuserdata['a_can_use_acp'])) access_error();
       else {
        // löschen
        
        $db->query("DELETE FROM bb".$n."_users_gb WHERE entryid=$id;");
        $db->query("UPDATE bb".$n."_users SET gbentries=gbentries-1 WHERE userid=$userid;");
        
        header("Location: profile.php?userid=$userid&msg=del");
        exit;
       }
       
       
      } else {
       
       if(!intval($_GET['page']) || intval($_GET['page']) < 1) $page = 1;
       else $page = intval($_GET['page']);
       
       $pages = ceil($user_info['gbentries']/$gb_perpage);
       
       if ($pages > 1) $pagelink = makePageLink("profile.php?userid=".$userid.$SID_ARG_2ND, $page, $pages, $showpagelinks - 1);
       else $pagelink = '&nbsp;';
       
       $startat = ($page-1)*$gb_perpage;
       $endat = $page*$gb_perpage;
       
       $res = $db->query("SELECT 
       gb.*, 
       fromu.username, fromu.receivepm,
       fromu.userid, av.avatarid, av.avatarextension, av.width, av.height
       FROM bb".$n."_users_gb AS gb
       LEFT JOIN bb".$n."_users AS fromu ON (gb.fromuser=fromu.userid)
       LEFT JOIN bb".$n."_avatars AS av ON (fromu.avatarid=av.avatarid)
       WHERE foruser=$userid ORDER BY date DESC LIMIT $startat, $endat;");
       
       $i = 0;
       unset($msgs, $row);
       
       while($row = $db->fetch_array($res)) {
        unset($gbava);
        $i++;
        $tdclass = getone($i, "tablea", "tableb");
        $time = formatdate($wbbuserdata['dateformat'], $row['date'],1);
        $time .= " <span class=\"time\">".formatdate($wbbuserdata['timeformat'], $row['date'])."</span>";
        
        $username = htmlconverter($row['username']);
        
        if ($row['avatarid'] && $showavatar == 1 && $wbbuserdata['showavatars'] == 1) {
         $avatarname = "images/avatars/avatar-$row[avatarid].".htmlconverter($row['avatarextension']);
         $avatarwidth = $row['width'];
         $avatarheight = $row['height'];
         if ($row['avatarextension'] == "swf" && $allowflashavatar == 1) eval("\$gbava = \"".$tpl->get("avatar_flash")."\";");
         eval("\$gbava = \"".$tpl->get("avatar_image")."\";");
        }
        
        if(!isset($parse)) $parse = new parse($docensor,75,1,"",$usecode);
         $message = $parse->doparse($row['message'],1,0,1,1);
         
         eval("\$msgs .= \"".$tpl->get("profile_gb_entrybit")."\";");
       }
       
       
       if($_GET['msg'] != "thx") {
        $gb_bbcode_nessarry = "1";
        eval ("\$headinclude .= \"".$tpl->get("bbcode_script")."\";");
        $bbcode_buttons = getcodebuttons();
        $bbcode_smilies = getclickysmilies($smilie_table_cols,$smilie_table_rows);
        
        eval("\$addentry = \"".$tpl->get("profile_gb_addentry")."\";");
       }
      }
      
      eval("\$guestbook = \"".$tpl->get("profile_gb")."\";");
      
     }
    }
    // *************************** Guestbook in Profile by rellek
     eval("\$tpl->output(\"".$tpl->get("profile")."\");");
    ?>
     
  5. Golf3forumde

    Golf3forumde New Member

    jetzt ist der Fehler in Zeile 422 und die Einträge werden auch noch nicht dargestellt
     
  6. rellek

    rellek relativ sensationell Mitarbeiter

    Es wäre schön, wenn du die Datei über die Anhangsfunktion anhängen könntest, damit deine Zeilennummern dieselben sind wie meine.
     
  7. Golf3forumde

    Golf3forumde New Member

    so habe die noch nicht von dir geänderte Profile.php angehangen
     

    Anhänge:

  8. rellek

    rellek relativ sensationell Mitarbeiter

    Schöner wärs, du hingst die Datei an, mit der der genannte Fehler auftritt, damit man auch mal die Zeilenangabe auswerten kann *sigh
     
  9. Golf3forumde

    Golf3forumde New Member

    die datei produziert den fehler?!? in Zeile 494

    hast du den Fehler dort nicht?

    werden bei dir die beiträge angezeigt

    kannst dich gerne bei mir registrieren Golf3forum.de - Das Original!!! | Portal

    und dann im Profil von "webmaster" probieren
     
  10. rellek

    rellek relativ sensationell Mitarbeiter

    Okay, sagen wir mal so:


    • DU hast ein Problem und möchtest Support (von mir). Da wärs nett, wenns zumindest einen Test-Account gäbe, und kein "registrier dich mal"
    • Ich hab für dich einen Fehler behoben, den Div-0-Fehler. Der kam daher, dass durch eine Variable geteilt wurde, die nicht gesetzt war, folglich 0. Diese Variable hab ich für dich gesetzt. Da wärs ziemlich kooperativ, wenn schon die Zeilennummern mit deiner geposteten Datei nicht übereinstimmen(!!!!!) wenn man zumindest mal die aktuellste Version bekommen könnte - in der Hoffnung dass die Zeilennummern da passen.

    Und zum Thema "Was willstn du von mir, Fehler ist in Zeile 494"
    Sehr witzig.
    zeile494,.png
     
  11. Golf3forumde

    Golf3forumde New Member

    hi also ich habe den fehler in der zeile 494 stehen weis nicht warum die datei bei dir nicht so lang ist

    hier ist der testaccount für dich

    Name: testaccount
    pw 123321

    danke dir shonmal für die hilfsbereitschaft
     
  12. Golf3forumde

    Golf3forumde New Member

    hi rellek reichen dir diese daten?

    oder brauchst du noch etwas von mir?
     
  13. rellek

    rellek relativ sensationell Mitarbeiter

    die profile.php, die momentan auf deinem server liegt, wäre noch nett (anhang).
    damit die fehlermeldung aussagekräftig ist.
     
  14. Golf3forumde

    Golf3forumde New Member

    ok habe ich angehangen
     

    Anhänge:

  15. Golf3forumde

    Golf3forumde New Member

    hi rellek und hast du den fehler gefunden? habe jetzt auch nochmal geschaut aber ich komme da einfach nicht hinter ;(
     
  16. Golf3forumde

    Golf3forumde New Member

    könntest du mir bitte Helfen?

    der Hack dümplet da jetzt im Forum rum und funktioniert nicht!!
     
  17. Mara777

    Mara777 Member

    ich glaube, er ist momentan abwesend
     

Diese Seite empfehlen

  1. Diese Seite verwendet Cookies, um Inhalte zu personalisieren, diese deinem Erleben anzupassen und dich nach der Registrierung angemeldet zu halten.
    Wenn du dich weiterhin auf dieser Seite aufhältst, akzeptierst du unseren Einsatz von Cookies.
    Information ausblenden