map.php 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?php
  2. error_reporting(32767 ^ 8);
  3. __FILE__ == '' && exit('Fatal error code: 0');
  4. @header('Content-Type: text/html; charset=utf-8');
  5. @set_magic_quotes_runtime(0);
  6. if (defined('DEBUG_MODE') == false) {
  7. define('DEBUG_MODE', 0);
  8. }
  9. if (PHP_VERSION < '4.1.0') {
  10. $_GET = &$HTTP_GET_VARS;
  11. $_SERVER = &$HTTP_SERVER_VARS;
  12. unset($HTTP_GET_VARS);
  13. unset($HTTP_SERVER_VARS);
  14. }
  15. if (isset($_REQUEST['GLOBALS']) || isset($_FILES['GLOBALS'])) {
  16. exit('Request tainting attempted.');
  17. }
  18. if (function_exists('date_default_timezone_set')) {
  19. date_default_timezone_set('Hongkong');
  20. }
  21. define('CURSCRIPT', 'map');
  22. define('IN_MYMPS', true);
  23. define('CURRENTDIR', dirname(__FILE__));
  24. require_once CURRENTDIR . '/data/config.php';
  25. require_once CURRENTDIR . '/include/common.fun.php';
  26. $p = mhtmlspecialchars($_GET['p']);
  27. if (isset($p) && @preg_match('/^[a-z0-9\\-\\.]+[,][a-z0-9\\-\\.]+$/', $p)) {
  28. list($p1, $p2) = explode(',', $p);
  29. }
  30. $areacode = isset($_GET['areacode']) ? intval($_GET['areacode']) : '';
  31. $action = isset($_GET['action']) ? trim(mhtmlspecialchars($_GET['action'])) : '';
  32. if (!in_array($action, array('show', 'markpoint'))) {
  33. $action = 'show';
  34. }
  35. $cityname = isset($_GET['cityname']) ? trim(mhtmlspecialchars($_GET['cityname'])) : 'beijing';
  36. $documentdomain = isset($_GET['documentdomain']) ? trim(mhtmlspecialchars($_GET['documentdomain'])) : 0;
  37. $title = isset($_GET['title']) ? mhtmlspecialchars($_GET['title']) : '您标注的位置';
  38. $level = is_numeric($_GET['level']) ? intval($_GET['level']) : (is_numeric($mymps_global['mapview_level']) ? $mymps_global['mapview_level'] : 10);
  39. $width = isset($_GET['width']) ? intval($_GET['width']) : 500;
  40. $height = isset($_GET['height']) ? intval($_GET['height']) : 500;
  41. $markpoint = isset($_GET['markpoint']) ? intval($_GET['markpoint']) : 0;
  42. if ((!$p1 || !$p2) && !empty($mymps_global['cfg_mappoint'])) {
  43. $key = 1;
  44. list($p1, $p2) = explode(',', $mymps_global['cfg_mappoint']);
  45. }
  46. $mapflag = $mymps_global['mapflag'] ? $mymps_global['mapflag'] : 'baidu';
  47. $version = 1.1000000000000001;
  48. include CURRENTDIR . '/template/box/map.html';
  49. $mymps_global = $mapflag = $width = $height = $title = $level = $action = $p1 = $areacode = $p2 = NULL;
  50. ?>