<commit_before><html>
<head>
	<title>Tiny Tiny RSS : Login</title>
	<link rel="stylesheet" type="text/css" href="tt-rss.css">
	<link rel="shortcut icon" type="image/png" href="images/favicon.png">
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<script type="text/javascript" src="lib/prototype.js"></script>
	<script type="text/javascript" src="lib/scriptaculous/scriptaculous.js"></script>
	<script type="text/javascript" src="functions.js"></script>
</head>

<body>

<script type="text/javascript">
function init() {

	var limit_set = getCookie("ttrss_bwlimit");

	if (limit_set == "true") {
		document.forms["loginForm"].bw_limit.checked = true;
	}

	document.forms["loginForm"].login.focus();
}

function fetchProfiles() {
	try {
		var params = Form.serialize('loginForm');
		var query = "?op=getProfiles&" + params;
		
		if (query) {
			new Ajax.Request("backend.php",	{
				parameters: query,
					onComplete: function(transport) {
						if (transport.responseText.match("select")) {
							$('profile_box').innerHTML = transport.responseText;
						}
				} });
		}

	} catch (e) {
		exception_error("fetchProfiles", e);
	}
}


function languageChange(elem) {
	try {
		document.forms['loginForm']['click'].disabled = true;
	
		var lang = elem[elem.selectedIndex].value;
		setCookie("ttrss_lang", lang, <?php print SESSION_COOKIE_LIFETIME ?>);
		window.location.reload();
	} catch (e) {
		exception_error("languageChange", e);
	}
}

function gotoRegForm() {
	window.location.href = "register.php";
	return false;
}

function bwLimitChange(elem) {
	try {
		var limit_set = elem.checked;

		setCookie("ttrss_bwlimit", limit_set, 
			<?php print SESSION_COOKIE_LIFETIME ?>);

	} catch (e) {
		exception_error("bwLimitChange", e);
	}
}

function validateLoginForm(f) {
	try {

		if (f.login.value.length == 0) {
			new Effect.Highlight(f.login);
			return false;
		}

		if (f.password.value.length == 0) {
			new Effect.Highlight(f.password);
			return false;
		}

		document.forms['loginForm']['click'].disabled = true;

		return true;
	} catch (e) {
		exception_error("validateLoginForm", e);
		return true;
	}
}
</script>

<script type="text/javascript">
	Event.observe(window, 'load', function() {
		init();
	});
</script>

<form action="" method="POST" id="loginForm" name="loginForm" onsubmit="return validateLoginForm(this)">
<input type="hidden" name="login_action" value="do_login">

<table width="100%" class="loginForm2">
<tr>
	<td class="loginTop" valign="bottom" align="left">
		<img src="images/ttrss_logo_big.png" alt="Logo">
	</td>
</tr><tr>
	<td align="center" valign="middle" class="loginMiddle" height="100%">
		<?php if ($_SESSION['login_error_msg']) { ?>
			<div class="loginError"><?php echo $_SESSION['login_error_msg'] ?></div>
			<?php $_SESSION['login_error_msg'] = ""; ?>
		<?php } ?>
		<table>
			<tr><td align="right"><?php echo __("Login:") ?></td>
			<td align="right"><input name="login" 
				onchange="fetchProfiles()" onfocus="fetchProfiles()"
				value="<?php echo $_SERVER["REMOTE_USER"] ?>"></td></tr>
			<tr><td align="right"><?php echo __("Password:") ?></td>
			<td align="right"><input type="password" name="password"
				onchange="fetchProfiles()" onfocus="fetchProfiles()"
				value="<?php echo $_SERVER["REMOTE_USER"] ?>"></td></tr>
			<?php if (ENABLE_TRANSLATIONS) { ?>
			<tr><td align="right"><?php echo __("Language:") ?></td>
			<td align="right">
			<?php
				print_select_hash("language", $_COOKIE["ttrss_lang"], get_translations(),
					"style='width : 100%' onchange='languageChange(this)'");

			?>
			</td></tr>
			<?php } ?>

			<tr><td align="right"><?php echo __("Profile:") ?></td>
			<td align="right" id="profile_box">
			<select style='width : 100%' disabled='1'>
				<option><?php echo __("Default profile") ?></option></select>
			</td></tr>

			<!-- <tr><td colspan="2">
				<input type="checkbox" name="remember_me" id="remember_me">
				<label for="remember_me">Remember me on this computer</label>
			</td></tr> -->

			<tr><td colspan="2" align="right" class="innerLoginCell">

			<button name='click'><?php echo __('Log in') ?></button>
			<?php if (defined('ENABLE_REGISTRATION') && ENABLE_REGISTRATION) { ?>
				<button onclick="return gotoRegForm()">
					<?php echo __("Create new account") ?></button>
			<?php } ?>

				<input type="hidden" name="action" value="login">
				<input type="hidden" name="rt" 
					value="<?php if ($return_to != 'none') { echo $return_to; } ?>">
			</td></tr>

			<tr><td colspan="2" align="right" class="innerLoginCell">

			<div class="small">
			<input name="bw_limit" id="bw_limit" type="checkbox"
				onchange="bwLimitChange(this)">
			<label for="bw_limit">
			<?php echo __("Limit bandwidth usage") ?></label></div>
<commit_msg>IE: fix being unable to login<commit_after><html>
<head>
	<title>Tiny Tiny RSS : Login</title>
	<link rel="stylesheet" type="text/css" href="tt-rss.css">
	<link rel="shortcut icon" type="image/png" href="images/favicon.png">
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<script type="text/javascript" src="lib/prototype.js"></script>
	<script type="text/javascript" src="lib/scriptaculous/scriptaculous.js"></script>
	<script type="text/javascript" src="functions.js"></script>
</head>

<body>

<script type="text/javascript">
function init() {

	var limit_set = getCookie("ttrss_bwlimit");

	if (limit_set == "true") {
		document.forms["loginForm"].bw_limit.checked = true;
	}

	document.forms["loginForm"].login.focus();
}

function fetchProfiles() {
	try {
		var params = Form.serialize('loginForm');
		var query = "?op=getProfiles&" + params;
		
		if (query) {
			new Ajax.Request("backend.php",	{
				parameters: query,
					onComplete: function(transport) {
						if (transport.responseText.match("select")) {
							$('profile_box').innerHTML = transport.responseText;
						}
				} });
		}

	} catch (e) {
		exception_error("fetchProfiles", e);
	}
}


function languageChange(elem) {
	try {
		document.forms['loginForm']['click'].disabled = true;
	
		var lang = elem[elem.selectedIndex].value;
		setCookie("ttrss_lang", lang, <?php print SESSION_COOKIE_LIFETIME ?>);
		window.location.reload();
	} catch (e) {
		exception_error("languageChange", e);
	}
}

function gotoRegForm() {
	window.location.href = "register.php";
	return false;
}

function bwLimitChange(elem) {
	try {
		var limit_set = elem.checked;

		setCookie("ttrss_bwlimit", limit_set, 
			<?php print SESSION_COOKIE_LIFETIME ?>);

	} catch (e) {
		exception_error("bwLimitChange", e);
	}
}

function validateLoginForm(f) {
	try {

		if (f.login.value.length == 0) {
			new Effect.Highlight(f.login);
			return false;
		}

		if (f.password.value.length == 0) {
			new Effect.Highlight(f.password);
			return false;
		}

		document.forms['loginForm']['click'].disabled = true;

		return true;
	} catch (e) {
		exception_error("validateLoginForm", e);
		return true;
	}
}
</script>

<script type="text/javascript">
	Event.observe(window, 'load', function() {
		init();
	});
</script>

<form action="" method="POST" id="loginForm" name="loginForm" onsubmit="return validateLoginForm(this)">
<input type="hidden" name="login_action" value="do_login">

<table width="100%" class="loginForm2">
<tr>
	<td class="loginTop" valign="bottom" align="left">
		<img src="images/ttrss_logo_big.png" alt="Logo">
	</td>
</tr><tr>
	<td align="center" valign="middle" class="loginMiddle" height="100%">
		<?php if ($_SESSION['login_error_msg']) { ?>
			<div class="loginError"><?php echo $_SESSION['login_error_msg'] ?></div>
			<?php $_SESSION['login_error_msg'] = ""; ?>
		<?php } ?>
		<table>
			<tr><td align="right"><?php echo __("Login:") ?></td>
			<td align="right"><input name="login" 
				onchange="fetchProfiles()" onfocus="fetchProfiles()"
				value="<?php echo $_SERVER["REMOTE_USER"] ?>"></td></tr>
			<tr><td align="right"><?php echo __("Password:") ?></td>
			<td align="right"><input type="password" name="password"
				onchange="fetchProfiles()" onfocus="fetchProfiles()"
				value="<?php echo $_SERVER["REMOTE_USER"] ?>"></td></tr>
			<?php if (ENABLE_TRANSLATIONS) { ?>
			<tr><td align="right"><?php echo __("Language:") ?></td>
			<td align="right">
			<?php
				print_select_hash("language", $_COOKIE["ttrss_lang"], get_translations(),
					"style='width : 100%' onchange='languageChange(this)'");

			?>
			</td></tr>
			<?php } ?>

			<tr><td align="right"><?php echo __("Profile:") ?></td>
			<td align="right" id="profile_box">
			<select style='width : 100%' disabled='1'>
				<option><?php echo __("Default profile") ?></option></select>
			</td></tr>

			<!-- <tr><td colspan="2">
				<input type="checkbox" name="remember_me" id="remember_me">
				<label for="remember_me">Remember me on this computer</label>
			</td></tr> -->

			<tr><td colspan="2" align="right" class="innerLoginCell">

			<button type="submit" name='click'><?php echo __('Log in') ?></button>
			<?php if (defined('ENABLE_REGISTRATION') && ENABLE_REGISTRATION) { ?>
				<button onclick="return gotoRegForm()">
					<?php echo __("Create new account") ?></button>
			<?php } ?>

				<input type="hidden" name="action" value="login">
				<input type="hidden" name="rt" 
					value="<?php if ($return_to != 'none') { echo $return_to; } ?>">
			</td></tr>

			<tr><td colspan="2" align="right" class="innerLoginCell">

			<div class="small">
			<input name="bw_limit" id="bw_limit" type="checkbox"
				onchange="bwLimitChange(this)">
			<label for="bw_limit">
			<?php echo __("Limit bandwidth usage") ?></label></div>

{'fraction_non_alphanumeric': 0.20497803806734993, 'fraction_numerical': 0.00418322526668061, 'mean_word_length': 4.785238959467635, 'pattern_counts': {'":': 0, '<': 221, '<?xml version=': 0, '>': 221, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1014366', 'n_tokens_mistral': 3707, 'n_tokens_neox': 3264, 'n_words': 646}