2001-07-30 17:59:25 +02:00
< ? php
/************************************************************************** \
* phpGroupWare - Setup *
* http :// www . phpgroupware . org *
* -------------------------------------------- *
* 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 . *
\ **************************************************************************/
/* $Id$ */
2002-04-29 21:49:24 +02:00
$GLOBALS [ 'phpgw_info' ] = array ();
2001-11-21 16:01:43 +01:00
$GLOBALS [ 'phpgw_info' ][ 'flags' ] = array (
2001-07-30 17:59:25 +02:00
'noheader' => True ,
'nonavbar' => True ,
'currentapp' => 'home' ,
'noapi' => True
);
include ( './inc/functions.inc.php' );
// Authorize the user to use setup app and load the database
2002-03-03 22:53:00 +01:00
if ( ! $GLOBALS [ 'phpgw_setup' ] -> auth ( 'Config' ))
2001-07-30 17:59:25 +02:00
{
Header ( 'Location: index.php' );
exit ;
}
// Does not return unless user is authorized
2002-04-29 21:49:24 +02:00
if ( get_var ( 'cancel' , Array ( 'POST' )))
2001-07-30 17:59:25 +02:00
{
2001-11-21 16:01:43 +01:00
Header ( 'Location: index.php' );
2001-07-30 17:59:25 +02:00
exit ;
}
2002-03-03 22:53:00 +01:00
$tpl_root = $GLOBALS [ 'phpgw_setup' ] -> html -> setup_tpl_dir ( 'setup' );
2002-08-12 01:54:58 +02:00
$setup_tpl = CreateObject ( 'setup.Template' , $tpl_root );
2001-07-30 17:59:25 +02:00
$setup_tpl -> set_file ( array (
'ldap' => 'ldap.tpl' ,
'T_head' => 'head.tpl' ,
'T_footer' => 'footer.tpl' ,
'T_alert_msg' => 'msg_alert_msg.tpl'
));
2002-03-04 03:55:53 +01:00
$GLOBALS [ 'phpgw_setup' ] -> html -> show_header ( lang ( 'LDAP Config' ), '' , 'config' , $ConfigDomain );
2001-07-30 17:59:25 +02:00
2002-04-29 21:49:24 +02:00
if ( $GLOBALS [ 'error' ])
2001-07-30 17:59:25 +02:00
{
//echo '<br><center><b>Error:</b> '.$error.'</center>';
2002-04-29 21:49:24 +02:00
$GLOBALS [ 'phpgw_setup' ] -> html -> show_alert_msg ( 'Error' , $GLOBALS [ 'error' ]);
2001-07-30 17:59:25 +02:00
}
$setup_tpl -> set_block ( 'ldap' , 'header' , 'header' );
$setup_tpl -> set_block ( 'ldap' , 'jump' , 'jump' );
$setup_tpl -> set_block ( 'ldap' , 'cancel_only' , 'cancel_only' );
$setup_tpl -> set_block ( 'ldap' , 'footer' , 'footer' );
$setup_tpl -> set_var ( 'description' , lang ( 'LDAP Accounts Configuration' ));
$setup_tpl -> set_var ( 'lang_ldapmodify' , lang ( 'Modify an existing LDAP account store for use with phpGroupWare (for a new install using LDAP accounts)' ));
$setup_tpl -> set_var ( 'lang_ldapimport' , lang ( 'Import accounts from LDAP to the phpGroupware accounts table (for a new install using SQL accounts)' ));
$setup_tpl -> set_var ( 'lang_ldapexport' , lang ( 'Export phpGroupware accounts from SQL to LDAP' ));
2001-12-11 05:42:55 +01:00
$setup_tpl -> set_var ( 'lang_ldapdummy' , lang ( 'Setup demo accounts in LDAP' ));
2001-07-30 17:59:25 +02:00
$setup_tpl -> set_var ( 'ldapmodify' , 'ldapmodify.php' );
$setup_tpl -> set_var ( 'ldapimport' , 'ldapimport.php' );
$setup_tpl -> set_var ( 'ldapexport' , 'ldapexport.php' );
2001-12-11 05:42:55 +01:00
$setup_tpl -> set_var ( 'ldapdummy' , 'setup_demo.php' );
2001-07-30 17:59:25 +02:00
$setup_tpl -> set_var ( 'action_url' , 'index.php' );
$setup_tpl -> set_var ( 'cancel' , lang ( 'Cancel' ));
$setup_tpl -> pfp ( 'out' , 'header' );
$setup_tpl -> pfp ( 'out' , 'jump' );
$setup_tpl -> pfp ( 'out' , 'cancel_only' );
$setup_tpl -> pfp ( 'out' , 'footer' );
2001-11-21 16:01:43 +01:00
2002-03-03 22:53:00 +01:00
$GLOBALS [ 'phpgw_setup' ] -> html -> show_footer ();
2001-07-30 17:59:25 +02:00
?>