added a login page
This commit is contained in:
parent
0dae0c7f45
commit
c7e1c2837f
@ -121,6 +121,20 @@
|
|||||||
<Compile Include="Global.asax.cs">
|
<Compile Include="Global.asax.cs">
|
||||||
<DependentUpon>Global.asax</DependentUpon>
|
<DependentUpon>Global.asax</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="login.aspx.cs">
|
||||||
|
<SubType>ASPXCodeBehind</SubType>
|
||||||
|
<DependentUpon>login.aspx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="login.aspx.designer.cs">
|
||||||
|
<DependentUpon>login.aspx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="loginv2.aspx.cs">
|
||||||
|
<SubType>ASPXCodeBehind</SubType>
|
||||||
|
<DependentUpon>loginv2.aspx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="loginv2.aspx.designer.cs">
|
||||||
|
<DependentUpon>loginv2.aspx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="main.aspx.cs">
|
<Compile Include="main.aspx.cs">
|
||||||
<SubType>ASPXCodeBehind</SubType>
|
<SubType>ASPXCodeBehind</SubType>
|
||||||
<DependentUpon>main.master</DependentUpon>
|
<DependentUpon>main.master</DependentUpon>
|
||||||
@ -261,6 +275,8 @@
|
|||||||
<Content Include="fonts\glyphicons-halflings-regular.svg" />
|
<Content Include="fonts\glyphicons-halflings-regular.svg" />
|
||||||
<Content Include="Global.asax" />
|
<Content Include="Global.asax" />
|
||||||
<Content Include="Content\Site.css" />
|
<Content Include="Content\Site.css" />
|
||||||
|
<Content Include="login.aspx" />
|
||||||
|
<Content Include="loginv2.aspx" />
|
||||||
<Content Include="main.css" />
|
<Content Include="main.css" />
|
||||||
<Content Include="main.master" />
|
<Content Include="main.master" />
|
||||||
<Content Include="MaxRefillNotif.aspx" />
|
<Content Include="MaxRefillNotif.aspx" />
|
||||||
|
@ -8,11 +8,19 @@
|
|||||||
<defaultDocument>
|
<defaultDocument>
|
||||||
<files>
|
<files>
|
||||||
<clear/>
|
<clear/>
|
||||||
<add value="Default.aspx"/>
|
<add value="login.aspx"/>
|
||||||
<!-- Or your specific default page -->
|
<!-- Or your specific default page -->
|
||||||
</files>
|
</files>
|
||||||
</defaultDocument>
|
</defaultDocument>
|
||||||
</system.webServer>
|
</system.webServer>
|
||||||
|
<system.web>
|
||||||
|
<authentication mode="Forms">
|
||||||
|
<forms loginUrl="login.aspx" timeout="2880" />
|
||||||
|
</authentication>
|
||||||
|
<authorization>
|
||||||
|
<deny users="?" /> <!-- Denies anonymous users -->
|
||||||
|
</authorization>
|
||||||
|
</system.web>
|
||||||
<connectionStrings>
|
<connectionStrings>
|
||||||
<add name="ConnString" connectionString="Server=sql.eggtech.net;Database=FinalProjectOfficialPharmacy;User Id=admin;Password=delirium-purveyor-overall-backboned-approval-amino;" providerName="System.Data.SqlClient"/>
|
<add name="ConnString" connectionString="Server=sql.eggtech.net;Database=FinalProjectOfficialPharmacy;User Id=admin;Password=delirium-purveyor-overall-backboned-approval-amino;" providerName="System.Data.SqlClient"/>
|
||||||
</connectionStrings>
|
</connectionStrings>
|
||||||
|
Binary file not shown.
@ -8,13 +8,21 @@
|
|||||||
<defaultDocument>
|
<defaultDocument>
|
||||||
<files>
|
<files>
|
||||||
<clear/>
|
<clear/>
|
||||||
<add value="Default.aspx"/>
|
<add value="login.aspx"/>
|
||||||
<!-- Or your specific default page -->
|
<!-- Or your specific default page -->
|
||||||
</files>
|
</files>
|
||||||
</defaultDocument>
|
</defaultDocument>
|
||||||
</system.webServer>
|
</system.webServer>
|
||||||
|
<system.web>
|
||||||
|
<authentication mode="Forms">
|
||||||
|
<forms loginUrl="login.aspx" timeout="2880" />
|
||||||
|
</authentication>
|
||||||
|
<authorization>
|
||||||
|
<deny users="?" /> <!-- Denies anonymous users -->
|
||||||
|
</authorization>
|
||||||
|
</system.web>
|
||||||
<connectionStrings>
|
<connectionStrings>
|
||||||
<add name="ConnString" connectionString="Server=10.1.1.250;Database=FinalProjectOfficialPharmacy;User Id=admin;Password=delirium-purveyor-overall-backboned-approval-amino;" providerName="System.Data.SqlClient"/>
|
<add name="ConnString" connectionString="Server=sql.eggtech.net;Database=FinalProjectOfficialPharmacy;User Id=admin;Password=delirium-purveyor-overall-backboned-approval-amino;" providerName="System.Data.SqlClient"/>
|
||||||
</connectionStrings>
|
</connectionStrings>
|
||||||
<appSettings>
|
<appSettings>
|
||||||
<add key="webpages:Version" value="3.0.0.0"/>
|
<add key="webpages:Version" value="3.0.0.0"/>
|
||||||
|
Binary file not shown.
24
FWA_MAIN/login.aspx
Normal file
24
FWA_MAIN/login.aspx
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<%@ Page Language="C#" CodeBehind="login.aspx.cs" Inherits="FWA_MAIN.login" %>
|
||||||
|
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
|
||||||
|
<script runat="server">
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head runat="server">
|
||||||
|
<title>Login</title>
|
||||||
|
</head>
|
||||||
|
<body style="background-color: #0f0f0f">
|
||||||
|
<form id="Login" runat="server">
|
||||||
|
<div style="horiz-align: center; width: 100%">
|
||||||
|
<label for="Username" style="color: white">Username:</label>
|
||||||
|
<asp:TextBox ID="Username" runat="server"></asp:TextBox><br/>
|
||||||
|
<label for="Password" style="color: white">Password:</label>
|
||||||
|
<asp:TextBox ID="Password" runat="server" TextMode="Password"></asp:TextBox><br/>
|
||||||
|
<asp:Button ID="LoginButton" runat="server" Text="Login" OnClick="LoginButton_Click" />
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</body>
|
||||||
|
</html>
|
30
FWA_MAIN/login.aspx.cs
Normal file
30
FWA_MAIN/login.aspx.cs
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
using System;
|
||||||
|
using System.Web.Security;
|
||||||
|
using System.Web.UI;
|
||||||
|
|
||||||
|
namespace FWA_MAIN
|
||||||
|
{
|
||||||
|
public partial class login : Page
|
||||||
|
{
|
||||||
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void LoginButton_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
string username = Username.Text;
|
||||||
|
string password = Password.Text;
|
||||||
|
|
||||||
|
// Example authentication; replace with actual logic
|
||||||
|
if (username == "admin" && password == "someonerandom")
|
||||||
|
{
|
||||||
|
FormsAuthentication.RedirectFromLoginPage(username, false);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Show an error message or handle invalid login
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
53
FWA_MAIN/login.aspx.designer.cs
generated
Normal file
53
FWA_MAIN/login.aspx.designer.cs
generated
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by a tool.
|
||||||
|
//
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace FWA_MAIN
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
public partial class login
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Login control.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Auto-generated field.
|
||||||
|
/// To modify move field declaration from designer file to code-behind file.
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.HtmlControls.HtmlForm Login;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Username control.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Auto-generated field.
|
||||||
|
/// To modify move field declaration from designer file to code-behind file.
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.WebControls.TextBox Username;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Password control.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Auto-generated field.
|
||||||
|
/// To modify move field declaration from designer file to code-behind file.
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.WebControls.TextBox Password;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// LoginButton control.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Auto-generated field.
|
||||||
|
/// To modify move field declaration from designer file to code-behind file.
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.WebControls.Button LoginButton;
|
||||||
|
}
|
||||||
|
}
|
13
FWA_MAIN/loginv2.aspx
Normal file
13
FWA_MAIN/loginv2.aspx
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<%@ Page Title="login" Language="C#" MasterPageFile="main.master" CodeBehind="loginv2.aspx.cs" Inherits="FWA_MAIN.loginv2" %>
|
||||||
|
|
||||||
|
<asp:Content runat="server" ContentPlaceHolderID="cph1">
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<label for="Username">Username:</label>
|
||||||
|
<asp:TextBox ID="Username" runat="server"></asp:TextBox>
|
||||||
|
<label for="Password">Password:</label>
|
||||||
|
<asp:TextBox ID="Password" runat="server" TextMode="Password"></asp:TextBox>
|
||||||
|
<asp:Button ID="LoginButton" runat="server" Text="Login" OnClick="LoginButton_Click" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</asp:Content>
|
29
FWA_MAIN/loginv2.aspx.cs
Normal file
29
FWA_MAIN/loginv2.aspx.cs
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
using System;
|
||||||
|
using System.Web.Security;
|
||||||
|
using System.Web.UI;
|
||||||
|
|
||||||
|
namespace FWA_MAIN
|
||||||
|
{
|
||||||
|
public partial class loginv2 : Page
|
||||||
|
{
|
||||||
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void LoginButton_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
string username = Username.Text;
|
||||||
|
string password = Password.Text;
|
||||||
|
|
||||||
|
// Example authentication; replace with actual logic
|
||||||
|
if (username == "admin" && password == "password")
|
||||||
|
{
|
||||||
|
FormsAuthentication.RedirectFromLoginPage(username, false);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Show an error message or handle invalid login
|
||||||
|
} }
|
||||||
|
}
|
||||||
|
}
|
58
FWA_MAIN/loginv2.aspx.designer.cs
generated
Normal file
58
FWA_MAIN/loginv2.aspx.designer.cs
generated
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by a tool.
|
||||||
|
//
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace FWA_MAIN
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
public partial class loginv2
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Username control.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Auto-generated field.
|
||||||
|
/// To modify move field declaration from designer file to code-behind file.
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.WebControls.TextBox Username;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Password control.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Auto-generated field.
|
||||||
|
/// To modify move field declaration from designer file to code-behind file.
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.WebControls.TextBox Password;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// LoginButton control.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Auto-generated field.
|
||||||
|
/// To modify move field declaration from designer file to code-behind file.
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.WebControls.Button LoginButton;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Master property.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Auto-generated property.
|
||||||
|
/// </remarks>
|
||||||
|
public new FWA_MAIN.main Master
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return ((FWA_MAIN.main)(base.Master));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1 +1 @@
|
|||||||
35e3f318d70032ecddcf1f126a0f5fadbfc716462983ce624410e76af3e3df7d
|
50074679a1a1cb6525af5fbfda8b79afcdf3526bcbe1cf9d0fe607e81ea9cb81
|
||||||
|
Binary file not shown.
Binary file not shown.
@ -8,13 +8,22 @@
|
|||||||
<defaultDocument>
|
<defaultDocument>
|
||||||
<files>
|
<files>
|
||||||
<clear />
|
<clear />
|
||||||
<add value="Default.aspx" />
|
<add value="login.aspx" />
|
||||||
<!-- Or your specific default page -->
|
<!-- Or your specific default page -->
|
||||||
</files>
|
</files>
|
||||||
</defaultDocument>
|
</defaultDocument>
|
||||||
</system.webServer>
|
</system.webServer>
|
||||||
|
<system.web>
|
||||||
|
<authentication mode="Forms">
|
||||||
|
<forms loginUrl="login.aspx" timeout="2880" />
|
||||||
|
</authentication>
|
||||||
|
<authorization>
|
||||||
|
<deny users="?" />
|
||||||
|
<!-- Denies anonymous users -->
|
||||||
|
</authorization>
|
||||||
|
</system.web>
|
||||||
<connectionStrings>
|
<connectionStrings>
|
||||||
<add name="ConnString" connectionString="Server=10.1.1.250;Database=FinalProjectOfficialPharmacy;User Id=admin;Password=delirium-purveyor-overall-backboned-approval-amino;" providerName="System.Data.SqlClient" />
|
<add name="ConnString" connectionString="Server=sql.eggtech.net;Database=FinalProjectOfficialPharmacy;User Id=admin;Password=delirium-purveyor-overall-backboned-approval-amino;" providerName="System.Data.SqlClient" />
|
||||||
</connectionStrings>
|
</connectionStrings>
|
||||||
<appSettings>
|
<appSettings>
|
||||||
<add key="webpages:Version" value="3.0.0.0" />
|
<add key="webpages:Version" value="3.0.0.0" />
|
||||||
|
Binary file not shown.
Binary file not shown.
@ -8,13 +8,21 @@
|
|||||||
<defaultDocument>
|
<defaultDocument>
|
||||||
<files>
|
<files>
|
||||||
<clear/>
|
<clear/>
|
||||||
<add value="Default.aspx"/>
|
<add value="login.aspx"/>
|
||||||
<!-- Or your specific default page -->
|
<!-- Or your specific default page -->
|
||||||
</files>
|
</files>
|
||||||
</defaultDocument>
|
</defaultDocument>
|
||||||
</system.webServer>
|
</system.webServer>
|
||||||
|
<system.web>
|
||||||
|
<authentication mode="Forms">
|
||||||
|
<forms loginUrl="login.aspx" timeout="2880" />
|
||||||
|
</authentication>
|
||||||
|
<authorization>
|
||||||
|
<deny users="?" /> <!-- Denies anonymous users -->
|
||||||
|
</authorization>
|
||||||
|
</system.web>
|
||||||
<connectionStrings>
|
<connectionStrings>
|
||||||
<add name="ConnString" connectionString="Server=10.1.1.250;Database=FinalProjectOfficialPharmacy;User Id=admin;Password=delirium-purveyor-overall-backboned-approval-amino;" providerName="System.Data.SqlClient"/>
|
<add name="ConnString" connectionString="Server=sql.eggtech.net;Database=FinalProjectOfficialPharmacy;User Id=admin;Password=delirium-purveyor-overall-backboned-approval-amino;" providerName="System.Data.SqlClient"/>
|
||||||
</connectionStrings>
|
</connectionStrings>
|
||||||
<appSettings>
|
<appSettings>
|
||||||
<add key="webpages:Version" value="3.0.0.0"/>
|
<add key="webpages:Version" value="3.0.0.0"/>
|
||||||
|
@ -8,13 +8,22 @@
|
|||||||
<defaultDocument>
|
<defaultDocument>
|
||||||
<files>
|
<files>
|
||||||
<clear />
|
<clear />
|
||||||
<add value="Default.aspx" />
|
<add value="login.aspx" />
|
||||||
<!-- Or your specific default page -->
|
<!-- Or your specific default page -->
|
||||||
</files>
|
</files>
|
||||||
</defaultDocument>
|
</defaultDocument>
|
||||||
</system.webServer>
|
</system.webServer>
|
||||||
|
<system.web>
|
||||||
|
<authentication mode="Forms">
|
||||||
|
<forms loginUrl="login.aspx" timeout="2880" />
|
||||||
|
</authentication>
|
||||||
|
<authorization>
|
||||||
|
<deny users="?" />
|
||||||
|
<!-- Denies anonymous users -->
|
||||||
|
</authorization>
|
||||||
|
</system.web>
|
||||||
<connectionStrings>
|
<connectionStrings>
|
||||||
<add name="ConnString" connectionString="Server=10.1.1.250;Database=FinalProjectOfficialPharmacy;User Id=admin;Password=delirium-purveyor-overall-backboned-approval-amino;" providerName="System.Data.SqlClient" />
|
<add name="ConnString" connectionString="Server=sql.eggtech.net;Database=FinalProjectOfficialPharmacy;User Id=admin;Password=delirium-purveyor-overall-backboned-approval-amino;" providerName="System.Data.SqlClient" />
|
||||||
</connectionStrings>
|
</connectionStrings>
|
||||||
<appSettings>
|
<appSettings>
|
||||||
<add key="webpages:Version" value="3.0.0.0" />
|
<add key="webpages:Version" value="3.0.0.0" />
|
||||||
|
Loading…
Reference in New Issue
Block a user