Exemplo n.º 1
0
<?php

/*
 * This file is part of Infoschool - a web based school intranet.
 * Copyright (C) 2006 Maikel Linke
 */
include 'var.php';
$output->secure();
if (!isset($_GET['item'])) {
    redirect('./');
}
$item_id = (int) $_GET['item'];
$item = new fs_item($item_id);
if (!$item->right_delete()) {
    redirect('./');
}
$item->delete();
redirect('./?id=' . $item->data['rel_to']);
Exemplo n.º 2
0
function person_rm_files($pid)
{
    include_once '../files/class.php';
    global $db;
    $db->select('id from filesystem where owner="' . $pid . '"');
    $items = $db->data;
    foreach ($items as $i => $item_row) {
        $fs_item = new fs_item($item_row['id']);
        if ($fs_item->data['id'] == $item_row['id']) {
            $fs_item->delete();
        }
    }
}