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

mira el codigo completo de el achivo lo publique

hay te va de nuevo

Código PHP:
<?php  
    
class BDUsuario 
        private 
$Conector
        private 
$Sql
        public 
$Resultado
        private function 
Conectar($Host,$User,$Pass,$BaseDatos){ 
            
$this->Conector=mysqli_connect($Host,$User,$Pass,$BaseDatos); 
            if(
$this->Conector->connect_errno 0){ 
                die(
'Error en la conexion: ' mysqli_error()); 
            } 
        } 
        public function 
Login($User,$Pass){ 
            
$this->Conectar("x.","x","x","x"); 
            
$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("x","x","x","x"); 
            
$this->Sql="CALL SP_AREA()"
            
$this->Resultado=$this->Conector->query($this->Sql); 
            
$this->Conector->close(); 
            return 
$this->Resultado
        } 
        public function 
Rol() 
        { 
            
$this->Conectar("x","x","x","x"); 
            
$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_Usuario,$Pass_Usuario,$Id_Rol,$Id_Area,$Desc_Cargo,$Url_Imagen
        { 
            
$this->Conectar("x","x","x","x"); 
            
$this->Sql="CALL SP_AGREGAR_USER('$Id_Usuario','$Nom_Usuario','$Apel_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("x","x","x","x"); 
            
$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("x","xt","x","x"); 
            
$this->Sql="CALL SP_BUSCAR_USUARIO_1('$Criterio_Busqueda','$Tipo_Busqueda')"
            
$this->Resultado=$this->Conector->query($this->Sql); 
            
$this->Conector->close(); 
            return 
$this->Resultado
        } 
        public function 
BorrarUsuario($Id_Usuario
        { 
            
$this->Conectar("x","x","x","x"); 
            
$this->Sql="CALL SP_BORRAR_USERUARIO('$Id_Usuario')"
            
$this->Conector->query($this->Sql); 
            
$this->Conector->close(); 
             
        } 
    } 
?>