Login   Register  
PHP Classes
elePHPant
Icontem

File: Security/Admin/Group/User/add.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/Group/User/add.php  >  Download  
File: Security/Admin/Group/User/add.php
Role: Example script
Content type: text/plain
Description: Adds a user to the Group
Class: Security
Manage user accounts and access controls
Author: By
Last change:
Date: 2010-08-27 15:59
Size: 1,494 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() . "Marketing/Security/rootFolder.php");
    include_once (
dirPath() . "Shared/Classes/Ladder/Ladder_Ladder.cls");
    include_once (
dirPath() . "Marketing/Security/Classes/Security_Security.cls");
    include_once (
dirPath() . "Shared/_app.inc");

Function 
php_Main ()
{
    
$nID 1;
    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"];

    
// ==========================================
    // get Folders

    
$fldrRoot rootFolder();
    
$objFolder gblLadder()->getItem ($nID);

    
$objGroup = new ENetArch_Security_Group ();
    
$objGroup->setState ($objFolder);

    
// ==========================================
    // View

    
$aryIDs parseString ($szIDs",");

    for (
$t=0$t<count ($aryIDs); $t++)
    {
        
$nID $aryIDs [$t];
        if (
$nID 0)
        {
            
$fldrUser gblLadder()->getItem ($nID);
            
$objUser = new ENetArch_Security_User ();
            
$objUser->setState ($fldrUser);

            
$objGroup->add_User ($objUser);
        }
    }
}

?>