public function efetivaLogin() { // Caso o usuário exista no sistema (MSG=="") deve buscar os seus dados, preferências e atuações $integrante = new Integrante(); $resp = $integrante->valida($_REQUEST); if (!is_bool($resp)) { //$retorno["MSG"] = $resp; //$this->view->mensagemUsuario($retorno); $this->view->exibirTelaLogin("Usuário ou senha inválida"); return; } $_SESSION["m80Usuario"] = $integrante->getId(); $_SESSION["m80Usuario_nome"] = $integrante->getNome(); $this->boasvindas(); return; }
public function carrega() { $this->conectar(); $queries[] = "SELECT * FROM integrantes;"; $resultado = $this->query($queries); $this->desconectar(); foreach ($resultado as $result) { $integrante = new Integrante(); $integrante->setId($result["id"]); $integrante->setNome($result["nome"]); $integrante->setSenha($result["senha"]); $integrante->setMail($result["email"]); $this->addIntegrante($integrante); } }
<?php $page = 'testimonios'; $page2 = 'nav-integrantes'; require "template/header.php"; require "class/class.integrantes.php"; $x = new Integrante(); if (isset($_POST["submit"])) { $x->edit(); } $data = $x->get((int) $_GET["edit"]); ?> <div class="container"> <div class="row"> <?php require "template/nav_testimonios.php"; ?> <div class="grid col-9"> <div class="row back-integrante"> <h2>Agregar integrante</h2> <hr> <form action="" class="agregar-integrante" method="post" enctype="multipart/form-data" id="add-integrante"> <div> <label for="">Nombre</label> <input type="text" name="nombre" id="nombre"> <label for="">Apellido</label> <input type="text" name="apellido" id="apellido"> <label for="">Puesto</label> <input type="text" name="puesto" id="puesto"> <label for="">Email</label>
<?php $page = 'testimonios'; $page2 = 'nav-integrantes'; require "template/header.php"; require "class/class.integrantes.php"; $x = new Integrante(); ?> <div class="container"> <div class="row"> <?php require "template/nav_testimonios.php"; ?> <div class="grid col-9"> <div class="row back-integrante"> <h2>Integrantes</h2> <hr> <div> <?php if ($x->fetch() != 0) { ?> <?php foreach ($x->fetch() as $k => $v) { ?> <div class="integrante" style="background:url(../resources/images/<?php echo $v["img"]; ?> )"> <h3><?php echo $v["nombre"] . " " . $v["apellido"]; ?>
<?php require_once 'class.integrantes.php'; require_once 'class.post.php'; Post::exist('sort', function () { $integrantes = new Integrante(); $integrantes->updateSort(Post::input('sort')); });
<?php include_once 'Integrante.php'; $username = $_POST['username']; $password = $_POST['password']; $email = $_POST['email']; $club = $_POST['club']; $integrante = new Integrante(); $integrante->username = $username; $integrante->password = $password; if ($integrante->save() != 1) { header("location : http://localhost/JQueryMobile/index.php"); } else { header("location : http://localhost/JQueryMobile/success.php"); }
<?php require "functions/testimonios_gral.inc.php"; traerTestimoniosGral(); ?> </div> <!-- /aca --> </div> <div class="pagination"></div> </section> <section class="Equipo clearfix SacarSeccionCelular" id="PerosnasFundacion"> <div class="row clearfix"> <?php require "admin/class/class.integrantes.php"; $x = new Integrante(); ?> <h1>Quienes Integramos La Fundación</h1> <?php foreach ($x->fetch() as $k => $v) { $telefono = !is_null($v["telefono"]) && !empty($v["telefono"]) ? 'TEL: ' . $v["telefono"] : ''; ?> <article class="integrantes"> <a href="mailto:<?php echo $v["email"]; ?> ">
public function setIntegrante($integrante) { $integ = new Integrante(); $integ->carrega($integrante); $this->integrante = $integ->getNome(); }
<?php $page = 'testimonios'; $page2 = 'nav-integrantes'; require "template/header.php"; require "class/class.integrantes.php"; $x = new Integrante(); if (isset($_POST["submit"])) { $x->add(); } ?> <div class="container"> <div class="row"> <?php require "template/nav_testimonios.php"; ?> <div class="grid col-9"> <div class="row back-integrante"> <div><?php echo $x->success; ?> </div> <h2>Agregar integrante</h2> <hr> <form action="" class="agregar-integrante" method="post" enctype="multipart/form-data" id="add-integrante"> <div> <label for="">Nombre</label> <input type="text" name="nombre" id="nombre"> <label for="">Apellido</label> <input type="text" name="apellido" id="apellido"> <label for="">Puesto</label>
<?php require "class/class.integrantes.php"; $int = (int) $_GET["delete"]; $x = new Integrante(); $x->delete($int);