Foros del Web » Programando para Internet » ASP Clásico »

Validar solo con password

Estas en el tema de Validar solo con password en el foro de ASP Clásico en Foros del Web. hola!!! necesito su ayuda estoy tratando de hacer una pagina me valide proyectos pero al hora de validarlos todos esos proyectos me mande traer una ...
  #1 (permalink)  
Antiguo 24/06/2010, 23:16
 
Fecha de Ingreso: mayo-2010
Mensajes: 78
Antigüedad: 14 años
Puntos: 0
Validar solo con password

hola!!! necesito su ayuda estoy tratando de hacer una pagina me valide proyectos pero al hora de validarlos todos esos proyectos me mande traer una pagina o un link que me pida el password del usuario pero que sea el mismo de ingreso a dicha pagina y asi al validarlo me muestre Q los proyectos han sido validados por esa pérsona y que me muestre hasta el final de la pagina el nombre de la parsona que los valido y la fecha dddmmmaaa
este es mi codigo al mandar traer la pagina o popup para el password

Código ASP:
Ver original
  1. <body><script language=javascript>
  2. <!--//BEGIN Script
  3.  
  4. function link1(url) {
  5.  
  6. link = window.open(url,"Link","toolbar=NO,location=NO,directories=NO,status=NO,menubar=NO,scrollbars=NO,resizable=YES,width=300,height=290,left=380,top=80");
  7.  
  8. }
  9. //END Script-->
  10. </script>
  11. </body>
  12.  
  13. <%if rs("perfil_usu")="administrador" or rs("perfil_usu")="captura" then%>
  14.        <div align="center">
  15.          <fieldset style="width:50%">
  16.          <legend>Aprobacion Master Plan</legend>
  17.            <table width="303" border="0" align="center">
  18.            <tr>
  19.              <td width="150" align="left">Master Plan Aprobado por: </td>
  20.            </tr>
  21.          </table>
  22.          <%end if%>
  23.          </fieldset>
  24.         </div>
  25.        <p align="center">
  26.          <%if rs("perfil_usu")="administrador" then%>
  27.          <input type="button" name="Aprobar Master Plan" id="Aprobar Master Plan" value="Aprobar Master Plan" onClick="link1('http://valp-page.la.pg.com/Proyectosi/Aprobar.asp')"/>
  28.          <%end if%>

este es mi codigo de la pagina de password :::
Código ASP:
Ver original
  1. </style>
  2. <head>
  3. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  4. <title>Sistema de Proyectos</title>
  5. <script language="javascript">
  6. function focos(){
  7. document.formidentifica.txtlgn.focus();
  8. }
  9.  
  10.  
  11.  
  12. function logeo()
  13. {
  14.     document.formidentifica.action="logeo_Aprobar.asp";
  15.     document.formidentifica.submit();
  16. }
  17.  
  18. function cancelar()
  19. {
  20.     document.formidentifica.action="Aprobar.asp";
  21.     document.formidentifica.submit();
  22. }
  23. </script>
  24. <style>
  25. #txtlgn , #txtpwd
  26. {
  27. text-transform:uppercase;
  28. }
  29. </style>
  30. </head>
  31.  
  32. <body bgcolor="#F1ECC7" onload="focos()">
  33. <table width="85%" height="302" border="0" cellpadding="3" cellspacing="0">
  34.   <tr>
  35.     <td height="18">&nbsp;</td>
  36.   </tr>
  37.   <tr>
  38.     <td height="217">
  39.         <table width="44%" height="134" border="1" align="center" bgcolor="#F4F8FF">
  40.           <tr>
  41.             <td height="128"><form id="form1" name="form1" method="post" action="Aprobar_login1.asp">
  42.               <table width="98%" height="122" border="0" align="right">
  43.                 <tr>
  44.                   <td width="30%" class="style2">&nbsp;</td>
  45.                   <td width="68%"><label></label></td>
  46.                   <td width="2%" rowspan="2"></td>
  47.                 </tr>
  48.                 <tr>
  49.                   <td height="22" class="style2"> <div align="center" class="style3">PASSWORD:</div></td>
  50.                   <td><label>
  51.                    
  52.                     <div align="left">
  53.                       <input type="password" name="pass" />
  54.                     </div>
  55.                   </label></td>
  56.                 </tr>
  57.                 <tr>
  58.                   <td height="24" colspan="3">                  
  59.                     <div align="center">
  60.                       <input type="submit" name="Submit" value="Enviar" />
  61.                     </div>
  62.                 </tr>
  63.                 <tr>
  64.                   <td height="20" colspan="3" class="error"><div align="center"><%=request.QueryString("mensaje")%></div></td>
  65.                 </tr>
  66.               </table>
  67.             </form>            </td>
  68.           </tr>
  69.       </table>
  70.         <hr width="30%" color="#006699" />
  71.     <p align="center">*Nota: El Password para ingresar al sistema, es el Password de intranet.*</p>    </td>
  72.   </tr>
  73. </table>
  74.     </td>
  75.   </tr>
  76. </table>

y este es mi codigo de logeo q valida al usuario y contraseña pero solo necesito contraseña::: y al hor de q le de enviar o m valide el password la pagina me muestre la persona que lo valido y la fecha::::
Código ASP:
Ver original
  1. </style>
  2. <head>
  3. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  4. <title>Sistema de Proyectos</title>
  5. <script language="javascript">
  6. function focos(){
  7. document.formidentifica.txtlgn.focus();
  8. }
  9.  
  10.  
  11.  
  12. function logeo()
  13. {
  14.     document.formidentifica.action="logeo_Aprobar.asp";
  15.     document.formidentifica.submit();
  16. }
  17.  
  18. function cancelar()
  19. {
  20.     document.formidentifica.action="Aprobar.asp";
  21.     document.formidentifica.submit();
  22. }
  23. </script>
  24. <style>
  25. #txtlgn , #txtpwd
  26. {
  27. text-transform:uppercase;
  28. }
  29. </style>
  30. </head>
  31.  
  32. <body bgcolor="#F1ECC7" onload="focos()">
  33. <table width="85%" height="302" border="0" cellpadding="3" cellspacing="0">
  34.   <tr>
  35.     <td height="18">&nbsp;</td>
  36.   </tr>
  37.   <tr>
  38.     <td height="217">
  39.         <table width="44%" height="134" border="1" align="center" bgcolor="#F4F8FF">
  40.           <tr>
  41.             <td height="128"><form id="form1" name="form1" method="post" action="Aprobar_login1.asp">
  42.               <table width="98%" height="122" border="0" align="right">
  43.                 <tr>
  44.                   <td width="30%" class="style2">&nbsp;</td>
  45.                   <td width="68%"><label></label></td>
  46.                   <td width="2%" rowspan="2"></td>
  47.                 </tr>
  48.                 <tr>
  49.                   <td height="22" class="style2"> <div align="center" class="style3">PASSWORD:</div></td>
  50.                   <td><label>
  51.                    
  52.                     <div align="left">
  53.                       <input type="password" name="pass" />
  54.                     </div>
  55.                   </label></td>
  56.                 </tr>
  57.                 <tr>
  58.                   <td height="24" colspan="3">                  
  59.                     <div align="center">
  60.                       <input type="submit" name="Submit" value="Enviar" />
  61.                     </div>
  62.                 </tr>
  63.                 <tr>
  64.                   <td height="20" colspan="3" class="error"><div align="center"><%=request.QueryString("mensaje")%></div></td>
  65.                 </tr>
  66.               </table>
  67.             </form>            </td>
  68.           </tr>
  69.       </table>
  70.         <hr width="30%" color="#006699" />
  71.     <p align="center">*Nota: El Password para ingresar al sistema, es el Password de intranet.*</p>    </td>
  72.   </tr>
  73. </table>
  74.     </td>
  75.   </tr>
  76. </table>


y por ultimo mi funcion de aprobar logeo paro slo necesito el password
Código ASP:
Ver original
  1. <%
  2. mensaje="Usuario o Contraseña invalida."
  3. correo=request.Form("correo")
  4. pass=request.Form("pass")
  5. texto="Login invalido"
  6. correo=replace(correo,"'","")
  7. pass=replace(pass,"'","")
  8.  
  9. SQL="SELECT * FROM proy_usuarios WHERE login_usu='"&correo&"' and activo='1' "
  10. response.Write(sql)
  11. 'response.End()
  12. set RS = prycxn.execute(SQL)
  13.  
  14.  
  15. if RS.eof  then
  16.     response.Redirect("Aprobar_login.asp?mensaje=Usuario no registrado o Usuario no activo")
  17. else
  18.     if pass = "proyectosI2010" then
  19.    
  20.         Session("passo")=pass
  21.  
  22.         Session("usuario")=correo
  23.         Session("perfil")=rs("privilegio")
  24.         response.Redirect("ProyAsp/PryPrincipal.asp")
  25.     else
  26.         Set XMLHttp = Server.CreateObject("Msxml2.ServerXMLHTTP.3.0")
  27.         XMLHttp.open "GET", "https://wirekey.pg.com/xgdsauth/xlogon.plx?xusr="&correo&"&xpwd="&pass&"", false
  28.         XMLHttp.send()
  29.         Set xmldoc = Server.CreateObject("Microsoft.XMLDOM")
  30.         xmldoc.async = false    
  31.         xmldoc.load(XMLHttp.responseBody)
  32.         if xmldoc.parseError.errorCode=0 then
  33.             Set nodeList = xmldoc.documentElement.getElementsByTagName("results")
  34.             Set node = nodeList(0)
  35.             messageCode =  node.ChildNodes(0).Text
  36.             if messageCode = 0 then
  37.                 Session("usuario")=correo
  38.                 Session("idUsuario")=rs("id_usu")
  39.                 Session("perfil")=rs("perfil")
  40.                 session("autoridad")=rs("perfil_usu")
  41.  
  42.                 response.Redirect("ProyAsp/PryPrincipal.asp")
  43.             else
  44.                 response.Redirect("Aprobar.asp?mensaje=Password invalido")
  45.             end if 
  46.         else
  47.             response.Redirect("Aprobar.asp?mensaje=Password invalido")
  48.         end if
  49.     end if
  50. end if
  51. %>
esta confuso

Etiquetas: password
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 17:32.