<?php
/*
Plugin Name: France departments map
Plugin URI: http://blog.comersis.com/WordPress/
Description: France departments map.
Version: fr-dpt-1.023
Author: S.Marmion
Author URI: http://www.cmap.comersis.com
License: non-comercial
*/
add_action( 'admin_menu', 'my_cmap_menu_pages' );

function my_cmap_menu_pages(){
    add_menu_page( 'cmap', 'Carte France', 'manage_options', 'fr_wpdpt_svg/index.php', '', plugins_url( 'fr_wpdpt_svg/im/c_france.png' ) );
		add_submenu_page( 'fr_wpdpt_svg/index.php', 'regions', 'paramètres', manage_options, 'plugin-editor.php?file=fr_wpdpt_svg/js/paths.js', '' );
		add_submenu_page( 'fr_wpdpt_svg/index.php', 'carto', 'affichage', manage_options, 'plugin-editor.php?file=fr_wpdpt_svg/cmap.php', '' );
}


function cmap_funcs( $atts ){
$mapp = "";
$mapp .= "<link href=\"".  plugins_url( 'css/map.css' , __FILE__ )."\" rel=\"stylesheet\" type=\"text/css\" />";
$mapp .= "<script type=\"text/javascript\" src=\"".  plugins_url( 'js/jquery.js' , __FILE__ )."\"></script>";
$mapp .= "<script type=\"text/javascript\" src=\"".  plugins_url( 'js/raphael-min.js' , __FILE__ )."\"></script>
<script type=\"text/javascript\" src=\"".  plugins_url( 'js/scale.raphael.js' , __FILE__ )."\"></script>
<script type=\"text/javascript\" src=\"".  plugins_url( 'js/paths.js' , __FILE__ )."\"></script>
<script type=\"text/javascript\" src=\"".  plugins_url( 'js/init2.js' , __FILE__ )."\"></script>";
$mapp .= $before_plugin;
$mapp .= "<div id=\"container\">
    
        <div class=\"mapBlock\">
                <div id=\"Cmap\"></div>
                <div id=\"text\"></div>
        </div>
        
    </div>";
$mapp .= $after_plugin;
	return "$mapp";
}
add_shortcode( 'francedpt', 'cmap_funcs' );
add_shortcode( 'francedpts', 'cmap_funcs' );
?>