| Server IP : 74.208.250.37 / Your IP : 216.73.216.114 Web Server : Apache/2.4.58 (Ubuntu) System : Linux ubuntu 6.8.0-124-generic #124-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 13:00:45 UTC 2026 x86_64 User : miferval ( 1000) PHP Version : 8.3.6 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/aprendizajeodisea/admin/model/ |
Upload File : |
<?php
/**
* Model login
*/
class ModelLogin extends Model
{
public function createTableRegistro(){
$query = $this->dbli->query
("CREATE TABLE IF NOT EXISTS registro
(
id NULL,
dominio varchar(100) NULL,
nombre varchar(100) NULL,
username varchar(100) NOT NULL,
password varchar(100) NOT NULL,
email varchar(100) NOT NULL,
telefono varchar(15) NULL,
comentario text NULL,
confirmation_token varchar(100) NULL,
constraint pk_registro primary key (id)
)
");
return $query;
}
public function addRegistro($data){
$query = $this->dbli->query
("INSERT INTO registro
(
dominio,
nombre,
username,
password,
email,
telefono,
comentario,
confirmation_token
)
VALUES
(
'".$data['dominio']."',
'".$data['nombre']."',
'".$data['username']."',
'".$data['password']."',
'".$data['email']."',
'".$data['telefono']."',
'".$data['comentario']."',
'".$data['authenticity_token']."'
)
");
return $query;
}
public function checkRegistroEmail($email){
$query = $this->dbli->queryli
("SELECT username,email,password FROM registro WHERE email = '$email'");
return $query;
}
public function dropRegistros(){
$query = $this->dbli->query
("DROP TABLE registro");
}
public function getRegistros($dominio){
$query = $this->dbli->queryli
("SELECT nombre,email,telefono,comentario FROM registro WHERE dominio = '$dominio'");
return $query;
}
public function getRegistroByEmail($email){
$query = $this->dbli->queryli
("SELECT nombre,email,telefono,username,password,confirmation_token FROM registro WHERE email = '$email'");
return $query;
}
public function deleteRegistro($email){
$query = $this->dbli->queryli
("DELETE FROM registro WHERE email='$email'");
return $query;
}
}