Commit 0950dc166c928527f62a3ff970ffa76e24e793a7
1 parent
3b12dc88
Exists in
master
and in
7 other branches
Inclusão do parâmetro locaplic no construtor da classe
Showing
6 changed files
with
16 additions
and
9 deletions
Show diff stats
classesphp/classe_analise.php
... | ... | @@ -75,7 +75,7 @@ $map_file - Endereço do mapfile no servidor. |
75 | 75 | |
76 | 76 | $tema - Nome do tema que será processado |
77 | 77 | */ |
78 | - function __construct($map_file,$tema="",$locaplic) | |
78 | + function __construct($map_file,$tema="",$locaplic="") | |
79 | 79 | { |
80 | 80 | //error_reporting(E_ALL); |
81 | 81 | if(file_exists($locaplic."/funcoes_gerais.php")) | ... | ... |
classesphp/classe_atributos.php
... | ... | @@ -71,7 +71,7 @@ $map_file - Endereço do mapfile no servidor. |
71 | 71 | |
72 | 72 | $tema - nome do tema |
73 | 73 | */ |
74 | - function __construct($map_file,$tema="",$locaplic) | |
74 | + function __construct($map_file,$tema="",$locaplic="") | |
75 | 75 | { |
76 | 76 | //error_reporting(E_ALL); |
77 | 77 | $this->locaplic = $locaplic; | ... | ... |
classesphp/classe_escala.php
... | ... | @@ -63,9 +63,14 @@ Cria um objeto Escala |
63 | 63 | parameters: |
64 | 64 | $map_file - Endereço do mapfile no servidor. |
65 | 65 | */ |
66 | - function __construct($map_file,$nomeImagem="") | |
66 | + function __construct($map_file,$nomeImagem="",$locaplic="") | |
67 | 67 | { |
68 | 68 | //error_reporting(E_ALL); |
69 | + if(file_exists($locaplic."/funcoes_gerais.php")) | |
70 | + require_once($locaplic."/funcoes_gerais.php"); | |
71 | + else | |
72 | + require_once("funcoes_gerais.php"); | |
73 | + $this->locaplic = $locaplic; | |
69 | 74 | $this->mapa = ms_newMapObj($map_file); |
70 | 75 | $this->arquivo = $map_file; |
71 | 76 | if ($nomeImagem == "") | ... | ... |
classesphp/classe_legenda.php
... | ... | @@ -106,7 +106,7 @@ $tema - nome do tema |
106 | 106 | $template - nome do template para processar a legenda |
107 | 107 | */ |
108 | 108 | |
109 | - function __construct($map_file,$locaplic,$tema="",$template="") | |
109 | + function __construct($map_file,$locaplic="",$tema="",$template="") | |
110 | 110 | { |
111 | 111 | //error_reporting(E_ALL); |
112 | 112 | if(file_exists($locaplic."/funcoes_gerais.php")) | ... | ... |
classesphp/classe_shp.php
... | ... | @@ -219,7 +219,7 @@ Include: |
219 | 219 | //nome do novo tema |
220 | 220 | $temaedit = nomeRandomico(); |
221 | 221 | //pega os valores |
222 | - include_once("classe_atributos.php"); | |
222 | + include_once($this->locaplic."/classesphp/classe_atributos.php"); | |
223 | 223 | $m = new Atributos($this->arquivo,$this->tema); |
224 | 224 | $shape = $m->identificaQBP($this->nome,$x,$y,$this->arquivo,0,"","shape"); |
225 | 225 | if ((is_array($shape)) && ($shape[0] == " ")) |
... | ... | @@ -243,7 +243,7 @@ Include: |
243 | 243 | if ($tipo == "pizza") |
244 | 244 | { |
245 | 245 | //gera a figura |
246 | - include_once("graficopizza.php"); | |
246 | + include_once($this->locaplic."/classesphp/graficopizza.php"); | |
247 | 247 | $res = graficopizza($data,$width,$inclinacao,$shadow_height,$cores,$imgurl,$this->arquivo,$temaedit); |
248 | 248 | $img = explode(",",$res); |
249 | 249 | } | ... | ... |
classesphp/classe_temas.php
... | ... | @@ -87,12 +87,14 @@ $map_file - Endereço do mapfile no servidor. |
87 | 87 | |
88 | 88 | $tema - nome do tema que será processado |
89 | 89 | */ |
90 | - function __construct($map_file,$tema=null) | |
90 | + function __construct($map_file,$tema=null,$locaplic="") | |
91 | 91 | { |
92 | 92 | //error_reporting(E_ALL); |
93 | - if (file_exists("funcoes_gerais.php")) | |
93 | + if(file_exists($locaplic."/funcoes_gerais.php")) | |
94 | + require_once($locaplic."/funcoes_gerais.php"); | |
95 | + else | |
94 | 96 | require_once("funcoes_gerais.php"); |
95 | - | |
97 | + $this->locaplic = $locaplic; | |
96 | 98 | $this->mapa = ms_newMapObj($map_file); |
97 | 99 | $this->arquivo = $map_file; |
98 | 100 | if (isset($tema)) | ... | ... |