示例#1
0
     if (!$dao->cadastrar() || !$log->cadastrar()) {
         $comitar = false;
     }
     if ($tfCPF == NULL) {
         $tfCPF = "%";
     }
     $linha = mysqli_fetch_array($dao->pesquisar($tfNome . ":" . $tfCPF . ":" . $classe));
     $pesCod = $linha["pes_codigo"];
 } else {
     $comitar = false;
 }
 for ($x = 1; $x < $tfFoneCont + 1; $x++) {
     eval("\$tfPesFone[{$x}] = isset(\$_POST[\"tfPesFone{$x}\"]) ? \$_POST[\"tfPesFone{$x}\"] : NULL;");
     if ($tfPesFone[$x] != NULL && preg_match("/^[0-9]{2,2}-[0-9]{4,4}-[0-9]{4,4}\$/", $tfPesFone[$x])) {
         include_once "../../dao/DAOTelefone.class.php";
         $dao = new DAOTelefone($pesCod, $tfPesFone[$x], "../../", $conexao);
         include_once "../../dao/DAOLog.class.php";
         $log = new DAOLog($_SESSION["pessoa"], 3, $_SESSION["nivel"], $_SESSION["codigo"], 6, "numero=\\'" . $tfPesFone[$x] . "\\'", "../../", $conexao);
         if (!$dao->cadastrar() || !$log->cadastrar()) {
             $comitar = false;
         }
     } else {
         if (strcmp($tfPesFone[$x], "") != 0) {
             $comitar = false;
         }
     }
 }
 switch ($tipo) {
     case "admin":
         if ($tfNomeUsuario != NULL || strcmp($tfSenha1, $tfSenha2) != 0 || $slNivel != NULL) {
             if (strlen($tfCPF) == 0) {
示例#2
0
     $log->alvCodigo = 3;
     $log->descricao = $tfNom . " cadastrado!";
     $daoLog->setLog($log);
     $daoLog->cadastrar();
     if (strlen($tfEmlURL) > 0) {
         $email = new Email($pessoa->codigo, $tfEmlURL, $tfEmlNot);
         $daoEmail = new DAOEmail($email, $conexao);
         $daoEmail->cadastrar();
         $log->alvCodigo = 4;
         $log->descricao = $tfEmlURL . " cadastrado!";
         $daoLog->setLog($log);
         $daoLog->cadastrar();
     }
     if (strlen($tfFonNum) > 0) {
         $telefone = new Telefone($pessoa->codigo, $tfFonNum, $tfFonNot);
         $daoTelefone = new DAOTelefone($telefone, $conexao);
         $daoTelefone->cadastrar();
         $log->alvCodigo = 5;
         $log->descricao = $tfFonNum . " cadastrado!";
         $daoLog->setLog($log);
         $daoLog->cadastrar();
     }
     $pesReferencia = $pessoa->codigo;
 } else {
     $pesReferencia = $slPes;
 }
 $tecnico = new Tecnico($slBancRef, $pesReferencia, $slCla, $tfDes, $tfAgen, $tfCont);
 $daoTecnico = new DAOTecnico($tecnico, $conexao);
 $daoTecnico->cadastrar();
 $log->alvCodigo = 15;
 $log->descricao = $tfDes . " cadastrado!";