public function incluir() { if ($this->isEmailRepetido($_POST['email'], 0)) { $_SESSION['tupi.mensagem'] = 15; } else { $this->nome = $_POST['nome']; $this->email = $_POST['email']; $this->senha = md5($_POST['senha']); $oPerfil = new perfil(); $oPerfil->getById($_REQUEST['perfil']); $this->perfil = $oPerfil; $this->save(); $_SESSION['tupi.mensagem'] = 12; } }
<?php // require_once '../negocio/perfil.class.php'; require_once '../util/funciones/Funciones.class.php'; $usuario = $_POST["p_nom_usuario"]; $objpefil = new perfil(); try { $registros = $objpefil->obetenerPerfil($usuario); echo json_encode($registros); } catch (Exception $exc) { Funciones::mensaje($exc->getMessage(), "e"); }
<?php ini_set('display_errors', 1); error_reporting(E_ALL); session_start(); require_once '../clases/classPerfil.php'; $email = $_SESSION['emailUsuario']; $perfil = new perfil(); $resultIMC = $perfil->obtenerIMC($email); while ($row = $resultIMC->fetch_assoc()) { $imc = $row['imc']; } echo $imc;
function getPerfilPrecios($id) { $oUser = new usuario(); $oUser->Load($id); $idperfil = $oUser->getIdPerfil(); $oPerfil = new perfil(); $oPerfil->Load($idperfil); return $oPerfil->getPrecios() . "~" . $oPerfil->getCajaTPV() . "~" . $oPerfil->getB2B() . "~" . $oPerfil->getServicios() . "~" . $oPerfil->getSuscripciones() . "~" . $oPerfil->getSAT(); }
public function novoUsuario() { $this->idUsuario = ultimoId::ultimoIdBanco('idUsuario', 'tblusuario'); $sqlNovoUsuario = "INSERT INTO tblusuario(idUsuario, nomeUsuario, email, senha, dataCadastro, dataAlteracao, codTipoUsuario) VALUES (" . $this->idUsuario . ", '" . $this->nomeUsuario . "', '" . $this->email . "', '" . $this->senha . "', '" . $this->dataCadastro . "', '" . $this->dataAlteracao . "', " . $this->codTipoUsuario . ")"; // echo "SQL Usuário: ".$sqlNovoUsuario."<br>"; try { $resultadoNovoUsuario = mysql_query($sqlNovoUsuario) or die("Novo Usuário. " . RETURN_SQL . mysql_error()); if ($resultadoNovoUsuario) { $perfil = new perfil(); $perfil->setNome($this->nomeUsuario); $perfil->setCodUsuario($this->idUsuario); $perfil->setDataAlteracao($this->dataAlteracao); $perfil->setCodSetenio(0); $perfil->setDataNascimento("0000-00-00"); $perfil->setDescricao(""); $perfil->setEstadoCivil(""); $perfil->setMotivacao(""); $perfil->setProfissao(""); $perfil->novoPerfil(); } // mysql_close($resultadoNovoUsuario); } catch (Exception $ex) { echo "Erro na execução do novo usuário. Descrição: " . $ex->getMessage(); } }
<?php session_start(); include "../../modelos/seguridad/cls_perfil.php"; switch ($_GET['op']) { case 'act': echo $_GET['cedula']; echo $_GET['nombre']; echo $_GET['apellido']; echo $_GET['date']; echo $_GET['sexo']; echo $_GET['telf']; echo $_GET['cel']; echo $_GET['correo1']; echo $_GET['correo2']; break; case 'bus': $obj_aux = new perfil(); $auxnom = $_SESSION['usuario']; $obj_aux->get($auxnom[0]['cedula']); $aux = $obj_aux->buscar_datos(); $aux2 = $obj_aux->numrow(); if ($aux2 > 0) { $_SESSION['numrow_perfil'] = $aux2; $_SESSION['datos_perfil'] = $aux; header("location: ../../vistas/seguridad/perfil.php"); } else { echo "MALOOOOO"; } break; }
<?php ini_set('display_errors', 1); error_reporting(E_ALL); session_start(); if (isset($_POST['fecha_nac']) && isset($_POST['sexo']) && isset($_POST['altura']) && isset($_POST['peso'])) { require_once '../clases/classPerfil.php'; $fecha_nac = $_POST['fecha_nac']; $sexo = $_POST['sexo']; $altura = $_POST['altura']; $peso = $_POST['peso']; $email = $_SESSION['emailUsuario']; $imc = $peso / ($altura * $altura); $perfil = new perfil(); $result = $perfil->agregarPerfil($fecha_nac, $sexo, $altura, $peso, $imc, $email); //$resultIMC = $perfil->obtenerIMC($email); echo "Perfil modificado exitosamente"; } else { echo "Llenar todos los campos"; }
function BorrarPerfil($id) { $oPerfil = new perfil(); if ($oPerfil->Load($id)) { $nombre = $oPerfil->getNombre(); echo gas("Aviso", _("Perfil {$nombre} borrado")); $oPerfil->MarcarEliminado(); return true; } else { echo gas("Aviso", _("No se ha podido borrar el perfil")); return false; } }
session_destroy(); header("Location: ../index.php"); } if ($_SESSION['logado'] == false) { header("Location: ../index.php"); } $menu = filter_input(INPUT_GET, 'm'); $tarefa = filter_input(INPUT_GET, 't'); $m = filter_input(INPUT_GET, 'me'); $codigoUsuario = base64_decode(filter_input(INPUT_GET, 'usuario')); $codigoUsuarioCodificado = filter_input(INPUT_GET, 'usuario'); $config = new configuracao(); $usuario_class = new usuario(); //$modelUsuario->setIdUsuario($_SESSION['idusuario']); //$modelUsuario->consultaUsuarioPerfil(); $perfil = new perfil(); $endereco = new Endereco(); $telefone = new telefone(); $setenio = new setenio(); $tipotelefone = new tipotelefone(); $tipousuario = new tipousuario(); ?> <!DOCTYPE html> <html lang="pt-br"> <head> <meta charset="UTF-8"> <title><?php echo TITULOSISTEMA; ?>