Skip to content

Commit 28b0c80

Browse files
author
Vinayak Suley
committed
Getting things up to github. First commit
0 parents  commit 28b0c80

File tree

278 files changed

+44031
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

278 files changed

+44031
-0
lines changed

App_Data/VSDotCom.MDF

10 MB
Binary file not shown.

App_Data/VSDotCom_log.ldf

768 KB
Binary file not shown.

Content/Site.css

Lines changed: 256 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,256 @@
1+
/* Very general, site-wide styles */
2+
3+
*
4+
{
5+
padding:0px;
6+
border:0px;
7+
margin:0px;
8+
}
9+
10+
body
11+
{
12+
font-size: .75em;
13+
font-family: Verdana, Helvetica, Sans-Serif;
14+
margin: 30px 0px 20px 0px;
15+
padding: 0;
16+
color: #777;
17+
background-image:url("/Images/SiteResources/BG1.jpg");
18+
background-position:center top;
19+
}
20+
21+
h2
22+
{
23+
color:#999;
24+
font-family:Segoe UI;
25+
font-size:x-large;
26+
font-weight:normal;
27+
padding-bottom:0px;
28+
}
29+
30+
a
31+
{
32+
color:inherit;
33+
font-size:inherit;
34+
text-decoration:none;
35+
}
36+
37+
tbody
38+
{
39+
vertical-align:inherit;
40+
}
41+
42+
43+
/* Styles for Master page */
44+
.MenuContainer
45+
{
46+
/* background-color:White; */
47+
opacity:0.7;
48+
filter: alpha(opacity=70);
49+
}
50+
51+
div.Level1HorizontalMenu
52+
{
53+
color:#444;
54+
font-family:"Segoe UI" !important;
55+
font-size:x-large;
56+
font-weight:normal;
57+
margin-bottom:10px;
58+
opacity:1.0;
59+
filter: alpha(opacity=100);
60+
}
61+
62+
span.Level1MenuSubchoice
63+
{
64+
color:#111;
65+
font-family:"Segoe UI";
66+
font-size:medium;
67+
font-weight:normal;
68+
margin-bottom:15px;
69+
opacity:1.0;
70+
filter: alpha(opacity=100);
71+
}
72+
73+
span.Level1MenuSubchoice:hover
74+
{
75+
color:#933;
76+
opacity:1.0;
77+
filter: alpha(opacity=100);
78+
}
79+
80+
/* Styles for the portfolio slideshow page */
81+
.slideshowContainer
82+
{
83+
width:100%;
84+
overflow:hidden;
85+
position:relative;
86+
}
87+
88+
.alignWindowLeft
89+
{
90+
left:0px;
91+
}
92+
93+
.alignWindowRight
94+
{
95+
right:0px;
96+
}
97+
98+
.panelSlider
99+
{
100+
position:relative;
101+
box-shadow:0px 0px 20px 5px rgba(0, 0, 0, 0.2);
102+
}
103+
104+
.displayCellBG
105+
{
106+
background-color:#f1f1f1;
107+
}
108+
109+
.panelCells
110+
{
111+
position:relative; z-index:0;
112+
padding-left: 0px;
113+
background-color:#ddd;
114+
}
115+
116+
.spacer2px
117+
{
118+
width:2px;
119+
position:relative;
120+
float:left;
121+
}
122+
123+
img.sliderBG
124+
{
125+
position:relative;
126+
top:0px;
127+
left:0px;
128+
z-index:1;
129+
height:500px;
130+
opacity:0.3;
131+
filter: alpha(opacity=20);
132+
}
133+
134+
.scrollZone
135+
{
136+
z-index:3;
137+
position:absolute;
138+
width:200px;
139+
height:500px;
140+
background-image:url(.);
141+
}
142+
143+
div.fullImageBG
144+
{
145+
width:100%;
146+
height:100%;
147+
position:absolute;
148+
z-index:9;
149+
left:0px;
150+
top:0px;
151+
background-color:#000000;
152+
opacity:0.90;
153+
filter: alpha(opacity=90);
154+
}
155+
156+
img.fullImage
157+
{
158+
position:absolute;
159+
z-index:10;
160+
left:0px;
161+
top:0px;
162+
box-shadow:0px 0px 5px rgba(180, 180, 150, 0.3);
163+
}
164+
165+
.fullScreenClickArea
166+
{
167+
position:absolute;
168+
top:0px;
169+
left:0px;
170+
width:100%;
171+
height:100%;
172+
z-index:11;
173+
}
174+
175+
.toggleHidden
176+
{
177+
display:none;
178+
}
179+
180+
.fullModeHelpText
181+
{
182+
position:relative;
183+
width:100%;
184+
padding-top:10px;
185+
z-index:12;
186+
font-family:Segoe UI, Verdana, Helvetica;
187+
font-size:large;
188+
text-align:center;
189+
color: rga(190, 185, 180, 0.8);
190+
display:none;
191+
}
192+
193+
/* Styles for text pages */
194+
div.textBG
195+
{
196+
background-color:#ffffff;
197+
opacity:0.6;
198+
filter: alpha(opacity=60);
199+
height:450px; /* 450 instead of 500 because the padding takes up 50px*/
200+
overflow:hidden;
201+
padding-left: 100px;
202+
padding-top: 50px;
203+
}
204+
205+
div.textContent
206+
{
207+
font-family:Segoe UI;
208+
font-size:small;
209+
color:Black;
210+
opacity:1.0;
211+
filter: alpha(opacity=100);
212+
width:600px;
213+
}
214+
215+
p.textContent
216+
{
217+
padding-bottom:20px;
218+
}
219+
220+
/* Styles for customer facing error pages. */
221+
a.suggestedLinks
222+
{
223+
color:#555;
224+
font-weight:bolder;
225+
}
226+
227+
228+
/* Photo catalog details page */
229+
230+
/* Validation error fields */
231+
.field-validation-error
232+
{
233+
color: #ff0000;
234+
}
235+
236+
.field-validation-valid
237+
{
238+
display: none;
239+
}
240+
241+
.input-validation-error
242+
{
243+
border: 1px solid #ff0000;
244+
background-color: #ffeeee;
245+
}
246+
247+
.validation-summary-errors
248+
{
249+
font-weight: bold;
250+
color: #ff0000;
251+
}
252+
253+
.validation-summary-valid
254+
{
255+
display: none;
256+
}

Controllers/AccountController.cs

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Web;
5+
using System.Web.Mvc;
6+
using System.Globalization;
7+
using System.Security.Principal;
8+
using System.Web.Security;
9+
using System.Web.UI;
10+
11+
namespace VinayakSuleyDotCom.Controllers
12+
{
13+
public class AccountController : Controller
14+
{
15+
public ActionResult LogOn()
16+
{
17+
return View();
18+
}
19+
20+
[HttpPost]
21+
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings",
22+
Justification = "Needs to take same parameter type as Controller.Redirect()")]
23+
public ActionResult LogOn(string userName, string password, bool rememberMe, string returnUrl)
24+
{
25+
MembershipProvider membershipProvider = Membership.Provider;
26+
27+
if (!ValidateLogOnInformation(membershipProvider, userName, password))
28+
{
29+
ViewData["rememberMe"] = rememberMe;
30+
return View();
31+
}
32+
33+
// Make sure we have the username with the right capitalization
34+
// since we do case sensitive checks for OpenID Claimed Identifiers later.
35+
userName = membershipProvider.GetUser(userName, true).UserName;
36+
37+
FormsAuthenticationTicket authTicket = new
38+
FormsAuthenticationTicket(1, //version
39+
userName, // user name
40+
DateTime.Now, //creation
41+
DateTime.Now.AddMinutes(30), //Expiration
42+
rememberMe, //Persistent
43+
userName); //since Classic logins don't have a "Friendly Name"
44+
45+
string encTicket = FormsAuthentication.Encrypt(authTicket);
46+
this.Response.Cookies.Add(new HttpCookie(FormsAuthentication.FormsCookieName, encTicket));
47+
48+
if (!String.IsNullOrEmpty(returnUrl))
49+
{
50+
return Redirect(returnUrl);
51+
}
52+
else
53+
{
54+
return RedirectToAction("Index", "Home");
55+
}
56+
}
57+
58+
private bool ValidateLogOnInformation(MembershipProvider membershipProvider, string userName, string password)
59+
{
60+
if (String.IsNullOrEmpty(userName))
61+
{
62+
ModelState.AddModelError("username", "You must specify a username.");
63+
}
64+
if (String.IsNullOrEmpty(password))
65+
{
66+
ModelState.AddModelError("password", "You must specify a password.");
67+
}
68+
if (!membershipProvider.ValidateUser(userName, password))
69+
{
70+
ModelState.AddModelError("_FORM", "The username or password provided is incorrect.");
71+
}
72+
73+
return ModelState.IsValid;
74+
}
75+
76+
private void SignIn(string userName, bool createPersistentCookie)
77+
{
78+
FormsAuthentication.SetAuthCookie(userName, createPersistentCookie);
79+
}
80+
81+
private void SignOut()
82+
{
83+
FormsAuthentication.SignOut();
84+
}
85+
}
86+
}

0 commit comments

Comments
 (0)