<? session_start();?>
<? session_destroy();?>
<? session_start();?>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<?php 
	header('Content-Type: text/html; charset=UTF-8');
	$filtro_error="";
	if (isset($_REQUEST['error'])){$filtro_error=$_REQUEST['error'];}
	$user = $_REQUEST['user'];
	function detect_mobile()
	{
		if(preg_match('/(alcatel|amoi|android|avantgo|blackberry|benq|cell|cricket|docomo|elaine|htc|iemobile|iphone|ipad|ipaq|ipod|j2me|java|midp|mini|mmp|mobi|motorola|nec-|nokia|palm|panasonic|philips|phone|playbook|sagem|sharp|sie-|silk|smartphone|sony|symbian|t-mobile|telus|up\.browser|up\.link|vodafone|wap|webos|wireless|xda|xoom|zte)/i', $_SERVER['HTTP_USER_AGENT']))
			return true;
	 
		else
			return false;
	}
	$mobile = detect_mobile();
?>
<html>
<head>
	<title>Clarosol</title>
	<meta http-equiv="cache-control" content="max-age=0" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
<meta http-equiv="pragma" content="no-cache" />
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=3.0">
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<link rel="stylesheet" type="text/css" href="jquery.mobile-1.4.2.min.css" />
	<script src="jquery-1.11.0.min.js" language="javascript" type="text/javascript"></script>
	<script src="jquery.mobile-1.4.2.min.js"></script>
	<link rel="apple-touch-icon" href="/icon.png"><link rel="apple-touch-startup-image" href="/Default.png">
</head>
<body><div data-role="page" data-ajax="false">
    <div data-role="content" data-theme="">
        <a href="#" data-role="image" class="ui-link" style="">
            <div style=" text-align:center">
				<?
				if($mobile === true){
					echo '<img style="width: 337px; height: 149px;" src="logo.jpg">';
				}else{
					echo '<img src="logo.jpg">';
				};
				?>	
            </div>
        </a>
		<?
			if($mobile === true){
				echo '<ul data-role="listview" data-divider-theme="b" data-inset="true">';
			}else{
				echo '<ul data-role="listview" data-divider-theme="b" data-inset="true" style="width:50%; margin-left:25%">';
			};
		?>	
		<li data-role="list-divider" role="heading">Cambio de contraseña</li>
		<li>	
			<h1 style='color:red;margin-top:50px;'>CAMBIA TU CONTRASEÑA POR OTRA QUE NO SEA 1234</h1>
			<form action=cambioPass.php method=get>
				<?
					if($mobile === true){
						echo 'Usuario:';
					}else{
						echo '<b>Usuario:</b>';
					};
				?>				
				<input id="loginName" name="loginName" value="<? echo $user; ?>" type="text"></input>
				<br>
				<?
					if($mobile === true){
						echo 'Contraseña:';
					}else{
						echo '<b>Contraseña:</b>';
					};
				?>
				<input id="loginPassword" name="loginPassword" type="text"/>
				<br>
				<?php
						if($filtro_error == "1"){
							echo "<h1 style='color:red;margin-top:50px;'>DEBE INTRODUCIR UNA CONTRASEÑA DIFERENTE A 1234</h1>";
						};
					?>
				<input type=submit border=0 value=" Entrar ">
			</form>
		</li>
		</ul>
    </div>
</div></body>    
</html>