<?
	//echo "sudo -u root $EASYPORTAL_SH update $EASYPORTAL_UPDATE_FILE $EASYPORTAL_DOC_ROOT";
	if($_GET['sub']=='installupdates'){
		exec('rm /tmp/easyportal.tar'); 
		$LOG=shell_exec("sudo -u root $EASYPORTAL_SH update $EASYPORTAL_DOC_ROOT $EASYPORTAL_UPDATE_FILE");
		//print_r($LOG);
	}

	include("vars.inc.php");
	$UPDVER=trim(shell_exec($EASYPORTAL_SH . " portalupdates"));


?>
<div id="informationen" class="CatContainer">
	<div class="title">
		<img src="images/version.png" align="left" class="icon">EasyPortal-Version
	</div>
	<div class="content">
		<table width="95%" cellspacing="3" border="0">
			<tr>
				<td width="130">EasyPortal-Version:</td>
				<td align="left"><b><? echo $EASYPORTAL_VERSION; ?></b></td>
				<td rowspan="2">
					<?
					if($UPDVER<>$EASYPORTAL_VERSION && $UPDVER <> 1) {
						?>	<a href="?sub=installupdates">Updates Installieren</a>	<?
					}
                                        if($_GET['sub']=='installupdates'){
                                 	        print_r($LOG);
	                                }
					?>
				</td>
			</tr>
			<tr>
				<td>Verf&#252;gbare Version:</td>
				<td align="left" style="font-weight: bold;">
					<?
						if($UPDVER==1) {
							echo $B_UPDATE_FEHLER;
						}
						else {
							echo $UPDVER;
						}
					?>
				</td>
			</tr>
		</table>
	</div>
</div>