Commit d13b960a33174c40206cde536e7d1646d05f156c

Authored by Caroline Salib
1 parent 56798234
Exists in master

Corrigido functions deprecadas;

portabilis/ieducar#167
ieducar/intranet/include/clsCadastro.inc.php
@@ -297,7 +297,7 @@ class clsCadastro extends clsCampos @@ -297,7 +297,7 @@ class clsCadastro extends clsCampos
297 * Adiciona os botoes de help para a pagina atual 297 * Adiciona os botoes de help para a pagina atual
298 */ 298 */
299 $url = parse_url($_SERVER['REQUEST_URI']); 299 $url = parse_url($_SERVER['REQUEST_URI']);
300 - $url = ereg_replace('^/', '', $url['path']); 300 + $url = preg_match('^/', '', $url['path']);
301 if (strpos($url, '_det.php') !== FALSE) { 301 if (strpos($url, '_det.php') !== FALSE) {
302 $tipo = 'det'; 302 $tipo = 'det';
303 } 303 }
@@ -386,7 +386,7 @@ class clsCadastro extends clsCampos @@ -386,7 +386,7 @@ class clsCadastro extends clsCampos
386 $nomeCampo = $componente[0]; 386 $nomeCampo = $componente[0];
387 $validador = $componente[2]; 387 $validador = $componente[2];
388 388
389 - if (empty($validador) && $nomeCampo == 'cpf' && ereg("^(tab_add_[0-9])", $nome) !== 1) { 389 + if (empty($validador) && $nomeCampo == 'cpf' && preg_match("^(tab_add_[0-9])", $nome) !== 1) {
390 $retorno .= 390 $retorno .=
391 "if( document.getElementById('$nome').value != \"\") 391 "if( document.getElementById('$nome').value != \"\")
392 { 392 {
@@ -405,7 +405,7 @@ class clsCadastro extends clsCampos @@ -405,7 +405,7 @@ class clsCadastro extends clsCampos
405 /** 405 /**
406 * Campo tabela 406 * Campo tabela
407 */ 407 */
408 - if (ereg("^(tab_add_[0-9])", $nome) === 1) { 408 + if (preg_match("^(tab_add_[0-9])", $nome) === 1) {
409 $nome_campos = $componente['cabecalho']; 409 $nome_campos = $componente['cabecalho'];
410 $componente = array_shift($componente); 410 $componente = array_shift($componente);
411 411
ieducar/intranet/include/clsCampos.inc.php
@@ -1102,7 +1102,7 @@ class clsCampos extends Core_Controller_Page_Abstract @@ -1102,7 +1102,7 @@ class clsCampos extends Core_Controller_Page_Abstract
1102 $campo_tabela = FALSE; 1102 $campo_tabela = FALSE;
1103 1103
1104 // Cria nova tab 1104 // Cria nova tab
1105 - if (ereg("^(tabbed_add_[0-9]+)", $nome) === 1) { 1105 + if (preg_match("^(tabbed_add_[0-9]+)", $nome) === 1) {
1106 $nomes_tab = urlencode(serialize($arr_campos['cabecalho_tab'])); 1106 $nomes_tab = urlencode(serialize($arr_campos['cabecalho_tab']));
1107 unset($arr_campos['cabecalho_tab']); 1107 unset($arr_campos['cabecalho_tab']);
1108 1108
@@ -1135,7 +1135,7 @@ class clsCampos extends Core_Controller_Page_Abstract @@ -1135,7 +1135,7 @@ class clsCampos extends Core_Controller_Page_Abstract
1135 continue; 1135 continue;
1136 } 1136 }
1137 1137
1138 - if (ereg("^(tab_name_[0-9]+)", $nome) === 1) { 1138 + if (preg_match("^(tab_name_[0-9]+)", $nome) === 1) {
1139 if ($existe_tab_aberta) { 1139 if ($existe_tab_aberta) {
1140 if ($this->__segue_fluxo) { 1140 if ($this->__segue_fluxo) {
1141 $colspan = 2; 1141 $colspan = 2;
@@ -1210,7 +1210,7 @@ class clsCampos extends Core_Controller_Page_Abstract @@ -1210,7 +1210,7 @@ class clsCampos extends Core_Controller_Page_Abstract
1210 continue; 1210 continue;
1211 } 1211 }
1212 1212
1213 - if (ereg("^(tab_add_[0-9]+)",$nome) === 1) { 1213 + if (preg_match("^(tab_add_[0-9]+)",$nome) === 1) {
1214 $campo_tabela = TRUE; 1214 $campo_tabela = TRUE;
1215 $javascript = ''; 1215 $javascript = '';
1216 1216
@@ -2616,7 +2616,7 @@ class clsCampos extends Core_Controller_Page_Abstract @@ -2616,7 +2616,7 @@ class clsCampos extends Core_Controller_Page_Abstract
2616 2616
2617 function getCampoTexto($nome, $id = '', $valor = '', $tamanhovisivel = '', 2617 function getCampoTexto($nome, $id = '', $valor = '', $tamanhovisivel = '',
2618 $tamanhomaximo = '', $evento = '', $disabled = '', $descricao = '', 2618 $tamanhomaximo = '', $evento = '', $disabled = '', $descricao = '',
2619 - $class = '', $descricao = '') 2619 + $class = '', $descricao2 = '')
2620 { 2620 {
2621 $id = $id ? $id : $nome; 2621 $id = $id ? $id : $nome;
2622 2622
ieducar/intranet/include/clsDetalhe.inc.php
@@ -119,7 +119,7 @@ class clsDetalhe extends Core_Controller_Page_Abstract @@ -119,7 +119,7 @@ class clsDetalhe extends Core_Controller_Page_Abstract
119 * adiciona os botoes de help para a pagina atual 119 * adiciona os botoes de help para a pagina atual
120 */ 120 */
121 $url = parse_url($_SERVER['REQUEST_URI']); 121 $url = parse_url($_SERVER['REQUEST_URI']);
122 - $url = ereg_replace( "^/", "", $url["path"] ); 122 + $url = preg_match( "^/", "", $url["path"] );
123 123
124 if (strpos($url, '_det.php') !== FALSE) { 124 if (strpos($url, '_det.php') !== FALSE) {
125 $tipo = "det"; 125 $tipo = "det";
ieducar/intranet/include/clsListagem.inc.php
@@ -263,7 +263,7 @@ class clsListagem extends clsCampos @@ -263,7 +263,7 @@ class clsListagem extends clsCampos
263 'pos_atual', -1, TRUE); 263 'pos_atual', -1, TRUE);
264 264
265 return NULL; 265 return NULL;
266 - } 266 + }
267 267
268 function RenderHTML() 268 function RenderHTML()
269 { 269 {
@@ -298,7 +298,7 @@ class clsListagem extends clsCampos @@ -298,7 +298,7 @@ class clsListagem extends clsCampos
298 </tr>"; 298 </tr>";
299 299
300 $retorno .= "</table>"; 300 $retorno .= "</table>";
301 - } 301 + }
302 302
303 if ($this->campos) { 303 if ($this->campos) {
304 $width = empty($this->largura) ? '' : "width='$this->largura'"; 304 $width = empty($this->largura) ? '' : "width='$this->largura'";
@@ -307,7 +307,7 @@ class clsListagem extends clsCampos @@ -307,7 +307,7 @@ class clsListagem extends clsCampos
307 * Adiciona o help da página. 307 * Adiciona o help da página.
308 */ 308 */
309 $url = parse_url($_SERVER['REQUEST_URI']); 309 $url = parse_url($_SERVER['REQUEST_URI']);
310 - $url = ereg_replace( '^/', '', $url['path']); 310 + $url = preg_match( '^/', '', $url['path']);
311 311
312 if (strpos($url, '_det.php') !== FALSE) { 312 if (strpos($url, '_det.php') !== FALSE) {
313 $tipo = 'det'; 313 $tipo = 'det';
@@ -321,7 +321,7 @@ class clsListagem extends clsCampos @@ -321,7 +321,7 @@ class clsListagem extends clsCampos
321 else { 321 else {
322 $tipo = 'cad'; 322 $tipo = 'cad';
323 } 323 }
324 - 324 +
325 $server = $_SERVER['SERVER_NAME']; 325 $server = $_SERVER['SERVER_NAME'];
326 $endereco = $_SERVER ['REQUEST_URI']; 326 $endereco = $_SERVER ['REQUEST_URI'];
327 $enderecoPagina = $_SERVER['PHP_SELF']; 327 $enderecoPagina = $_SERVER['PHP_SELF'];
@@ -500,7 +500,7 @@ class clsListagem extends clsCampos @@ -500,7 +500,7 @@ class clsListagem extends clsCampos
500 </tr>"; 500 </tr>";
501 501
502 $retorno .= "</table>"; 502 $retorno .= "</table>";
503 - } 503 + }
504 504
505 $retorno .= " 505 $retorno .= "
506 <form name=\"form_resultado\" id=\"form_resultado\" method=\"POST\" action=\"\"> 506 <form name=\"form_resultado\" id=\"form_resultado\" method=\"POST\" action=\"\">