exec.php
945 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
include_once(dirname(__FILE__)."/../inicia.php");
include_once(dirname(__FILE__)."/../../admin/php/login.php");
if(verificaOperacaoSessao("admin/html/subirshapefile") == false){
echo "Vc nao pode realizar essa operacao.";exit;
}
//
//faz a busca da função que deve ser executada
//
$retorno = ""; //string que será retornada ao browser via JSON
switch (strtoupper($funcao))
{
case "NOMEPASTA":
$locaplic = basename($locaplic);
$retorno = $locaplic."/temas";
if($customDir != "interface"){
$teste = $locaplic."/".$customDir;
if(file_exists($teste)){
$retorno = $teste;
}
$teste = $locaplic."/".$customDir."/images";
if(file_exists($teste)){
$retorno = $teste;
}
$teste = $locaplic."/".$customDir."/imagens";
if(file_exists($teste)){
$retorno = $teste;
}
}
break;
}
if (!connection_aborted()){
cpjson($retorno);
}
else
{exit();}
?>