芝麻web文件管理V1.00
编辑当前文件:/home/p/r/i/prismawe/www/blog/wp-content/plugins/google-maps/googlemaps.php
1) $param =substr($param, 0, strpos($param, ' ')); $input = explode("&", $param); $URL=$input[0]; $pos = strpos($URL, '?'); $thevalue=substr($URL, $pos); $URL=substr($param, $pos); $URL=str_replace("?&","?",$URL); if ($arg == 3) list($url, $width, $height) = $params; else if ($arg==2) list($url, $width) = $params; else if ($arg == 1) list($url) = $params; else return ""; $posLink = strpos($url, '?'); $Linkvalue=substr($url, 0, $pos); if($width=="") { $width=get_option('googlemaps_width'); if($width=="") $width=$defaultWidth; } if($height=="") { $height=get_option('googlemaps_height'); if($height=="") $height=$defaultHeight; } $pattern="#(?:(px|%))#"; if (!preg_match_all($pattern, $width, $params)) $width.="px"; if (!preg_match_all($pattern, $height, $params)) $height.="px"; if (strpos($URL, 'kml')!==false) { $JSFile="kml"; $TheLink=$Linkvalue; $Linkvalue=""; $URL="?kml=".$TheLink.$URL; } elseif(strpos($URL, 'q=')!==false) $JSFile="markers"; elseif (strpos($URL, 'saddr=')!==false && strpos($URL, 'daddr=')!==false) $JSFile="directions"; else $JSFile="maps"; $input=""; if($count==0) $input=''; $input.='
'; $input.=__('Loading...',googlemaps).'
'; $input.=__('Be careful to see the map you have to activate the Javascript!',googlemaps).'
'; $input.='
'; if($googlemaps_more==1 || $googlemaps_more=="") { $input.='
'.__('Photos',googlemaps).'
'.__('Videos',googlemaps) .'
'.__('Wikipedia',googlemaps) .'
'.__('Webcams',googlemaps). '
'.__('Hide all',googlemaps).'
'; } $input.=''; $count+=1; return $input; } function googlemaps_parse($content) { $allblocks = '(?:address|blockquote|code|div|h[1-6]|p|pre)'; $content = preg_replace_callback( "/(<$allblocks(.*?)>)?\[map:([^]]+)](<\/$allblocks>)?/i", "googlemaps_embed", $content ); return $content; } function googlemaps_admin_page () { global $user_level, $googlemaps_userlevel, $googlemaps_version; get_currentuserinfo(); $current=current_user_can('level_'.$googlemaps_userlevel); if ($user_level < $googlemaps_userlevel && $current!=1) { echo '
' . __("No Access for you!",wordspew) .'
'; } else { ?>
v.
:
click here for sign up, then copy-paste your given key in the field above.',googlemaps);?>
:
250px or
95%
)',googlemaps);?>
:
250px or
95%
)',googlemaps);?>
/> More',googlemaps);?>
'. __('Settings').''; array_unshift( $links, $settings_link ); } return $links; } function googlemaps_options() { global $user_level, $googlemaps_userlevel; get_currentuserinfo(); $current=current_user_can('level_'.$googlemaps_userlevel); if ($user_level < $googlemaps_userlevel && $current!=1) die(__("Cheatin' uh ?")); update_option('googlemaps_key', $_POST['googlemaps_key']); update_option('googlemaps_width', $_POST['googlemaps_width']); update_option('googlemaps_height', $_POST['googlemaps_height']); $button_more = (isset($_POST['googlemaps_more'])) ? 1 : 0; update_option('googlemaps_more', $button_more); } function googlemaps_add_admin_page() { global $googlemaps_userlevel; add_management_page('GoogleMaps Parameters', __('Google Maps',googlemaps), $googlemaps_userlevel, 'googlemaps', 'googlemaps_admin_page'); } if (function_exists('add_action')) { add_action('admin_menu', 'googlemaps_add_admin_page'); } if (isset($_POST['googlemaps_options'])) add_action('init', 'googlemaps_options'); add_filter('the_content', 'googlemaps_parse'); add_filter('plugin_action_links', 'add_Googlemaps_link', 10, 2); ?>