<?php
/* +----------------------------------------------------------------------+
| Netautor Professional Application Server |
+----------------------------------------------------------------------+
| Copyright (C) 1998-2002 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> |
| Christian Unger <hide@address.com> |
| Helli Kleinhans <hide@address.com> |
+----------------------------------------------------------------------+ */
/**************************************
* Activate update to version 4.5.2
* @version $Revision: 1.1 $
* @author Stefan Rottensteiner
* @author Helmut Kleinhans
*/
include ('../../../../include/init.inc');
// error_reporting(65535);
if (function_exists('ob_end_flush()')) {ob_end_flush ();}
includeNaPro('mversion,array');
$update_success = true;
/* Get currently installed version */
$installed_version = version_normalize(version_get($sql_world,'software','napro'));
/* Check here for desired version */
$version_comp = version_compare($installed_version,'4.5.2','>=');
?>
<html>
<head><title>Activate Update 4.5.2</title></head>
<link href="../../../../include/netautor.css" rel="stylesheet" type="TEXT/CSS" media="screen" >
<script language="JavaScript">
<!--
function reloadChoice(){
if (parent.frames['update_choice']) {
parent.frames['update_choice'].document.location.href= parent.frames['update_choice'].document.location.href;
}
}
//-->
</script>
<body bgcolor="White" text="Black" leftmargin="1" topmargin="1">
<br>
<?php
if ($version_comp==1){
?> <font class="setuptextokay">Version 4.5.2 allready installed</font>
<script language="JavaScript">reloadChoice();</script>
</body>
</html>
<?php
exit();
}
?>
<font class="setuplinktext">Start : <?php echo(date('d.m.Y H:i:s'));?></font><br><br>
<font class="setuptextokay"><br>1. Update Netautor functions (May take some time)</font><br>
<?php
$source_file = $GLOBALS['DC_ENV']->cachepath.'npf_functions.dat';
if (file_exists($source_file)){
$target_file = $GLOBALS['DC_ENV']->cachepath.'_npf_functions.dat';
if (copy ($source_file,$target_file)){
if (!unlink($source_file)){
echo ('<font class="setuptextfalse">Cannot delete "'.$source_file.'"</font><br>');
}
}
else {
echo ('<font class="setuptextfalse">Cannot copy "'.$source_file.'" to "'.$target_file.'"</font><br>');
}
}
flush();
includeNapro('array,string,xml,na_functions');
naf_generate_def_file($GLOBALS['DC_ENV']);
if (!file_exists($source_file)) {
echo ('<font class="setuptextfalse">Functions have not been fully updated for some reasons !</font><br>');
$update_success = false;
}
?>
<font class="setuptextokay"><br>Registring update informations</font><br>
<?php version_set($sql_world,'software','napro','4.5.2'); ?>
<br><font class="setuplinktext">End : <?php echo(date('d.m.Y H:i:s'));?></font><br>
<script language="JavaScript">reloadChoice();</script>
</body>
</html>