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/excluirnoticia.php

<?
include"menu.php";
$idnoticia = $_POST["idnoticia"];
   $idnoticia = base64_decode($idnoticia);
   $idnoticia = base64_decode($idnoticia);
   
   
?>

<?php




switch ($permissao)
{
case "2":
 
break;


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
















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 noticias WHERE id=$idnoticia";
// echo"$sql";
if ($conn->query($sql) === TRUE) {
 
   echo"<script type='text/javascript'> 
    window.alert('EXCLUIDA COM SUCESSO!')
	setTimeout(function() {window.history.back()}, 1000);

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

$conn->close();

   
?>

Zerion Mini Shell 1.0