ParsX.com
پذیرش پروژه از دانشجویی ... تا سازمانی 09376225339
 
   ProfileProfile   Log in to check your private messagesLog in to check your private messages  |  FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups Log inLog in   RegisterRegister 

كمك در پروژه

 
Post new topic   Reply to topic    ParsX.com Forum Index -> راهنمايي در پروژه
View previous topic :: View next topic  
Author Message
pink
مهمون يكي دو روزه


Joined: 21 Aug 2010
Posts: 6

PostPosted: Sat Aug 21, 2010 10:32 pm    Post subject: كمك در پروژه Reply with quote

من براي صفحه ي عضويت وب سايتي كه طراحي كردم به مشكل برخوردم.
كدها و شرط هاي asp براي صفحه ي عضويت و صفحه ي ورود كاربران رو مي خوام.
اگه در اين زمينه بهم كمكي كنيد ممنون ميشم.
Back to top
vahid
بي تو هرگز


Joined: 26 Nov 2004
Posts: 2970
Location: Tehran

PostPosted: Sun Aug 22, 2010 9:17 am    Post subject: Reply with quote

سورس login.asp
<!--#include file="includelogin.asp"--><html>    <head>   <meta http-equiv="Content-Language" content="en">   <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">   <meta name="GENERATOR" content="Microsoft FrontPage 4.0">   <meta name="ProgId" content="FrontPage.Editor.Document">   <title>You need to login</title>   </head>    <body>    <%=sText%>      <%   Dim sURL   sURL = Request.ServerVariables("SCRIPT_NAME")   If Request.ServerVariables("QUERY_STRING") <> "" Then      '      sURL = sURL & "?" & Request.ServerVariables("QUERY_STRING")    End If   %>    <form method="POST" action="<%=sURL%>">   <input type="hidden" name="dologin" value="yes">     <table border="0" width="100%">       <tr>      <td>Loginname:</td>      <td><input name="id" size="20"></td>    </tr>    <tr>      <td>Password:</td>      <td><input type="password" name="pwd" size="20"></td>    </tr>  </table>  <p><input type="submit" value="Login" name="B1"></p>   </form>    </body>    </html><%      Response.EndEnd If%>

سورس includelogin.asp
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%><%Response.Buffer = True  Function ValidateLogin( sId, sPwd )    ' For you to validate ID and PASSWORD   ' Maybe against a database   ' Here we have hardcoded some OK id:s and passwords   '   ValidateLogin = False   If sId = "anil_rash" AND sPwd="rashmi" Then      ValidateLogin = True   End If   If sId = "user2" AND sPwd="pwd2" Then      ValidateLogin = True   End IfEnd Function  Dim sText, fBack fBack = FalseIf Request.Form("dologin") = "yes" Then    'Try to login   If ValidateLogin( Request.Form("id"),Request.Form("pwd") ) = True Then      'It is OK!!!      'We are logged in so lets go back to the file that included us        fBack = True      Session("logonid") = Request.Form("id")   Else      sText = "Wrong password or user id"   End IfElse   'We are not trying to login...   If Session("loginid") <> "" Then       '      fBack = True      'We are logged in so lets go back to the file that included us     Else      sText = "Please login"   End IfEnd If If fBack = False Then %><!--#include file="includelogin.asp"-->
<html>

   <head>
   <meta http-equiv="Content-Language" content="en">
   <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
   <meta name="GENERATOR" content="Microsoft FrontPage 4.0">
   <meta name="ProgId" content="FrontPage.Editor.Document">
   <title>You need to login</title>
   </head>

   <body>

   <%=sText%>   
   <%
   Dim sURL
   sURL = Request.ServerVariables("SCRIPT_NAME")
   If Request.ServerVariables("QUERY_STRING") <> "" Then
      '
      sURL = sURL & "?" & Request.ServerVariables("QUERY_STRING")
   End If
   %>
   
   <form method="POST" action="<%=sURL%>">
   <input type="hidden" name="dologin" value="yes">
     <table border="0" width="100%">
       <tr>
      <td>Loginname:</td>
      <td><input name="id" size="20"></td>
    </tr>
    <tr>
      <td>Password:</td>
      <td><input type="password" name="pwd" size="20"></td>
    </tr>
  </table>
  <p><input type="submit" value="Login" name="B1"></p>
   </form>

   </body>

   </html>
<%   
   Response.End
End If
%>


and now

save this code below with this page name

includelogin.asp

<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%
Response.Buffer = True


Function ValidateLogin( sId, sPwd )
   ' For you to validate ID and PASSWORD
   ' Maybe against a database
   ' Here we have hardcoded some OK id:s and passwords
   '
   ValidateLogin = False
   If sId = "anil_rash" AND sPwd="rashmi" Then
      ValidateLogin = True
   End If
   If sId = "user2" AND sPwd="pwd2" Then
      ValidateLogin = True
   End If
End Function


Dim sText, fBack

fBack = False
If Request.Form("dologin") = "yes" Then
   'Try to login
   If ValidateLogin( Request.Form("id"),Request.Form("pwd") ) = True Then
      'It is OK!!!
      'We are logged in so lets go back to the file that included us 
      fBack = True
      Session("logonid") = Request.Form("id")
   Else
      sText = "Wrong password or user id"
   End If
Else
   'We are not trying to login...
   If Session("loginid") <> "" Then
      '
      fBack = True
      'We are logged in so lets go back to the file that included us 
   Else
      sText = "Please login"
   End If
End If

If fBack = False Then
 %>
Back to top
pink
مهمون يكي دو روزه


Joined: 21 Aug 2010
Posts: 6

PostPosted: Sun Aug 22, 2010 9:45 am    Post subject: Reply with quote

ممنونم
Back to top
nana.ha
مهمون يكي دو روزه


Joined: 20 Sep 2012
Posts: 1

PostPosted: Thu Sep 20, 2012 5:39 pm    Post subject: Reply with quote

با سلام لطفا مرا در پیدا کردن مقالاتی در مورد مقایسه پروتکل های مسیریابی شبکه های ad hoc راهنمایی کنید. (لاتین یا فارسی)
Back to top
vahid
بي تو هرگز


Joined: 26 Nov 2004
Posts: 2970
Location: Tehran

PostPosted: Fri Nov 09, 2012 11:41 am    Post subject: Reply with quote

سلام لطفا یک تاپیک جدید باز کنید .
Back to top
Display posts from previous:   
Post new topic   Reply to topic    ParsX.com Forum Index -> راهنمايي در پروژه All times are GMT + 3.5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum