Location: PHPKode > projects > O - OpenSource GroupWare > osgw/admin/service_install.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['add_header'] = FALSE;

include($here. "/class.admin.php");
$admin = new admin;

$location = $_GET['sv'];
include($O->dir ."/$location/data.php");

//Add service to database
$sql = "INSERT INTO o_services (code,location,sort_order,active, version) VALUES

//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')";
$service_location[] = $d;	

$handle = opendir($O->dir ."/$location/config/tables");
while (false !== ($file = readdir($handle))) 
	//Have to unset $fields to keep O from trying to add columns from previous tables
	//to the current table

	if(is_file($O->dir ."/$location/config/tables/$file") && $file != '.' &&  $file != '..' && !strstr($file, '~'))
		include($root_dir ."/$location/config/tables/$file");
		$sql = $db->create_table($table_name, $fields);

Return current item: O - OpenSource GroupWare