Location: PHPKode > projects > Netautor Professional > netautor/napro4/admin/install/update/5.1.0/update.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>   |
   |          Helli  Kleinhans											  |
   |          Marek  Kadziela       <hide@address.com>	      |
   |          Christian Unger											  |
   |          Gregor Wollner                                              |
   +----------------------------------------------------------------------+ */

 /**************************************
 * Activate update to version 5.1.0
 * @version  $Revision: 1.3 $
 * @author	Stefan Rottensteiner
 * @author	Helmut Kleinhans
 */

 include ('../../../../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.1.0','>=');

?>
<html>
<head><title>Activate Update 5.1.0</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){
		?>	<font class="textred">Version 5.1.0 allready installed</font>
			<script language="JavaScript">reloadChoice();</script>
			</body>
			</html>
		<?php
		exit();
	}
?>
<font class="text">Start : <?php echo(date('d.m.Y H:i:s'));?></font><br><br>

<font class="head"><br>1. Update Netautor functions </font><br>
<br>
<font class="text">Please be patient ... </font><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.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="text">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="text">Functions have not been fully updated for some reasons !</font><br>');
		$update_success = false;
	}

?>
<br>

<font class="head"><br>2. Registring update informations</font><br>
<?php 	version_set($sql_world,'software','napro','5.1.0'); ?>

<br><font class="text">End : <?php echo(date('d.m.Y H:i:s'));?></font><br>
<script language="JavaScript">reloadChoice();</script>
</body>
</html>
Return current item: Netautor Professional