<? include("vars.inc.php"); ?>
<table width="320" cellspacing="1">
	<tr>
		<td id="titel">easyVDR-Version</td></tr>
	<tr>
		<td>
			<table width="100%" cellpadding="0" cellspacing="10" id="tableborderless">
				<tr>
					<td valign="top" width="70">
						<img src="images/version.png" alt="Version">
					</td>
					<td align="left">
						<table id="tableborderless">
						<?
							// easyVDR-Version
							$VERSION=exec($EASYPORTAL_DOC_ROOT."scripts/easyvdr_version.sh");
							echo "<tr><td valign=\"top\">Installierte Version:</td><td valign=\"top\"><b>".$VERSION."</b></td></tr>";

							// Auf Updates prüfen
							if($_GET['action']=="ckupdates") {

								$UPDATEVERS=exec($EASYPORTAL_DOC_ROOT."scripts/available_version.sh");
								echo "<tr><td valign=\"top\">Verf&#252;gbare Version:</td>";

								// Kein Update verfügbar
								if($VERSION != $UPDATEVERS) {
									echo "<td valign=\"top\"><b>$UPDATEVERS</b></td></tr>";
									echo "<tr><td colspan=\"2\"><a href=\"javascript:oeffnefenster('includes/update.php');\">Installieren</a></td></tr>";
								}
								else {
									echo "<td><b>Kein Update verf&#252;gbar!</b></td></tr>";
								}
							}
							echo '<tr><td colspan="2">';
							echo "<a onclick=\"CheckUpdates()\" onmouseover=\"Tip('$TIP_VERSION_CHK')\"><img src=\"images/update.png\"</a><td><tr>";
						?>
						</table>
					</td>
				</tr>
			</table>
		</td>
	</tr>
</table>