Mini Shell

Direktori : /home/sicomercio/domains/sicomerciomppa.com.br/public_html/adm/
Upload File :
Current File : /home/sicomercio/domains/sicomerciomppa.com.br/public_html/adm/excluirusuarios.php

<?
include"menu.php";



switch ($permissao)
{
case "2":
 
// excluir empresa do usuairo

// print_r($_POST);
$id = $_POST["id"]; 
$id = base64_decode($id);




// excluir usuairo 


include"conexao.php";

// Create connection
$conn = new mysqli($host, $user, $pass, $db);
// Check connection
if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
} 

// sql to delete a record
$sql = "DELETE FROM tab_usuario WHERE id_usuario=$id";
// echo"$sql";
if ($conn->query($sql) === TRUE) {
 
 
   
  
  
  
} else {
    echo "Error deleting record: " . $conn->error;
}

$conn->close();


 // exclui empresa  



include"conexao.php";

// Create connection
$conn = new mysqli($host, $user, $pass, $db);
// Check connection
if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
} 

// sql to delete a record
$sql = "DELETE FROM tab_empresa WHERE id_usuario=$id";
// echo"$sql";
if ($conn->query($sql) === TRUE) {
 
   echo"<script type='text/javascript'> 
    window.alert('EXCLUIDO COM SUCESSO!')
	setTimeout(function() {window.history.back()}, 1000);

   </script>";
   
   
  
  
  
} else {
    echo "Error deleting record: " . $conn->error;
}

$conn->close();









break;


default:
echo "<script>
alert('sem permissão! ');
 
</script>";
exit();
break;
}



?>



Zerion Mini Shell 1.0