Commit dc1d7eec99ba02d338fef015e265781099bcd923
1 parent
3a40419f
Exists in
master
and in
7 other branches
--no commit message
Showing
8 changed files
with
65 additions
and
4 deletions
Show diff stats
admin/js/estat_mapa.js
@@ -17,7 +17,7 @@ Este programa é distribuído na expectativa de que seja útil | @@ -17,7 +17,7 @@ Este programa é distribuído na expectativa de que seja útil | ||
17 | porém, SEM NENHUMA GARANTIA; nem mesmo a garantia implícita | 17 | porém, SEM NENHUMA GARANTIA; nem mesmo a garantia implícita |
18 | de COMERCIABILIDADE OU ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA. | 18 | de COMERCIABILIDADE OU ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA. |
19 | Consulte a Licença Pública Geral do GNU para mais detalhes. | 19 | Consulte a Licença Pública Geral do GNU para mais detalhes. |
20 | -Você deve ter recebido uma cópia da Licença Pública Geral do | 20 | +Você deve ter recebido uma cópia da Licença Pública Geral do |
21 | GNU junto com este programa; se não, escreva para a | 21 | GNU junto com este programa; se não, escreva para a |
22 | Free Software Foundation, Inc., no endereço | 22 | Free Software Foundation, Inc., no endereço |
23 | 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. | 23 | 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. |
@@ -330,7 +330,7 @@ function montaDivMapa(i) | @@ -330,7 +330,7 @@ function montaDivMapa(i) | ||
330 | { | 330 | { |
331 | "linhas":[ | 331 | "linhas":[ |
332 | {titulo:"Título:",id:"Etitulo",size:"50",value:i.titulo,tipo:"text",div:""}, | 332 | {titulo:"Título:",id:"Etitulo",size:"50",value:i.titulo,tipo:"text",div:""}, |
333 | - {titulo:"Template <img onclick='selTemplate(\"Etemplate\")' src='"+limg+"' style='cursor:pointer;position :relative;top:2px'/>:",id:"Etemplate",size:"50",value:i.template,tipo:"text",div:""}, | 333 | + {titulo:"Template (<a href='../php/metaestat_templates.php' target='_blank'>prévia</a>) <img onclick='selTemplate(\"Etemplate\")' src='"+limg+"' style='cursor:pointer;position :relative;top:2px'/>:",id:"Etemplate",size:"50",value:i.template,tipo:"text",div:""}, |
334 | {titulo:"Logo (esquerdo) <img onclick='selLogo(\"Elogoesquerdo\")' src='"+limg+"' style='cursor:pointer;position :relative;top:2px'/>:",id:"Elogoesquerdo",size:"50",value:i.logoesquerdo,tipo:"text",div:""}, | 334 | {titulo:"Logo (esquerdo) <img onclick='selLogo(\"Elogoesquerdo\")' src='"+limg+"' style='cursor:pointer;position :relative;top:2px'/>:",id:"Elogoesquerdo",size:"50",value:i.logoesquerdo,tipo:"text",div:""}, |
335 | {titulo:"Logo (direito) <img onclick='selLogo(\"Elogodireito\")' src='"+limg+"' style='cursor:pointer;position :relative;top:2px'/>::",id:"Elogodireito",size:"50",value:i.logodireito,tipo:"text",div:""} | 335 | {titulo:"Logo (direito) <img onclick='selLogo(\"Elogodireito\")' src='"+limg+"' style='cursor:pointer;position :relative;top:2px'/>::",id:"Elogodireito",size:"50",value:i.logodireito,tipo:"text",div:""} |
336 | ] | 336 | ] |
@@ -377,8 +377,10 @@ function selTemplate(id){ | @@ -377,8 +377,10 @@ function selTemplate(id){ | ||
377 | textos = [], | 377 | textos = [], |
378 | selecionados = [$i(id).value]; | 378 | selecionados = [$i(id).value]; |
379 | for(i=0;i<n;i++){ | 379 | for(i=0;i<n;i++){ |
380 | - valores.push(dados[i]); | ||
381 | - textos.push(dados[i]); | 380 | + if(dados[i].split(".")[1] === "php"){ |
381 | + valores.push(dados[i]); | ||
382 | + textos.push(dados[i]); | ||
383 | + } | ||
382 | } | 384 | } |
383 | core_menuCheckBox(valores,textos,selecionados,$i(id),"","","sim"); | 385 | core_menuCheckBox(valores,textos,selecionados,$i(id),"","","sim"); |
384 | } | 386 | } |
@@ -0,0 +1,48 @@ | @@ -0,0 +1,48 @@ | ||
1 | + <?php | ||
2 | + include(dirname(__FILE__)."/../../ms_configura.php"); | ||
3 | + include(dirname(__FILE__)."/../../classesphp/funcoes_gerais.php"); | ||
4 | + //parser do arquivo para envio como imagem diretamente ao navegador | ||
5 | + if(!empty($_GET)){ | ||
6 | + //echo $_GET["nomeimg"];exit; | ||
7 | + ob_clean(); | ||
8 | + echoimg($_GET["nomeimg"],$_GET["tipo"]); | ||
9 | + exit; | ||
10 | + } | ||
11 | + ?> | ||
12 | +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> | ||
13 | +<html> | ||
14 | +<head> | ||
15 | +<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> | ||
16 | +<title>Lista de templates</title> | ||
17 | +<style type="text/css"> | ||
18 | +body { | ||
19 | + margin: 20; | ||
20 | + padding: 20; | ||
21 | + font-size: 14px; | ||
22 | +} | ||
23 | +</style> | ||
24 | +<link rel="stylesheet" type="text/css" href="../html/admin.css"> | ||
25 | +</head> | ||
26 | +<body class=" yui-skin-sam fundoPonto"> | ||
27 | + <div class="bordaSuperior"> </div> | ||
28 | + <div class="mascaraPrincipal" id="divGeral" style="width: 100%;max-width:95%"> | ||
29 | + <div id=cabecalhoPrincipal></div> | ||
30 | + <h1>Lista de templates para uso em aplicações do sistema de metadados estatísticos</h1> | ||
31 | + <?php | ||
32 | + $arqs = listaArquivos($locaplic.$metaestatTemplates)["arquivos"]; | ||
33 | + foreach($arqs as $arq){ | ||
34 | + $nome = explode(".",$arq)[0]; | ||
35 | + $ext = explode(".",$arq)[1]; | ||
36 | + if($ext == "php"){ | ||
37 | + echo "<p>Nome do template: <i>$arq</i></p>"; | ||
38 | + $nomeimg = $locaplic.$metaestatTemplates."/".$nome.".png"; | ||
39 | + if(file_exists($nomeimg)){ | ||
40 | + echo "<img style='border:1px solid gray' src='"; | ||
41 | + echo "metaestat_templates.php?&nomeimg=$nomeimg&tipo=png"; | ||
42 | + echo "' />"; | ||
43 | + } | ||
44 | + } | ||
45 | + } | ||
46 | + ?> | ||
47 | + </div> | ||
48 | +</body> | ||
0 | \ No newline at end of file | 49 | \ No newline at end of file |
classesphp/funcoes_gerais.php
@@ -414,6 +414,17 @@ function listaArquivos($diretorio) | @@ -414,6 +414,17 @@ function listaArquivos($diretorio) | ||
414 | {return "erro";} | 414 | {return "erro";} |
415 | } | 415 | } |
416 | /* | 416 | /* |
417 | + Function: echoimg | ||
418 | + | ||
419 | + Envia para o navegador uma imagem. Utilizado na tag IMG em arquivos HTML | ||
420 | + */ | ||
421 | +function echoimg($arquivo,$tipo){ | ||
422 | + echo header("Content-type: image/png \n\n"); | ||
423 | + header('Content-Length: '.filesize($arquivo)); | ||
424 | + fpassthru(fopen($arquivo, 'rb')); | ||
425 | + exit; | ||
426 | +} | ||
427 | +/* | ||
417 | Function: gravaDados | 428 | Function: gravaDados |
418 | 429 | ||
419 | Grava as linhas de um array em um arquivo. | 430 | Grava as linhas de um array em um arquivo. |
40.7 KB
40.3 KB
43.4 KB
41.8 KB
41.5 KB