Anzeige

PHPNuke Usermap fehler! Hilfe!!

PHPNuke Usermap fehler! Hilfe!! | PSD-Tutorials.de

Erstellt von CalibraMan, 15.01.2006.

  1. CalibraMan

    CalibraMan Guest

    PHPNuke Usermap fehler! Hilfe!!
    Hi habe die gleich Usermap wie hier im einsatz, jedoch wird bei mir wenn man auf einen Userpunkt klickt und sich das kleine Fenster öffnet keine Usernamen angezeigt.

    hier mal der Code
    index.php
    Code (Text):
    1.  
    2. <?PHP
    3. ###############################################################
    4. #
    5. # PHP-Nuke-Version
    6. #
    7. # Copyright (C) 2004 by
    8. #
    9. # Andreas Trösch
    10. # http://www.nukemodule.de
    11. #
    12. # Bernd Münt
    13. # http://www.bmservices.de
    14. #
    15. # Dieses Modul basiert auf Usermap by http://www.fletchers-Corner.de
    16. #
    17. #
    18. #
    19. ###############################################################
    20. # PHPKit Usermap 1.2 von [url]www.fletchers-corner.de[/url]
    21. #
    22. # Version 1.2 (28 Oktober 2003)
    23. #
    24. # Sie dürfen dieses Script für persönliche
    25. # Zwecke und den Einsatz im Tauschring benutzen.
    26. # Der Autor übernimmt keine Garantie für die beim
    27. # Einsatz dieses Scriptes entstandenen Schäden an
    28. # Hard und Software.
    29. #
    30. # DER WIEDERVERKAUF IN JEGLICHER FORM IST STRIKT VERBOTEN!
    31. # DER DOWNLOAD DIESES PROGRMMES VON FREMDEN SEITEN IST VERBOTEN!
    32. #
    33. #
    34. # Plz/Geodaten von OpenGeoDB - freie Geokoordinaten-Datenbank
    35. #
    36. # http://opengeodb.de
    37. #
    38. #
    39. ############################################################################################
    40.  
    41. if (!eregi("modules.php", $PHP_SELF)) {
    42.     die ("You can't access this file directly...");
    43. }
    44.  
    45. require_once("mainfile.php");
    46. require("modules/usermap/Map.php");
    47. $start=gettimeofday();
    48. include("header.php");
    49. $module_name = basename(dirname(__FILE__));
    50. get_lang($module_name);
    51. opentable();
    52.  
    53. if(isset($usernames))
    54.  {
    55.   $usernames=preg_replace("/^\s*/","",$usernames);
    56.   $usernames=preg_replace("/\s*$/","",$usernames);
    57.   $usernames=preg_replace("/\s{2,}/"," ",$usernames);
    58.   $search_usernames=explode(" ",$usernames);
    59.   $searchForUserName=true;
    60.  }
    61.  
    62. $Handler['onclick']="(navigator.appName=='Netscape')? makeVisible(event) : makeVisible();";
    63. $Handler['onmouseout']="self.status='';";
    64. $Handler['onmouseover']="self.status='';return true";
    65.  
    66. $MyMap = new Map("modules/$name/karte.png");
    67. $MyMap->setRange(5.65, 15.2 ,47.2, 55.35);
    68.  
    69. $result = sql_query("select user_id,username,user_from from ".$prefix."_users",$dbi);
    70.  
    71. $Anzahl=0;
    72.  
    73. while (list($uid,$uname,$user_from) = sql_fetch_row($result,$dbi))
    74.  {
    75.   $plz = $user_from;
    76.   if ($plz!="" && is_numeric($user_from) && strlen($user_from)==5)
    77.    {
    78.     $gender="n";
    79.     $genders["$uname"]=$gender;
    80.     $result1 = sql_query("select laenge,breite from plz_data where plz=$plz",$dbi);
    81.     if (sql_num_rows($result1,$dbi)==1)
    82.      {
    83.       list ($x,$y)=sql_fetch_row($result1,$dbi);
    84.       $x=($x-5.65)*750/(15.2-5.65);
    85.       $y=(55.35-$y)*1024/(55.35-47.2);
    86.       $x=(round($x/8)*8);
    87.       $y=(round($y/8)*8);
    88.  
    89.       if(isset($AlleOrte[$x.":".$y]))
    90.        {
    91.                 $AlleOrte["$x:$y"]["userids"][]=$uid;
    92.                 $AlleOrte["$x:$y"]["usernames"][]=$uname;
    93.            }
    94.           else
    95.            {
    96.                 $AlleOrte["$x:$y"]=array(
    97.                         "userids"=>array($uid),
    98.                         "usernames"=>array($uname),
    99.                         "x"=>$x,
    100.                         "y"=>$y
    101.                    );
    102.                 }
    103.       $Anzahl++;
    104.      }
    105.    }
    106.  }
    107.  
    108. foreach($AlleOrte as $ort)
    109.  {
    110.   unset($pinLink);
    111.   $isSearched=false;
    112.   foreach($ort["userids"] as $key=>$id)
    113.    {
    114.     if($searchForUserName && in_array($ort["usernames"][$key],$search_usernames)) $isSearched=true;
    115.     $pinLink[]=$ort["usernames"][$key];
    116.    }
    117.   if($isSearched)
    118.    $MyMap->addImg($ort["x"],$ort["y"],"modules/$name/kreuz.png",21);
    119.  
    120.   $theNames=join(",",$ort["usernames"]);
    121.   $g="";
    122.  
    123.   foreach ($pinLink as $u)
    124.     $g.=$genders["$u"];
    125.   $m = strpos($g,"m");
    126.   $w = strpos($g,"w");
    127.  
    128.   $color="blau";
    129.  
    130.   $MyMap->addPin($ort["x"],$ort["y"],"modules/$name/$color.png",8,1,$theNames,"modules/$name/viewusers.php?names=".join(",",$pinLink),$Handler['onclick'],$Handler['onmouseover'],$Handler['onmouseout']);
    131.   if($ort["x"]==0){ print_r($ort);}
    132.  }
    133.  
    134. session_start();
    135. $_SESSION["usermap"]=$MyMap->dumpbuffer();
    136. $end=gettimeofday();
    137. $start=$start["sec"]+($start["usec"]/1000000.0);
    138. $end=$end["sec"]+($end["usec"]/1000000.0);
    139. $sec=$end-$start;
    140. ?>
    141. <script language="Javascript" type="text/javascript">
    142.         <!--
    143.                 function hide(){
    144.                         document.getElementById('fenster').style.visibility='hidden';
    145.                 }
    146.  
    147.                 function makeVisible(e){
    148.                         if(navigator.appName=="Netscape"){
    149.                                 X=e.pageX;
    150.                                 Y=e.pageY;
    151.                         }else{
    152.                                 X=window.event.clientX+document.body.scrollLeft;
    153.                                 Y=window.event.clientY+document.body.scrollTop;
    154.                         }
    155.                         X+=20;
    156.                         Y-=20;
    157.                         document.getElementById("fenster").style.top=Y;
    158.                         document.getElementById("fenster").style.left=X;
    159.                         document.getElementById("fenster").style.visibility="visible";
    160.                 }
    161.         -->
    162. </script>
    163. <style type="text/css">
    164.         a.close {color:#FFFFFF; font-weight:bold;  text-decoration:none;}
    165.     a.close:visited {color:#FFFFFF; font-weight:bold; text-decoration:none;}
    166.         img{border:none;}
    167.         #fenster{position:absolute; top:0px; left:0px; border: none; visibility:hidden;}
    168.         #profiles{height:100px; width:100px; border:none; padding:0px; margin:0px;}
    169. </style>
    170. <table width=770>
    171. <tr><td>
    172. <h2 align=center><?php echo ""._MITGLIEDERKARTE.""; ?></h2>
    173. <hr width="75%">
    174. <form name="Suche" action="modules.php" method="get" style="text-align:center">
    175. <input type="hidden" name="file" value="index">
    176. <input type="hidden" name="name" value="usermap">
    177. <?php echo ""._SUCHENNACH.""; ?>: <input type=text name="usernames" value="<?=$usernames?>">&<input type="submit" name="Suchen" value="<?php echo ""._SUCHEN.""; ?>">
    178.  
    179. <?php echo ""._MEHRERESUCHEN.""; ?>
    180. </form>
    181. [img]modules/<? echo $name; ?>/karte.php[/img]
    182. <? print($MyMap->getImageMap("map")); ?>
    183. <p align=right><?php echo ""._ESWERDEN.""; ?> <?=$Anzahl?> <?php echo ""._MITGLIEDERANGEZEIGT.""; ?>
    184.  
    185. <?php echo ""._KARTEERSTELLT.""; ?> <? printf("%0.3f",$sec)?> <?php echo ""._SEKUNDEN.""; ?>.</p>
    186. </td></tr></table>
    187.   <DIV id=fenster>
    188.           <TABLE
    189.           style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; MARGIN: 0px; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid; BORDER-COLLAPSE: collapse; spacing: 0px">
    190.             <TBODY>
    191.             <TR>
    192.               <TD
    193.               style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; BACKGROUND: #424542; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none; TEXT-ALIGN: right">[url="javascript:self.status='';hide()"]X[/url] </TD></TR>
    194.             <TR>
    195.               <TD style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px"><IFRAME id=profiles name=profiles src="modules/usermap/viewusers.htm" frameBorder=0></td></tr></table>
    196. </div>
    197.  
    198. <?
    199. closetable();
    200. include("footer.php");
    201. ?>
    202. <div id="fenster">
    203.                 <table style="spacing:0px; border:solid black 1px; margin:0px; border-collapse:collapse;">
    204.                         <tr>
    205.                                 <td style="text-align:right; border:none; background: url('modules/usermap/title.gif')">
    206.                                         [url="javascript:self.status='';hide()"]X[/url]
    207.                                 </td>
    208.                         </tr>
    209.                         <tr>
    210.                                 <td style="padding:0px; margin:0px;">
    211.                                         <iframe frameborder=0 id="profiles" src="modules/usermap/viewusers.php" name="profiles">
    212.                                 </td>
    213.                         </tr>
    214.                 </table>
    215. </div>
    216.  
    viewusers.php
    Code (Text):
    1.  
    2. <html>
    3. <style type="text/css">
    4. <!--
    5. body {  font-family: Verdana; font-size: 10px}
    6. -->
    7. </style>
    8. <body bgcolor="696b69">
    9. <?php
    10. if(isset($names))
    11.  {
    12.   $names=explode(",",$names);
    13.   foreach($names as $user)
    14.    print "<a href=\"../../modules.php?name=Your_Account&op=userinfo&username=".$user."\" target=_top>".$user."</a>
    15. ";
    16.  }
    17. ?>
    18. </body>
    19. </html>
    20.  
    Die viewusers.htm
    Code (Text):
    1.  
    2. <html>
    3. <style type="text/css">
    4. <!--
    5. body {  font-family: Verdana; font-size: 10px}
    6. -->
    7. </style>
    8. <body bgcolor="white">
    9. <?
    10. if(isset($names))
    11.  {
    12.   $names=explode(",",$names);
    13.   foreach($names as $user)
    14.    print "<a href=\"../../modules.php?name=Your_Account&op=userinfo&username=".$user."\" target=_top>"\$user\&</a>
    15. ";
    16.  }
    17. ?>
    18. </body>
    19. </html>
    20.  
    Das ganze sieht so aus:

    http://www.calibrateam.de/modules.php?name=usermap

    Einfach auf einen punkt klicken

    Wäre schön wenn sich jemand besser auskennt wie ich.

    Danke im voraus
     
    #1      
  2. CalibraMan

    CalibraMan Guest

    PHPNuke Usermap fehler! Hilfe!!
    Keiner ne idee???
     
    #2      
x
×
×