Archive cliente_upd.php :

<?
include("inc/lib.inc.php");
 #define de ACAO
 define("NG_ACAO", "CLI_DETAIL");
 #verifica_permissao
 checkPermission();

$page = new Smarty();

$cl = new clientes();
$cl->NR_CLIENTE = $_GET["nr"];
$cl->load();

if(empty($cl->NOME)) {
  $page->assign("not_updated", true);
  $page->assign("nr_cliente", $_GET["nr"]);
} else {
  $n = new nodo();
  $nodos = $n->select();
  $page->assign("nodos", $nodos);

  $page->assign("cliente", $cl);
}
$page->display("cliente_upd.html");
?>

Archive lib.inc.php:

<?
if(PHP_OS == "WINNT")
 ini_set("include_path",".;../inc/;inc/;..");
else
 ini_set("include_path",".:../inc/:inc/:..");


require_once("inc/config.php");
require_once("inc/classes.inc.php");

session_start();

function Redirect($url)
{
  Header("Location:$url");
}

function showMessage($msg)
{
   logger('SYSTEM LOG',$msg);
//   $msg = urlencode($msg);
   echo $msg;
   exit();
}

function isopen() {
  $self = $_SERVER["PHP_SELF"];
  $base = basename($self);
  $base = basename($base,".php");
  $open_pages = split(",", OPEN_PAGES);
  return in_array($base, $open_pages);
}

function logger($op, $msg) {

$op = NG_ACAO;
$usuario = (isset($_SESSION["s_usuario"]))?$_SESSION["s_usuario"]-
>LOGIN:"SYSTEM USER";
$ip = $_SERVER["REMOTE_ADDR"];

/* Safe logs */
unset($_POST["senha"]);
unset($_POST["confirmacao"]);


$post_data = serialize($_POST);
$get_data = serialize($_GET);

$l = new log();
$l->USUARIO = $usuario;
$l->IP = $ip;
$l->MENSAGEM = $msg;
$l->OPERACAO = $op;
$l->DADOS_GET = $get_data;
$l->DADOS_POST = $post_data;

$l->add();

}

function showError($errno, $err_msg) {
 $msg =  "$errno|$err_msg";
 logger(NG_ACAO, $msg);
 echo $msg;
 exit;
}
function isauth() {
  if(!isset($_SESSION["logged"])) {
   Redirect("login.php");
   exit();
   }
}

function logoff() {
  session_destroy();
  Redirect("login.php");
}

function checkPermission($tipo = 0) {
   $u = $_SESSION["s_usuario"];
   if(!$u->hasPermission(NG_ACAO)) {
       if($tipo == 0)
         showError("999", "Permissao negada para executar esse
comando.");
       else
         showMessage("Permissao negada para executar esse comando.");
    }
}

function fillObject($method, $object, $readonly = "") {
   $method = "_" . strtoupper($method);
   global $$method;
   $src = $$method;
   if(!is_array($readonly)) $readonly = array($readonly);

   $vars_name = get_class_vars($object);
   $vars = array_keys($vars_name);
   $obj = new $object();
   foreach($vars as $var) {
     if(!in_array($var,$readonly)) $obj->$var = $src[$var];
   }
   return $obj;
 }

 if(!isopen())
   isauth();

?>

Archive cliente_upd.html:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://
www.w3.org/TR/html4/loose.dtd">
<html>

<head>
  <title></title>
  <meta name="GENERATOR" content="Quanta Plus">
  <meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">


<script type="text/javascript" language="javascript" src="js/
prototype.js" ></script>
<script type="text/javascript" src="js/window.js"> </script>
<script type="text/javascript" src="js/window_ext.js"> </script>
<script type="text/javascript" src="js/debug.js"> </script>
<script type="text/javascript" src="js/effects.js"> </script>
<script language="javascript" type="text/javascript" src="js/
masks.js"></script>
<script type="text/javascript" src="js/XHConn.js"></script>
<script language="javascript" type="text/javascript" src="js/
functions.js"></script>
<script language="javascript" type="text/javascript" src="js/
CalendarPopup.js"></script>

{literal}
<SCRIPT LANGUAGE="JavaScript">document.write(getCalendarStyles());</
SCRIPT>
{/literal}


{literal}
<script language="javascript">

function open_cable_web() {
  alert('Atencao: uma página nova será aberta!');
}

function show_api() {
  document.location.href = "api_list.php";
}

function cm_list_fn(objxml) {
   divcm = document.getElementById("cm_div");
   divcm.innerHTML = objxml.responseText;

Xaprb.InputMask.setupOneElementMask(document.getElementById('cm_mac'));
}

function cpe_list_fn(objxml) {
   divcpe = document.getElementById("cpe_div");
   divcpe.innerHTML = objxml.responseText;

Xaprb.InputMask.setupOneElementMask(document.getElementById('cpe_mac'));
}


function cm_list(id) {
 var myConn = new XHConn();
 if (!myConn) alert("XMLHTTP not available. Try a newer/better
browser.");
 myConn.connect("cliente_cm_list.php", "GET", "nr=" + id, cm_list_fn);
}

function cpe_list(id) {
 var myConn = new XHConn();
 if (!myConn) alert("XMLHTTP not available. Try a newer/better
browser.");
 myConn.connect("cliente_cpe_list.php", "GET", "nr=" + id,
cpe_list_fn);
}


 function cpe_upd(id) {
  lnro = document.getElementById("ln_cpe_ro_" + id);
  lnro.style.display = "none";
  lnrw = document.getElementById("ln_cpe_rw_" + id);
  lnrw.style.display = "";
 }


 function cm_upd(id) {
  lnro = document.getElementById("ln_cm_ro_" + id);
  lnro.style.display = "none";
  lnrw = document.getElementById("ln_cm_rw_" + id);
  lnrw.style.display = "";
 }

 function cm_upd_cancel(id) {
  lnro = document.getElementById("ln_cm_ro_" + id);
  lnro.style.display = "";
  lnrw = document.getElementById("ln_cm_rw_" + id);
  lnrw.style.display = "none";
 }

 function cpe_upd_cancel(id) {
  lnro = document.getElementById("ln_cpe_ro_" + id);
  lnro.style.display = "";
  lnrw = document.getElementById("ln_cpe_rw_" + id);
  lnrw.style.display = "none";
 }

 function cpe_upd_save_fn(objxml) {
   result = objxml.responseText.split("|");
   if(result[0] == "0") {
     show_cpe();
   } else {
     alert(result[1]);
   }
 }

 function cm_upd_save_fn(objxml) {
   result = objxml.responseText.split("|");
   if(result[0] == "0") {
     show_cm();
   } else {
     alert(result[1]);
   }
 }

 function cpe_del_fn(objxml) {
   result = objxml.responseText.split("|");
   if(result[0] == "0") {
     show_cpe();
   } else {
     alert(result[1]);
   }

 }

 function cpe_del(id) {
  if(confirm('Deseja realmente excluir essa CPE?')) {
     mac = document.getElementById("cpe_mac_" + id);
     isp = document.getElementById("cpe_isp_" + id);
     gen1 = document.getElementById("cpe_gen1_" + id);
     gen2 =  document.getElementById("cpe_gen2_" + id);
     gen3 = document.getElementById("cpe_gen3_" + id);
     cod = document.getElementById("codigo");

     var myConn = new XHConn();
     if (!myConn) alert("XMLHTTP not available. Try a newer/better
browser.");

     myConn.connect("cliente_cpe_del.php", "POST", "mac=" + mac.value
+ "&isp=" + isp.options[isp.selectedIndex].value + "&gen1=" +
gen1.value +"&gen2=" +   gen2.value + "&gen3=" + gen3.value + "&nr=" +
cod.value , cpe_del_fn);
   }
   }

 function cm_del_fn(objxml) {
   result = objxml.responseText.split("|");
   if(result[0] == "0") {
     show_cm();
   } else {
     alert(result[1]);
   }
 }


 function cm_del(id) {
 if(confirm('Deseja realmente excluir esse Cable?')) {
    mac = document.getElementById("cm_mac_" + id);
    ps = document.getElementById("cm_ps_" + id);
    gen3 = document.getElementById("cm_gen3_" + id);
    cod = document.getElementById("codigo");
    var myConn = new XHConn();
    if (!myConn) alert("XMLHTTP not available. Try a newer/better
browser.");

    myConn.connect("cliente_cm_del.php", "POST", "mac="+ mac.value +
"&ps=" + ps.options[ps.selectedIndex].value + "&gen3=" + gen3.value +
"&nr=" + cod.value , cm_del_fn);
  }

 }

 function cpe_upd_save(id) {
  mac = document.getElementById("cpe_mac_" + id);
  isp = document.getElementById("cpe_isp_" + id);
  gen1 = document.getElementById("cpe_gen1_" + id);
  gen2 =  document.getElementById("cpe_gen2_" + id);
  gen3 = document.getElementById("cpe_gen3_" + id);
  cod = document.getElementById("codigo");

  var myConn = new XHConn();
  if (!myConn) alert("XMLHTTP not available. Try a newer/better
browser.");

  myConn.connect("cliente_cpe_doupd.php", "POST", "mac=" + mac.value +
"&isp=" + isp.options[isp.selectedIndex].value + "&gen1=" + gen1.value
+"&gen2=" +   gen2.value + "&gen3=" + gen3.value + "&nr=" +
cod.value , cpe_upd_save_fn);

 }


 function cm_upd_save(id) {
  mac = document.getElementById("cm_mac_" + id);
  ps = document.getElementById("cm_ps_" + id);
  gen3 = document.getElementById("cm_gen3_" + id);
  cod = document.getElementById("codigo");
  var myConn = new XHConn();
  if (!myConn) alert("XMLHTTP not available. Try a newer/better
browser.");

  myConn.connect("cliente_cm_doupd.php", "POST", "mac="+ mac.value +
"&ps=" + ps.options[ps.selectedIndex].value + "&gen3=" + gen3.value +
"&nr=" + cod.value , cm_upd_save_fn);

 }


function cm_add_fn(objxml)  {
  result = objxml.responseText.split("|");
  if(result[0] == "0") {
    show_cm();
  } else {
    alert(result[1]);
 }

}
 function cm_add(id) {
  mac = document.getElementById("cm_mac");
  ps = document.getElementById("cm_ps");
  gen3 = document.getElementById("cm_gen3");
  cod = document.getElementById("codigo");
  var myConn = new XHConn();
  if (!myConn) alert("XMLHTTP not available. Try a newer/better
browser.");

  myConn.connect("cliente_cm_doadd.php", "POST", "mac=" + mac.value +
"&ps=" + ps.options[ps.selectedIndex].value + "&gen3=" + gen3.value +
"&nr=" + cod.value , cm_add_fn);

 }


function cm_reset_fn(objxml)  {
  result = objxml.responseText.split("|");
  alert(result[1]);
}
 function cm_reset(id) {
  if(confirm('Resetar este cable modem?')) {
  mac = document.getElementById("cm_mac_" + id);
  cod = document.getElementById("codigo");
  var myConn = new XHConn();
  if (!myConn) alert("XMLHTTP not available. Try a newer/better
browser.");

  myConn.connect("cliente_cm_reset.php", "POST", "mac=" + mac.value +
"&nr=" + cod.value , cm_reset_fn);
 }

 }

 function show_cpe() {
   cod = document.getElementById("codigo");
   cpe_list(cod.value);
 }


 function show_cm() {
   cod = document.getElementById("codigo");
   cm_list(cod.value);
 }


 function cliente_modify() {
  divmod = document.getElementById("cli_upd");
  divdet = document.getElementById("cli_detail");
  divdet.style.display = "none";
  divmod.style.display = "";
 }

 function show_cm_add() {
  divadd = document.getElementById("ln_cm_add");
  divadd.style.display = "";
 }

 function cm_add_cancel() {
  divadd = document.getElementById("ln_cm_add");
  divadd.style.display = "none";
 }

 function cpe_add_fn(objxml)  {
   result = objxml.responseText.split("|");
   if(result[0] == "0") {
     show_cpe();
   } else {
     alert(result[1]);
   }

 }
 function cpe_add() {
  mac = document.getElementById("cpe_mac");
  isp = document.getElementById("cpe_isp");
  gen1 = document.getElementById("cpe_gen1");
  gen2 =  document.getElementById("cpe_gen2");
  gen3 = document.getElementById("cpe_gen3");
  cod = document.getElementById("codigo");

  var myConn = new XHConn();
  if (!myConn) alert("XMLHTTP not available. Try a newer/better
browser.");

  myConn.connect("cliente_cpe_doadd.php", "POST", "mac=" + mac.value +
"&isp=" + isp.options[isp.selectedIndex].value + "&gen1=" + gen1.value
+"&gen2=" +   gen2.value + "&gen3=" + gen3.value + "&nr=" +
cod.value , cpe_add_fn);


 }

 function cpe_add_cancel() {
  divadd = document.getElementById("ln_cpe_add");
  divadd.style.display = "none";
 }

 function show_cpe_add() {
  divadd = document.getElementById("ln_cpe_add");
  divadd.style.display = "";
 }

 function cliente_cancel() {
  divmod = document.getElementById("cli_upd");
  divdet = document.getElementById("cli_detail");
  divdet.style.display = "";
  divmod.style.display = "none";
 }

 function cliente_save() {
  frm = document.getElementById("frm_upd");
  frm.submit();
 }


var global_cm_id = 0;
var global_cpe_id = 0;

 function show_cpe_close(id)  {
     div_detail = document.getElementById("detail_cm_" + id);
     div_detail.style.display = "none";
 }



 function show_cable_modem_close(id)  {
     div_detail = document.getElementById("detail_cm_" + id);
     div_detail.style.display = "none";
 }


 function show_cpe_detail_close(id)  {
     div_detail = document.getElementById("detail_cpe_" + id);
     div_detail.style.display = "none";
 }


 function show_cable_modem_fn(objxml)  {
   result = objxml.responseText.split("|");
   if(result[0] == "0") {
     div_detail = document.getElementById("detail_cm_" +
global_cm_id);
     div_detail.style.display = "";
     fechar_div = "<br><br><a href=
\"javascript:show_cable_modem_close(" + global_cm_id +")\">Fechar</
a>";
     div_detail.innerHTML = result[1] + fechar_div;

   } else {
     alert(result[1]);
   }

  }

 function show_cable_modem(id) {
  mac = document.getElementById("cm_mac_" + id);
  cod = document.getElementById("codigo");
  div_detail = document.getElementById("detail_cm_" + id);
  div_detail.style.display = "";
  div_detail.innerHTML = "Aguarde, processando comando...";

  var myConn = new XHConn();
  if (!myConn) alert("XMLHTTP not available. Try a newer/better
browser.");

  global_cm_id = id;

  myConn.connect("cliente_cm_detail.php", "POST", "mac=" + mac.value
+   "&nr=" + cod.value , show_cable_modem_fn);

 }

 function show_cpe_detail_fn(objxml)  {
   result = objxml.responseText.split("|");
   if(result[0] == "0") {
     div_detail = document.getElementById("detail_cpe_" +
global_cpe_id);
     div_detail.style.display = "";
     fechar_div = "<br><br><a href=
\"javascript:show_cpe_detail_close(" + global_cpe_id +")\">Fechar</
a>";
     div_detail.innerHTML = result[1] + fechar_div;

   } else {
     alert(result[1]);
   }

  }

function cm_hard_reset_fn(objxml)  {
  result = objxml.responseText.split("|");
  alert(result[1]);
}


function cm_hard_reset(id) {
  if(confirm('Resetar este cable modem?')) {
  mac = document.getElementById("cm_mac_" + id);
  cod = document.getElementById("codigo");
  var myConn = new XHConn();
  if (!myConn) alert("XMLHTTP not available. Try a newer/better
browser.");

  myConn.connect("cliente_cm_hard_reset.php", "POST", "mac=" +
mac.value +  "&nr=" + cod.value , cm_reset_fn);
 }
}

function convert_mac(mac_arris) {
  var new_str = "";
   mac_arris = mac_arris.replace(/\./g,"");
   mac_arris = mac_arris.toUpperCase();
   for(a = 1; a <= mac_arris.length; a++) {
      new_str += mac_arris[a - 1];
      if((a % 2) == 0 && a < mac_arris.length ) new_str += ":";
   }
  return new_str;
}


function mark_relation(target_str) {
   var new_str = convert_mac(target_str);
   div_cpe = document.getElementById(new_str);
   if(!div_cpe)
     alert('Este IP não possui CPE relacionada');
   else {
    div_cpe.style.background = "#A7C4FF";
    document.getElementById("anc" + new_str).focus();
  }
 }


 function show_cpe_detail(id) {
  mac = document.getElementById("cpe_mac_" + id);
  cod = document.getElementById("codigo");
  div_detail = document.getElementById("detail_cpe_" + id);
  div_detail.style.display = "";
  div_detail.innerHTML = "Aguarde, processando comando...";

  var myConn = new XHConn();
  if (!myConn) alert("XMLHTTP not available. Try a newer/better
browser.");

  global_cpe_id = id;

  myConn.connect("cliente_cpe_get_ip.php", "POST", "mac=" + mac.value
+   "&nr=" + cod.value , show_cpe_detail_fn);

 }

 function cliente_find() {
  document.location.href = "cliente_fnd.php";
 }


function show_cm_detail_menu(str_mac, ip) {

  var mac = convert_mac(str_mac);

  var menu = "<a href=\"javascript:detail_cpe_add('" + mac + "')
\">Adicionar CPE</a><br><a href=\"javascript:mark_relation('" +
str_mac  + "')\">Relacionar Cable</a><br><a href=
\"javascript:cpe_ping_host('" + ip + "')\">Ping Host</a><br><a href=
\"javascript:cpe_ping_cmts('" + ip + "')\">Ping CMTS</a><br><a href=
\"javascript:cpe_clear_cable_host('" + mac + "')\">Clear Cable Host</
a><br><br><a href=\"javascript:hide_cm_detail_menu('" + str_mac  + "')
\">Fechar</a>";

  mnu = document.getElementById(str_mac);
  mnu.style.display = "";
  mnu.innerHTML = menu;
 }

 function hide_cm_detail_menu(str_mac) {
  mnu = document.getElementById(str_mac);
  mnu.style.display = "none";
  mnu.innerHTML = "";

 }

 function detail_cpe_add(mac) {
   div_cpe = document.getElementById(mac);
   if(div_cpe)
     alert('Esta CPE já está cadastrada.');
   else {
     show_cpe_add();
     cpe_fld = document.getElementById("cpe_mac");
     cpe_fld.value = mac;
     cpe_fld.focus();
   }
 }

 function cpe_ping_host(ip) {
  var myConn = new XHConn();
  if (!myConn) alert("XMLHTTP not available. Try a newer/better
browser.");
     myConn.connect("cliente_cpe_os_ping.php", "POST", "ip=" + ip ,
cpe_ping_host_fn);
  showProgress();
 }


 function cpe_ping_host_fn(objxml) {
  hideProgress();
  result = objxml.responseText.split("|");
  if(result[0] != "0")
    alert(result[1]);
  else {
    popupWin(result[1]);
  }
 }



 function cm_ping_host(ip) {
  var myConn = new XHConn();
  if (!myConn) alert("XMLHTTP not available. Try a newer/better
browser.");
     myConn.connect("cliente_cm_os_ping.php", "POST", "ip=" + ip ,
cm_ping_host_fn);
  showProgress();
 }


 function cm_ping_host_fn(objxml) {
  hideProgress();
  result = objxml.responseText.split("|");
  if(result[0] != "0")
    alert(result[1]);
  else {
    popupWin(result[1]);
  }
 }




 function cpe_ping_cmts(ip) {
  var myConn = new XHConn();
  if (!myConn) alert("XMLHTTP not available. Try a newer/better
browser.");
     myConn.connect("cliente_cpe_cmts_ping.php", "POST", "ip=" + ip ,
cpe_ping_cmts_fn);
  showProgress();
 }

 function cpe_ping_cmts_fn(objxml) {

  hideProgress();
  result = objxml.responseText.split("|");
  if(result[0] != "0")
    alert(result[1]);
  else {
    popupWin(result[1]);
  }

 }



 function cm_ping_cmts(ip) {
  var myConn = new XHConn();
  if (!myConn) alert("XMLHTTP not available. Try a newer/better
browser.");
     myConn.connect("cliente_cm_cmts_ping.php", "POST", "ip=" + ip ,
cm_ping_cmts_fn);
  showProgress();
 }

 function cm_ping_cmts_fn(objxml) {

  hideProgress();
  result = objxml.responseText.split("|");
  if(result[0] != "0")
    alert(result[1]);
  else {
    popupWin(result[1]);
  }

 }


 function cpe_clear_cable_host(mac) {
 if(confirm('Deseja realmente limpar este HOST no CMTS?') ) {
   var myConn = new XHConn();
   if (!myConn) alert("XMLHTTP not available. Try a newer/better
browser.");
     myConn.connect("cliente_cpe_clear_cable_host.php", "POST", "mac="
+ mac ,  cpe_clear_cable_host_fn);
  showProgress();
  }

 }

 function cpe_clear_cable_host_fn(objxml) {
  hideProgress();
  result = objxml.responseText.split("|");
  alert(result[1]);
 }

 function popupWin(data) {
    Dialog.alert(data, {windowParameters: {className: "alphacube",
width:500, height:300}, okLabel: "fechar",    ok:function(win)
{debug("validate alert panel"); return true;}, cancel:function(win)
{debug("validate cancel panel"); return true;}});
 }

 function showProgress() {
   divp = document.getElementById("UpdateProgress");
   divp.style.display = "";
 }

 function hideProgress() {
   divp = document.getElementById("UpdateProgress");
   divp.style.display = "none";
 }

</script>
{/literal}

{literal}
<SCRIPT LANGUAGE="JavaScript">
var cal1x = initCal("caldiv","setValue");
function setValue(y,m,d) {
  date = formatDate(new Date(m +"/"+d+"/"+y), "dd/MM/yy");
  data_span = document.getElementById("data_span");
  cli_gen1 = document.getElementById("cli_gen1");
  data_span.innerHTML = date;
  cli_gen1.value = date;
}
</SCRIPT>
{/literal}

  <link rel="stylesheet" type="text/css" href="css/style.css"
media="screen" />
  <link rel="stylesheet" type="text/css" href="css/menu.css"
media="screen" />
  <link rel="stylesheet" type="text/css" href="css/cuscosky.css"
media="screen" /></head>
  <link href="css/themes/default.css" rel="stylesheet" type="text/css"
></link>
  <link href="css/themes/alphacube.css" rel="stylesheet" type="text/
css" ></link>

<body>
{include file='include_top.html'}
{if $not_updated }
<br><br>
<div align="center">
<h2>Cadastro de Clientes</h2>
<span class="alert">API Não atualizada ou cliente não encontrado.</
span><br>
<a href="cliente_upd.php?nr={$nr_cliente}">
Caso a API não tenha sido atualizada clique aqui para recarregar a
página.
</a>
</div>
{else}
<div id="cli_detail" align="center">
<h4>Dados do Cliente</h4>
<FORM method="POST">
<TABLE border="1" width="90%">
<tr><td colspan="2">Código:{$cliente->NR_CLIENTE}{if $cliente->EMAIL|
regex_replace:"/\s+$/":"" !=""}<span class="alert">(bloqueado)</span>{/
if}</td></tr>
<tr><td>Nome:{$cliente->NOME}</td><td> Email:{$cliente->EMAIL}</td></
tr>
<tr><td colspan="2">Endereço:{$cliente->ENDERECO}</td></tr>
<tr><td>Tel. Res.: {$cliente->TEL_RES}</td><td>Data:{$cliente->GEN1}</
td></tr>
<tr><td>Tel. Com.: {$cliente->TEL_COM}</td><td> Nodo:{$cliente->GEN2}</
td></tr>
<tr><td>Tel. Cel.: {$cliente->TEL_CEL}</td><td> Provedor:{$cliente-
>GEN3}</td></tr>
</TABLE>
</FORM>
<br>
<div align="center"><input type="button" name="btUpd" value="
Atualizar  " onclick="location.reload(true)"
class="styled">&nbsp;<input type="button" name="btEdt"
value="Modificar" onclick="cliente_modify()"
class="styled">&nbsp;<input type="button" name="btFnd"
value="Procurar" class="styled" onclick="cliente_find()">&nbsp;<input
type="button" name="btApi" value="  API  " class="styled"
onclick="show_api()"></div>
</div>
<!--- UPDATE DIV --->
<div id="cli_upd" style="display:none" align="center">
<h4>Atualizar Cliente</h4>
<FORM method="POST" action="cliente_doupd.php" id="frm_upd"
name="frm_upd">
<input type="hidden" value="{$cliente->NR_CLIENTE|regex_replace:"/\s+
$/":""}" id="codigo" name="codigo" class="input_mask mask_codigo">
<TABLE border="1" width="90%">
<tr><td colspan="2">Código:{$cliente->NR_CLIENTE|strip:''}{if $cliente-
>EMAIL|regex_replace:"/\s+$/":"" !=""}<span class="alert">(bloqueado)</
span>{/if}</td></tr>
<tr><td>Nome:<INPUT type="text" name="nome" id="nome" size="80"
value="{$cliente->NOME|regex_replace:"/\s+$/":""}" class="styled"
onblur="validate_nome(this)"></td><td> Email:{$cliente->EMAIL|
regex_replace:"/\s+$/":""}</td></tr>
<tr><td colspan="2">Endereço:<INPUT type="text" name="endereco"
id="endereco" size="60" value="{$cliente->ENDERECO|regex_replace:"/\s+
$/":""}" class="styled " onblur="validate_endereco(this)"></td></tr>
<tr><td>Tel. Res.: <INPUT type="text" name="telres" id="telres"
value="{$cliente->TEL_RES|regex_replace:"/\s+$/":""}" class="styled"></
td><td>Data:<span id="data_span">{$cliente->GEN1|regex_replace:"/\s+
$/":""}</span><INPUT type="hidden" name="cli_gen1" id="cli_gen1"
value="{$cliente->GEN1|regex_replace:"/\s+$/":""}"
class="styled">&nbsp;&nbsp;<A HREF="#" onClick="setCalendar(cal1x,
'anc','cli_gen1','{$cliente->GEN1|regex_replace:"/\s+$/":""}'); return
false;" TITLE="Clique para escolher a data" NAME="anc"
ID="anc">Escolha a data</A></td></tr>
<tr><td>Tel. Com.: <INPUT type="text" name="telcom" id="telcom"
value="{$cliente->TEL_COM|regex_replace:"/\s+$/":""}" class="styled"></
td><td> Nodo:<select id="cli_gen2" name="cli_gen2" class="styled">
{foreach from=$nodos item=nodo}
<option value="{$nodo->DENOMINACAO}" {if $cliente->GEN2|
regex_replace:"/\s+$/":"" == $nodo->DENOMINACAO }selected{/if}>{$nodo-
>DENOMINACAO}</option>
{/foreach}
</select></td></tr>
<tr><td>Tel. Cel.: <INPUT type="text" name="telcel" id="telcel"
value="{$cliente->TEL_CEL|regex_replace:"/\s+$/":""}" class="styled"></
td><td> Provedor:<INPUT type="text" name="cli_gen3" id="cli_gen3"
value="{$cliente->GEN3|regex_replace:"/\s+$/":""}" class="styled"></
td></tr>
</TABLE>
</FORM>
<br>
<div align="center"><input type="button" name="btEdt" value="
Salvar   " class="styled" onclick="cliente_save()">&nbsp;<input
type="button" name="btCancel" value="  Cancelar   "
onclick="cliente_cancel()" class="styled">&nbsp;<input type="button"
name="btFnd" value="Procurar" class="styled"
onclick="cliente_find()">&nbsp;<input type="button" name="btApi"
value="  API  " class="styled" onclick="show_api()"></div>

</div>
{literal}
<script language="javascript">
show_cm();
</script>
{/literal}
<div id="cm_div" align="center">
</div>

{literal}
<script language="javascript">
show_cpe();
Xaprb.InputMask.setupOneElementMask(document.getElementById(''));
</script>
{/literal}

<div id="cpe_div" align="center">
</div>


{/if}
<DIV ID="caldiv" STYLE="position:absolute;visibility:hidden;background-
color:white;layer-background-color:white;"></DIV>
<div id="UpdateProgress" style="display:none">
Aguarde, executando comando...
</div>
<script>
 WindowCloseKey.init();
</script>
</body>
</html>


Im using http://prototypejs.org/assets/2007/10/16/prototype.js , the
firebug show me:

getEventID(null)prototype.js (line 3812)
createWrapper(null, "keypress", function())prototype.js (line 3832)
observe(null, "keypress", function())prototype.js (line 3876)
setupOneElementMask(null)masks.js (line 99)
if (element._eventID) return element._eventID;


Regards,

ThEcHaCaL

P.S.: ( pastie.caboo.se ) didnt work here =/




On Dec 4, 10:48 am, "Mislav Marohnić" <[EMAIL PROTECTED]>
wrote:
> We don't know if you're doing something wrong because you haven't told or
> shown us what you are doing. But, the code you are referring to is pretty
> internal to event handling, so I don't think you might be doing something
> wrong.
>
> What we need from you if full code where this happens (use
> pastie.caboo.sefor pasting), as well as exact browser information. If
> you could make a
> minimal document where this error happens so we could reproduce it, it would
> help us resolving the issue quickly. Thanks!
>
> On Dec 4, 2007 1:18 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hello all,
>
> > I'm using the prototype.js in my application and i have an error:
>
> > Error: element has no properties
> > Source File:http://www/application/js/prototype.js
> > Line: 3844
>
> > function getEventID(element) {
> > if (element._eventID) return element._eventID;
> > arguments.callee.id = arguments.callee.id || 1;
> > return element._eventID = ++arguments.callee.id;
> > }
>
> > Am I doing something wrong or is this a known bug?
>
> > P.S.:Sorry for my poor english ok?!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to