PHP Classes

File: uploady/admin/users/actions/delete.php

Recommend this page to a friend!
  Classes of Faris AL-Otabi   Uploady PHP Upload File to MySQL   uploady/admin/users/actions/delete.php   Download  
File: uploady/admin/users/actions/delete.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Uploady PHP Upload File to MySQL
Store file upload details in a MySQL database
Author: By
Last change: fix
Date: 4 months ago
Size: 526 bytes
 

Contents

Class file image Download
<?php
include_once '../../session.php';

if (
$_SERVER['REQUEST_METHOD'] == "POST") {
    if (!
$auth->checkToken($_POST['csrf'], $_SESSION['csrf'])) {
       
$utils->redirect($utils->siteUrl('/admin/users/view.php?msg=csrf'));
    }

    foreach (
$_POST['userid'] as $id) {
        if (
$data->id == $id) {
           
$utils->redirect($utils->siteUrl('/admin/users/view.php?msg=forbidden'));
        }
       
$user->delete((int) $id);
    }

   
$utils->redirect($utils->siteUrl('/admin/users/view.php?msg=user_deleted'));
}