Location: PHPKode > projects > O - OpenSource GroupWare > osgw/config/install_services.php
<?php
/**************************************************************************
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2 of the License, or
   (at your option) any later version.

   @Authors:	Ryan Thompson(hide@address.com)
***************************************************************************/
$service['no_session'] = TRUE;
require('../config.inc.php');

$handle = opendir('../');
while (false !== ($d = readdir($handle))) 
{
	if(!in_array($d, $system_dirs) && is_dir($root_dir. "/".$d) && $d != 'osgw')
	{
		
		include("$root_dir/$d/data.php");
		//Add service to database
		$sql = "INSERT INTO o_services (code,location,sort_order,active, version) VALUES
			('{$service['code']}','$d','{$service['sort']}','1','{$service['version']}')";
		$db->query($sql);
		
		//Add default user rights for service (by default there's no access (0))
		$sql = "INSERT INTO o_user_rights (user_id, service, rights) 
			VALUES ('1','{$service['code']}','0')";
		$db->query($sql);
		$service_location[] = $d;
	}
	
}

header("Location: general_config.php");
Return current item: O - OpenSource GroupWare