Exemplo n.º 1
0
    <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
    <script type="text/javascript" src="js/inupload.js"></script>
  
</head>

<?php 
$Action = vvar("q", "none");
$upload_dir = vvar("d", "./");
$substitute_dir = vvar("s", "./");
$MinW = vvar("minw", "100");
$MaxW = vvar("maxw", "650");
if ($Action == "none") {
    display_upload_form($MinW, $MaxW);
}
if ($Action == "upload") {
    upload_content_file($upload_dir, $substitute_dir, $MinW, $MaxW);
}
function vvar($v, $def)
{
    $valor = $def;
    if (isset($_SESSION[$v])) {
        $valor = $_SESSION[$v];
    }
    if (isset($_GET[$v])) {
        $valor = $_GET[$v];
    }
    if (isset($_POST[$v]) and $_POST[$v] != "") {
        $valor = $_POST[$v];
    }
    return $valor;
}
Exemplo n.º 2
0
        if (strlen(get_option('gmap_v3_gpx_proKey')) != 32) {
            ?>
				<body><br /><br /><br />
				<div class="panel_wrapper mceActionPanel" style="text-align:center; font-size:18px; font-family:verdana; margin:50px;"><?php 
            _e("This feature is available in Pro-Version only.  More about Pro-Version you'll find ", GPX_GM_PLUGIN);
            ?>
 <a href="http://www.atlsoft.de/programmierung/google-maps-wordpress-plugin-professional/" target="_blank" onclick="FileBrowserDialogue.mySubmit(); return false;"><b><?php 
            _e("here", GPX_GM_PLUGIN);
            ?>
</a></b>.</div>  			
				</body> 
				 <?php 
        } else {
            ?>
	<body> <?php 
            upload_content_file($uploadFileName, $post_id, $description, $startCoords, $trackFile);
            ?>
	</body> <?php 
        }
    } else {
        display_eddi($map_id, $post_id);
    }
}
?>
</html>

<?php 
// displays the upload form
function display_eddi($map_id, $post_id)
{
    global $wpdb;
Exemplo n.º 3
0
	</script>
</head>	
<body>
<?php 
$action = isset($_GET["action"]) ? $_GET["action"] : "none";
// no action by default
$query = isset($_GET["q"]) ? $_GET["q"] : "";
// no action by default
$udir = isset($_GET["udir"]) ? $_GET["udir"] : "./";
// same directory by default
$input_field = isset($_GET["input"]) ? $_GET["input"] : "";
$ReplaceFile = isset($_GET["replace_file"]) ? $_GET["replace_file"] : "yes";
// replace the file by default
if ($action == "gmap_tinymce_upload") {
    if ($query == "upload") {
        upload_content_file($udir, $input_field);
    } else {
        display_upload_form();
    }
}
?>
</body>
</html>

<?php 
// displays the upload form
function display_upload_form()
{
    global $wpdb;
    $upload_d = wp_upload_dir();
    $upload_dir = $upload_d['basedir'];