<?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 |
+----------------------------------------------------------------------+*/
/**
* Finalization, write config-file, start package installation
*
* @author Stefan Rottensteiner
* @version $Revision: 1.27 $
*/
require_once ('./setup.inc');
if (empty($_POST['SETUP_CHECK']))
{
Header('Location: setup.php');
exit();
}
?>
<!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;?> Setup Test Step 6">
<title><?php echo SOFTWARE_NAME_FULL; ?> <?php echo SOFTWARE_VERSION_FULL;?> Setup Test Step 6</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="Expires" content="0">
<meta name="robots" content="noindex,nofollow">
<link href="../../include/netautor.css" rel="stylesheet" type="text/css" src="../../include/netautor.css">
</head>
<body bgcolor="White" text="Black" leftmargin=1 topmargin=1>
<form method="post" action="setup_6.php">
<input type="hidden" name="NAPRO_START" value="" >
<?php
echo(setup_getMyVars($_POST,'NAPRO'));
if (!ini_get('register_globals'))
foreach( $_POST as $key => $value)
if (isset( $GLOBALS[ $key ]) && !isset( $$key)) $$key = &$GLOBALS[ $key ];
if (!isset($NAPRO_UID)) $NAPRO_UID ='';
if (!isset($NAPRO_PWD)) $NAPRO_PWD ='';
if (!isset($NAPRO_PWD_2)) $NAPRO_PWD_2='';
if (!empty($NAPRO_START))
{
$NORM_NAPRO_UID = preg_replace('/[^a-z0-9_ @!?%\-]/i','',$NAPRO_UID);
$NORM_NAPRO_PWD = preg_replace('/[^a-z0-9_ @!?%\-]/i','',$NAPRO_PWD);
$NORM_NAPRO_PWD_2 = preg_replace('/[^a-z0-9_ @!?%\-]/i','',$NAPRO_PWD_2);
if (empty($NAPRO_UID) || $NAPRO_UID != $NORM_NAPRO_UID)
{
$NAPRO_START =0;
$ACCOUNT_ERROR =1;
}
else
if (empty($NAPRO_PWD) || ($NAPRO_PWD != $NORM_NAPRO_PWD) || ($NAPRO_PWD != $NAPRO_PWD_2))
{
$NAPRO_START =0;
$ACCOUNT_ERROR =2;
}
}
?>
<script language="JavaScript" type="text/javascript">
function goOn(SiteName,ConfirmText)
{
if ((ConfirmText && ConfirmText!="") && (!confirm(ConfirmText))) return;
document.forms[0].action=SiteName;
document.forms[0].submit();
}
function startInstall()
{
document.forms[0].elements['NAPRO_START'].value='1';
document.forms[0].submit();
}
/**
* Set new title in current or a special fram document
*/
function setTitle(newTitle)
{
if (parent && parent.frames['SETUP_HEAD'])
{
parent.frames['SETUP_HEAD'].document.setTitle(newTitle);
}
else
{
document.title = newTitle;
}
}
function setBusy(busyFlag)
{
if (parent && parent.frames['SETUP_HEAD'])
{
parent.frames['SETUP_HEAD'].document.setBusy(busyFlag);
}
}
setTitle('<?php echo (strtr($SETUP_LANGUAGE_TEXT['setup_step'],array('%1'=>'6','%2'=>'7')));?>');
</script>
<br>
<br>
<table border="0" cellspacing="0" cellpadding="0" align="center" valign="top">
<tr>
<td align="center" valign="top" colspan="3" class="text">
<?php if (empty($NAPRO_START)): ?>
<table class="bgwindow700" width="700" border=0 align="center" >
<tr>
<td width="694" colspan="2" align="left" valign="top" class="head">
<img src="../../grafik/pixel.gif" width="1" height="7"><br>
<?php echo ($SETUP_LANGUAGE_TEXT['setup_step_4']['title']); ?><br>
<div align="center"><img src="../../grafik/spacer_700.gif" width="694" height="13"><br></div>
</td>
</tr>
<tr>
<td class="text"><label for="NAPRO_UID"><?php echo($SETUP_LANGUAGE_TEXT['setup_step_4']['napro_uid']);?></label></td>
<td><input class="input319" type="text" maxlength="30" size="30" value="<?php echo(htmlspecialchars($NAPRO_UID));?>" name="NAPRO_UID" id="NAPRO_UID"></td>
</tr>
<tr>
<td class="text"><label for="NAPRO_PWD"><?php echo($SETUP_LANGUAGE_TEXT['setup_step_4']['napro_pwd']);?></label><br></td>
<td><input class="input319" type="password" maxlength="30" size="30" value="<?php echo(htmlspecialchars($NAPRO_PWD));?>" name="NAPRO_PWD" id="NAPRO_PWD"></td>
</tr>
<tr>
<td class="text"><label for="NAPRO_PWD_2"><?php echo($SETUP_LANGUAGE_TEXT['setup_step_4']['napro_pwd2']);?></label><br></td>
<td><input class="input319" type="password" maxlength="30" size="30" value="<?php echo(htmlspecialchars($NAPRO_PWD_2));?>" name="NAPRO_PWD_2" id="NAPRO_PWD_2"></td>
</tr>
<?php if (!empty($ACCOUNT_ERROR)) :?>
<tr>
<td class="text"> </td>
<td valign="center"><span class="textred"><?php echo $SETUP_LANGUAGE_TEXT['setup_step_4'][( $ACCOUNT_ERROR ==1 ? 'uid_error' : 'pwd_error')];?></span></td>
</tr>
<?php endif;?>
</table>
<img src="../../grafik/bgwindow_482_stop.gif" width="700" height="14"><br>
<table width="700" border="0" align="center" class="bgwindow700">
<tr>
<td class="text">
<img src="../../grafik/pixel.gif" width="1" height="8"><br>
<b><?php echo($SETUP_LANGUAGE_TEXT['note']);?></b><br>
<img src="../../grafik/pixel.gif" width="1" height="4"><br>
<?php echo ($SETUP_LANGUAGE_TEXT['setup_step_4']['info']);?><br>
</td>
</tr>
</table>
<img src="../../grafik/bgwindow_482_stop.gif" width="700" height="14"><br>
<table width="700" border="0" align="center" class="bgwindow700">
<tr>
<td class="head" width="33%" align="center" >
<input type="button" class="create" value="<?php echo ($SETUP_LANGUAGE_TEXT['back']);?>" onClick="goOn('setup_5.php');">
</td>
<td class="head" width="34%" align="center" >
<input type="button" class="preview" value="<?php echo ($SETUP_LANGUAGE_TEXT['cancel']);?>" onClick="goOn('setup.php');">
</td>
<td class="head" width="33%" align="center" >
<input type="button" class="create" value="<?php echo ($SETUP_LANGUAGE_TEXT['setup_step_4']['start']);?>" onClick="startInstall();">
</td>
</tr>
</table>
<img src="../../grafik/bgwindow_482_stop.gif" width="700" height="14"><br>
<?php endif ;?>
</td>
</tr>
</table>
<?php
if (empty($NAPRO_START))
{
echo('</body></html>');
exit();
}
?>
<script language="JavaScript" type="text/javascript">
<!--
setBusy(true);
//-->
</script>
<center>
<?php flush(); ?>
<?php
if ( @file_exists('../../../config/base.php') || @file_exists($PATH_CONFIG.'base.php') )
{
?>
</center>
<div style="border:Red solid 2px; padding: 5px 5px 5px 5px; font-weight: bold; font-size: 11px; font-family: Verdana,Geneva,Arial,Helvetica,sans-serif; color: Black; background-color: #FFFFB0;" >
<span style="color: Red;" >INTERNAL NETAUTOR ERROR<br><br></span>
<?php echo $SETUP_LANGUAGE_TEXT['setup_step_4']['config_exists']; ?>
</div>
<script language="JavaScript" type="text/javascript">
<!--
setBusy(false);
//-->
</script>
</form>
</body>
</html><?php
flush();
exit();
}
$PATH_START = substr($PATH_INSTALL ,0,-(strlen(SOFTWARE_NAME_SHORT.'/')));
$PATH_START_INDEX = substr($PATH_INDEX ,0,-(strlen(SOFTWARE_NAME_SHORT.'/')));
if (file_exists('../../../../digitalworkroom/'))
{
$CACHE_ALLOW_CACHE = 'yes';
$CACHE_LIFE_TIME = '3600';
$CACHE_AUTO_CACHE_NOTE = 'yes';
$CACHE_REFERENCE = 'ID_KEY';
$CACHE_REFERENCE_SESSION = 'LANGUAGE,WEBUSER_ID';
$CACHE_SERVER_MODE = '';
}
else
{
$CACHE_ALLOW_CACHE = 'no';
$CACHE_LIFE_TIME ='';
$CACHE_AUTO_CACHE_NOTE = 'no';
$CACHE_REFERENCE = '';
$CACHE_REFERENCE_SESSION = '';
$CACHE_SERVER_MODE = '';
}
$config='<'."?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').");
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';
// *** CACHING ***
var \$allow_cache = '$CACHE_ALLOW_CACHE'; // Cache allowed 'yes' or 'no'
var \$cache_life_time = '$CACHE_LIFE_TIME'; // Cache update intervall in seconds
var \$auto_cache_note = '$CACHE_AUTO_CACHE_NOTE'; // Cache automatic 'yes' or 'no'
var \$cache_reference = '$CACHE_REFERENCE'; // Cache reference fields, separate 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. empty = Off, 0 = PHP Runtime only, 1 = Under certain circumstances, 2 = Allways
// *** VERSION CONTROL ***
var \$vers_control = '0'; // 1 = Enabled 0 = Disabled
var \$vers_control_count = '10'; // Version control counter. Remember up to n versions (Default is 10)
}
?".'>';
?>
<table width="700" border="0" align="center" class="bgwindow700">
<tr>
<td valign="top" class="text" width="694">
<?php echo $SETUP_LANGUAGE_TEXT['setup_step_4']['config_create']; ?><br>
</td>
</tr>
</table>
<img src="../../grafik/bgwindow_482_stop.gif" width="700" height="14"><br>
<?php flush(); ?>
<?php
$file= @fopen ($PATH_CONFIG.'base.php','wb');
if (!$file)
{
?>
<table width="700" border="0" align="center" class="bgwindow700">
<tr>
<td valign="top" class="head" width="694">
<span class="textred"><?php echo $SETUP_LANGUAGE_TEXT['setup_step_4']['config_failed']; ?><br></span>
</td>
</tr>
</table>
<img src="../../grafik/bgwindow_482_stop.gif" width="700" height="14"><br>
</center>
<script language="JavaScript" type="text/javascript">
<!--
setBusy(false);
//-->
</script>
</form>
</body>
</html>
<?php
exit();
}
@fwrite($file,$config,strlen($config));
@fclose($file);
if (!file_exists($PATH_CONFIG.'base.php') || filesize($PATH_CONFIG.'base.php')==0)
{
?>
<table width="700" border="0" align="center" class="bgwindow700">
<tr>
<td valign="top" class="head" width="694">
<span class="textred"><?php echo $SETUP_LANGUAGE_TEXT['setup_step_4']['config_failed']; ?><br></span>
</td>
</tr>
</table>
<img src="../../grafik/bgwindow_482_stop.gif" width="700" height="14"><br>
</center>
<script language="JavaScript" type="text/javascript">
<!--
setBusy(false);
//-->
</script>
</form>
</body>
</html>
<?php
exit();
}
?>
<table width="700" border="0" align="center" class="bgwindow700">
<tr>
<td valign="top" class="head" width="694">
<span class="text"><?php echo $SETUP_LANGUAGE_TEXT['setup_step_4']['functions_activ']; ?><br></span>
</td>
</tr>
</table>
<img src="../../grafik/bgwindow_482_stop.gif" width="700" height="14"><br>
<!-- Beginne XML-Datei zu analysieren <?php echo str_repeat('.',4096);?> -->
<?php
flush();
error_reporting(0);
?>
<!-- <?php include_once ('../../include/init.inc'); ?> -->
<?php
error_reporting(E_ALL);
includeNaPro('na_functions');
$result= naf_generate_def_file($DC_ENV);
?><!-- Ende der Dateianalyse --><?php
?>
<table width="700" border="0" align="center" class="bgwindow700">
<tr>
<td valign="top" class="head" width="694">
<?php
if ($result)
{
?>
<span class="textgreen"><?php echo $SETUP_LANGUAGE_TEXT['setup_step_4']['functions_okay']; ?><br></span>
<?php
}
else
{
?>
<span class="textred"><?php echo $SETUP_LANGUAGE_TEXT['setup_step_4']['functions_failed']; ?><br></span>
</td>
</tr>
</table>
<img src="../../grafik/bgwindow_482_stop.gif" width="700" height="14"><br>
</center>
<script language="JavaScript" type="text/javascript">
<!--
setBusy(false);
//-->
</script>
</form>
</body>
</html>
<?php
exit();
}
?>
</td>
</tr>
</table>
<img src="../../grafik/bgwindow_482_stop.gif" width="700" height="14"><br>
<!-- Starte Paketimport
<?php echo str_repeat('.',4096);?>
-->
<?php
$SETUP_CHECK = 1;
$whichone = array ('base');
$Admin_name = $NAPRO_UID;
$Admin_pass = $NAPRO_PWD;
include('install_pck_5.php');
?>
<table class="bgwindow700" width="700" border=0 align="center" >
<tr>
<td class="head" align="center" >
<input type="button" class="create" value="<?php echo ($SETUP_LANGUAGE_TEXT['setup_step_4']['end']);?>" onClick="goOn('setup_7.php');" >
</td>
</tr>
</table>
<img src="../../grafik/bgwindow_482_stop.gif" width="700" height="14"><br>
</center>
<script language="JavaScript" type="text/javascript">
<!--
setBusy(false);
setTitle('<?php echo (strtr($SETUP_LANGUAGE_TEXT['setup_step'],array('%1'=>'6','%2'=>'7')));?>');
//-->
</script>
<input type="hidden" name="NAPRO_UID" value="<?php echo $NAPRO_UID;?>">
<input type="hidden" name="NAPRO_PWD" value="<?php echo $NAPRO_PWD;?>">
</form>
<br>
<br>
</body>
</html>