Add files via upload
This commit is contained in:
@ -287,7 +287,7 @@ table a{
|
||||
.code a {
|
||||
text-decoration: underline;
|
||||
}
|
||||
.code ul {
|
||||
.code ul, .code ol {
|
||||
color: #dadada;
|
||||
}
|
||||
.code img{
|
||||
|
@ -1,13 +1,21 @@
|
||||
<?php
|
||||
// TO-DO: Completar
|
||||
class DAO {
|
||||
//Constants:
|
||||
private const _SERVERNAME = "localhost";
|
||||
private const _USERNAME = "sw";
|
||||
private const _PASSWORD = "_admin_";
|
||||
//private const _BD = "complucine";
|
||||
|
||||
//Atributes:
|
||||
public $mysqli;
|
||||
|
||||
public function __construct(){
|
||||
|
||||
//Constructor:
|
||||
public function __construct($bd_name){
|
||||
try{
|
||||
if (!$this->mysqli) {
|
||||
$this->mysqli = new mysqli('127.0.0.1', 'sw',
|
||||
'_admin_', 'complucine');
|
||||
$this->mysqli = new mysqli(_SERVERNAME, _USERNAME,
|
||||
_PASSWORD, $bd_name);
|
||||
}
|
||||
// echo "Conexión a la BD, satisfactoria.";
|
||||
} catch (Exception $e){
|
||||
@ -18,8 +26,11 @@
|
||||
/* ... */
|
||||
}
|
||||
|
||||
//Destructor:
|
||||
public function __destruct(){
|
||||
$this->mysqli->close();
|
||||
}
|
||||
|
||||
//Methods:
|
||||
}
|
||||
?>
|
@ -36,7 +36,7 @@
|
||||
case strpos($this->page, 'showtimes'): $this->page = 'Cartelera'; break;
|
||||
case strpos($this->page, 'cinemas'): $this->page = 'Nuestros Cines'; break;
|
||||
case strpos($this->page, 'about_us'): $this->page = 'Sobre FDI-Cines'; $this->prefix = '../../'; break;
|
||||
case strpos($this->page, 'terms'): $this->page = 'Terminos y Condiciones'; $this->prefix = '../../'; break;
|
||||
case strpos($this->page, 'terms'): $this->page = 'Términos y Condiciones'; $this->prefix = '../../'; break;
|
||||
case strpos($this->page, 'detalles'): $this->page = 'Detalles'; $this->prefix = '../../'; break;
|
||||
case strpos($this->page, 'bocetos'): $this->page = 'Bocetos'; $this->prefix = '../../'; break;
|
||||
case strpos($this->page, 'miembros'): $this->page = 'Miembros'; $this->prefix = '../../'; break;
|
||||
@ -44,7 +44,6 @@
|
||||
case strpos($this->page, 'contacto'): $this->page = 'Contacto'; break;
|
||||
default: $this->page = 'FDI-Cines'; $this->prefix = './'; break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//Returns page name:
|
||||
|
@ -2,14 +2,14 @@
|
||||
class UserDAO extends DAO {
|
||||
|
||||
//Constants:
|
||||
private $_USER = "user";
|
||||
private $_MANAGER = "manager";
|
||||
private $_ADMIN = "admin";
|
||||
private const _USER = "user";
|
||||
private const _MANAGER = "manager";
|
||||
private const _ADMIN = "admin";
|
||||
|
||||
//Attributes:
|
||||
|
||||
//Constructor:
|
||||
function __construct(){
|
||||
function __construct($bd_name){
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,6 @@
|
||||
<?php
|
||||
include_once('users_dto_interface.php');
|
||||
|
||||
class UserDTO implements UsersDTO {
|
||||
|
||||
//Attributes:
|
||||
@ -9,12 +11,12 @@
|
||||
private $_rol; //Type of user: user | manager | admin.
|
||||
|
||||
//Constructor:
|
||||
function __construct($id, $username, $email, $password, $roles){
|
||||
function __construct($id, $username, $email, $password, $rol){
|
||||
$this->_id = $id;
|
||||
$this->_username = $username;
|
||||
$this->_email = $email;
|
||||
$this->_password = $password;
|
||||
$this->_rol = $roles;
|
||||
$this->_rol = $rol;
|
||||
}
|
||||
|
||||
//Methods:
|
||||
|
Reference in New Issue
Block a user