-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtatus
232 lines (232 loc) · 12.2 KB
/
tatus
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
[1mdiff --git a/furnitureHub.v12.suo b/furnitureHub.v12.suo[m
[1mindex c4992e1..7f3af09 100644[m
Binary files a/furnitureHub.v12.suo and b/furnitureHub.v12.suo differ
[1mdiff --git a/furnitureHub/Default.aspx b/furnitureHub/Default.aspx[m
[1mindex 6421970..d0525ad 100644[m
[1m--- a/furnitureHub/Default.aspx[m
[1m+++ b/furnitureHub/Default.aspx[m
[36m@@ -70,6 +70,8 @@[m
<div class="account-content">[m
<form class="form-horizontal" runat="server">[m
[m
[32m+[m[32m <asp:Literal ID="message" runat="server"></asp:Literal>[m
[32m+[m[41m [m
<div class="form-group ">[m
<div class="col-xs-12">[m
<input class="form-control" id="userNameAspx" type="text" required="" placeholder="Username" runat="server">[m
[36m@@ -149,5 +151,6 @@[m
<script src="<%=this.baseUrl%>/assets/js/jquery.core.js"></script>[m
<script src="<%=this.baseUrl%>/assets/js/jquery.app.js"></script>[m
[m
[32m+[m[32m <asp:Literal ID="timeScript" runat="server"></asp:Literal>[m
</body>[m
</html>[m
[1mdiff --git a/furnitureHub/Default.aspx.cs b/furnitureHub/Default.aspx.cs[m
[1mindex b4e3ae9..ac91d59 100644[m
[1m--- a/furnitureHub/Default.aspx.cs[m
[1m+++ b/furnitureHub/Default.aspx.cs[m
[36m@@ -11,12 +11,48 @@[m [mnamespace furnitureHub {[m
[m
furnitureHub furnitureHubObject = new furnitureHub();[m
[m
[32m+[m[32m public string baseUrl {[m
[32m+[m
[32m+[m[32m get {[m
[32m+[m
[32m+[m[32m return furnitureHubObject.baseUrl();[m
[32m+[m[32m }[m
[32m+[m[32m }[m
[32m+[m
protected void Page_Load(object sender, EventArgs e) {[m
[m
[32m+[m[32m if (Session["message"] != null) {[m
[32m+[m
[32m+[m[32m if(Session["message"].ToString() == "0"){[m
[32m+[m
[32m+[m[32m message.Text = "<div class='alert alert-danger' id='message' role='alert'><strong>Invalid </strong> Data</div>";[m
[32m+[m[32m timeScript.Text = "<script>setTimeout(function() {$('#message').fadeOut('fast');}, 5000);</script>";[m
[32m+[m[32m }[m
[32m+[m[32m if (Session["message"].ToString() == "1") {[m
[32m+[m
[32m+[m[32m message.Text = "<div class='alert alert-danger' id='message' role='alert'>Waiting for <strong>Admin </strong>approval. Please contact the <strong>Admin </strong></div>";[m
[32m+[m[32m timeScript.Text = "<script>setTimeout(function() {$('#message').fadeOut('fast');}, 5000);</script>";[m
[32m+[m[32m }[m
[32m+[m[32m }[m
[32m+[m[41m [m
}[m
[m
public void loginClick(object sender, System.EventArgs e) {[m
[m
[32m+[m[32m //usertype:[m
[32m+[m[32m //0 = admin[m
[32m+[m[32m //1 = supervisior[m
[32m+[m
[32m+[m[32m //message:[m
[32m+[m[32m //0 = username doesnot exist[m
[32m+[m[32m //1 = username exist but not approved by admin[m
[32m+[m[32m //else ok[m
[32m+[m
[32m+[m[32m //status:[m
[32m+[m[32m //0 = username exist but not approved by admin[m
[32m+[m[32m //1 = username exist and approved by admin[m
[32m+[m[32m //else doesnot exist[m
[32m+[m
string userName = userNameAspx.Value;[m
string password = passwordAspx.Value;[m
DataTable dataTable = furnitureHubObject.getLoginData(userName, password);[m
[36m@@ -24,24 +60,32 @@[m [mnamespace furnitureHub {[m
[m
string sessionUserName = dataTable.Rows[0]["username"].ToString();[m
string sessionPassword = dataTable.Rows[0]["password"].ToString();[m
[32m+[m[32m string sessionType = dataTable.Rows[0]["type"].ToString();[m
int sessionStatus = Convert.ToInt32(dataTable.Rows[0]["status"]);[m
if (sessionStatus == 0) {[m
[m
[31m- }[m
[31m- if(sessionStatus == 1) {[m
[32m+[m[32m Session["userName"] = sessionUserName;[m
[32m+[m[32m Session["password"] = sessionPassword;[m
[32m+[m[32m Session["message"] = 1;[m
Response.Redirect("superVisior/dashboard/dashboard.aspx");[m
[31m- [m
}[m
[32m+[m[32m if(sessionStatus == 1) {[m
[m
[31m- }[m
[31m- Response.Redirect("admin/dashboard/dashboard.aspx");[m
[31m- }[m
[31m-[m
[31m- public string baseUrl {[m
[32m+[m[32m Session["userName"] = sessionUserName;[m
[32m+[m[32m Session["password"] = sessionPassword;[m
[32m+[m[32m Session["message"] = 1;[m
[32m+[m[32m Response.Redirect("superVisior/dashboard/dashboard.aspx");[m
[32m+[m[32m } else {[m
[m
[31m- get {[m
[32m+[m[32m Session["userName"] = sessionUserName;[m
[32m+[m[32m Session["password"] = sessionPassword;[m
[32m+[m[32m Session["message"] = 1;[m
[32m+[m[32m Response.Redirect("admin/dashboard/dashboard.aspx");[m[41m [m
[32m+[m[32m }[m
[32m+[m[32m } else {[m
[m
[31m- return furnitureHubObject.baseUrl();[m
[32m+[m[32m Session["message"] = 0;[m
[32m+[m[32m Response.Redirect("Default.aspx");[m
}[m
}[m
}[m
[1mdiff --git a/furnitureHub/Default.aspx.designer.cs b/furnitureHub/Default.aspx.designer.cs[m
[1mindex 7544900..cd249b7 100644[m
[1m--- a/furnitureHub/Default.aspx.designer.cs[m
[1m+++ b/furnitureHub/Default.aspx.designer.cs[m
[36m@@ -12,6 +12,15 @@[m [mnamespace furnitureHub {[m
[m
public partial class Default {[m
[m
[32m+[m[32m /// <summary>[m
[32m+[m[32m /// message control.[m
[32m+[m[32m /// </summary>[m
[32m+[m[32m /// <remarks>[m
[32m+[m[32m /// Auto-generated field.[m
[32m+[m[32m /// To modify move field declaration from designer file to code-behind file.[m
[32m+[m[32m /// </remarks>[m
[32m+[m[32m protected global::System.Web.UI.WebControls.Literal message;[m
[32m+[m[41m [m
/// <summary>[m
/// userNameAspx control.[m
/// </summary>[m
[36m@@ -29,5 +38,14 @@[m [mnamespace furnitureHub {[m
/// To modify move field declaration from designer file to code-behind file.[m
/// </remarks>[m
protected global::System.Web.UI.HtmlControls.HtmlInputPassword passwordAspx;[m
[32m+[m[41m [m
[32m+[m[32m /// <summary>[m
[32m+[m[32m /// timeScript control.[m
[32m+[m[32m /// </summary>[m
[32m+[m[32m /// <remarks>[m
[32m+[m[32m /// Auto-generated field.[m
[32m+[m[32m /// To modify move field declaration from designer file to code-behind file.[m
[32m+[m[32m /// </remarks>[m
[32m+[m[32m protected global::System.Web.UI.WebControls.Literal timeScript;[m
}[m
}[m
[1mdiff --git a/furnitureHub/bin/furnitureHub.dll b/furnitureHub/bin/furnitureHub.dll[m
[1mindex d7774fd..e087cb6 100644[m
Binary files a/furnitureHub/bin/furnitureHub.dll and b/furnitureHub/bin/furnitureHub.dll differ
[1mdiff --git a/furnitureHub/bin/furnitureHub.pdb b/furnitureHub/bin/furnitureHub.pdb[m
[1mindex 706ecaf..403c35d 100644[m
Binary files a/furnitureHub/bin/furnitureHub.pdb and b/furnitureHub/bin/furnitureHub.pdb differ
[1mdiff --git a/furnitureHub/furnitureHub.csproj b/furnitureHub/furnitureHub.csproj[m
[1mindex d3f3436..50e836e 100644[m
[1m--- a/furnitureHub/furnitureHub.csproj[m
[1m+++ b/furnitureHub/furnitureHub.csproj[m
[36m@@ -1170,7 +1170,7 @@[m
<Content Include="assets\plugins\waypoints\jquery.waypoints.min.js" />[m
<Content Include="Default.aspx" />[m
<Content Include="signup.aspx" />[m
[31m- <Content Include="superVisior\Dashboard\dashboard.aspx" />[m
[32m+[m[32m <Content Include="supervisior\Dashboard\dashboard.aspx" />[m
<Content Include="Web.config" />[m
</ItemGroup>[m
<ItemGroup>[m
[36m@@ -1225,11 +1225,11 @@[m
<Compile Include="signup.aspx.designer.cs">[m
<DependentUpon>signup.aspx</DependentUpon>[m
</Compile>[m
[31m- <Compile Include="superVisior\Dashboard\dashboard.aspx.cs">[m
[32m+[m[32m <Compile Include="supervisior\Dashboard\dashboard.aspx.cs">[m
<DependentUpon>dashboard.aspx</DependentUpon>[m
<SubType>ASPXCodeBehind</SubType>[m
</Compile>[m
[31m- <Compile Include="superVisior\Dashboard\dashboard.aspx.designer.cs">[m
[32m+[m[32m <Compile Include="supervisior\Dashboard\dashboard.aspx.designer.cs">[m
<DependentUpon>dashboard.aspx</DependentUpon>[m
</Compile>[m
</ItemGroup>[m
[1mdiff --git a/furnitureHub/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/furnitureHub/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache[m
[1mindex ba74248..66cf076 100644[m
Binary files a/furnitureHub/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/furnitureHub/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ
[1mdiff --git a/furnitureHub/obj/Debug/furnitureHub.dll b/furnitureHub/obj/Debug/furnitureHub.dll[m
[1mindex d7774fd..e087cb6 100644[m
Binary files a/furnitureHub/obj/Debug/furnitureHub.dll and b/furnitureHub/obj/Debug/furnitureHub.dll differ
[1mdiff --git a/furnitureHub/obj/Debug/furnitureHub.pdb b/furnitureHub/obj/Debug/furnitureHub.pdb[m
[1mindex 706ecaf..403c35d 100644[m
Binary files a/furnitureHub/obj/Debug/furnitureHub.pdb and b/furnitureHub/obj/Debug/furnitureHub.pdb differ
[1mdiff --git a/furnitureHub/superVisior/Dashboard/dashboard.aspx b/furnitureHub/superVisior/Dashboard/dashboard.aspx[m
[1mindex ef6e7ea..a869e14 100644[m
[1m--- a/furnitureHub/superVisior/Dashboard/dashboard.aspx[m
[1m+++ b/furnitureHub/superVisior/Dashboard/dashboard.aspx[m
[36m@@ -1,4 +1,4 @@[m
[31m-<%@ Page Title="" Language="C#" MasterPageFile="~/furnitureHubMaster.Master" AutoEventWireup="true" CodeBehind="dashboard.aspx.cs" Inherits="furnitureHub.superVisior.Dashboard.dashboard" %>[m
[32m+[m[32m<%@ Page Title="" Language="C#" MasterPageFile="~/furnitureHubMaster.Master" AutoEventWireup="true" CodeBehind="dashboard.aspx.cs" Inherits="furnitureHub.supervisior.Dashboard.dashboard" %>[m
<asp:Content id="Content1" ContentPlaceHolderID="content" runat="server">[m
<!-- Start content -->[m
<div class="content">[m
[1mdiff --git a/furnitureHub/superVisior/Dashboard/dashboard.aspx.cs b/furnitureHub/superVisior/Dashboard/dashboard.aspx.cs[m
[1mindex 459839d..e35ba7c 100644[m
[1m--- a/furnitureHub/superVisior/Dashboard/dashboard.aspx.cs[m
[1m+++ b/furnitureHub/superVisior/Dashboard/dashboard.aspx.cs[m
[36m@@ -5,7 +5,7 @@[m [musing System.Web;[m
using System.Web.UI;[m
using System.Web.UI.WebControls;[m
[m
[31m-namespace furnitureHub.superVisior.Dashboard {[m
[32m+[m[32mnamespace furnitureHub.supervisior.Dashboard {[m
public partial class dashboard: System.Web.UI.Page {[m
[m
furnitureHub furnitureHubObject = new furnitureHub();[m
[1mdiff --git a/furnitureHub/superVisior/Dashboard/dashboard.aspx.designer.cs b/furnitureHub/superVisior/Dashboard/dashboard.aspx.designer.cs[m
[1mindex d9bfee2..0b30f7b 100644[m
[1m--- a/furnitureHub/superVisior/Dashboard/dashboard.aspx.designer.cs[m
[1m+++ b/furnitureHub/superVisior/Dashboard/dashboard.aspx.designer.cs[m
[36m@@ -7,7 +7,7 @@[m
// </auto-generated>[m
//------------------------------------------------------------------------------[m
[m
[31m-namespace furnitureHub.superVisior.Dashboard {[m
[32m+[m[32mnamespace furnitureHub.supervisior.Dashboard {[m
[m
[m
public partial class dashboard {[m