Login   Register  
PHP Classes
elePHPant
Icontem

File: Security/Admin/_delete.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Michael J. Fuhrman  >  Security  >  Security/Admin/_delete.php  >  Download  
File: Security/Admin/_delete.php
Role: Example script
Content type: text/plain
Description: redirects the copy request to the appropriate php page - not implemented
Class: Security
Manage user accounts and access controls
Author: By
Last change:
Date: 3 years ago
Size: 1,364 bytes
 

Contents

Class file image Download
<?
/*    =======================================
    Copyright 1998 - 2010 - E Net Arch
    This program is distributed under the terms of the GNU
    General Public License (or the Lesser GPL).
    www.ENetArch.net
    ======================================= */

    
function dirPath() {return ("../../../"); }

    include_once (
dirPath() . "Shared/_app.inc");

Function 
php_Main ()
{
    
$nID 0;
    if (isset (
$_REQUEST["nID"]))
        
$nID $_REQUEST["nID"];

    
$szIDs "";
    if (isset (
$_REQUEST["szIDs"]))
        
$szIDs $_REQUEST["szIDs"];

    
$szNameSpace "ENetArch_Panel_Folder_DetailView";
    if (isset (
$_REQUEST["szNameSpace"]))
        
$szNameSpace $_REQUEST["szNameSpace"];

    
// ==========================================
    // Validations


    // ==========================================
    // Delete Item

    
if ($nID <> 0)
    {
        
$objItem gblLadder()->getItem ($nID);
        
$nParent $objItem->Parent();
        
$objItem->Delete();

        
$szParams =
            
"nID=" $nParent "&" .
            
"szNameSpace=" $szNameSpace "&";

        
header ("Location:_view.php?" $szParams);
        return;
    }

    
// ==========================================
    // Delete Items

    
$aryIDs parseString ($szIDs",");

    for (
$t=0$t<count ($aryIDs); $t++)
    {
        
$nID $aryIDs [$t];
        if (
$nID 0)
        {
            
$objItem gblLadder()->getItem ($nID);
            
$objItem->Delete();
        }
    }
}
?>