salam,in proje khodame ke belakhare ba komake dustan halesh konam
enshalah be dard bokhore va mofid bashe
Download zip
kode safhe asli:
کد HTML:
<%@ Page Language="C#" %>
<%@ Import Namespace="System.Data.OleDb" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
</script>
<%
if (Request["user"]!=null&&Request["pass"]!=null)
{
string con, com;
bool found = false;
con = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Request.PhysicalApplicationPath + @"data.mdb";
//Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Users\NIIT\Desktop\data.mdb
OleDbConnection olcon = new OleDbConnection(con);
com = "select * from data";
OleDbCommand olcom = new OleDbCommand(com, olcon);
OleDbDataReader olreader;
olcon.Open();
olreader = olcom.ExecuteReader();
while (olreader.Read())
{
if (olreader["inuser"].ToString()==Request["user"]&&olreader["inpass"].ToString()==Request["pass"])
{
found = true;
}
}
olreader.Close();
olcon.Close();
if (found == true)
{
Session["user"] = Request["user"];
Session["log"] = "yes";
//if (Request["wp"]!=null)
//{
// Response.Redirect(Request["wp"]+".aspx");
//}
//else
//{
Response.Redirect("show1.aspx");
//}
}
else
{
Response.Redirect("show1.aspx?msg=wrong username or password");
}
//if (Request["wp"]!=null)
//{
// Response.Redirect("default.aspx?lastuser=" + Request["user"] + "&msg=Wrong username or password&wp=" + Request["wp"]);
// Response.Redirect("default.aspx?lastuser=" + Request["user"] + "&msg=Wrong username or password");
//}
}
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Default</title>
</head>
<body style="background-image:url('-FGTRVIqhIq.jpg')">
<form id="form1" runat="server">
<div align="center" style="height:100%">
<div style="border-style:groove; border-color:Blue; border-width:inherit" >
<p style="color:Fuchsia; font-size:small>
<img src="4a347_smilekitty.jpg" align="right" />
<form action="Default.aspx" method="get">
<br />
username: <input type="text" name="user" />
<br />
password:<input type="text" name="pass" />
<br />
<%
if (Request["wp"]!=null)
{
Response.Write("<input type=\"hidden\" value\"" + Request["wp"] + " \" />");
}
%>
<input type="reset" value="again" />
<input type="submit" value="Enter" />
<br />
<p style="font-size:small; color:Red">
<%= Request["msg"] %>
</p>
<span style="font-size:small; color:Blue">
<a href="newuser.aspx">
new user or add user
</a>
<br />
<br />
</span>
</form>
</p>
</div>
</div>
</form>
</body>
</html>
kode back nashodane safahat:
کد HTML:
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Cache.SetNoStore();
Response.Cache.SetExpires(DateTime.MinValue);
proje kamel shode:
http://www.uploadbaz.com/mh90g0knyf72
علاقه مندی ها (Bookmarks)