Пример #1
0
<?php

require '../clases/AutoCarga.php';
$bd = new DataBase();
$sesion = new Session();
$gestor = new ManageArtista($bd);
$email = Request::post("email");
$clave = Request::post("clave");
$artista = $gestor->get($email);
$email = $artista->getEmail();
//si el usuario no existe
if ($email === null) {
    header("Location:login.php?error=exist");
} else {
    if (sha1($clave) !== $artista->getClave()) {
        header("Location:login.php?error=clave");
    } else {
        if ($artista->getActivo() === "0") {
            header("Location:login.php?error=activo");
        } else {
            $sesion->setUser($artista);
            $sesion->sendRedirect("index.php");
        }
    }
}
Пример #2
0
$manageArtista = new ManageArtista($bd);
$listaEventos = $manageEvento->getList();
?>
   
                <table border="1" class="tablaEventos">    
                    <thead>
                    <th>Evento</th>
                    <th>Fecha</th>
                    <th>Artista</th>
                    <th>Lugar</th>
                    </thead>

                <?php 
foreach ($listaEventos as $indice => $evento) {
    $id2 = $evento->getID_artista();
    $artista = $manageArtista->get($evento->getID_artista());
    $lugar = $manageLugar->get($evento->getID_lugar());
    ?>

                        <tr>
                            <td><?php 
    echo $evento->getNombre_evento();
    ?>
</td>
                            <td><?php 
    echo $evento->getFecha();
    ?>
</td>
                            <td><?php 
    echo $artista->getNombre_artista();
    ?>
Пример #3
0
<?php

require './clases/AutoCarga.php';
require './clases/ManageRelaciones.php';
$bd = new DataBase();
$gestor = new ManageArtista($bd);
$ID_artista = Request::get("ID_artista");
$artista = $gestor->get($ID_artista);
?>
<!DOCTYPE html>

<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
        <link rel="stylesheet" type="text/css" href="./estilos/estilos.css"/>
    </head>
    <body>
        <div id="cabeceraIndex">
            <div id="logo">
                <img src="./estilos/ticket-icon.png" width="250" height="100"/>
            </div>
            <nav>
                <a href="index.php" >Inicio</a>
                <a href="artistas.php" >Artistas</a>
                <a href="./login/adm.html">Admin</a>
            </nav>
        </div>
        <div id="cuerpoIndex">
            <?php 
$nombre = $artista->getNombre_artista();
Пример #4
0
//las últimas versiones también vienen con autoload
$sesion = new Session();
$bd = new DataBase();
$gestor = new ManageArtista($bd);
//Datos para crear el nuevo usuario
$email = Request::post("email");
$clave = Request::post("clave");
$clave2 = Request::post("clave2");
$alias = $email;
$fechaalta = date('Y-m-d');
$artista = new Artista($email, sha1($clave), $alias, $fechaalta, 0, 0, "_main1.html");
//Si el email es un email y las claves son iguales, creamos el usuario y le
//mandamos el correo de validación
if (Filter::isEmail($email) && $clave === $clave2) {
    //Se comprueba que no exista en la base de datos el nuevo usuario
    if ($gestor->get($email)->getEmail() != null) {
        header("Location:altaArtista.php?error=exist");
    } else {
        //$r = Mail::sendMail($email);//Mandamos el email
        //if($r === "SENT") {
        $gestor->insert($artista);
        //Se inserta el usuario en la tabla
        mkdir("../images/{$email}", 0777, true);
        header("Location:altaArtista.php?aviso=enviado");
        //}else{
        //            header("Location:altaArtista.php?error=noenviado");
        //        }
    }
} else {
    header("Location:altaArtista.php?error=claves");
}