PHP Classes

File: app/modules/scrapbook/delete_scrapbook.php

Recommend this page to a friend!
  Classes of Laudir Bispo   PHP Real Estate Website   app/modules/scrapbook/delete_scrapbook.php   Download  
File: app/modules/scrapbook/delete_scrapbook.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Real Estate Website
Manage the properties of a real estate business
Author: By
Last change:
Date: 3 years ago
Size: 928 bytes
 

Contents

Class file image Download
?<?PHP
session_name
(SESSION_NAME);
session_start();

require_once
$_SERVER['DOCUMENT_ROOT'].'/config/config.php';
require_once (
$_SERVER['DOCUMENT_ROOT'].'/config/public_functions.php');

if(
$_SESSION['level'] !== 3 and 2)
{
  die (
AlertsMensagens('warning', '<strong>'.$_SESSION['level'].' AÇÃO NÃO PERMITIDA!</strong> Você não tem autorização para completar esta ação.'));
}


if(empty(
$_POST['del']) or !isset($_POST['del']))
{
  die (
AlertsMensagens('warning', '<strong>Campo Vazio!</strong> Marque uma opção para continuar.'));
}
else
{
 
$ids = filter($_POST['del']);
 
}

function
filter( $dados )
{
 
$ids = Array();
    foreach(
$dados AS $dado ) $ids[] = (int)$dado;
    return
$ids;
}
 
require_once (
$_SERVER['DOCUMENT_ROOT'].'/controles/class/connect.class.php');
$con_db = new DB();
$con = $con_db->connect();
 
$delete = $con->query(' DELETE FROM `recados` WHERE `id` IN('.implode( ',', $ids ).') ');