Location: PHPKode > projects > Netautor Professional > netautor/napro4/admin/install/setup_again.php
<?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.49 $										  |
   +----------------------------------------------------------------------+*/

/**
 * Reconfigure system.
 *
 * @author Stefan Rottensteiner
 */

if (!file_exists('../../../config/base.php') && empty($_POST['SETUP_CHECK']))
{
	Header('Location: setup.html');
	exit();
}

if(!isset($_POST['READ_CONFIG'])) $READ_CONFIG=1;
$_POST['SETUP_CHECK']=1;

include_once ('./setup.inc');
include_once ('../../include/init.inc');
includeNaPro('mversion');

$GLOBALS['LOCALE']->textdomain('install');

$installed_version = version_normalize(version_get($sql_world,'software','napro'));
if (version_compare($installed_version,SOFTWARE_VERSION_FULL,'ne')) {
	Header('Location: ./update_frame.html?cv='.$version_okay);
	exit();
}

if(!$GLOBALS['USER']->check_feature('Admin')) { $GLOBALS['USER']->login_call(); }

?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
	<meta name="Description" content="<?php echo SOFTWARE_NAME_FULL?> <?php echo SOFTWARE_VERSION_FULL?> Reconfiguration">
	<title><?php echo ($SETUP_LANGUAGE_TEXT['setup_again']);?></title>
	<link href="../../include/netautor.css" rel="stylesheet" type="TEXT/CSS" media="screen" >
	<script language="JavaScript">
	
	function checkCookieName(field){
		var current_name = field.value;
		var new_name 	 = '';
		for (i=0;i<current_name.length;i++){
			z = current_name.charAt(i);
			if (z==' ') z='';
			if (z=='.') z='_';
			new_name+=''+z;
		}
		
		if (new_name == '') new_name='powered_by_<?php echo SOFTWARE_NAME_SHORT;?>';
		field.value=new_name;
	}
	
	function changeIndexRoot(){
		var userIndexRoot = document.forms[0].elements['PATH_INDEX'].value;
	
		document.forms[0].elements['PATH_INDEX'].value = normalizePath(userIndexRoot);
		document.forms[0].elements['ERROR_PATH'].value='1';
		document.forms[0].submit();
	}
	function normalizePath(userGivenPath){ return userGivenPath; }
	</script>
	<script language="JavaScript1.2">
	function normalizePath(userGivenPath){
		if (!userGivenPath || userGivenPath=="") userGivenPath='/';
		var newPath = '';
		var lastChar= '';
		
		/*leftTrim*/
		i=0;
		while (userGivenPath.charAt(i)==" ") {i++;} if (i>0) userGivenPath=userGivenPath.substring(i);
		/*rightTrim*/
		i=userGivenPath.length;
		while (userGivenPath.charAt(i-1)==" ") {i--;}  if (i < userGivenPath.length) userGivenPath=userGivenPath.substr(0,i);
	
		for (i=0;i<userGivenPath.length;i++){
			/* Get character*/
			c = userGivenPath.charAt(i);
			/* Flip windows chars */
			if (c=='\\') c='/';
			/* Skip // */
			if (lastChar=='/' && c=='/') continue;
			/* Allowed char for name */
			newPath = newPath + c;
			lastChar = c;
		}
		/* Ensure leading / */
		if (newPath.charAt(1) != ':' && newPath.charAt(0)!= '/' ) newPath = '/'+newPath;
		/* Ensure ending / */
		if (newPath.charAt(newPath.length-1)!='/') 	newPath = newPath+'/';	
		return newPath;
	}
	</script>

</head>

<body bgcolor="#ffffff" class="standard">

<form method="post" action="setup_again.php">
<input type="hidden" name="ERROR_PATH" 	 	value="">
<input type="hidden" name="ERROR_DB" 	 	value="">
<input type="hidden" name="ERROR_LDAP" 	 	value="">
<input type="hidden" name="WRITE_CONFIG" 	value="">
<input type="hidden" name="READ_CONFIG" 	value="0">
<?php 
	if (!empty($READ_CONFIG))
	{
		unset($_POST['READ_CONFIG']);

		$PATH_CACHE			= $DC_ENV->cachepath;
		$PATH_LAYOUTS		= $DC_ENV->layoutspath;
		$PATH_EXTERNAL_FUNC	= $DC_ENV->external_func_path;
		$PATH_GRAFIX		= $DC_ENV->gfxpath;
		$PATH_COOKIE_NAME	= $DC_ENV->cookiename;
		$PATH_START			= $DC_ENV->startpath;
		$PATH_START_INDEX	= $DC_ENV->startindexpath;

// caching ...
		$CACHE_ALLOW		= (!empty($DC_ENV->allow_cache)) ? $DC_ENV->allow_cache : 'no';
		$CACHE_AUTO_NOTE	= (!empty($DC_ENV->auto_cache_note)) ? $DC_ENV->auto_cache_note : 'no';
		$CACHE_LIFE_TIME	= (!empty($DC_ENV->cache_life_time)) ? $DC_ENV->cache_life_time : '';
		$CACHE_REFERENCE	= (!empty($DC_ENV->cache_reference)) ? $DC_ENV->cache_reference : '';
		$CACHE_REFERENCE_SESSION	= (!empty($DC_ENV->cache_reference_session)) ? $DC_ENV->cache_reference_session : '';
		$CACHE_SERVER_MODE	= (!empty($DC_ENV->cache_server_mode)) ? $DC_ENV->cache_server_mode : '';
// ... caching

// ... debug
		$DEBUG_LEVEL		= (!empty($DC_ENV->debug_level)) ? intval($DC_ENV->debug_level) : $DC_ENV->debug_level;
// ... debug

// Version control
		$VERS_CONTROL		= (!empty($DC_ENV->vers_control)) ? $DC_ENV->vers_control : '';
		$VERS_CONTROL_COUNT	= (!empty($DC_ENV->vers_control_count)) ? $DC_ENV->vers_control_count : 10;

		$PATH_LOGS			= (empty($DC_ENV->logs_path) ? $DC_ENV->installpath.'logs/' : $DC_ENV->logs_path );
		if (!empty($DC_ENV->application_root))  	$PATH_APPLICATION_ROOT 		= $DC_ENV->application_root;
		if (!empty($DC_ENV->application_root_sub))  $PATH_APPLICATION_ROOT_SUB 	= $DC_ENV->application_root_sub;
		if (empty($PATH_INDEX)) $PATH_INDEX			= $DC_ENV->indexpath;

		$SQL_VENDOR		= $sql_conf['vendor'];
		$SQL_SID		= $sql_conf['sid'];
		$SQL_HOST		= $sql_conf['host'];
		$SQL_UID		= $sql_conf['uid'];
		$SQL_PWD		= $sql_conf['pwd'];
		$SQL_PCON		= $sql_conf['pcon'];

		@$SQL_WRITE_VENDOR		= $write_sql_conf['vendor'];
		@$SQL_WRITE_SID			= $write_sql_conf['sid'];
		@$SQL_WRITE_HOST		= $write_sql_conf['host'];
		@$SQL_WRITE_UID			= $write_sql_conf['uid'];
		@$SQL_WRITE_PWD			= $write_sql_conf['pwd'];
		@$SQL_WRITE_PCON		= $write_sql_conf['pcon'];

		if ( class_exists('ldap_conf') )
		{
			$temp = new ldap_conf();
			$LOGIN_ENGINE = (!empty($DC_ENV->LOGIN_ENGINE) && strtolower($DC_ENV->LOGIN_ENGINE) == 'ldap') ? 'ldap' : '' ;
			@$LDAP_HOST = strval($temp->host);
			@$LDAP_PORT = intval($temp->port);
			@$LDAP_PROTOCOL = intval($temp->protocoll);
			@$LDAP_LOGIN_DN = trim(strval($temp->login_dn));
			@$LDAP_LOGIN_PASSWD = trim(strval($temp->login_pass));
			@$LDAP_USES_DN = trim(strval($temp->use_dn));
		}
		else
		{
			$LOGIN_ENGINE = '';
			$LDAP_HOST = '';
			$LDAP_PORT = '';
			$LDAP_PROTOCOL = '';
			$LDAP_LOGIN_DN = '';
			$LDAP_LOGIN_PASSWD ='';
			$LDAP_USES_DN = '';
		}

		if ( empty($LDAP_PORT)) $LDAP_PORT = 389;
		if ( empty($LDAP_PROTOCOL)) $LDAP_PROTOCOL = 3;
	}
	echo(setup_getMyVars($_POST,'PATH_,SQL,LDAP_,LOGIN_,ERROR_,WRITE_,CACHE_'));

	if (!isset($PHP_SELF))			$PHP_SELF 			= getenv('PHP_SELF');

	if (!isset($SERVER_SOFTWARE))	$SERVER_SOFTWARE 	= getenv('SERVER_SOFTWARE');
	if (empty($SERVER_SOFTWARE)) 	$SERVER_SOFTWARE	= $_SERVER['SERVER_SOFTWARE'];

	if (!isset($PATH_TRANSLATED))	$PATH_TRANSLATED 	= getenv('PATH_TRANSLATED');
	if (empty($PATH_TRANSLATED)) 	$PATH_TRANSLATED	= $_SERVER['PATH_TRANSLATED'];
	if (empty($PATH_TRANSLATED)) 	$PATH_TRANSLATED	= $_SERVER['SCRIPT_FILENAME'];
	if (empty($PATH_TRANSLATED)) 	@$PATH_TRANSLATED	= __FILE__;

	if (!isset($DOCUMENT_ROOT))		$DOCUMENT_ROOT 		= getenv('DOCUMENT_ROOT');
	if (empty($DOCUMENT_ROOT)) 		$DOCUMENT_ROOT		= $_SERVER['DOCUMENT_ROOT'];

	if( strpos( $_SERVER['PHP_SELF'], 'php.exe') )	// Wenn php.exe im Pfad
	{
		$_SERVER['PHP_SELF'] = substr( strstr( $_SERVER['PHP_SELF'], '.exe' ), 4 );
	}

	$chop_this	= (strpos($PATH_TRANSLATED,'index.php') ? 'admin/install/index.php' : 'admin/install/setup_again.php' );

	if (empty($PATH_INSTALL)){
		if( strpos(strtolower($SERVER_SOFTWARE),'microsoft')!==false || strpos(strtolower($SERVER_SOFTWARE),'win32')!==false  || strpos(PHP_OS,'WIN') === 0) // Wenn NT-Server
		{
			$base_path 		= str_replace('//','/',str_replace ('\\','/',str_replace("\\",'/',$PATH_TRANSLATED)));
			$PATH_INSTALL	= substr( $base_path, 0, -strlen($chop_this) );
			$PATH_OS		= 'WINDOWS';
		}
		else	// Wenn kein NT-Server
		{
			$PATH_INSTALL 	= substr($PATH_TRANSLATED,0,-strlen($chop_this));
			$PATH_OS		= 'UNIX';
		}
	}

	if (empty($PATH_CONFIG)) $PATH_CONFIG	= dirname( $PATH_INSTALL ).'/config/';

	if (empty($REQUEST_URI)) $REQUEST_URI = getenv('REQUEST_URI');
	if (empty($REQUEST_URI)) $REQUEST_URI = $_SERVER['REQUEST_URI'];
	if (empty($REQUEST_URI)) $REQUEST_URI = $_SERVER['SCRIPT_NAME'];

	if (empty($PATH_INDEX)) $PATH_INDEX = substr($REQUEST_URI,0,-strlen($chop_this));

	$PATH_INDEX		= (substr($PATH_INDEX,0,1)=='/'?$PATH_INDEX:'/'.$PATH_INDEX);

	if (empty($PATH_APPLICATION_ROOT))  	$PATH_APPLICATION_ROOT 		= substr($PATH_INSTALL,0,-(strlen($PATH_INDEX))).'/';
	if (empty($PATH_APPLICATION_ROOT_SUB))  $PATH_APPLICATION_ROOT_SUB 	= substr($PATH_INSTALL,0,-(strlen('netautor/'.SOFTWARE_NAME_SHORT.'/')));
	if (empty($PATH_CACHE)) 			$PATH_CACHE			= dirname( $PATH_INSTALL ).'/cache/';
	if (empty($PATH_LAYOUTS)) 			$PATH_LAYOUTS		= dirname( $PATH_INSTALL ).'/layouts/';
	if (empty($PATH_LOGS)) 				$PATH_LOGS			= dirname( $PATH_INSTALL ).'/logs/';
	if (empty($PATH_EXTERNAL_FUNC)) 	$PATH_EXTERNAL_FUNC	= dirname( $PATH_INSTALL ).'/external/npf_lib/';
	if (empty($PATH_GRAFIX))			$PATH_GRAFIX		= $PATH_INDEX.'grafik/';
	if (empty($PATH_COOKIE_NAME))		$PATH_COOKIE_NAME	= 'powered_by_'.SOFTWARE_NAME_SHORT;

 	if(empty($PATH_START))				$PATH_START 		= substr($PATH_INSTALL	,0,-(strlen(SOFTWARE_NAME_SHORT.'/')));
 	if(empty($PATH_START_INDEX))		$PATH_START_INDEX 	= substr($PATH_INDEX	,0,-(strlen(SOFTWARE_NAME_SHORT.'/')));


	if (!empty($_POST['WRITE_CONFIG']))
	{

// caching ...
		if(empty($CACHE_ALLOW)) 
			$CACHE_ALLOW = 'no';
		if(empty($CACHE_AUTO_NOTE) || empty($CACHE_ALLOW) || strtolower($CACHE_ALLOW) == 'no') 
			$CACHE_AUTO_NOTE = 'no';
// ... caching

// Version control
		if(!empty($VERS_CONTROL) && empty($VERS_CONTROL_COUNT)) $VERS_CONTROL_COUNT = 10;

/* write_sql_conf */ 

if (empty($SQL_WRITE_VENDOR))
{
	$temp	=	'';
}
else
{
	$temp=	"
\$write_sql_conf=array(
	'vendor'=>'{$SQL_WRITE_VENDOR}',	// Indentify used DBMS
	'sid'	=>'{$SQL_WRITE_SID}',		// Name of Tablespace
	'host'	=>'{$SQL_WRITE_HOST}',		// DBMS resides on this server / ODBC-Name
	'uid'	=>'{$SQL_WRITE_UID}',		// User name for DB connection
	'pwd'	=>'{$SQL_WRITE_PWD}',		// Password for DB connection
	'pcon'	=>".( empty($SQL_WRITE_PCON) ? 'false' : 'true' )." 
);
";
}


$LOGIN_ENGINE = (!empty($LOGIN_ENGINE) && strtolower($LOGIN_ENGINE) == 'ldap') ? 'ldap' : '' ;

$temp.='class ldap_conf
{
';
	$temp.=' var $host =\''.( empty($LDAP_HOST) ? '' : $LDAP_HOST ).'\';'."\r\n";
	$temp.=' var $port =\''.( empty($LDAP_PORT) ? '389' : $LDAP_PORT ).'\';'."\r\n";
	$temp.=' var $protocoll =\''.( empty($LDAP_PROTOCOL) ? '3' : $LDAP_PROTOCOL ).'\';'."\r\n";
	$temp.=' var $login_dn =\''.( empty($LDAP_LOGIN_DN) ? '' : $LDAP_LOGIN_DN ).'\';'."\r\n";
	$temp.=' var $login_pass =\''.( empty($LDAP_LOGIN_PASSWD) ? '' : $LDAP_LOGIN_PASSWD ).'\';'."\r\n";
	$temp.=' var $use_dn =\''.( empty($LDAP_USES_DN) ? '' : $LDAP_USES_DN ).'\';'."\r\n";

	$temp.=' function ldap_conf() {	return true; }
}
';

		$file_content	= "<?php
/***************************************************
* ".SOFTWARE_NAME_FULL." ".SOFTWARE_VERSION_FULL."
* Created on ".(date('d.m.Y H:i:s'))."
* DO NOT EDIT THIS FILE MANUALLY!!
* IT'S AUTOMATICLY CREATED !!
***************************************************/
\$sql_conf=array(
	'vendor'=>'{$SQL_VENDOR}',	// Indentify used DBMS
	'sid'	=>'{$SQL_SID}',		// Name of Tablespace
	'host'	=>'{$SQL_HOST}',	// DBMS resides on this server / ODBC-Name
	'uid'	=>'{$SQL_UID}',		// User name for DB connection
	'pwd'	=>'{$SQL_PWD}',		// Password for DB connection
	'pcon'	=>".( empty($SQL_PCON) ? 'false' : 'true' )." 
);

{$temp}

class dcenv
{
 var \$os					= '{$PATH_OS}';						// UNIX ( includes MAc OS) and WINDOWS 
 var \$cookiename			= '{$PATH_COOKIE_NAME}';			// Name of cookie to identfy your application
 var \$installpath			= '{$PATH_INSTALL}';				// Installation path up to napro4
 var \$cachepath				= '{$PATH_CACHE}';					// Patch for cache and session files
 var \$tablepath				= '{$PATH_CACHE}tables/';			// Path to cache sql table definitions
 var \$docucache				= '{$PATH_CACHE}docu/';				// Path to cache the documentation
 var \$logs_path				= '{$PATH_LOGS}';					// Path to various log-files 
 var \$startpath				= '{$PATH_START}';
 var \$includepath			= '{$PATH_INSTALL}include/';
 var \$application_root 		= '{$PATH_APPLICATION_ROOT}';		// Corrected DOCUMENT_ROOT
 var \$application_root_sub 	= '{$PATH_APPLICATION_ROOT_SUB}';	// Corrected DOCUMENT_ROOT - extended  
 var \$external_func_path	= '{$PATH_EXTERNAL_FUNC}';			// Path to user defined Netautor functions
 var \$layoutspath			= '{$PATH_LAYOUTS}';				// Path to compiled layouts
 var \$gfxpath				= '{$PATH_GRAFIX}';					// Path to the grafix
 var \$indexpath				= '{$PATH_INDEX}';
 var \$startindexpath		= '{$PATH_START_INDEX}';
// *** CACHE *** 
 var \$allow_cache			= '{$CACHE_ALLOW}';			// Cache allowed 'yes' or 'no'
 var \$cache_life_time		= '{$CACHE_LIFE_TIME}';			// Cache update intervall in seconds
 var \$auto_cache_note		= '{$CACHE_AUTO_NOTE}';			// Cache automatic 'yes' or 'no'
 var \$cache_reference		= '{$CACHE_REFERENCE}';			// Cache reference fields, separated with komma
 var \$cache_reference_session		= '{$CACHE_REFERENCE_SESSION}';			// Cache reference session fields, separated with komma
 var \$cache_server_mode		= '{$CACHE_SERVER_MODE}';			// Cache server mode, 'cms' or 'web'
 											// cache on 'cms' is permanent off
// *** DEBUG ***
 var \$debug_level			= '{$DEBUG_LEVEL}';			// Debug-Level. empty = Off, 0 = PHP Runtime only, 1 = Under certain circumstances, 2 = Allways
 var \$vers_control			= '{$VERS_CONTROL}';			// Version control	empty = Off, 1 = On
 var \$vers_control_count	= '{$VERS_CONTROL_COUNT}';		// Version control counter (Default is 10)

 var \$login_engine	= '{$LOGIN_ENGINE}'; // Insert 'ldap' of leave it blank
}
?>";

		$file_path	=	"{$PATH_CONFIG}base.php";

		if (file_exists($file_path)) 
		{
			// Datei existiert
			$backup_file_path	=	dirname($file_path).'/base.backup.'.(date('Ymd',time())).'.php';
			copy($file_path,$backup_file_path);
		}

		$file_handle	= fopen($file_path,'wb');
		if ($file_handle)
		{	// Schreibe neue base.php
			$fwrite_result = fwrite($file_handle,$file_content,strlen($file_content));
			fclose($file_handle);
			$message[]='<span class="textgreen">'.$GLOBALS['LOCALE']->gettext('msg_config_write_okay').'</span>';
		}
		else
		{ echo 3;
			$message[]=$GLOBALS['LOCALE']->gettext('msg_config_write_error');
			// Fehler beim Öffnen der base.php zum Schreiben
		}

	}

	if (empty($SQL_VENDOR)) 	$SQL_VENDOR	='mysql';
	if (empty($SQL_HOST)) 		$SQL_HOST	='';
	if (empty($SQL_PCON)) 		$SQL_PCON	='';
	if (empty($SQL_UID)) 		$SQL_UID	='';
	if (!isset($SQL_PWD)) 		$SQL_PWD	='';
	if (empty($SQL_SID)) 		$SQL_SID	='';

	if (empty($SQL_WRITE_VENDOR)) 	$SQL_WRITE_VENDOR	='';
	if (empty($SQL_WRITE_HOST)) 	$SQL_WRITE_HOST	='';
	if (empty($SQL_WRITE_PCON)) 	$SQL_WRITE_PCON	='';
	if (empty($SQL_WRITE_UID)) 		$SQL_WRITE_UID	='';
	if (!isset($SQL_WRITE_PWD)) 	$SQL_WRITE_PWD	='';
	if (empty($SQL_WRITE_SID)) 		$SQL_WRITE_SID	='';

	$extension_exists	=	true;
	switch ($SQL_VENDOR)
	{
		case	'mysql':	$extension_exists	= function_exists('mysql_connect') ; break;
		case	'mysqli':	$extension_exists	= function_exists('mysqli_connect') ; break;
		case	'oci_817':	$extension_exists	= function_exists('OCIPLogon') ; break;
		case	'oci':		$extension_exists	= function_exists('OCIPLogon') ; break;
		case	'odbc':		$extension_exists	= function_exists('odbc_connect') ; break;
		case	'mssql':	$extension_exists	= function_exists('mssql_connect') ; break;
		case	'informix':	$extension_exists	= function_exists('ifx_connect') ; break;
		case	'pgsql':	$extension_exists	= function_exists('pg_connect') ; break;
	}
	if (!$extension_exists)	$message[]= $GLOBALS['LOCALE']->gettext('msg_missing_extension');

?>

<table width="975" border="0" cellspacing="0" cellpadding="0">
<input type="hidden" name="PATH_START_INDEX" 	value="<?php echo $PATH_START_INDEX;?>">
<input type="hidden" name="PATH_START" 			value="<?php echo $PATH_START;?>">	
<input type="hidden" name="PATH_APPLICATION_ROOT_SUB" 	value="<?php echo $PATH_APPLICATION_ROOT_SUB;?>">


		
	<tr>
		<td width="482" align="left" valign="top">
			<table width="482" border="0" cellspacing="0" cellpadding="4" class="bgwindow482">
				<tr>
					<td width="474" colspan="2" align="left" valign="top" class="head">
						<img src="../../grafik/pixel.gif" width="1" height="7"><br>
						<?php echo( $GLOBALS['LOCALE']->gettext('set_filesystem') ); ?><br>
						<img src="../../grafik/spacer_474.gif" width="474" height="24"><br>
					</td>
				</tr>
				<tr>
					<td width="155" align="left" valign="center" class="text">
						<?php echo( $GLOBALS['LOCALE']->gettext('os') ); ?><br>
					</td>
					<td width="327" align="left" valign="center" class="text">
						<input type="hidden" name="PATH_OS" value="<?php echo $PATH_OS; ?>" >
						<?php echo $PATH_OS; ?>
						<br>
					</td>
				</tr>
				<tr>
					<td width="155" align="left" valign="center" class="text">
						<label for="PATH_APPLICATION_ROOT"><?php echo( $GLOBALS['LOCALE']->gettext('appl_path') ); ?></label><br>
					</td>
					<td width="327" align="left" valign="center" class="text">
						<?php echo $PATH_APPLICATION_ROOT;?>
						<input onChange="this.form.elements['ERROR_PATH'].value='1';this.value=normalizePath(this.value);" class="input319" type="hidden" maxlength="250" value="<?php echo(htmlspecialchars($PATH_APPLICATION_ROOT));?>" name="PATH_APPLICATION_ROOT" id="PATH_APPLICATION_ROOT"><br>
					</td>
				</tr>				
				<tr>
					<td width="155" align="left" valign="center" class="text">
						<label for="PATH_INSTALL"><?php echo( $GLOBALS['LOCALE']->gettext('install_path') ); ?></label><br>
					</td>
					<td width="327" align="left" valign="center" class="text">
						<?php echo $PATH_INSTALL;?>
						<input onChange="this.form.elements['ERROR_PATH'].value='1';this.value=normalizePath(this.value);" class="input319" type="hidden" maxlength="250" value="<?php echo(htmlspecialchars($PATH_INSTALL));?>" name="PATH_INSTALL" id="PATH_INSTALL"><br>
					</td>
				</tr>
				<tr>
					<td width="155" align="left" valign="center" class="text">
						<label for="PATH_CONFIG"><?php echo( $GLOBALS['LOCALE']->gettext('config_path') ); ?></label><br>
					</td>
					<td width="327" align="left" valign="center" class="text">
						<?php echo $PATH_CONFIG;?>
						<input onChange="this.form.elements['ERROR_PATH'].value='1';this.value=normalizePath(this.value);" class="input319" type="hidden" maxlength="250" value="<?php echo(htmlspecialchars($PATH_CONFIG));?>" name="PATH_CONFIG" id="PATH_CONFIG"><br>
					</td>
				</tr>
				<tr>
					<td width="155" align="left" valign="center" class="text">
						<label for="PATH_INDEX"><?php echo( $GLOBALS['LOCALE']->gettext('webroot_path') ); ?></label><br>
					</td>
					<td width="327" align="left" valign="center" class="text">
						<?php echo $PATH_INDEX;?>
						<input onChange="this.value=normalizePath(this.value);changeIndexRoot();" class="input319" type="hidden" value="<?php echo(htmlspecialchars($PATH_INDEX));?>" name="PATH_INDEX" id="PATH_INDEX"><br>
					</td>
				</tr>
				<tr>
					<td width="155" align="left" valign="center" class="text">
						<label for="PATH_GRAFIX"><?php echo( $GLOBALS['LOCALE']->gettext('image_path') ); ?></label><br>
					</td>
					<td width="327" align="left" valign="center" class="text">
						<?php echo $PATH_GRAFIX;?>
						<input onChange="this.form.elements['ERROR_PATH'].value='1';this.value=normalizePath(this.value);" class="input319" type="hidden" value="<?php echo(htmlspecialchars($PATH_GRAFIX));?>" name="PATH_GRAFIX" id="PATH_GRAFIX"><br>
					</td>
				</tr>				
				<tr>
					<td width="155" align="left" valign="center" class="text">
						<label for="PATH_CACHE"><?php echo( $GLOBALS['LOCALE']->gettext('cache_path') ); ?></label><br>
					</td>
					<td width="327" align="left" valign="center" class="text">
						<input onChange="this.form.elements['ERROR_PATH'].value='1';this.value=normalizePath(this.value);" class="input319" type="text" value="<?php echo(htmlspecialchars($PATH_CACHE));?>" name="PATH_CACHE" id="PATH_CACHE"><br>
					</td>
				</tr>
				<tr>
					<td width="155" align="left" valign="center" class="text">
						<label for="PATH_LAYOUTS"><?php echo( $GLOBALS['LOCALE']->gettext('layout_path') ); ?></label><br>
					</td>
					<td width="327" align="left" valign="center" class="text">
						<input onChange="this.form.elements['ERROR_PATH'].value='1';this.value=normalizePath(this.value);" class="input319" type="text" value="<?php echo(htmlspecialchars($PATH_LAYOUTS));?>" name="PATH_LAYOUTS" id="PATH_LAYOUTS"><br>
					</td>
				</tr>
				<tr>
					<td width="155" align="left" valign="center" class="text">
						<label for="PATH_LOGS"><?php echo( $GLOBALS['LOCALE']->gettext('log_path') ); ?></label><br>
					</td>
					<td width="327" align="left" valign="center" class="text">
						<input onChange="alert(this.value); this.form.elements['ERROR_PATH'].value='1';this.value=normalizePath(this.value);" class="input319" type="text" value="<?php echo(htmlspecialchars($PATH_LOGS));?>" name="PATH_LOGS" id="PATH_LOGS"><br>
					</td>
				</tr>
				<tr>
					<td width="155" align="left" valign="center" class="text">
						<label for="PATH_EXTERNAL_FUNC"><?php echo( $GLOBALS['LOCALE']->gettext('function_path') ); ?></label><br>
					</td>
					<td width="327" align="left" valign="center" class="text">
						<input onChange="this.form.elements['ERROR_PATH'].value='1';this.value=normalizePath(this.value);" class="input319" type="text" value="<?php echo(htmlspecialchars($PATH_EXTERNAL_FUNC));?>" name="PATH_EXTERNAL_FUNC" id="PATH_EXTERNAL_FUNC"><br>
					</td>
				</tr>
				<tr>
					<td width="155" align="left" valign="center" class="text">
						<br>
					</td>
					<td width="327" align="left" valign="center" class="text">
						<input type="button" value="<?php echo( $GLOBALS['LOCALE']->gettext('button_test_path') ); ?>" class="buttonsmall" onClick="doTheDirTest();"><br>
					</td>
				</tr>
				<tr>
					<td colspan="2" width="482" align="left" valign="center" class="text">
						<img src="../../grafik/pixelgrey.gif" width="474" height="1"><br>
					</td>
				</tr>
				<tr>
					<td width="155" align="left" valign="center" class="text">
						<label for="PATH_COOKIE_NAME"><?php echo( $GLOBALS['LOCALE']->gettext('cookie_name') ); ?></label><br>
					</td>
					<td width="327" align="left" valign="center" class="text">
						<input onChange="this.form.elements['ERROR_PATH'].value='1';checkCookieName(this);" class="input136" type="text" maxlength="32" value="<?php echo(htmlspecialchars($PATH_COOKIE_NAME));?>" name="PATH_COOKIE_NAME" id="PATH_COOKIE_NAME"><br>
					</td>
				</tr>
				<tr>
					<td colspan="2" width="482" align="left" valign="center" class="text">
						<img src="../../grafik/pixelgrey.gif" width="474" height="1"><br>
					</td>
				</tr>
				<tr>
					<td width="155" align="left" valign="center" class="text">
						<?php echo( $GLOBALS['LOCALE']->gettext('allow_cache') ); ?><br>
					</td>
					<td width="327" align="left" valign="center" class="text">
					
						<table border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td width="27" align="left" valign="center" class="text">
									<input type="Checkbox" value="yes" name="CACHE_ALLOW" <?php if(!empty($CACHE_ALLOW) && strtolower($CACHE_ALLOW) != 'no') echo('checked'); ?>><br>
								</td>
								<td width="140" align="left" valign="center" class="text">
									<input type="text" class="input136" style="text-align:right" name="CACHE_LIFE_TIME" id="CACHE_LIFE_TIME" value="<?php if(!empty($CACHE_LIFE_TIME)) echo($CACHE_LIFE_TIME);?>"><br>
								</td>
								<td align="left" valign="center" class="text">
									<?php echo( $GLOBALS['LOCALE']->gettext('cache_life_time') ); ?><br>
								</td>
							</tr>
						</table>
						
					</td>
				</tr>
				<tr>
					<td width="155" align="left" valign="center" class="text">
						<?php echo( $GLOBALS['LOCALE']->gettext('auto_cache_note') ); ?><br>
					</td>
					<td width="327" align="left" valign="center" class="text">
					
						<table border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td width="27" align="left" valign="center" class="text">
									<input type="Checkbox" value="yes" name="CACHE_AUTO_NOTE" <?php if(!empty($CACHE_AUTO_NOTE) && strtolower($CACHE_AUTO_NOTE) != 'no') echo('checked'); ?>><br>
								</td>
								<td align="left" valign="center" class="text" width="300" >
									<table border="0" width="100%" align="left" >
										<tr>
											<td class="text"><input type="text" class="input136" name="CACHE_REFERENCE" id="CACHE_REFERENCE"  value="<?php if(!empty($CACHE_REFERENCE)) echo($CACHE_REFERENCE);?>"><br></td>
											<td class="text"><?php echo( $GLOBALS['LOCALE']->gettext('cache_reference') ); ?><br></td>
										</tr>
										<tr>
											<td class="text"><input type="text" class="input136" name="CACHE_REFERENCE_SESSION" id="CACHE_REFERENCE_SESSION" value="<?php if(!empty($CACHE_REFERENCE_SESSION)) echo($CACHE_REFERENCE_SESSION);?>"><br></td>
											<td class="text"><?php echo( $GLOBALS['LOCALE']->gettext('cache_reference_session') ); ?><br></td>
										</tr>
									</table>
								</td>
							</tr>
						</table>
					
					</td>
				</tr>
				<tr>
					<td width="155" align="left" valign="center" class="text">
						<?php echo( $GLOBALS['LOCALE']->gettext('cache_server_mode') ); ?><br>
					</td>
					<td width="327" align="left" valign="center" class="text">
					
						<table border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td width="27" align="left" valign="center" class="text">
									<input type="Radio" value="cms" name="CACHE_SERVER_MODE" <?php if(!empty($CACHE_SERVER_MODE) && strtolower($CACHE_SERVER_MODE) == 'cms') echo('checked'); ?>><br>
								</td>
								<td width="50" align="left" valign="center" class="text">
									<?php echo( $GLOBALS['LOCALE']->gettext('cache_server_mode_cms') ); ?><br>
								</td>
								<td width="27" align="left" valign="center" class="text">
									<input type="Radio" value="web" name="CACHE_SERVER_MODE" <?php if(!empty($CACHE_SERVER_MODE) && strtolower($CACHE_SERVER_MODE) == 'web') echo('checked'); ?>><br>
								</td>
								<td width="50" align="left" valign="center" class="text">
									<?php echo( $GLOBALS['LOCALE']->gettext('cache_server_mode_web') ); ?><br>
								</td>
								<td width="27" align="left" valign="center" class="text">
									<input type="Radio" value="" name="CACHE_SERVER_MODE" <?php if(empty($CACHE_SERVER_MODE)) echo('checked'); ?>><br>
								</td>
								<td width="50" align="left" valign="center" class="text">
									<?php echo( $GLOBALS['LOCALE']->gettext('cache_server_mode_no') ); ?><br>
								</td>
							</tr>
						</table>
					
					</td>
				</tr>
				<tr>
					<td colspan="2" width="482" align="left" valign="center" class="text">
						<img src="../../grafik/pixelgrey.gif" width="474" height="1"><br>
					</td>
				</tr>
				<tr>
					<td width="155" align="left" valign="center" class="text">
						<?php echo( $GLOBALS['LOCALE']->gettext('debug_level') ); ?><br>
					</td>
					<td width="327" align="left" valign="center" class="text">
						<table border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td width="27" align="left" valign="center" class="text">
									<input type="radio" value="" name="DEBUG_LEVEL" <?php if(empty($DEBUG_LEVEL) && $DEBUG_LEVEL != '0' ) echo('checked'); ?>><br>
								</td>
								<td  width="50" align="left" valign="center" class="text">
									<?php echo( $GLOBALS['LOCALE']->gettext('debug_level_never') ); ?><br>
								</td>								
								<td width="27" align="left" valign="center" class="text">
									<input type="radio" value="0" name="DEBUG_LEVEL" <?php if($DEBUG_LEVEL == '0' ) echo('checked'); ?>><br>
								</td>
								<td  width="50" align="left" valign="center" class="text">
									<?php echo( $GLOBALS['LOCALE']->gettext('debug_level_runtime') ); ?><br>
								</td>		
								<td width="27" align="left" valign="center" class="text">
									<input type="radio" value="2" name="DEBUG_LEVEL" <?php if( $DEBUG_LEVEL == 2 ) echo('checked'); ?>><br>
								</td>
								<td width="50" align="left" valign="center" class="text">
									<?php echo( $GLOBALS['LOCALE']->gettext('debug_level_dependent') ); ?><br>
								</td>
								<td width="27" align="left" valign="center" class="text">
									<input type="radio" value="1" name="DEBUG_LEVEL" <?php if( $DEBUG_LEVEL == 1 ) echo('checked'); ?>><br>
								</td>
								<td width="50" align="left" valign="center" class="text">
									<?php echo( $GLOBALS['LOCALE']->gettext('debug_level_allways') ); ?><br>
								</td>
							</tr>
						</table>
					</td>
				</tr>
				<tr>
					<td colspan="2" width="482" align="left" valign="center" class="text">
						<img src="../../grafik/pixelgrey.gif" width="474" height="1"><br>
					</td>
				</tr>

<?php // Versions check ?>
				<tr>
					<td width="155" align="left" valign="center" class="text">
						<?php echo( $GLOBALS['LOCALE']->gettext('vers_control') ); ?><br>
					</td>
					<td width="327" align="left" valign="center" class="text">
						<table border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td width="27" align="left" valign="center" class="text">
									<input type="radio" value="" name="VERS_CONTROL" <?php if(empty($VERS_CONTROL) ) echo('checked'); ?>><br>
								</td>
								<td  width="50" align="left" valign="center" class="text">
									<?php echo( $GLOBALS['LOCALE']->gettext('vers_control_off') ); ?><br>
								</td>								
								<td width="27" align="left" valign="center" class="text">
									<input type="radio" value="1" name="VERS_CONTROL" <?php if($VERS_CONTROL == '1' ) echo('checked'); ?>><br>
								</td>
								<td  width="50" align="left" valign="center" class="text">
									<?php echo( $GLOBALS['LOCALE']->gettext('vers_control_on') ); ?><br>
								</td>		
								<td  width="70" align="left" valign="center" class="text">
									<input type="text" class="input60" style="text-align:right" name="VERS_CONTROL_COUNT" value="<?php if(!empty($VERS_CONTROL_COUNT)) echo($VERS_CONTROL_COUNT); ?>"><br>
								</td>	
								<td  width="84" align="left" valign="center" class="text">
									<?php echo( $GLOBALS['LOCALE']->gettext('vers_control_count') ); ?><br>
								</td>	
							</tr>
						</table>
					</td>
				</tr>
				
				<tr>
					<td colspan="2" width="482" align="left" valign="center" class="text">
						<img src="../../grafik/pixelgrey.gif" width="474" height="1"><br>
					</td>
				</tr>
<?php // ... debug ?>								
				<tr>
					<td colspan="2" width="482" align="center" valign="top" class="text">
						<img src="../../grafik/pixel.gif" width="1" height="3"><br>
						<?php if ($extension_exists) :?>
						<input type="button" value="<?php echo( $GLOBALS['LOCALE']->gettext('button_save') ); ?>" class="create" onClick="writeConfigFile();">&nbsp;<br>
						<?php endif; ?>
					</td>
				</tr>
				<tr>
					<td width="155"><img src="../../grafik/pixel.gif" width="147" height="1"><br></td>
					<td width="327"><img src="../../grafik/pixel.gif" width="319" height="1"><br></td>
				</tr>
			</table>
			<img src="../../grafik/bgwindow_482_stop.gif" width="482" height="14"><br>
		</td>
		<td width="11"></td>
		<td width="480" align="left" valign="top">
			<input type="hidden"	name="SQL_WRITE_VENDOR"	value="<?php echo $SQL_WRITE_VENDOR; ?>" >
			<input type="hidden"	name="SQL_WRITE_HOST"	value="<?php echo $SQL_WRITE_HOST; ?>" >
			<input type="hidden"	name="SQL_WRITE_PCON"	value="<?php echo $SQL_WRITE_PCON; ?>" >
			<input type="hidden"	name="SQL_WRITE_UID"	value="<?php echo $SQL_WRITE_UID; ?>" >
			<input type="hidden"	name="SQL_WRITE_PWD"	value="<?php echo $SQL_WRITE_PWD; ?>" >
			<input type="hidden"	name="SQL_WRITE_SID"	value="<?php echo $SQL_WRITE_SID; ?>" >
			<table width="482" border="0" cellspacing="0" cellpadding="4" class="bgwindow482">
				<tr>
					<td width="474" colspan="2" align="left" valign="top" class="head">
						<img src="../../grafik/pixel.gif" width="1" height="7"><br>
						<?php echo( $GLOBALS['LOCALE']->gettext('set_db_connect') ); ?><br>
						<img src="../../grafik/spacer_474.gif" width="474" height="24"><br>
					</td>
				</tr>
				<tr>
					<td width="155" align="left" valign="center" class="text">
						<label for="SQL_VENDOR"><?php echo( $GLOBALS['LOCALE']->gettext('db_type') ); ?></label><br>
					</td>
					<td width="327" align="left" valign="center" class="text">
						<select name="SQL_VENDOR" id="SQL_VENDOR" class="select" onChange="db_choosen(this.options[this.options.selectedIndex].value);">
							<option value='mysql' 		<?php if ($SQL_VENDOR=='mysql' || empty($SQL_VENDOR)) 	echo ('selected');?>>mySQL</option>
							<option value='mssql' 		<?php if ($SQL_VENDOR=='mssql') 	echo ('selected');?>>MS-SQL via PHP</option>
							<option value='odbc' 		<?php if ($SQL_VENDOR=='odbc')	 	echo ('selected');?>>MS-SQL via ODBC</option>
							<option value='oci_817' 	<?php if ($SQL_VENDOR=='oci_817') 	echo ('selected');?>>Oracle OCI 8.17</option>
							<option value='oci' 		<?php if ($SQL_VENDOR=='oci') 		echo ('selected');?>>Oracle OCI 8.05</option>
							<option value='mysqli' 		<?php if ($SQL_VENDOR=='mysqli' ) 	echo ('selected');?>>mySQLi (Beta!)</option>
							<option value='informix' 	<?php if ($SQL_VENDOR=='informix') 	echo ('selected');?>>Informix (Beta!)</option>
							<option value='pgsql' 		<?php if ($SQL_VENDOR=='pgsql') 	echo ('selected');?>>PostgresSQL (Beta!)</option>
						</select><br>
					</td>
				</tr>
				<?php if ($extension_exists) :?>
				<tr>
					<td width="155" align="left" valign="center" class="text">
						<label for="SQL_HOST"><?php echo( $GLOBALS['LOCALE']->gettext('db_host_'.$SQL_VENDOR) ); ?></label><br>
					</td>
					<td width="327" align="left" valign="center" class="text">
						<table border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td align="left" valign="center" class="text">
									<input onChange="this.form.elements['ERROR_DB'].value='1';" class="input319" type="text" value="<?php echo(htmlspecialchars($SQL_HOST));?>" name="SQL_HOST" id="SQL_HOST"><br>
								</td>
								<td align="left" valign="center" class="text">
									&nbsp;
								</td>
							</tr>
						</table>
					</td>
				</tr>
				<tr>
					<td width="155" align="left" valign="center" class="text">
						<label for="SQL_SID"><?php echo( $GLOBALS['LOCALE']->gettext('db_tablespace_'.$SQL_VENDOR) ); ?></label><br>
					</td>
					<td width="327" align="left" valign="center" class="text">
						<input onChange="this.form.elements['ERROR_DB'].value='1';" class="input319" type="text" value="<?php echo(htmlspecialchars($SQL_SID));?>" name="SQL_SID"  id="SQL_SID"><br>
					</td>
				</tr>
				<tr>
					<td width="155" align="left" valign="center" class="text">
						<label for="SQL_PCON"><?php echo( $GLOBALS['LOCALE']->gettext('db_connect') ); ?></label><br>
					</td>
					<td width="327" align="left" valign="center" class="text">
						<select name="SQL_PCON"  id="SQL_PCON" class="select" onChange="this.form.elements['ERROR_DB'].value='1';">
							<option value="1" <?php if (!empty($SQL_PCON)) echo(' selected');?>><?php echo( $GLOBALS['LOCALE']->gettext('yes') ); ?></option>
							<option value=""  <?php if (empty($SQL_PCON)) echo(' selected');?>><?php echo( $GLOBALS['LOCALE']->gettext('no') ); ?></option>
						</select><br>
					</td>
				</tr>
				<tr>
					<td width="155" align="left" valign="center" class="text">
						<label for="SQL_UID"><?php echo( $GLOBALS['LOCALE']->gettext('db_user') ); ?></label><br>
					</td>
					<td width="327" align="left" valign="center" class="text">
						<input onChange="this.form.elements['ERROR_DB'].value='1';" class="input319" type="text" maxlength="30" value="<?php echo(htmlspecialchars($SQL_UID));?>" name="SQL_UID" id="SQL_UID"><br>
					</td>
				</tr>
				<tr>
					<td width="155" align="left" valign="center" class="text">
						<label for="SQL_PWD"><?php echo( $GLOBALS['LOCALE']->gettext('db_pass') ); ?></label><br>
					</td>
					<td width="327" align="left" valign="center" class="text">
						<input onChange="this.form.elements['ERROR_DB'].value='1';" class="input319" type="password" maxlength="30" value="<?php echo(htmlspecialchars($SQL_PWD));?>" name="SQL_PWD" id="SQL_PWD"><br>
					</td>
				</tr>
				<tr>
					<td class="text"></td>
					<td class="text">
						<img src="../../grafik/pixel.gif" width="1" height="3"><br>
						<input type="button" value="<?php echo( $GLOBALS['LOCALE']->gettext('button_test_db') ); ?>" class="buttonsmall" onClick="doTheDBTest();"><br>
					</td>
				</tr>
				<tr>
					<td width="155"><img src="../../grafik/pixel.gif" width="147" height="1"><br></td>
					<td width="327"><img src="../../grafik/pixel.gif" width="319" height="1"><br></td>
				</tr>
				<?php else: ?>
					<input type="hidden"	name="SQL_HOST"		value="<?php echo $SQL_HOST; ?>">
					<input type="hidden"	name="SQL_SID"		value="<?php echo $SQL_SID; ?>">
					<input type="hidden"	name="SQL_UID"		value="<?php echo $SQL_UID; ?>">
					<input type="hidden"	name="SQL_PWD"		value="<?php echo $SQL_PWD; ?>">
					<input type="hidden"	name="SQL_PCON"		value="<?php echo $SQL_PCON; ?>">
				<?php endif; ?>
			</table>
			<img src="../../grafik/bgwindow_482_stop.gif" width="482" height="14"><br>
			<table width="482" border="0" cellspacing="0" cellpadding="4" class="bgwindow482">
				<tr>
					<td width="474" colspan="2" align="left" valign="top" class="head">
						<img src="../../grafik/pixel.gif" width="1" height="7"><br>
						<?php echo( $GLOBALS['LOCALE']->gettext('set_ldap_connect') ); ?><br>
						<img src="../../grafik/spacer_474.gif" width="474" height="24"><br>
					</td>
				</tr>			
				<tr>
					<td width="155" align="left" valign="center" class="text">
						<label for="LDAP_ACTIV"><?php echo( $GLOBALS['LOCALE']->gettext('ldap_activ') ); ?></label><br>
					</td>
					<td width="327" align="left" valign="center" class="text">
						<select name="LOGIN_ENGINE"  id="LOGIN_ENGINE" class="select" onChange="this.form.elements['ERROR_LDAP'].value='1';">
							<option value="ldap" <?php if (!empty($LOGIN_ENGINE)) echo(' selected');?>><?php echo( $GLOBALS['LOCALE']->gettext('yes') ); ?></option>
							<option value=""  <?php if (empty($LOGIN_ENGINE)) echo(' selected');?>><?php echo( $GLOBALS['LOCALE']->gettext('no') ); ?></option>
						</select><br>
					</td>
				</tr>
				<tr>
					<td width="155" align="left" valign="center" class="text">
						<label for="LDAP_HOST"><?php echo( $GLOBALS['LOCALE']->gettext('ldap_host') ); ?></label><br>
					</td>
					<td width="327" align="left" valign="center" class="text">
						<input onChange="this.form.elements['ERROR_LDAP'].value='1';" class="input319" type="text" value="<?php echo(htmlspecialchars($LDAP_HOST));?>" name="LDAP_HOST"  id="LDAP_HOST"><br>
					</td>
				</tr>
				<tr>
					<td width="155" align="left" valign="center" class="text">
						<label for="LDAP_PORT"><?php echo( $GLOBALS['LOCALE']->gettext('ldap_port') ); ?></label><br>
					</td>
					<td width="327" align="left" valign="center" class="text">
						<input onChange="this.form.elements['ERROR_LDAP'].value='1';" class="input136" type="text" value="<?php echo(htmlspecialchars($LDAP_PORT));?>" name="LDAP_PORT"  id="LDAP_PORT"><br>
					</td>
				</tr>
				<tr>
					<td width="155" align="left" valign="center" class="text">
						<label for="LDAP_PROTOCOL"><?php echo( $GLOBALS['LOCALE']->gettext('ldap_protocol') ); ?></label><br>
					</td>
					<td width="327" align="left" valign="center" class="text">
						<input onChange="this.form.elements['ERROR_LDAP'].value='1';" class="input136" type="text" value="<?php echo(htmlspecialchars($LDAP_PROTOCOL));?>" name="LDAP_PROTOCOL"  id="LDAP_PROTOCOL"><br>
					</td>
				</tr>
				<tr>
					<td width="155" align="left" valign="center" class="text">
						<label for="LDAP_LOGIN_DN"><?php echo( $GLOBALS['LOCALE']->gettext('ldap_login_dn') ); ?></label><br>
					</td>
					<td width="327" align="left" valign="center" class="text">
						<input onChange="this.form.elements['ERROR_LDAP'].value='1';" class="input319" type="text" value="<?php echo(htmlspecialchars($LDAP_LOGIN_DN));?>" name="LDAP_LOGIN_DN"  id="LDAP_LOGIN_DN"><br>
					</td>
				</tr>				
				<tr>
					<td width="155" align="left" valign="center" class="text">
						<label for="LDAP_LOGIN_PASSWD"><?php echo( $GLOBALS['LOCALE']->gettext('ldap_login_passwd') ); ?></label><br>
					</td>
					<td width="327" align="left" valign="center" class="text">
						<input onChange="this.form.elements['ERROR_LDAP'].value='1';" class="input319" type="password" value="<?php echo(htmlspecialchars($LDAP_LOGIN_PASSWD));?>" name="LDAP_LOGIN_PASSWD"  id="LDAP_LOGIN_PASSWD"><br>
					</td>
				</tr>				
				<tr>
					<td width="155" align="left" valign="center" class="text">
						<label for="LDAP_USES_DN"><?php echo( $GLOBALS['LOCALE']->gettext('ldap_uses_dn') ); ?></label><br>
					</td>
					<td width="327" align="left" valign="center" class="text">
						<input onChange="this.form.elements['ERROR_LDAP'].value='1';" class="input319" type="text" value="<?php echo(htmlspecialchars($LDAP_USES_DN));?>" name="LDAP_USES_DN"  id="LDAP_USES_DN"><br>
					</td>
				</tr>	

				<tr>
					<td width="155"><img src="../../grafik/pixel.gif" width="147" height="1"><br></td>
					<td width="327"><img src="../../grafik/pixel.gif" width="319" height="1"><br></td>
				</tr>
			</table>
			<img src="../../grafik/bgwindow_482_stop.gif" width="482" height="14"><br>
			<table width="482" border="0" cellspacing="0" cellpadding="4" class="bgwindow482">
				<tr>
					<td width="482" align="left" valign="center" class="text">
						<img src="../../grafik/pixel.gif" width="474" height="8"><br>				
						<?php echo $GLOBALS['LOCALE']->gettext('db_info'); ?><br>
						<?php
						if ($PATH_OS=='WINDOWS')
						{
							$DRIVE	= substr($PATH_APPLICATION_ROOT,0,2);
							echo str_replace('%0%',$DRIVE,$GLOBALS['LOCALE']->gettext('db_info_WINDOWS')).'<br>';
						}
						?>
						<img src="../../grafik/pixel.gif" width="474" height="3"><br>						
					</td>
				</tr>
			</table>
			<img src="../../grafik/bgwindow_482_stop.gif" width="482" height="14"><br>
			<?php if (!empty($message)) :?>
			<table width="482" border="0" cellspacing="0" cellpadding="4" class="bgwindow482">
				<tr>
					<td width="482" align="left" valign="center" class="textred">
						<img src="../../grafik/pixel.gif" width="474" height="3"><br>
						<?php
							echo implode('<br>',$message);
						?>
						<img src="../../grafik/pixel.gif" width="474" height="3"><br>						
					</td>
				</tr>
			</table>
			<img src="../../grafik/bgwindow_482_stop.gif" width="482" height="14"><br>
			<?php endif; ?>
		</td>
	</tr>
	<tr>
		<td width="482"><img src="../../grafik/pixel.gif" width="482" height="1"><br></td>
		<td width="11"><img src="../../grafik/pixel.gif" width="11" height="1"><br></td>
		<td width="482"><img src="../../grafik/pixel.gif" width="482" height="1"><br></td>
	</tr>
</table>

</form>

<script language="JavaScript" type="text/javascript">

var testWindow;

// Test paths
function doTheDirTest()
{
	//if (testWindow && !testWindow.closed) testWindow.close();

	//testWindow= window.open('','SetupTestOuputWindow','scrollbars=yes,menubars=no,locationbars=no,dependent=yes,width=350,height=600');
	top.main.document.getElementById('f_installation').rows='150,*,24';
	document.forms[0].action="setup_2_test.php";
	document.forms[0].target="setupmessage";
	//if (testWindow)	testWindow.focus();
	setTimeout("document.forms[0].submit()",200);
	setTimeout("document.forms[0].target='_self';document.forms[0].action='setup_again.php';",'1000');
	
}

var chosenDB = '<?php echo($SQL_VENDOR);?>';
function db_choosen(sql_vendor)
{
	chosenDB=sql_vendor;
	document.forms[0].elements['WRITE_CONFIG'].value='';	
	document.forms[0].submit();
}
// Test database
function doTheDBTest()
{
	if (chosenDB == '' )
	{
		alert('<?php echo($SETUP_LANGUAGE_TEXT['db_no_db']);?>');
		return;
	}
	//if (testWindow && !testWindow.closed) testWindow.close();

	//testWindow= window.open('','SetupTestOuputWindow','scrollbars=yes,menubars=no,locationbars=no,dependent=yes,width=350,height=200');
	top.main.document.getElementById('f_installation').rows='150,*,24';
	document.forms[0].action="setup_3_test.php";
	document.forms[0].target="setupmessage";
	//if (testWindow)	testWindow.focus();

	setTimeout("document.forms[0].submit()",200);
	setTimeout("document.forms[0].target='_self';document.forms[0].action='setup_again.php';",'1000');
}

function writeConfigFile()
{
	var error_path 	='<?php echo ($SETUP_LANGUAGE_TEXT['setup_step_2']['confirm_next']); ?>';
	var error_db	='<?php echo ($SETUP_LANGUAGE_TEXT['setup_step_3']['confirm_next']); ?>';

	if (document.forms[0].elements['ERROR_PATH'].value != '')
	{
		if (!confirm(error_path)) return;
	}
	if (document.forms[0].elements['ERROR_DB'].value != '')
	{
		if (!confirm(error_db)) return;
	}

	document.forms[0].target						='_self';
	document.forms[0].action						='setup_again.php';
	document.forms[0].elements['WRITE_CONFIG'].value='1';
	document.forms[0].submit();
}
</script>

</body>

</html>
Return current item: Netautor Professional