Ir para conteúdo
Fórum Script Brasil
  • 0

(Resolvido) Login e senha Correta mas não entra


shopgoias

Pergunta

Ola Caros Amigos modifiquei a pagina do microtik para os clientes conectarem no provedor via radio so que quando digita o login e senha mesmo tando corretos ele não conecta irei colocar a pagina original e a que eu modifiquei, por favor me ajudem.. Obrigado

Modificada

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>|&gt;&gt;Cafe Online&lt;&lt;| Sinal de Qualidade</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="expires" content="-1" />
<style type="text/css">
body {color: #737373; font-size: 10px; font-family: verdana;}

textarea,input,select {
background-color: #FDFBFB;
border: 1px solid #BBBBBB;
padding: 2px;
margin: 1px;
font-size: 14px;
color: #808080;
}

a, a:link, a:visited, a:active { color: #AAAAAA; text-decoration: none; font-size: 10px; }
a:hover { border-bottom: 1px dotted #c1c1c1; color: #AAAAAA; }
img {border: none;}
td { font-size: 14px; color: #7A7A7A; }
</style>

</head>

<body>
$(if chap-id)
    <form name="sendin" action="$(link-login-only)" method="post">
        <input type="hidden" name="username" />
        <input type="hidden" name="password" />
        <input type="hidden" name="dst" value="$(link-orig)" />
        <input type="hidden" name="popup" value="true" />
    </form>
    
    <script type="text/javascript" src="/md5.js"></script>
    <script type="text/javascript">
    <!--
        function doLogin() {
        document.sendin.username.value = document.login.username.value;
        document.sendin.password.value = hexMD5('$(chap-id)' + document.login.password.value + '$(chap-challenge)');
        document.sendin.submit();
        return false;
        }
    //-->
    </script>
$(endif)

<div align="center">
</div>

<table width="100%" style="margin-top: 10%;">
    <tr>
    <td align="center" valign="middle">
        <div class="notice" style="color: #c1c1c1; font-size: 9px"><br />
      </div>
        <table width="240" height="240" style="border: 1px solid #cccccc; padding: 0px;" cellpadding="0" cellspacing="0">
            <tr>
                <td align="center" valign="bottom" height="175" colspan="2">
                    <form name="login" action="$(link-login-only)" method="post"
                        $(if chap-id) onSubmit="return doLogin()" $(endif)>
                        <input type="hidden" name="dst" value="$(link-orig)" />
                        <input type="hidden" name="popup" value="true" />
              <table width="640" height="479" border="0" cellpadding="3" cellspacing="0">
                <tr> 
                  <td valign="top" style="background-image: url(img/cafe.jpg);"> 
                    <table width="100%" border="0" cellspacing="0" cellpadding="3">
                      <tr> 
                        <td width="36%" height="154">&nbsp;</td>
                        <td width="64%">&nbsp;</td>
                      </tr>
                      <tr> 
                        <td height="31">&nbsp;</td>
                        <td><input style="width: 80px" name="username2" type="text" value="$(username)"/></td>
                      </tr>
                      <tr> 
                        <td height="20" valign="top" style="font-size:10px;"><img name="" src="" width="1" height="5" alt="" /></td>
                        <td valign="top" style="font-size:10px;"><img name="" src="" width="1" height="5" alt="" /></td>
                      </tr>
                      <tr> 
                        <td height="33">&nbsp;</td>
                        <td><input style="width: 80px" name="password2" type="password"/></td>
                      </tr>
                      <tr>
                        <td height="33">&nbsp;</td>
                        <td><input name="submit" type="submit" value="OK" /></td>
                      </tr>
                    </table></td>
                </tr>
              </table>
              </form>
                </td>
            </tr>
            <tr>
          <td align="center">&nbsp;</td>
        </tr>
        </table>
    
    <br />
    <div style="color: #c1c1c1; font-size: 9px">Powered by Caf&eacute; Online  &copy; 2008</div>
    $(if error)<br /><div style="color: #FF8080; font-size: 9px">$(error)</div>$(endif)
    </td>
    </tr>
</table>

<script type="text/javascript">
<!--
  document.login.username.focus();
//-->
</script>
</body>
</html>
Original
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>mikrotik hotspot > login</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="expires" content="-1" />
<style type="text/css">
body {color: #737373; font-size: 10px; font-family: verdana;}

textarea,input,select {
background-color: #FDFBFB;
border: 1px solid #BBBBBB;
padding: 2px;
margin: 1px;
font-size: 14px;
color: #808080;
}

a, a:link, a:visited, a:active { color: #AAAAAA; text-decoration: none; font-size: 10px; }
a:hover { border-bottom: 1px dotted #c1c1c1; color: #AAAAAA; }
img {border: none;}
td { font-size: 14px; color: #7A7A7A; }
</style>

</head>

<body>
$(if chap-id)
    <form name="sendin" action="$(link-login-only)" method="post">
        <input type="hidden" name="username" />
        <input type="hidden" name="password" />
        <input type="hidden" name="dst" value="$(link-orig)" />
        <input type="hidden" name="popup" value="true" />
    </form>
    
    <script type="text/javascript" src="/md5.js"></script>
    <script type="text/javascript">
    <!--
        function doLogin() {
        document.sendin.username.value = document.login.username.value;
        document.sendin.password.value = hexMD5('$(chap-id)' + document.login.password.value + '$(chap-challenge)');
        document.sendin.submit();
        return false;
        }
    //-->
    </script>
$(endif)

<div align="center">
<a href="$(link-login-only)?target=lv&amp;dst=$(link-orig-esc)">Latviski</a>
</div>

<table width="100%" style="margin-top: 10%;">
    <tr>
    <td align="center" valign="middle">
        <div class="notice" style="color: #c1c1c1; font-size: 9px">Please log on to use the mikrotik hotspot service<br />$(if trial == 'yes')Free trial available, <a style="color: #FF8080"href="$(link-login-only)?dst=$(link-orig-esc)&amp;username=T-$(mac-esc)">click here</a>.$(endif)</div><br />
        <table width="240" height="240" style="border: 1px solid #cccccc; padding: 0px;" cellpadding="0" cellspacing="0">
            <tr>
                <td align="center" valign="bottom" height="175" colspan="2">
                    <form name="login" action="$(link-login-only)" method="post"
                        $(if chap-id) onSubmit="return doLogin()" $(endif)>
                        <input type="hidden" name="dst" value="$(link-orig)" />
                        <input type="hidden" name="popup" value="true" />
                        
                            <table width="100" style="background-color: #ffffff">
                                <tr><td align="right">login</td>
                                        <td><input style="width: 80px" name="username" type="text" value="$(username)"/></td>
                                </tr>
                                <tr><td align="right">password</td>
                                        <td><input style="width: 80px" name="password" type="password"/></td>
                                </tr>
                                <tr><td>&nbsp;</td>
                                        <td><input type="submit" value="OK" /></td>
                                </tr>
                            </table>
                    </form>
                </td>
            </tr>
            <tr><td align="center"><a href="http://www.mikrotik.com" target="_blank" style="border: none;"><img src="/img/logobottom.png" alt="mikrotik" /></a></td></tr>
        </table>
    
    <br /><div style="color: #c1c1c1; font-size: 9px">Powered by mikrotik routeros &copy; 2005 mikrotik</div>
    $(if error)<br /><div style="color: #FF8080; font-size: 9px">$(error)</div>$(endif)
    </td>
    </tr>
</table>

<script type="text/javascript">
<!--
  document.login.username.focus();
//-->
</script>
</body>
</html>

Link para o comentário
Compartilhar em outros sites

2 respostass a esta questão

Posts Recomendados

  • 0

O problema é simples

O php usa o nome do campo pra indentificar o mesmo, se você dar um copiar e colar o DW que você deve ter usado muda o nome do campo para [nome]2 porque obviamente uma pagina não pode ter dois campos com a mesma identificacao.

Veja no exemplo:

<input style="width: 80px" name="username2" type="text" value="$(username)"/>

name="username2"

Tire o 2 dali que funciona

Link para o comentário
Compartilhar em outros sites

Participe da discussão

Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emoticons são permitidos.

×   Seu link foi incorporado automaticamente.   Exibir como um link em vez disso

×   Seu conteúdo anterior foi restaurado.   Limpar Editor

×   Você não pode colar imagens diretamente. Carregar ou inserir imagens do URL.



  • Estatísticas dos Fóruns

    • Tópicos
      152,2k
    • Posts
      652k
×
×
  • Criar Novo...