<?php
/* +----------------------------------------------------------------------+
| Netautor Professional Application Server |
+----------------------------------------------------------------------+
| Copyright (C) 1998-2005 digiconcept GmbH. <www.digiconcept.net> |
+----------------------------------------------------------------------+
| This file is subject to license, that is bundled with this package |
| in the file LICENSE.TXT, and is available at through the |
| world-wide-web at http://www.netautor.com/license/ |
| |
| If you did not receive a copy of the license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| hide@address.com so we can mail you a copy. |
+----------------------------------------------------------------------+
| Authors: Stefan Rottensteiner <hide@address.com> |
| Marek Kadziela <hide@address.com> |
| Gregor Wollner |
| Christian Unger |
| Helli Kleinhans |
+----------------------------------------------------------------------+
| @version $Revision: 1.10 $ |
+----------------------------------------------------------------------+*/
/**
* Group manager - executiv part
*/
require_once('../../include/init.inc');
if(!$GLOBALS['USER']->check_feature('Admin') && !$GLOBALS['USER']->check_feature('ac_user'))
{
$GLOBALS['USER']->login_call();
}
$GLOBALS['LOCALE']->textdomain('user');
includeNaPro('form');
error_reporting(255);
if(!empty($exchange))
{
$statemens=array();
$remove_id=array();
if(!empty($move_1))
{
foreach($move_1 as $idx=>$user_id)
{
if(empty($user_id)) continue;
$remove_id[] = $user_id;
}
if(!empty($remove_id))
$statements[]="DELETE FROM gto WHERE gto_group_id = {$gto_group_id} AND gto_user_id in ( ".implode(',',$remove_id)." )";
}
if(!empty($move_2))
{
foreach($move_2 as $idx=>$user_id)
{
if(empty($user_id)) continue;
$statements[]="INSERT INTO gto (gto_user_id,gto_group_id) values ({$user_id},{$gto_group_id})";
}
}
if(!empty($statements))
{
$sql_world->exec_multi($statements);
$statements=array();
}
}
include 'groupmanager.msk';
?>