home *** CD-ROM | disk | FTP | other *** search
/ 202.53.64.216 / 202.53.64.216.tar / 202.53.64.216 / janahitha / AdsLogin.asp < prev    next >
Text File  |  2004-11-26  |  3KB  |  106 lines

  1. <%Response.Buffer=true%>
  2. <!-- #include file="AdsOpenConn.asp" -->
  3. <%
  4.     if request.form.count>0 then
  5.  
  6.         loginid = replace(trim(request.form("loginid")),"'","''")
  7.         password = replace(trim(request.form("password")),"'","''")
  8.         
  9.         rsStr="select ClientId, ClientName from ClientMaster where " & _
  10.         " ClientLoginId = '" + loginid + "' and " & _
  11.         "ClientPassword = '" + password + "'"
  12.     'Response.Write(rsStr)
  13.  
  14.         set rs = server.createobject("ADODB.Recordset")
  15.         rs.CursorLocation=3
  16.         rs.open rsStr,con,3,3
  17.         'if rs.eof then 
  18.     '        flag = true
  19. '        else
  20. '            session("ClientId") = cstr(rs("ClientId"))
  21. '            session("ClientLoginId") = loginid
  22. '            session("ClientName") = rs("ClientName")
  23. '        end if
  24.         if rs.RecordCount>0 then
  25.             session("ClientId") = cstr(rs("ClientId"))
  26.             session("ClientLoginId") = loginid
  27.             session("ClientName") = rs("ClientName")        
  28.         else
  29.             flag=true
  30.         end if
  31.         Response.Write(rs.RecordCount)    
  32.         rs.close
  33.         set rs = nothing
  34.     end if
  35.     Response.Write(session(CliendtLoginId))
  36.     'Response.End
  37.     if session("ClientLoginId")<>"" then response.redirect "AdsMyPage.asp"
  38. %>
  39. <html>
  40.     <head>
  41.         <title> Janahitha Ads - Welcome </title>
  42.         <meta name="author" content="Jagadish,Gopi">
  43.         <script language="javascript" src="func.js"></script>
  44.         <script language="javascript">
  45.         function check()
  46.         {
  47.             validateform = document.userloginform;
  48.             if(isempty(validateform.loginid))
  49.                 validateform.loginid.focus();
  50.             else
  51.             if(isempty(validateform.password))
  52.                 validateform.password.focus();
  53.             else
  54.                 validateform.submit();
  55.         }
  56.         </script>
  57.     </head>
  58.     <body bottommargin=0 topmargin=0 leftmargin=0 rightmargin=0 marginheight=0 marginwidth=0 bgcolor=#ffffff>
  59.         <!-- #include file="AdsTop.asp" --> 
  60.         <center>
  61.         <table width=100% cellpadding=0 cellspacing=0 border=0 height=100%>
  62.         <tr>
  63.             <td width=150 align=center valign=top bgcolor="#FFFFFF">
  64.                 <!-- #include file="AdsLeft.asp" -->
  65.             </td>
  66.             <td width=630 align=center valign=top bgcolor="#ffffff">
  67.                 <br><br><br>
  68.                 <form name="userloginform" method=post action="<%=request.servervariables("script_name")%>">
  69.                 <font face="verdana" color="#846648"> <b> Member Login </b> </font> <br> <br>
  70.                 <%
  71.                     if flag then
  72.                 %>
  73.                 <font face=verdana size=2 color=red> <b> Invalid Login Id or Password </b> </font> <br> <br>
  74.                 <%
  75.                     end if
  76.                 %>
  77.                 <table cellpadding=0 cellspacing=0 border=0>
  78.                 <tr> <td bgcolor="#f2D197">
  79.                 <table cellspacing=1 cellpadding=5 border=0>
  80.                 <tr bgcolor="#ffffff">
  81.                     <td> <font face="verdana" size=2> Login Id </font> </td>
  82.                     <td> <input type=text name="loginid" size="15"> </td>
  83.                 </tr>
  84.                 <tr bgcolor="#ffffff">
  85.                     <td> <font face="verdana" size=2> Password </font> </td>
  86.                     <td> <input type=password name="password" size="15"> </td>
  87.                 </tr>
  88.                 </table>
  89.                 </td> </tr>
  90.                 </table>
  91.                 <br>
  92.                 <input type=button value=" Login " onclick="javascript:check()">
  93.                 </form>
  94.                 <font > 
  95.                 <a href="AdsForGotPwd.asp"><font face="ms sans serif" size=1 color="#4878B9">Forgot Password??</font></a>
  96.                 <br> <br>
  97.                 <a href="AdsRegister.asp"><font face="ms sans serif" size=2 color="#4878B9"><b>New Member Sign In !!</b></font></a>
  98.                 </font>
  99.             </td>
  100.         </tr>
  101.         </table>
  102.         </center>
  103.         <!-- #include file="AdsBottom.asp" -->
  104.     </body>
  105. </html>
  106. <!-- #include file="AdsCloseConn.asp" -->