<?php
if ( !defined('IN_MFA') )
		die("Hacking attempt");

$user->dieNotAdmin();

$layoutadminargs['admin_start'] = $lang['admin_start'];
$layoutadminargs['general_config'] = $lang['general_config'];
$layoutadminargs['user_management'] = $lang['user_management'];
$layoutadminargs['maintenance'] = $lang['maintenance'];
$layoutadminargs['back'] = $lang['back'];


$layoutadminargs['info_text'] = "
<span class='title'>".$lang['admin_welcome']."</span>
<br><br>".$lang['admin_welcome_text'];

$layoutadminargs['admin_main_content'] =" <span style='font-size:18pt;'>Versionsinformation</span><br><br>";
//Versionsinfo
$errno = 0;
$errstr = "";
if($fp = @fsockopen("myfileadmin.aprescher.de",80,$errno,$errstr))
{
	$request = "GET /versioninfo/vinfo.txt HTTP/1.0\r\n";
	$request .= "HOST: myfileadmin.aprescher.de\r\n";
	$request .= "User-Agent: myFileAdmin-Versioninfo 1.1\r\n\r\n";
	
	$version_info = array();
	fputs($fp,$request);
	while(! feof($fp))
		$version_info[] = @fgets($fp, 1024);
	
	if($version_info[10] == VERSION)
		$layoutadminargs['admin_main_content'] .= "<b class='success'>".$lang['goodversion']."</b>";
	else
		$layoutadminargs['admin_main_content'] .= 
		"<b class='error'>".$lang['badversion']."<br><br>
		".$lang['yourversion']." ".VERSION.". ".$lang['rightversion']." ".$version_info[10]."
		</b></p>";

}
else
	$layoutadminargs['admin_main_content'] .= "<b class='error'>No connection to aprescher.de</b>";

$show_after_header .= $template->layoutparser("adminpage",$layoutadminargs);

@fclose($fp);
?>