Ver Mensaje Individual
  #3 (permalink)  
Antiguo 18/02/2014, 10:02
robinson37
 
Fecha de Ingreso: marzo-2009
Mensajes: 44
Antigüedad: 15 años, 1 mes
Puntos: 1
Respuesta: Borrar registro

Gracias por tu pronta respuesta

Si mira el archivo completo


<?php
class BDUsuario {
private $Conector;
private $Sql;
public $Resultado;
private function Conectar($Host,$User,$Pass,$BaseDatos){
$this->Conector=mysqli_connect($Host,$User,$Pass,$BaseDa tos);
if($this->Conector->connect_errno > 0){
die('Error en la conexion: ' . mysqli_error());
}
}
public function Login($User,$Pass){
$this->Conectar("xxx.xxx.xxx","xxx","xxxx","xxxxx");
$this->Sql="CALL SP_MANEJOUSUARIO('$User','$Pass')";
$this->Resultado=$this->Conector->query($this->Sql);
$this->Conector->close();
return $this->Resultado;
}
public function Area()
{
$this->Conectar("xxx.xxx.xxx","xxx","xxxx","xxxxx");
$this->Sql="CALL SP_AREA()";
$this->Resultado=$this->Conector->query($this->Sql);
$this->Conector->close();
return $this->Resultado;
}
public function Rol()
{
$this->Conectar("xxx.xxx.xxx","xxx","xxxx","xxxxx");
$this->Sql="CALL SP_ROL()";
$this->Resultado=$this->Conector->query($this->Sql);
$this->Conector->close();
return $this->Resultado;
}
public function AgregarUsuario($Id_Usuario,$Nom_Usuario,$Apel_Usua rio,$Pass_Usuario,$Id_Rol,$Id_Area,$Desc_Cargo,$Ur l_Imagen)
{
$this->Conectar("xxx.xxx.xxx","xxx","xxxx","xxxxx");
$this->Sql="CALL SP_AGREGAR_USER('$Id_Usuario','$Nom_Usuario','$Ape l_Usuario','$Pass_Usuario','$Id_Rol','$Id_Area','$ Desc_Cargo','$Url_Imagen')";
$this->Conector->query($this->Sql);
$this->Conector->close();
}
public function ComprobarUsuario($Id_Usuario)
{
$this->Conectar("xxx.xxx.xxx","xxx","xxxx","xxxxx");
$this->Sql="CALL SP_COMPROBAR_USUARIO('$Id_Usuario')";
$this->Resultado=$this->Conector->query($this->Sql);
$this->Conector->close();
return $this->Resultado;
}
public function BuscarUsuario($Criterio_Busqueda,$Tipo_Busqueda)
{
$this->Conectar("xxx.xxx.xxx","xxx","xxxx","xxxxx");
$this->Sql="CALL SP_BUSCAR_USUARIO('$Criterio_Busqueda','$Tipo_Busq ueda')";
$this->Resultado=$this->Conector->query($this->Sql);
$this->Conector->close();
return $this->Resultado;
}
public function BorrarUsuario($Id_Usuario)
{
$this->Conectar("xxx.xxx.xxx","xxx","xxxx","xxxxx");
$this->Sql="CALL SP_BORRAR_USERUARIO('$Id_Usuario')";
$this->Conector->query($this->Sql);
$this->Conector->close();
return $this->Resultado;
}
}
?>