<% if Request.TotalBytes =0 then%> <TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=1> <TR> <TD><!--#include file="main_links_titles.htm"--></TD> </TR> <TR> <TD><!--#include file="header.asp"--> <%showheader "login User","0"%></TD> </TR> <TR> <TD> <form action="login.asp" method="post" id="form1" name="form1"> <h3 align=center>enter login and password</h3> <table border="1" cellPadding="0" cellSpacing="0" height="80%" style="HEIGHT: 86px; WIDTH: 187px" width="80%" align="center" bgColor="#c6c7b9"> <tr> <td align="middle">login</td> <td><input id="text1" name="text1" style="HEIGHT: 22px; WIDTH: 103px"></td></tr> <tr> <td align="middle">password</td> <td><input id="password1" name="password1" type="password" style="HEIGHT: 22px; WIDTH: 102px"></td></tr> <tr> <td></td> <td><input id="submit1" name="submit1" style="HEIGHT: 24px; WIDTH: 104px" type="submit" value="Submit"></td></tr></table> </form> <%else '**************************************** set ado = server.CreateObject ("ADODB.Connection") DBPath = Server.MapPath ("adminoptions/utility/cars.mdb") dbdriver = "Microsoft.Jet.OLEDB.4.0;" CString = "Provider=" & DBDriver & "; " CString = CString & "Data Source=" & DBPath '' cstring=cstring&";user id=admin;password=admin" ado.Open CString '' ado.BeginTrans() 'begin a transaction ''Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\Inetpub\fathi_backup\iranamlak\iranamlak.mdb;Persist Security Info=False '*************************************** set record=server.CreateObject ("adodb.recordset") s="select * from userstbl where user_name='"+Request("text1")+"' and user_password='"+request("password1")+"'" record.Open s,ado,1,2 if record.RecordCount >0 then if record("is_valid")=0 then session("domain")=record("userdomain") session("user_name")=record("user_name") session("logedin")="true" session("user_id")=record("user_id") if record("userdomain")="admin" then response.redirect("controlpanel.asp") end if if record("userdomain")="branch" then response.redirect ("branch_virtual_office.asp") end if if record("userdomain")="ajance" then Response.Redirect ("normal_user_office.asp") end if if record("userdomain")="normaluser" then Response.Redirect ("normal_user_office.asp") end if if record("userdomain")="type" then Response.Redirect("typeistcontrolpanel.asp") end if else Response.Write ("<h2 align=center> Your Login ID Is Lock</h2>") %> <p align=center><!--#include file="header.asp"--> <%showheader "login User","0"%> <% end if %> <%else %> <p align=center><!--#include file="header.asp"--> <%showheader "login User","0"%> </p> <h3 align=center >login or password error!</h3> <form action="login.asp" method="post" id="form1" name="form1"> <table border="1" cellPadding="0" cellSpacing="0" height="80%" style="HEIGHT: 94px; WIDTH: 195px" width="80%" align="center" bgColor="#c6c7b9"> <tr> <td align="middle">login</td> <td><input id="text1" name="text1" style="HEIGHT: 22px; WIDTH: 110px"></td></tr> <tr> <td align="middle">password</td> <td><input id="password1" name="password1" type="password" style="HEIGHT: 22px; WIDTH: 112px"></td></tr> <tr> <td align="middle"><input type=hidden name=httpheader value=<%=request.form("httpheader")%>></td> <td><INPUT id=submit1 name=submit1 style="HEIGHT: 24px; WIDTH: 113px" type=submit value=Submit></td></tr></table> </form> <%end if record.Close ado.Close end if %> </TD> </TR> </TABLE>