<?php
/**
* Short description.
*
* Detail description
* @param none
* @global none
* @since 1.0
* @access private
* @return void
* @update date time
*/
function WorldMap()
{
global $imagesdir,$ID_MEMBER,$db_prefix,$HTTP_GET_VARS,$settings;
if ($HTTP_GET_VARS['t'] == 2 && $settings[7] != 'Administrator')
$HTTP_GET_VARS['t'] = 0;
if ($HTTP_GET_VARS['t'] == 1 && $ID_MEMBER==-1)
$HTTP_GET_VARS['t'] = 0;
if ($HTTP_GET_VARS['t'] == 0)
{
if (isset ($HTTP_GET_VARS['submitted']) && $HTTP_GET_VARS['submitted'] && $ID_MEMBER != -1)
{
$request = mysql_query ("SELECT * FROM {$db_prefix}world_map WHERE ID_MEMBER=$ID_MEMBER");
if (mysql_num_rows($request) > 0)
$request = mysql_query ("UPDATE {$db_prefix}world_map SET xPos=$HTTP_GET_VARS[map_x], yPos=$HTTP_GET_VARS[map_y] WHERE ID_MEMBER=$ID_MEMBER");
else
$request = mysql_query ("INSERT INTO {$db_prefix}world_map (ID_MEMBER,xPos,yPos) VALUES($ID_MEMBER, $HTTP_GET_VARS[map_x], $HTTP_GET_VARS[map_y])");
}
}
if ($ID_MEMBER == -1)
{
print "<font face=verdana,size=1><center><img src=\"
http://www.sportsbike.cc/yabbse/worldmap_image.php\"></center>";
}
else
{
if ($settings[7] == 'Administrator')
{
$adminTxt = " <input type=radio name=t value=2>Delete Pin";
}
print "<font face=verdana,size=1><form action=\"$scripturl\" method=get><input type=hidden name=action value=\"worldmap\"><center><input type=image src=\"
http://www.sportsbike.cc/yabbse/worldmap_image.php?me=$ID_MEMBER&t=$HTTP_GET_VARS[t]&x=$HTTP_GET_VARS[map_x]&y=$HTTP_GET_VARS[map_y]\" name=map onclick=\"submit()\" style=\"cursor:crosshair\"><br> <input type=radio name=t value=1 checked>Who is this? <input type=radio name=t value=0>Place My Pin$adminTxt</center><input type=hidden name=submitted value=1></form>";
}
print <<<EOT
The most recent pin addition is hilighted by a blue circle, and your location is indicated by a blue pin. The above image is a PNG, if you can't see it, your browser may not support the PNG file type. The
yabb.info member map is a map of all the members who are registered on
yabb.info and who have indicated their position on the world map. If you haven't yet placed yourself, click on the map above to place your pin. You can move your pin around at any time. Also, you can only place a pin if you are a registered member and are logged in.<p align=right><a href="javascript:window.close()">Close Window</a>
</font>
EOT;
obExit();
}//end func
?>