'; $searcharray = array("", "", "", "", "", "", ""); $replacearray = array("ae", "oe", "ue", "ss", "Ae", "Oe", "Ue"); $area=''; if( $g_user[userid] != 0 ) { $eintragen = 'Eintragen'; } if ($mode=='') { $r_a_user = thwb_query("SELECT userid, username, userlocx, userlocy FROM ".$pref."user WHERE userlocx > 0 and userlocy> 0 ORDER BY username ASC"); while( $a_user = mysql_fetch_array($r_a_user) ) { $a_user[userlocxx] = $a_user[userlocx]-4; $a_user[userlocxxx] = $a_user[userlocx]+4; $a_user[userlocyy] = $a_user[userlocy]; $a_user[userlocyyy] = $a_user[userlocy]+8; $area .= 'Hier wohnt '.$a_user[username].''; } $area .= ''; $config['usersperpage'] = 15; $r_anzahl = thwb_query("SELECT count(userid) AS usercount FROM ".$pref."user WHERE userlocx > 0 and userlocy> 0 "); $anzahl = mysql_fetch_array($r_anzahl); $pages = ceil($anzahl['usercount'] / $config['usersperpage']); $pagesstring = ''; define('PADDING', 6); if( !isset($page) ) $page = 1; // erste seite if( $page - PADDING > 1 ) { $pagesstring = '[Erste Seite] ... '; } $i = $page - PADDING; if( $i < 1 ) $i = 1; $imax = $page + PADDING; if( $imax > $pages ) $imax = $pages; for( $i; $i <= $imax; $i++ ) { if( $i == $page ) $pagesstring .= ">" . ($i) . "< "; else $pagesstring .= "[" . ($i) . "] "; } // letzte seite if( $page + PADDING < $pages ) { $pagesstring .= "... [Letzte Seite]"; } $Tframe = new Template("templates/" . $style['styletemplate'] . "/frame.html"); $TPage = new Template("templates/" . $style['styletemplate'] . "/mapshow.html"); $navpath .= 'Karte » anzeigen'; $r_user = thwb_query("SELECT userid, username, userlocation, userlocx, userlocy, userlocnear FROM ".$pref."user WHERE userlocx > 0 and userlocy> 0 ORDER BY username ASC LIMIT " . intval($page - 1) * $config['usersperpage'] . ", " . $config['usersperpage']); $names = ''; while( $user = mysql_fetch_array($r_user) ) { if ($user[userlocnear]=='') { $near = '';} else {$near = 'bei '.$user[userlocnear];} $user[userlocxx] = $user[userlocx]-5; $user[userlocxxx] = $user[userlocx]+5; $user[userlocyy] = $user[userlocy]-5; $user[userlocyyy] = $user[userlocy]+5; $maplink = '[alleine anzeigen]'; $user[username_hacked] = str_replace($searcharray, $replacearray, $user[username]); $user[username_hacked] = preg_replace('/[^\w\d_-]+/', '-', $user[username_hacked]); $names .= ''; } $names .= '
  • '.$user[username].' wohnt in '. $user[userlocation].' '.$near.' '.$maplink.'
  • '; $NAMES = $names; eval($TPage->GetTemplate("CONTENT")); eval($Tframe->GetTemplate()); } elseif ($mode=='singel') { $Tframe = new Template("templates/" . $style['styletemplate'] . "/mapsingel.html"); eval($Tframe->GetTemplate()); } ?>