<%
'-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
' Loja Exemplo Locaweb
' Versão: 6.5
' Data: 12/09/06
' Arquivo: conta_usuario_altera_senha.asp
' Versão do arquivo: 0.0
' Data da ultima atualização: 19/06/07
'
'-----------------------------------------------------------------------------
' Licença Código Livre: http://comercio.Locaweb.com.br/gpl/gpl.txt
'-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-

page = "conta_usuario_cadastrado"
rodape = "no"

'Checa se o usuário está autenticado
If Session("logado") = "" Then
    Response.Redirect "autentica.asp?lang="&Request("lang")&"&tipo_acesso=conta"
End if
%>
<!--#INCLUDE FILE="funcoes/funcoes_usuario.asp" -->
<!--#INCLUDE FILE="funcoes/funcoes_uteis.asp" -->
<table height="100%" width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
        <td colspan="3" valign="top" height="30"><!--#INCLUDE FILE="cabecalho.asp" --></td>
    </tr>
    <tr>
        <td valign="top" height="10%" width="10%" class="TBLlatesquerda"><!--#INCLUDE FILE="menu.asp" --></td>
        <td valign="top" height="95%">
            <form method="post" action="" name="senha">
            <input type="hidden" name="acao" value="alterar">
            <table cellspacing="0" cellpadding="10" width="100%">
                <tr>
                    <td>
                        <table border=0 align="center" cellpadding="0" cellspacing="0"  bgcolor="#FFFFFF" id="dadostable" width="100%">
                            <tr>
                                <td colspan="6" height="20"><A href="conta_usuario.asp?lang=<%=varLang%>" class="textos_infos"><%=Application("GblTxtVoltar")%></A></td>
                            </tr>
                            <%
                            If Request("acao") = "alterar" Then
                                Altera_Senha = TrocaSenhaUsuario(Conexao, Session("user_Id"), Request.form("senha_atual"), Request.form("nova_senha"))
                                If Altera_Senha = "0" Then 
                                    varMsgSenha = Application("CtussenTxtMSG1")
                                ElseIf Altera_Senha = "1" Then 
                                    varMsgSenha = Application("CtussenTxtMSG2")
                                ElseIf Altera_Senha = "2" Then 
                                    varMsgSenha = Application("CtussenTxtMSG3")
                                End if
                            %>
                            <tr bgcolor="#FFFF00">
                                <td colspan="6" align="center" height="18" valign="middle"><B><FONT COLOR="#000000"><%= varMsgSenha%></FONT></B></td>
                            </tr>
                            <%
                            End if
                            %>
                            <tr class="FUNDOTABtopico">
                                <td colspan="6" align="center" height="18" valign="middle"><B><span class="TXTTABtopico"><%=Application("CtussenTxtTitTrocasenha")%></span></B></td>
                            </tr>
                            <tr bgcolor="#FFFFFF">
                                <td align="center"  valign="top">
                                    <table width="100%" border=0 align="center" cellpadding="4" cellspacing="1" bgcolor="#CCCCCC">
                                        <tr bgcolor="#EFEFEF">        
                                            <td align="center">
                                                <table border="0" cellpadding="6" cellspacing="1" bgcolor="#CCCCCC">
                                                  <tr>
                                                    <td bgcolor="#FFFFFF" colspan="2"><table width="100%" border="0" align="center" cellpadding="2" cellspacing="0">
                                                      <tr>
                                                        <td colspan="2"><table width="100%"  border="0" cellpadding="4" cellspacing="1" bgcolor="#CCCCCC">
                                                            <tr>
                                                              <td bgcolor="#F7F7F7"><table border="0" class="formulario">
                                                                  <tr>
                                                                    <td align="center"><b><span class="TextoPadrao"><%=Application("CtussenTxEmail")%>: <font color="#FF0000"><%= Session("user_Id")%></font></span></b></td>
                                                                  </tr>
                                                              </table></td>
                                                            </tr>
                                                        </table></td>
                                                      </tr>
                                                      <tr>
                                                        <td><span class="TextoItem"><b><%=Application("CtussenTxtSenAtual")%>:</b></span></td>
                                                        <td><input type="password" name="senha_atual" maxlength="20" size="30" value="" class="FORMbox"></td>
                                                      </tr>
                                                      <tr>
                                                        <td><span class="TextoItem"><b><%=Application("CtussenTxtNovaSen")%>:</b></span></td>
                                                        <td><input type="password" name="nova_senha" maxlength="100" size="30" value="" class="FORMbox"></td>
                                                      </tr>
                                                      <tr>
                                                        <td><span class="TextoItem"><b><%=Application("CtussenTxtConfSen")%>:</b></span></td>
                                                        <td><input type="password" name="confirma_senha" maxlength="20" size="30" value="" class="FORMbox"></td>
                                                      </tr>
                                                    </table></td>
                                                  </tr>
                                                </table>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                            <tr bgcolor="#FFFFFF">
                                <td height="40" align="center"><input TYPE="submit" value="<%= Application("CtussenBttAltSenha")%>" class="BTTN1" Onclick="return valida_trocapassword(document.senha);"></td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
            </form>        
        </td>
        <td valign="top" height="10%" width="10%" class="TBLlatdireita"><!--#INCLUDE FILE="lateral_servicos.asp" --></td>
    </tr>
    <tr>
        <td colspan="3" valign="top"><!--#INCLUDE FILE="rodape.htm" --></td>
    </tr>
</table>