<? 
class login
{
	var $VERSION=1.03;

	function login() {
		global $X;

		unset($_SESSION['backend']);
		$N=$X->CONF->BROWSER['name'];
		$V=$X->CONF->BROWSER['major_version'];
		//////////////////////////////////////////

		if($N=='firefox' 	&& $V<3) $not_supp=true;
		if($N=='mozilla' 	&& $V<4) $not_supp=true;
		if($N=='chrome' 	&& $V<9) $not_supp=true;
		if($N=='opera' 	&& $V<9) $not_supp=true;
		if($N=='safari' 	&& $V<5) $not_supp=true;
		if($N=='ie' 		&& $V<9) $not_supp=true;

		//////////////////////////////////////////
		if($not_supp==false) $_SESSION['backend']['login_procedure']=1;
		if(!defined('ADDON_HEAD')) define('ADDON_HEAD','');
		if(!defined('ADDON_BODY')) define('ADDON_BODY','');


		echo '<!DOCTYPE html>
<html lang="en-US" xml:lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Logowanie - CMS.Panel</title>
<meta name="viewport" content="width=960" />
<script type="text/javascript">var SID="'.session_id().'";</script>
<link rel="stylesheet" href="includes/login.css?v='.$this->VERSION.'" type="text/css" />
<script type="text/javascript" id="js" src="login.js?v='.$this->VERSION.'"></script>
'.ADDON_HEAD.'
</head>
<body>

<div id="top"><div id="top_logo"'.($X->CONF->ASPAR==true ? ' style="background:url(images/logo_aspar.png) no-repeat center bottom"':'').'></div></div>
<div id="bottom">
	<div id="login_box">
		'.($not_supp==false ? '
			<div id="form_cont">
				<div class="form">
					<div class="fields"><span class="login_ico"></span><br /><span class="pass_ico"></span></div>
					<form id="login_form" name="login_form" form action="/X/" method="post" onsubmit="return false;">
						<input type="text" class="input" id="input_login" name="login" /><br />
						<input type="password" class="input" id="input_password" name="password" /><br />
						<input type="submit" id="input_submit" onfocus="this.blur()" value="Zaloguj się" />
					</form>
				</div>
			</div>
		':'
			<div class="browser_error">
				<b class="white">Twoja przeglądarka jest <u>zbyt stara</u> i nie jest<br />obsługiwana przez panel administracyjny.</b><br />
				<img src="images/warning.png" alt="" style="margin-top:18px;" /><br />
				'.$X->CONF->BROWSER['full_name'].' '.$X->CONF->BROWSER['version'].'<br />
				<br /><br /><br />
				<b>Obsługiwane przeglądarki:</b><br />
				<div class="browsers">
					Firefox &nbsp;<b>3+</b><br />
					Chrome &nbsp;<b>9+</b><br />
					Opera &nbsp;<b>9+</b><br />
					Safari &nbsp;<b>5+</b><br />
					Internet Explorer &nbsp;<b>9+</b><br />
				</div>
			</div>
		').'
	</div>
</div>
'.ADDON_BODY.'

</body>
</html>';
		exit;
	}

}
$LOGIN=new login();
?>