<?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> |
| Helli Kleinhans |
| Marek Kadziela <hide@address.com> |
| Christian Unger |
| Gregor Wollner |
+----------------------------------------------------------------------+ */
/**************************************
* Activate update to version 5.3.1
* @version $Revision: 1.1 $
* @author Stefan Rottensteiner
*/
require_once ('../../../../include/init.inc');
error_reporting(65535);
if (function_exists('ob_flush_end()')) {ob_flush_end();}
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,'5.3.1','>=');
?>
<html>
<head>
<title>Activate Update 5.3.1</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 leftmargin="10" class="brown">
<br>
<?php
if ($version_comp==1){
?> <span class="textred">Version 5.3.1 allready installed</span>
<script language="JavaScript">reloadChoice();</script>
</body>
</html>
<?php
exit();
}
?>
<span class="text">Start : <?php echo(date('d.m.Y H:i:s'));?></span><br/>
<br/>
<span class="head"><br>1. Update Netautor functions </span><br>
<br/>
<span class="text">Please be patient ... </span><br>
<?php
@set_time_limit(60*5);
$source_file = $GLOBALS['DC_ENV']->cachepath.'npf_functions.dat';
if (file_exists($source_file)){
$target_file = $GLOBALS['DC_ENV']->cachepath.'npf_functions_'.date('Ymd',time()).'.dat';
if (copy ($source_file,$target_file)){
if (!unlink($source_file)){
echo ('<span class="setuptextfalse">Cannot delete "'.$source_file.'"</span><br>');
}
}
else {
echo ('<span class="text">Cannot copy "'.$source_file.'" to "'.$target_file.'"</span><br>');
}
}
flush();
includeNapro('array,string,xml,na_functions');
@set_time_limit(60*5);
naf_generate_def_file($GLOBALS['DC_ENV']);
if (!file_exists($source_file)) {
echo ('<span class="text">Functions have not been fully updated for some reasons !</span><br>');
$update_success = false;
}
?>
<br/>
<span class="head"><br>2. Registring update informations</span><br>
<?php version_set($sql_world,'software','napro','5.3.1'); ?>
<br/>
<span class="text">End : <?php echo(date('d.m.Y H:i:s'));?></span><br>
<script language="JavaScript">reloadChoice();</script>
</body>
</html>