Location: PHPKode > projects > Netautor Professional > netautor/napro4/admin/install/update_choice.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 											  |
   +----------------------------------------------------------------------+*/


/**
 * Simple list of available updates ...
 * @version  $Revision: 1.12 $
 * @author	Stefan Rottensteiner
 */

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


?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
	<title>Activate updates ...</title>
</head>
<link href="../../include/netautor.css" rel="stylesheet" type="text/css" src="../../include/netautor.css">
<body bgcolor="#ffffff" class="standard">
<?php 

	$updates 	= array();
	$update_dir = dir('./update/');
	while (false !== ($entry = $update_dir->read())) {
    	$entry = trim($entry);
		if (substr($entry,0,1) =='.' ) continue;
		$updates[$entry]=$entry;
	}
	$update_dir->close();
	ksort($updates);
	
 /* Get currently installed version */
	 $installed_version = version_normalize(version_get($sql_world,'software','napro'));

?>
<div align="center">
<table width="210" border="0" cellspacing="0" cellpadding="4" class="bgwindowsmall">
	<tr>
		<td width="202" align="left" valign="top" class="head">
			<img src="../../grafik/pixel.gif" width="1" height="7"><br>
			Update Manager<br>
			<img src="../../grafik/spacer_small.gif" width="202" height="24"><br>
		</td>
	</tr>
	<tr>
		<td width="202" align="left" valign="center" class="text">
			
			You are currently running<br>
			Netautor Pro in Version <b><?php echo($installed_version );?></b><br>
			<br>
			The following newer Versions<br>
			are available for update.<br>
			<b>click on the highlighted<br>
			link to install:</b><br>

			<?php 
			$i=0;

			foreach ($updates as $ui => $uv){
				$filename='./update/'.$uv.'/update.php';
				if (!file_exists($filename)) continue;
				$i++;
				$uv= version_normalize($uv,3);
				$version_comp		= version_compare($installed_version,$uv,'<');
				?>
				<img src="../../grafik/spacer_grey.gif" width="202" height="15"><br>
				<?php
				if ($version_comp==1) 
				{
				?>
				&raquo; <a target="update_action" class="link" href="<?php echo $filename; ?>" ><b>Update to <?php echo $uv; ?></b></a><br>
				<?php 
				}
				else 
				{
				?>
				&raquo; <span class="text">Update to <?php echo $uv; ?></span><br>
				<?php 
				}
			}
			?>
		</td>
	</tr>
</table>
<img src="../../grafik/bgwindow_small_stop.gif" width="210" height="14"><br>
</div>
</body>
</html>
Return current item: Netautor Professional