Add files via upload
This commit is contained in:
		
							
								
								
									
										33
									
								
								assets/php/HTMLtemplate.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										33
									
								
								assets/php/HTMLtemplate.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,33 @@
 | 
			
		||||
<!--
 | 
			
		||||
    Práctica - Sistemas Web | Grupo D
 | 
			
		||||
    CompluCine - FDI-cines
 | 
			
		||||
-->
 | 
			
		||||
<!DOCTYPE HTML>
 | 
			
		||||
<html lang="es">
 | 
			
		||||
    <!-- Head -->
 | 
			
		||||
    <?php
 | 
			
		||||
        $template->print_head();
 | 
			
		||||
    ?>
 | 
			
		||||
    <body>
 | 
			
		||||
        <!-- Header -->
 | 
			
		||||
        <?php
 | 
			
		||||
            $template->print_header();
 | 
			
		||||
        ?>
 | 
			
		||||
 | 
			
		||||
        <!-- Main -->
 | 
			
		||||
        <?php
 | 
			
		||||
           $template->print_main();
 | 
			
		||||
        ?>
 | 
			
		||||
 | 
			
		||||
        <!-- Section -->
 | 
			
		||||
        <?php
 | 
			
		||||
            $template->print_section($section);
 | 
			
		||||
        ?>
 | 
			
		||||
 | 
			
		||||
        <!-- Footer -->
 | 
			
		||||
        <?php
 | 
			
		||||
            $template->print_footer();
 | 
			
		||||
        ?>
 | 
			
		||||
       
 | 
			
		||||
    </body>
 | 
			
		||||
</html>
 | 
			
		||||
@@ -46,4 +46,9 @@
 | 
			
		||||
     * @see http://php.net/manual/en/language.types.callable.php
 | 
			
		||||
     */
 | 
			
		||||
    register_shutdown_function(array($app, 'shutdown'));
 | 
			
		||||
 | 
			
		||||
    //Depuración (BORRAR):
 | 
			
		||||
    ini_set('display_errors', 1);
 | 
			
		||||
    ini_set('display_startup_errors', 1);
 | 
			
		||||
    error_reporting(E_ALL);
 | 
			
		||||
?>
 | 
			
		||||
 
 | 
			
		||||
@@ -5,13 +5,13 @@
 | 
			
		||||
    //private const _NUMPAGES = 10; //Constant to page results.
 | 
			
		||||
 | 
			
		||||
    //Attributes:
 | 
			
		||||
    public $page;           //Page Name.
 | 
			
		||||
    public $prefix;         //Page prefix.
 | 
			
		||||
    private $page;           //Page Name.
 | 
			
		||||
    private $prefix;         //Page prefix.
 | 
			
		||||
 | 
			
		||||
    public $session;        //"Iniciar Sesión" (if user isn´t logged in), "Cerrar Sesión" (otherwise).
 | 
			
		||||
    public $session_route;  //"login/" (if user isn´t logged in), "logout/" (otherwise).
 | 
			
		||||
    public $panel;          //Button to access the user's dashboard (only displayed if logged in).
 | 
			
		||||
    public $user_route;     //Route of the panel (depends on the type of user).
 | 
			
		||||
    private $session;        //"Iniciar Sesión" (if user isn´t logged in), "Cerrar Sesión" (otherwise).
 | 
			
		||||
    private $session_route;  //"login/" (if user isn´t logged in), "logout/" (otherwise).
 | 
			
		||||
    private $panel;          //Button to access the user's dashboard (only displayed if logged in).
 | 
			
		||||
    private $user_route;     //Route of the panel (depends on the type of user).
 | 
			
		||||
 | 
			
		||||
    //Constructor:
 | 
			
		||||
    function __construct(){
 | 
			
		||||
@@ -216,11 +216,26 @@
 | 
			
		||||
                    }  
 | 
			
		||||
                    echo"</nav>
 | 
			
		||||
                </div>
 | 
			
		||||
            </div>\n";
 | 
			
		||||
            </div>
 | 
			
		||||
        ";
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    //Print specific page content:
 | 
			
		||||
    function print_section($section){
 | 
			
		||||
        /* Panel menu */
 | 
			
		||||
        $sub_header = '';
 | 
			
		||||
        if(strpos($_SERVER['PHP_SELF'], 'panel')){
 | 
			
		||||
            echo "<!-- Panel Menu -->
 | 
			
		||||
            ";
 | 
			
		||||
            $this->print_panelMenu($_SESSION["rol"]);
 | 
			
		||||
            $this->print_msg();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        echo $section;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    //Print Films Cards:
 | 
			
		||||
    function print_fimls(){
 | 
			
		||||
        //List of the movies:
 | 
			
		||||
@@ -472,7 +487,7 @@
 | 
			
		||||
            <a href='{$prefix}fdicines/terms_conditions/'>Términos de uso</a> |
 | 
			
		||||
            <a href='{$prefix}cinemas/'>Nuestros cines</a> |
 | 
			
		||||
            <a href='{$prefix}contacto/'>Contacto</a> |
 | 
			
		||||
            <button onclick=\"cambiarCSS('{$css}')\">$nameCSS</button>
 | 
			
		||||
            <button onclick=\"cambiarCSS('$css');\">$nameCSS</button>
 | 
			
		||||
        </footer>\n";
 | 
			
		||||
 | 
			
		||||
        echo"
 | 
			
		||||
 
 | 
			
		||||
@@ -1,33 +1,10 @@
 | 
			
		||||
 | 
			
		||||
<?php 
 | 
			
		||||
    //General Config File:
 | 
			
		||||
    require_once('../assets/php/config.php');
 | 
			
		||||
 | 
			
		||||
    //Specific page content:
 | 
			
		||||
        $section = '';
 | 
			
		||||
 | 
			
		||||
    //General page content:
 | 
			
		||||
    require RAIZ_APP.'/HTMLtemplate.php';
 | 
			
		||||
?>
 | 
			
		||||
<!DOCTYPE HTML>
 | 
			
		||||
<!--
 | 
			
		||||
    Práctica - Sistemas Web | Grupo D
 | 
			
		||||
    CompluCine - FDI-cines
 | 
			
		||||
-->
 | 
			
		||||
<html lang="es">
 | 
			
		||||
    <!-- Head -->
 | 
			
		||||
    <?php
 | 
			
		||||
        $template->print_head();
 | 
			
		||||
    ?>
 | 
			
		||||
    <body>
 | 
			
		||||
        <!-- Header -->
 | 
			
		||||
        <?php
 | 
			
		||||
            $template->print_header();
 | 
			
		||||
        ?>
 | 
			
		||||
 | 
			
		||||
        <!-- Main -->
 | 
			
		||||
        <?php
 | 
			
		||||
            $template->print_main();
 | 
			
		||||
        ?>        
 | 
			
		||||
 | 
			
		||||
        <!-- Footer -->
 | 
			
		||||
        <?php
 | 
			
		||||
            $template->print_footer();
 | 
			
		||||
        ?>
 | 
			
		||||
    </body>
 | 
			
		||||
 | 
			
		||||
</html>
 | 
			
		||||
							
								
								
									
										88
									
								
								contacto/includes/formContact.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										88
									
								
								contacto/includes/formContact.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,88 @@
 | 
			
		||||
<?php
 | 
			
		||||
require_once($prefix.'assets/php/form.php');
 | 
			
		||||
 | 
			
		||||
class FormContact extends Form {
 | 
			
		||||
    //Constants:
 | 
			
		||||
    const HTML5_EMAIL_REGEXP = '^[a-zA-Z0-9.!#$%&\'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$'; 
 | 
			
		||||
 | 
			
		||||
    public function __construct() {
 | 
			
		||||
        $options = array("action" => "");
 | 
			
		||||
        parent::__construct('formContact', $options);
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    protected function generaCamposFormulario($datos, $errores = array()) {
 | 
			
		||||
 | 
			
		||||
        // Se generan los mensajes de error si existen.
 | 
			
		||||
        $htmlErroresGlobales = self::generaListaErroresGlobales($errores);
 | 
			
		||||
        $errorNombre = self::createMensajeError($errores, 'name', 'span', array('class' => 'error'));
 | 
			
		||||
        $errorEmail = self::createMensajeError($errores, 'email', 'span', array('class' => 'error'));
 | 
			
		||||
        $errorMessage = self::createMensajeError($errores, 'message', 'span', array('class' => 'error'));
 | 
			
		||||
 | 
			
		||||
        // Se genera el HTML asociado a los campos del formulario y los mensajes de error.
 | 
			
		||||
        $html = "<div class='row'>
 | 
			
		||||
                    <fieldset id='datos_personales'>
 | 
			
		||||
                        <legend>Datos personales</legend><pre>".$htmlErroresGlobales."</pre>
 | 
			
		||||
                        <div class='_name'>
 | 
			
		||||
                            <input type='text' name='name' id='name' value='' placeholder='Nombre' required/><pre>".$errorNombre."</pre>
 | 
			
		||||
                        </div>
 | 
			
		||||
                        <div class='_email'>
 | 
			
		||||
                            <input type='email' name='email' id='email' value='' placeholder='Email' required/><pre>".$errorEmail."</pre>
 | 
			
		||||
                        </div>
 | 
			
		||||
                    </fieldset>
 | 
			
		||||
                    <fieldset id='motivo'>
 | 
			
		||||
                        <legend>Motivo de la consulta</legend>
 | 
			
		||||
                        <div class='reason'>
 | 
			
		||||
                            <input type='radio' id='radio' name='reason' value='evaluation' checked>
 | 
			
		||||
                            <label for='evaluation'>Evaluación</label>
 | 
			
		||||
                        </div>
 | 
			
		||||
                        <div class='reason'>
 | 
			
		||||
                            <input type='radio' id='radio' name='reason' value='sugestions'>
 | 
			
		||||
                            <label for='sugestions'>Sugerencias</label>
 | 
			
		||||
                        </div>
 | 
			
		||||
                        <div class='reason'>
 | 
			
		||||
                            <input type='radio' id='radio' name='reason' value='critics'>
 | 
			
		||||
                            <label for='critics'>Críticas</label>
 | 
			
		||||
                        </div>
 | 
			
		||||
                    </fieldset>
 | 
			
		||||
                    <div class='message'><pre>".$errorMessage."</pre>
 | 
			
		||||
                        <textarea name='message' id='message' placeholder='Escribe aquí tu mensaje...'></textarea>
 | 
			
		||||
                    </div>
 | 
			
		||||
                    <div class='verify'>
 | 
			
		||||
                        <input type='checkbox' id='checkbox' name='terms' required>
 | 
			
		||||
                        <label for='terms'>Marque esta casilla para verificar que ha leído nuestros términos y condiciones del servicio.</label>
 | 
			
		||||
                    </div>
 | 
			
		||||
                    <div class='actions'> 
 | 
			
		||||
                        <input type='submit' id='submit' value='Enviar mensaje' class='primary' />
 | 
			
		||||
                        <input type='reset' id='reset' value='Borrar' />       
 | 
			
		||||
                    </div>
 | 
			
		||||
                </div>";
 | 
			
		||||
 | 
			
		||||
        return $html;
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    protected function procesaFormulario($datos) {
 | 
			
		||||
        $result = array();
 | 
			
		||||
 | 
			
		||||
        $nombre = $this->test_input($datos['name']) ?? null;
 | 
			
		||||
        if ( empty($nombre) || mb_strlen($nombre) < 3 || mb_strlen($nombre) > 8 ) {
 | 
			
		||||
            $result['name'] = "El nombre tiene que tener\n una longitud de más de\n 3 caracteres\n y menos de 8 caracteres.";
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
        $email = $this->test_input($datos['email']) ?? null;
 | 
			
		||||
        if ( empty($email) || !mb_ereg_match(self::HTML5_EMAIL_REGEXP, $email) ) {
 | 
			
		||||
            $result['email'] = "El email no es válido.";
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        $message = $this->test_input($datos['message']) ?? null;
 | 
			
		||||
        if ( empty($message) || mb_strlen($message) < 1 || mb_strlen($message) > 250 ) {
 | 
			
		||||
            $result['message'] = "El mensaje no puede estar vacío\ny no puede contener más de\n250 caracteres.";
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (count($result) === 0) {
 | 
			
		||||
            $result = ROUTE_APP;            
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
        return $result;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -1,77 +1,19 @@
 | 
			
		||||
<?php 
 | 
			
		||||
    //General Config File:
 | 
			
		||||
    require_once('../assets/php/config.php');
 | 
			
		||||
?>
 | 
			
		||||
<!--
 | 
			
		||||
    Práctica - Sistemas Web | Grupo D
 | 
			
		||||
    CompluCine - FDI-cines
 | 
			
		||||
-->
 | 
			
		||||
<!DOCTYPE HTML>
 | 
			
		||||
<html lang="es">
 | 
			
		||||
    <!-- Head -->
 | 
			
		||||
    <?php
 | 
			
		||||
        $template->print_head();
 | 
			
		||||
    ?>
 | 
			
		||||
    <body>
 | 
			
		||||
        <!-- Header -->
 | 
			
		||||
        <?php
 | 
			
		||||
            $template->print_header();
 | 
			
		||||
        ?>
 | 
			
		||||
 | 
			
		||||
        <!-- Main -->
 | 
			
		||||
        <?php
 | 
			
		||||
           $template->print_main();
 | 
			
		||||
        ?>
 | 
			
		||||
    //Contact form:
 | 
			
		||||
    require_once('includes/formContact.php');
 | 
			
		||||
    $form = new FormContact();
 | 
			
		||||
    $htmlForm = $form->gestiona();
 | 
			
		||||
    
 | 
			
		||||
        <!-- Form -->
 | 
			
		||||
    //Specific page content:
 | 
			
		||||
    $section = '<!-- Contact Form -->
 | 
			
		||||
            <section id="formulario">
 | 
			
		||||
            <h4>Formulario</h4>
 | 
			
		||||
            <form method="post" action="mailto:fernmend@ucm.es">
 | 
			
		||||
                <div class="row">
 | 
			
		||||
                    <fieldset id="datos_personales">
 | 
			
		||||
                        <legend>Datos personales</legend>
 | 
			
		||||
                        <div class="_name">
 | 
			
		||||
                            <input type="text" name="name" id="name" value="" placeholder="Nombre" required/>
 | 
			
		||||
                        </div>
 | 
			
		||||
                        <div class="_email">
 | 
			
		||||
                            <input type="email" name="email" id="email" value="" placeholder="Email" required/>
 | 
			
		||||
                        </div>
 | 
			
		||||
                    </fieldset>
 | 
			
		||||
                    <fieldset id="motivo">
 | 
			
		||||
                        <legend>Motivo de la consulta</legend>
 | 
			
		||||
                        <div class="reason">
 | 
			
		||||
                            <input type="radio" id="radio" name="reason" value="evaluation" checked>
 | 
			
		||||
                            <label for="evaluation">Evaluación</label>
 | 
			
		||||
                        </div>
 | 
			
		||||
                        <div class="reason">
 | 
			
		||||
                            <input type="radio" id="radio" name="reason" value="sugestions">
 | 
			
		||||
                            <label for="sugestions">Sugerencias</label>
 | 
			
		||||
                        </div>
 | 
			
		||||
                        <div class="reason">
 | 
			
		||||
                            <input type="radio" id="radio" name="reason" value="critics">
 | 
			
		||||
                            <label for="critics">Críticas</label>
 | 
			
		||||
                        </div>
 | 
			
		||||
                    </fieldset>
 | 
			
		||||
                    <div class="message">
 | 
			
		||||
                        <textarea name="message" id="message" placeholder="Escribe aquí tu mensaje..."></textarea> <!-- rows="5"  -->
 | 
			
		||||
                    </div>
 | 
			
		||||
                    <div class="verify">
 | 
			
		||||
                        <input type="checkbox" id="checkbox" name="terms" required>
 | 
			
		||||
                        <label for="terms">Marque esta casilla para verificar que ha leído nuestros términos y condiciones del servicio.</label>
 | 
			
		||||
                    </div>
 | 
			
		||||
                    <div class="actions"> 
 | 
			
		||||
                        <input type="submit" id="submit" value="Enviar mensaje" class="primary" />
 | 
			
		||||
                        <input type="reset" id="reset" value="Borrar" />       
 | 
			
		||||
                    </div>
 | 
			
		||||
                </div>
 | 
			
		||||
            </form>
 | 
			
		||||
        </section>
 | 
			
		||||
                <h4>Formulario (EN DESARROLLO)</h4>
 | 
			
		||||
                '.$htmlForm.'
 | 
			
		||||
            </section>';
 | 
			
		||||
    
 | 
			
		||||
        <!-- Footer -->
 | 
			
		||||
        <?php
 | 
			
		||||
            $template->print_footer();
 | 
			
		||||
        ?>
 | 
			
		||||
       
 | 
			
		||||
    </body>
 | 
			
		||||
 | 
			
		||||
</html>
 | 
			
		||||
    //General page content:
 | 
			
		||||
    require RAIZ_APP.'/HTMLtemplate.php';
 | 
			
		||||
?>
 | 
			
		||||
 
 | 
			
		||||
@@ -22,34 +22,9 @@
 | 
			
		||||
    $htmlFormLogin = $formLogin->gestiona();
 | 
			
		||||
    $formRegister = new FormRegister();
 | 
			
		||||
    $htmlFormRegister = $formRegister->gestiona();
 | 
			
		||||
?>
 | 
			
		||||
<!DOCTYPE HTML>
 | 
			
		||||
<!--
 | 
			
		||||
    Práctica - Sistemas Web | Grupo D
 | 
			
		||||
    CompluCine - FDI-cines
 | 
			
		||||
-->
 | 
			
		||||
<html lang="es">
 | 
			
		||||
    <!-- Head -->
 | 
			
		||||
    <?php
 | 
			
		||||
        $template->print_head();
 | 
			
		||||
    ?>
 | 
			
		||||
    <body>
 | 
			
		||||
        <!-- Header -->
 | 
			
		||||
        <?php
 | 
			
		||||
            $template->print_header();
 | 
			
		||||
        ?>
 | 
			
		||||
 | 
			
		||||
        <!-- Main -->
 | 
			
		||||
        <?php
 | 
			
		||||
            $template->print_main();
 | 
			
		||||
        ?>
 | 
			
		||||
        
 | 
			
		||||
        <!-- Login / Register -->
 | 
			
		||||
        <section id="login_register">
 | 
			
		||||
			<div class ="row">
 | 
			
		||||
                <?php
 | 
			
		||||
    if($isLogin){
 | 
			
		||||
                    echo "<!-- Login -->
 | 
			
		||||
        $form = "<!-- Login -->
 | 
			
		||||
        <div class='column left'>
 | 
			
		||||
            <div class='code info'>
 | 
			
		||||
                <h2>¿No tienes una cuenta?</h2>
 | 
			
		||||
@@ -66,7 +41,7 @@
 | 
			
		||||
            ".$htmlFormLogin."
 | 
			
		||||
            </div>"."\n";
 | 
			
		||||
    } else {
 | 
			
		||||
                    echo "<!-- Register -->
 | 
			
		||||
        $form = "<!-- Register -->
 | 
			
		||||
        <div class='column left'>
 | 
			
		||||
            <h2>Registro</h2>
 | 
			
		||||
            ".$htmlFormRegister."
 | 
			
		||||
@@ -83,15 +58,15 @@
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>"."\n";
 | 
			
		||||
        }
 | 
			
		||||
                ?>
 | 
			
		||||
 | 
			
		||||
    //Specific page content:
 | 
			
		||||
    $section = '<!-- Login / Register -->
 | 
			
		||||
                <section id="login_register">
 | 
			
		||||
                    <div class ="row">
 | 
			
		||||
                        '.$form.'
 | 
			
		||||
                    </div>	
 | 
			
		||||
		</section>
 | 
			
		||||
                </section>';
 | 
			
		||||
 | 
			
		||||
        <!-- Footer -->
 | 
			
		||||
        <?php
 | 
			
		||||
            $template->print_footer();
 | 
			
		||||
        ?>
 | 
			
		||||
 | 
			
		||||
    </body>
 | 
			
		||||
 | 
			
		||||
</html>
 | 
			
		||||
    //General page content:
 | 
			
		||||
    require RAIZ_APP.'/HTMLtemplate.php';
 | 
			
		||||
?>
 | 
			
		||||
@@ -6,48 +6,20 @@
 | 
			
		||||
    require_once('./includes/formLogin.php');
 | 
			
		||||
    $reply = FormLogin::getReply();
 | 
			
		||||
 | 
			
		||||
?>
 | 
			
		||||
<!DOCTYPE HTML>
 | 
			
		||||
<!--
 | 
			
		||||
    Práctica - Sistemas Web | Grupo D
 | 
			
		||||
    CompluCine - FDI-cines
 | 
			
		||||
-->
 | 
			
		||||
<html lang="es">
 | 
			
		||||
    <!-- Head -->
 | 
			
		||||
    <?php
 | 
			
		||||
        $template->print_head();
 | 
			
		||||
    ?>
 | 
			
		||||
    <body>
 | 
			
		||||
        <!-- Header -->
 | 
			
		||||
        <?php
 | 
			
		||||
            $template->print_header();
 | 
			
		||||
        ?>
 | 
			
		||||
 | 
			
		||||
        <!-- Main -->
 | 
			
		||||
        <?php
 | 
			
		||||
            $template->print_main();
 | 
			
		||||
        ?>
 | 
			
		||||
        
 | 
			
		||||
        <!-- Reply -->
 | 
			
		||||
    //Specific page content:
 | 
			
		||||
    $section = '<!-- Reply -->
 | 
			
		||||
                <section class="reply">
 | 
			
		||||
                    <div class ="row">
 | 
			
		||||
                        <div class="column side"></div>
 | 
			
		||||
                        <div class="column middle">
 | 
			
		||||
                            <div class="code info">
 | 
			
		||||
                        <?php
 | 
			
		||||
                            echo $reply;
 | 
			
		||||
                        ?>
 | 
			
		||||
                                '.$reply.'
 | 
			
		||||
                            </div>
 | 
			
		||||
                        </div>
 | 
			
		||||
                        <div class="column side"></div>    
 | 
			
		||||
            </div>
 | 
			
		||||
        </section>
 | 
			
		||||
                    </div>';
 | 
			
		||||
 | 
			
		||||
        <!-- Footer -->
 | 
			
		||||
        <?php
 | 
			
		||||
            $template->print_footer();
 | 
			
		||||
        ?>
 | 
			
		||||
    //General page content:
 | 
			
		||||
    require RAIZ_APP.'/HTMLtemplate.php';
 | 
			
		||||
 | 
			
		||||
    </body>
 | 
			
		||||
 | 
			
		||||
</html>
 | 
			
		||||
?>
 | 
			
		||||
@@ -19,49 +19,21 @@
 | 
			
		||||
                        Haz clic <a href='{$prefix}'>aquí</a> si tu navegador no te redirige automáticamente.</p>\n";
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
?>
 | 
			
		||||
<!DOCTYPE HTML>
 | 
			
		||||
<!--
 | 
			
		||||
    Práctica - Sistemas Web | Grupo D
 | 
			
		||||
    CompluCine - FDI-cines
 | 
			
		||||
-->
 | 
			
		||||
<html lang="es">
 | 
			
		||||
    <!-- Head -->
 | 
			
		||||
    <?php
 | 
			
		||||
        $template->print_head();
 | 
			
		||||
    ?>
 | 
			
		||||
    <body>
 | 
			
		||||
        <!-- Header -->
 | 
			
		||||
        <?php
 | 
			
		||||
            $template->print_header();
 | 
			
		||||
        ?>
 | 
			
		||||
 | 
			
		||||
        <!-- Main -->
 | 
			
		||||
        <?php
 | 
			
		||||
            $template->print_main();
 | 
			
		||||
        ?>
 | 
			
		||||
        
 | 
			
		||||
        <!-- Reply -->
 | 
			
		||||
    //Specific page content:
 | 
			
		||||
    $section = '<!-- Reply -->
 | 
			
		||||
                <section class="reply">
 | 
			
		||||
                    <div class ="row">
 | 
			
		||||
                        <div class="column side"></div>
 | 
			
		||||
                        <div class="column middle">
 | 
			
		||||
                            <div class="code info">
 | 
			
		||||
                        <?php
 | 
			
		||||
                            echo $reply;
 | 
			
		||||
                        ?>
 | 
			
		||||
                                '.$reply.'
 | 
			
		||||
                            </div>
 | 
			
		||||
                        </div>
 | 
			
		||||
                        <div class="column side"></div>    
 | 
			
		||||
                    </div>
 | 
			
		||||
        </section>
 | 
			
		||||
                </section>';
 | 
			
		||||
 | 
			
		||||
        <!-- Footer -->
 | 
			
		||||
        <?php
 | 
			
		||||
            $template->print_footer();
 | 
			
		||||
        ?>
 | 
			
		||||
    //General page content:
 | 
			
		||||
    require RAIZ_APP.'/HTMLtemplate.php';
 | 
			
		||||
    
 | 
			
		||||
    </body>
 | 
			
		||||
 | 
			
		||||
</html>
 | 
			
		||||
?>
 | 
			
		||||
@@ -36,7 +36,6 @@ class FormChangeEmail extends Form {
 | 
			
		||||
        return $html;
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    /* TODO */
 | 
			
		||||
    protected function procesaFormulario($datos){
 | 
			
		||||
        $result = array();
 | 
			
		||||
        
 | 
			
		||||
 
 | 
			
		||||
@@ -37,49 +37,21 @@
 | 
			
		||||
                    </div>
 | 
			
		||||
                    <div class="column side"></div>'."\n";
 | 
			
		||||
    }
 | 
			
		||||
?>
 | 
			
		||||
<!DOCTYPE HTML>
 | 
			
		||||
<!--
 | 
			
		||||
    Práctica - Sistemas Web | Grupo D
 | 
			
		||||
    CompluCine - FDI-cines
 | 
			
		||||
-->
 | 
			
		||||
<html lang="es">
 | 
			
		||||
    <!-- Head -->
 | 
			
		||||
    <?php
 | 
			
		||||
        $template->print_head();
 | 
			
		||||
    ?>
 | 
			
		||||
    <body>
 | 
			
		||||
        <!-- Header -->
 | 
			
		||||
        <?php
 | 
			
		||||
            $template->print_header();
 | 
			
		||||
        ?>
 | 
			
		||||
 | 
			
		||||
        <!-- Main -->
 | 
			
		||||
        <?php
 | 
			
		||||
            $template->print_main();
 | 
			
		||||
        ?>
 | 
			
		||||
    
 | 
			
		||||
        <!-- Panel -->
 | 
			
		||||
    //Specific page content:
 | 
			
		||||
    $section = '<!-- User Panel -->
 | 
			
		||||
        <section id="user_panel">
 | 
			
		||||
            <div class="row">
 | 
			
		||||
                <!-- Panel Menu -->
 | 
			
		||||
                <?php
 | 
			
		||||
                    $template->print_panelMenu($_SESSION["rol"]);
 | 
			
		||||
                ?>
 | 
			
		||||
                <!-- Contents -->
 | 
			
		||||
                <div class="row">
 | 
			
		||||
                    <?php
 | 
			
		||||
                        $template->print_msg();
 | 
			
		||||
                        echo $reply;
 | 
			
		||||
                    ?>
 | 
			
		||||
                    '.$reply.'
 | 
			
		||||
                </div>
 | 
			
		||||
            </div>
 | 
			
		||||
        </section>
 | 
			
		||||
        <!-- Footer -->
 | 
			
		||||
        <?php
 | 
			
		||||
            $template->print_footer();
 | 
			
		||||
        ?>
 | 
			
		||||
        </section>';
 | 
			
		||||
 | 
			
		||||
    </body>
 | 
			
		||||
    //General page content:
 | 
			
		||||
    require RAIZ_APP.'/HTMLtemplate.php';
 | 
			
		||||
    
 | 
			
		||||
?>
 | 
			
		||||
 | 
			
		||||
</html>
 | 
			
		||||
 
 | 
			
		||||
@@ -21,14 +21,14 @@ class FormRegister extends Form {
 | 
			
		||||
        //$nombre = $datos['name'] ?? '';
 | 
			
		||||
 | 
			
		||||
        // Se generan los mensajes de error si existen.
 | 
			
		||||
        $htmlErroresGlobales2 = self::generaListaErroresGlobales($errores);
 | 
			
		||||
        $htmlErroresGlobales = self::generaListaErroresGlobales($errores);
 | 
			
		||||
        $errorNombre = self::createMensajeError($errores, 'name', 'span', array('class' => 'error'));
 | 
			
		||||
        $errorEmail = self::createMensajeError($errores, 'email', 'span', array('class' => 'error'));
 | 
			
		||||
        $errorPassword = self::createMensajeError($errores, 'pass', 'span', array('class' => 'error'));
 | 
			
		||||
        $errorPassword2 = self::createMensajeError($errores, 'repass', 'span', array('class' => 'error'));
 | 
			
		||||
 | 
			
		||||
        $html = "<div class='row'>
 | 
			
		||||
                            <fieldset id='datos_personales'><pre>".$htmlErroresGlobales2."</pre>
 | 
			
		||||
                            <fieldset id='datos_personales'><pre>".$htmlErroresGlobales."</pre>
 | 
			
		||||
                                <legend>Datos personales</legend>
 | 
			
		||||
                                <input type='text' name='name' id='name' value='' placeholder='Nombre' required/><pre>".$errorNombre."</pre>
 | 
			
		||||
                                <input type='email' name='email' id='email' value='' placeholder='Email' required/><pre>".$errorEmail."</pre>
 | 
			
		||||
@@ -114,7 +114,7 @@ class FormRegister extends Form {
 | 
			
		||||
                        <p>Ha ocurrido un problema y no hemos podido completar el registro</p>
 | 
			
		||||
                        <p>Vuelve a intetarlo o inicia sesión si tienes una cuenta de usuario.</p>
 | 
			
		||||
                        <a href='../login/'><button>Iniciar Sesión</button></a>
 | 
			
		||||
                        <form method='post' action='../login/'><button name='register' id='register'>Registro</button></form>\n";
 | 
			
		||||
                        <form method='post' action='../login/'><button name='register' id='_register'>Registro</button></form>\n";
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        return $reply;
 | 
			
		||||
 
 | 
			
		||||
@@ -6,48 +6,18 @@
 | 
			
		||||
    require_once('./includes/formRegister.php');
 | 
			
		||||
    $reply = FormRegister::getReply();
 | 
			
		||||
 | 
			
		||||
?>
 | 
			
		||||
<!DOCTYPE HTML>
 | 
			
		||||
<!--
 | 
			
		||||
    Práctica - Sistemas Web | Grupo D
 | 
			
		||||
    CompluCine - FDI-cines
 | 
			
		||||
-->
 | 
			
		||||
<html lang="es">
 | 
			
		||||
    <!-- Head -->
 | 
			
		||||
    <?php
 | 
			
		||||
        $template->print_head();
 | 
			
		||||
    ?>
 | 
			
		||||
    <body>
 | 
			
		||||
        <!-- Header -->
 | 
			
		||||
        <?php
 | 
			
		||||
            $template->print_header();
 | 
			
		||||
        ?>
 | 
			
		||||
 | 
			
		||||
        <!-- Main -->
 | 
			
		||||
        <?php
 | 
			
		||||
            $template->print_main();
 | 
			
		||||
        ?>
 | 
			
		||||
        
 | 
			
		||||
        <!-- Reply -->
 | 
			
		||||
    $section =  '<!-- Reply -->
 | 
			
		||||
    <section class="reply">
 | 
			
		||||
        <div class ="row">
 | 
			
		||||
            <div class="column side"></div>
 | 
			
		||||
            <div class="column middle">
 | 
			
		||||
                <div class="code info">
 | 
			
		||||
                        <?php
 | 
			
		||||
                            echo $reply;
 | 
			
		||||
                        ?>
 | 
			
		||||
                    '.$reply.'
 | 
			
		||||
                </div>
 | 
			
		||||
            </div>
 | 
			
		||||
            <div class="column side"></div>    
 | 
			
		||||
        </div>
 | 
			
		||||
        </section>
 | 
			
		||||
    </section>';
 | 
			
		||||
 | 
			
		||||
        <!-- Footer -->
 | 
			
		||||
        <?php
 | 
			
		||||
            $template->print_footer();
 | 
			
		||||
        ?>
 | 
			
		||||
 | 
			
		||||
    </body>
 | 
			
		||||
 | 
			
		||||
</html>
 | 
			
		||||
    require RAIZ_APP.'/HTMLtemplate.php';
 | 
			
		||||
?>
 | 
			
		||||
@@ -1,6 +1,19 @@
 | 
			
		||||
<?php
 | 
			
		||||
    //General Config File:
 | 
			
		||||
    require_once('../assets/php/config.php');
 | 
			
		||||
    
 | 
			
		||||
    /*
 | 
			
		||||
    //Page-specific content:
 | 
			
		||||
    $section = '<!-- Films -->
 | 
			
		||||
            <section id="films_billboard">
 | 
			
		||||
                <div class="row">
 | 
			
		||||
                '.$template->print_fimls().'
 | 
			
		||||
                </div>
 | 
			
		||||
            </section>';
 | 
			
		||||
 | 
			
		||||
    //General page content:
 | 
			
		||||
    require RAIZ_APP.'/HTMLtemplate.php';
 | 
			
		||||
    */
 | 
			
		||||
?>
 | 
			
		||||
<!DOCTYPE HTML>
 | 
			
		||||
<!--
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user