$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!"; $daoLog->setLog($log); $daoLog->cadastrar(); $conexao->fechar(); $cadastrar = true; }
<?php $toRoot = isset($toRoot) ? $toRoot : "../"; include_once $toRoot . "beans/Tecnico.class.php"; include_once $toRoot . "dao/DAOTecnico.class.php"; include_once $toRoot . "utils/ConectarMySQL.class.php"; $conexao = new ConectarMySql($toRoot); $bean = new Tecnico(); $dao = new DAOTecnico($bean, $conexao); $array = $dao->getTecnicoLista(); if ($array != NULL) { echo '<option value="---" selected="selected" >----------</option>'; foreach ($array as $temp) { $bean = $temp; echo '<option value="' . $bean->codigo . '" >' . $bean->descricao . '</option>'; } } else { echo '<option value="---" selected="selected" >Não há técnicos cadastrados!</option>'; } $conexao->fechar();