Make login/logout forms https-aware

This commit is contained in:
Aleksei Miheev
2014-01-05 13:05:16 +00:00
parent a28a38ccbc
commit c623b24515
4 changed files with 6 additions and 6 deletions

View File

@@ -454,7 +454,7 @@ function template_main()
<img src="', $settings['images_url'], '/icons/login.gif" alt="', $txt[34], '" border="0" /></a>
</td>
<td class="windowbg2" valign="middle">
<form action="', str_replace('http://', 'https://', $scripturl), '?action=login2" method="post" style="margin: 0;">
<form action="', str_replace('http://', 'http://', $scripturl), '?action=login2" method="post" style="margin: 0;">
<table border="0" cellpadding="2" cellspacing="0" align="center" width="100%"><tr>
<td valign="middle" align="left">
<label for="user"><strong>', $txt[35], ':</strong><br /><input type="text" name="user" id="user" size="15" /></label>

View File

@@ -7,7 +7,7 @@ function template_login()
global $context, $settings, $options, $scripturl, $modSettings, $txt;
echo '
<form action="', str_replace('http://', 'https://', $scripturl), '?action=login2" name="frmLogin" method="post" style="margin-top: 4ex;">
<form action="', str_replace('http://', 'http://', $scripturl), '?action=login2" name="frmLogin" method="post" style="margin-top: 4ex;">
<table border="0" width="400" cellspacing="0" cellpadding="4" class="tborder" align="center">
<tr class="titlebg">
<td colspan="2">
@@ -67,7 +67,7 @@ function template_kick_guest()
// This isn't that much... just like normal login but with a message at the top.
echo '
<form action="', str_replace('http://','https://', $scripturl), '?action=login2" method="post" name="frmLogin">
<form action="', str_replace('http://','http://', $scripturl), '?action=login2" method="post" name="frmLogin">
<table border="0" cellspacing="0" cellpadding="3" class="tborder" align="center">
<tr class="titlebg">
<td>', $txt[633], '</td>
@@ -124,7 +124,7 @@ function template_maintenance()
// Display the administrator's message at the top.
echo '
<form action="', str_replace('http://', 'https://', $scripturl), '?action=login2" method="post">
<form action="', str_replace('http://', 'http://', $scripturl), '?action=login2" method="post">
<table border="0" width="86%" cellspacing="0" cellpadding="3" class="tborder" align="center">
<tr class="titlebg">
<td colspan="2">', $context['title'], '</td>

View File

@@ -31,7 +31,7 @@ function template_before()
return true;
}
// --></script>
<form action="', str_replace('http://','https://',$scripturl), '?action=register2" method="post" name="creator" onsubmit="return defaultagree();">
<form action="', str_replace('http://','http://',$scripturl), '?action=register2" method="post" name="creator" onsubmit="return defaultagree();">
<table border="0" width="100%" cellpadding="3" cellspacing="0" class="tborder">
<tr class="titlebg">
<td>', $txt[97], ' - ', $txt[517], '</td>

View File

@@ -238,7 +238,7 @@ function template_main_above()
', $txt['welcome_guest'], '<br />
', $context['current_time'], '<br />
<form action="', str_replace('http://','https://', $scripturl), '?action=login2" method="post" style="margin: 3px 1ex 1px 0; text-align:right;">
<form action="', str_replace('http://','http://', $scripturl), '?action=login2" method="post" style="margin: 3px 1ex 1px 0; text-align:right;">
<input title="Имя" type="text" name="user" size="10" /> <input title="Пароль" type="password" name="passwrd" size="10" />
<select title="Помнить меня" name="cookielength">
<option value="60">', $txt['smf53'], '</option>