} $conectar = isset($_GET["conectar"]) ? $_GET["conectar"] : NULL; if ($conectar == "sim") { include_once $toRoot . "utils/funcoes.php"; foreach ($_POST as $nomeCampo => $valor) { $comando = "\$" . $nomeCampo . "= antiSQL(isset(\$_POST['{$nomeCampo}']) ? '" . $valor . "' : NULL);"; eval($comando); } include_once $toRoot . "utils/ConectarMySQL.class.php"; include_once $toRoot . "beans/Cliente.class.php"; include_once $toRoot . "beans/Log.class.php"; include_once $toRoot . "dao/DAOCliente.class.php"; include_once $toRoot . "dao/DAOLog.class.php"; $conexao = new ConectarMySQL(); $cliente = new Cliente(); $daoCli = new DAOCliente($cliente, $conexao); $cliente = $daoCli->getCliente($tfNomUsu); if ($cliente != NULL && $cliente->nomeUsuario == $tfNomUsu && decodificar($cliente->senha) == $tfSen) { $_SESSION["codigo"] = $cliente->codigo; $_SESSION["nivel"] = $cliente->nivel; $_SESSION["pesCodigo"] = $cliente->pesCodigo; $_SESSION["codigoPai"] = $cliente->codigoPai; $_SESSION["nomeUsuario"] = $cliente->nomeUsuario; $_SESSION["sennha"] = $cliente->sennha; $_SESSION["solicitacoes"] = 0; $log = new Log(1, 1, $_SESSION["nomeUsuario"] . " realizou log-in no sistema!"); $daoLog = new DAOLog($log, $conexao); $daoLog->cadastrar(); if ($_SESSION["nivel"] == 3 || $_SESSION["nivel"] == 4) { include_once $toRoot . "beans/FuncionarioEmpresa.class.php"; include_once $toRoot . "dao/DAOFuncionarioEmpresa.class.php";
<?php /** * Created by PhpStorm. * User: alfonsogalvanmadera * Date: 06/04/16 * Time: 11:41 PM */ include "../Modelos/DAOCliente.php"; include "../Modelos/Cliente.php"; //echo "controlador Mostrar Todos <br>"; //$todos= new Cliente(); $mostrar = new DAOCliente(); $r = $mostrar->buscar(); if ($r > 0) { //var_dump($r); session_start(); $_SESSION['todos'] = $r; //var_dump($_SESSION['todos']); ?> <html> <head> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css"> <meta http-equiv="Refresh" content="2;url=http://localhost:8888/EjerciciosParaEntrega/Prueba4.5/Vistas/VistaMostrarTodos.php"> </head> <body> <h1 align="center">Cargando...</h1> </body> </html>
<script src="../js/main.js"></script> <!-- Google Analytics: change UA-XXXXX-X to be your site's ID. --> <!--<script> (function(b,o,i,l,e,r){b.GoogleAnalyticsObject=l;b[l]||(b[l]= function(){(b[l].q=b[l].q||[]).push(arguments)});b[l].l=+new Date; e=o.createElement(i);r=o.getElementsByTagName(i)[0]; e.src='//www.google-analytics.com/analytics.js'; r.parentNode.insertBefore(e,r)}(window,document,'script','ga')); ga('create','UA-XXXXX-X','auto');ga('send','pageview'); </script>--> </body> </html> <?php $dao = new DAOCliente(); function cargar() { $clie = new Cliente(); $clie->setIdCliente(""); $clie->setNombre($_POST["nom"]); $clie->setEdad($_POST["edad"]); $clie->setTelefono($_POST["tel"]); $clie->setCorreo($_POST["mail"]); $clie->setPass($_POST["pass"]); $clie->setNacionalidad($_POST["nac"]); $clie->setTipo(1); return $clie; } if (isset($_POST["acept"])) { $dao->insertar(cargar());
function registerUser() { $email = Utils::getPostParam("email"); $password = md5(Utils::getPostParam("pwd")); $clienteDAO = new DAOCliente(); $cliente = new cliente(); $properties = array('ID' => null, 'EMAIL' => $email, 'PASSWORD' => $password, 'ATTIVO' => 1); ClienteMapper::map($cliente, $properties); $clienteDAO->save($cliente); $return = ""; if ($cliente->getID() === null) { $return = ""; } else { $return = ""; } echo $return; }
var chart = new google.visualization.PieChart(document.getElementById('chart_div')); chart.draw(data, options); } </script> </head> <body> <?php require_once 'navbar.php'; ?> <div class="container-fluid"> <div class="col placeholder" style="position:relative;"> <div class="main-div-dashboard"> <div class="row-border"> <?php $idcliente = $_SESSION['id_cliente']; $clienteDAO = new DAOCliente(); $cliente = $clienteDAO->findById($idcliente); var_dump($cliente); ?> <div class="user-round left" style="background-image:url('<?php echo $_SESSION['cliente']->getIMMAGINEPROFILO(); ?> ')">aa</div> </div> <div class="row-border"> Due </div> <div class="row-border"> Tre <!-- <table id="riquadro-info" style="width: 100%; padding: 5px;">
$pesReferencia = $pessoa->codigo; } else { $pesReferencia = $slPes; } if (!isset($cadCliFunCla)) { $cadCliFunCla = 2; } else { if ($cadCliFunCla == 1 || $cadCliFunCla == 2) { ${$cadCliFunCla} = 3; } } if ($_SESSION["codigo"] == 1) { $slCla = 2; } $cliente = new Cliente($pesReferencia, $slCla, $tfNomUsu, codificar($tfSen1)); $daoCliente = new DAOCliente($cliente, $conexao); $daoCliente->cadastrar(); $cliente = $daoCliente->getAtual(); $log->alvCodigo = 2; $log->descricao = $tfNomUsu . " cadastrado!"; $daoLog->setLog($log); $daoLog->cadastrar(); if ($_SESSION["nivel"] != 1) { $funcionario = new Funcionario($slEmp, $pesReferencia); $daoFuncionario = new DAOFuncionario($funcionario, $conexao); $daoFuncionario->cadastrar(); $log->alvCodigo = 6; $log->descricao = "funcionario cadastrado!"; $daoLog->setLog($log); $daoLog->cadastrar(); }
<?php /** * Created by PhpStorm. * User: alfonsogalvanmadera * Date: 07/04/16 * Time: 12:09 AM */ include "../Modelos/DAOCliente.php"; include "../Modelos/Cliente.php"; include "../Modelos/DAODatosRecibidos.php"; include "../Modelos/DAOTabla.php"; //echo "controlador Buscar Usuario <br>"; $id = $_GET['idUsuario']; //echo "<br> el valor que trae es: $id <br>"; $clienteB = new DAOCliente(); $re = $clienteB->buscarCliente($id); $idC = $re['id_cliente2']; //echo $idC; $dr = new DAODatosRecibidos(); $d = $dr->buscarDatosRecibidos($idC); $idD = $d['id_datos_amort']; //echo $idD; $dT = new DAOTabla(); $t = $dT->buscarTabla($idD); //$idT=$t['id_datos_amort']; if ($re > 0) { // var_dump($re); session_start(); $_SESSION['usuario'] = $re; $_SESSION['datos'] = $d;
* Date: 14/03/16 * Time: 1:20 PM */ include "../Modelos/DAOCliente.php"; include "../Modelos/Cliente.php"; $nombre = $_POST['nombre']; $email = $_POST['correo']; $ruta = $_FILES['imagen']; //echo "controlador <br>"; //echo $nombre; $cliente = new Cliente(); $cliente->setNombre($nombre); $cliente->setEmail($email); $cliente->setRutaImagen($ruta); //var_dump ($cliente); $dao = new DAOCliente(); $result = $dao->guardarCliente($cliente); //echo $result; if (is_numeric($result)) { ?> <!DOCTYPE html> <html lang=""> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script> <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script> <title>Guardar</title> </head>
<table align="center"> <tr> <td><input type="submit" name="add" value="Agregar" class="btn1"></td> <td><input type="submit" name="del" value="Eliminar" class="btn1"></td> <td><input type="submit" name="mod" value="Modificar" class="btn1"></td> </tr> </table> </form> </div> <hr> <?php //creacion del Data Acces Object require '../Model/DAOCliente.php'; $dao = new DAOCliente(); $dao->listar(); function cargar() { $client = new Cliente(); $client->setIdCliente($_POST["id"]); $client->setNombre($_POST["nom"]); $client->setEdad($_POST["edad"]); $client->setTelefono($_POST["tel"]); $client->setCorreo($_POST["mail"]); $client->setPass($_POST["pass"]); $client->setNacionalidad($_POST["nac"]); $client->setPass($_POST["pass"]); $client->setTipo($_POST["tipo"]); return $client; }
<?php /** * Created by PhpStorm. * User: alfonsogalvanmadera * Date: 07/04/16 * Time: 12:13 PM */ include "../Modelos/DAOCliente.php"; include "../Modelos/Cliente.php"; //echo "controlador Borrar Usuario <br>"; $id = $_POST['idUsuarioB']; //echo "<br> el valor que trae es: $id <br>"; $clienteB = new DAOCliente(); $re = $clienteB->borrarCliente($id); //var_dump($re); if (is_numeric($re)) { ?> <!DOCTYPE html> <html lang=""> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="Refresh" content="3;url=http://localhost:8888/EjerciciosParaEntrega/Prueba4.5/Formularios/pruebaindex.html"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script> <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script> <title>Borrando</title> </head>