Update of /cvsroot/slugtalk/slugboards/slugtalk
In directory sc8-pr-cvs1:/tmp/cvs-serv18871/slugtalk
Added Files:
AssemblyInfo.cs Global.asax Global.asax.cs Global.asax.resx
Web.config login.aspx login.aspx.cs login.aspx.resx
register.aspx register.aspx.cs register.aspx.resx
slugtalk.csproj slugtalk.csproj.webinfo slugtalk.sln
slugtalk.suo style.css vs-113516760029603174_tmp.htm
vs-180432980829603174_tmp.htm
Log Message:
Slugboards v1.0
--- NEW FILE: AssemblyInfo.cs ---
using System.Reflection;
using System.Runtime.CompilerServices;
//
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
//
[assembly: AssemblyTitle("")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
//
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.*")]
//
// In order to sign your assembly you must specify a key to use. Refer to the
// Microsoft .NET Framework documentation for more information on assembly signing.
//
// Use the attributes below to control which key is used for signing.
//
// Notes:
// (*) If no key is specified, the assembly is not signed.
// (*) KeyName refers to a key that has been installed in the Crypto Service
// Provider (CSP) on your machine. KeyFile refers to a file which contains
// a key.
// (*) If the KeyFile and the KeyName values are both specified, the
// following processing occurs:
// (1) If the KeyName can be found in the CSP, that key is used.
// (2) If the KeyName does not exist and the KeyFile does exist, the key
// in the KeyFile is installed into the CSP and used.
// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
// When specifying the KeyFile, the location of the KeyFile should be
// relative to the "project output directory". The location of the project output
// directory is dependent on whether you are working with a local or web project.
// For local projects, the project output directory is defined as
// <Project Directory>\obj\<Configuration>. For example, if your KeyFile is
// located in the project directory, you would specify the AssemblyKeyFile
// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
// For web projects, the project output directory is defined as
// %HOMEPATH%\VSWebCache\<Machine Name>\<Project Directory>\obj\<Configuration>.
// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
// documentation for more information on this.
//
[assembly: AssemblyDelaySign(false)]
[assembly: AssemblyKeyFile("")]
[assembly: AssemblyKeyName("")]
--- NEW FILE: Global.asax ---
<%@ Application Codebehind="Global.asax.cs" Inherits="slugtalk.Global" %>
--- NEW FILE: Global.asax.cs ---
using System;
using System.Collections;
using System.ComponentModel;
using System.Web;
using System.Web.SessionState;
namespace slugtalk
{
/// <summary>
/// Summary description for Global.
/// </summary>
public class Global : System.Web.HttpApplication
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
public Global()
{
InitializeComponent();
}
protected void Application_Start(Object sender, EventArgs e)
{
}
protected void Session_Start(Object sender, EventArgs e)
{
}
protected void Application_BeginRequest(Object sender, EventArgs e)
{
}
protected void Application_EndRequest(Object sender, EventArgs e)
{
}
protected void Application_AuthenticateRequest(Object sender, EventArgs e)
{
}
protected void Application_Error(Object sender, EventArgs e)
{
}
protected void Session_End(Object sender, EventArgs e)
{
}
protected void Application_End(Object sender, EventArgs e)
{
}
#region Web Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
}
#endregion
}
}
--- NEW FILE: Global.asax.resx ---
<?xml version="1.0" encoding="utf-8" ?>
<root>
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="ResMimeType">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="Version">
<value>1.0.0.0</value>
</resheader>
<resheader name="Reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="Writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
--- NEW FILE: Web.config ---
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<!-- DYNAMIC DEBUG COMPILATION
Set compilation debug="true" to enable ASPX debugging. Otherwise, setting this value to
false will improve runtime performance of this application.
Set compilation debug="true" to insert debugging symbols (.pdb information)
into the compiled page. Because this creates a larger file that executes
more slowly, you should set this value to true only when debugging and to
false at all other times. For more information, refer to the documentation about
debugging ASP.NET files.
-->
<compilation
defaultLanguage="c#"
debug="true"
/>
<!-- CUSTOM ERROR MESSAGES
Set customErrors mode="On" or "RemoteOnly" to enable custom error messages, "Off" to disable.
Add <error> tags for each of the errors you want to handle.
"On" Always display custom (friendly) messages.
"Off" Always display detailed ASP.NET error information.
"RemoteOnly" Display custom (friendly) messages only to users not running
on the local Web server. This setting is recommended for security purposes, so
that you do not display application detail information to remote clients.
-->
<customErrors
mode="RemoteOnly"
/>
<!-- AUTHENTICATION
This section sets the authentication policies of the application. Possible modes are "Windows",
"Forms", "Passport" and "None"
"None" No authentication is performed.
"Windows" IIS performs authentication (Basic, Digest, or Integrated Windows) according to
its settings for the application. Anonymous access must be disabled in IIS.
"Forms" You provide a custom form (Web page) for users to enter their credentials, and then
you authenticate them in your application. A user credential token is stored in a cookie.
"Passport" Authentication is performed via a centralized authentication service provided
by Microsoft that offers a single logon and core profile services for member sites.
-->
<authentication mode="Windows" />
<!-- AUTHORIZATION
This section sets the authorization policies of the application. You can allow or deny access
to application resources by user or role. Wildcards: "*" mean everyone, "?" means anonymous
(unauthenticated) users.
-->
<authorization>
<allow users="*" /> <!-- Allow all users -->
<!-- <allow users="[comma separated list of users]"
roles="[comma separated list of roles]"/>
<deny users="[comma separated list of users]"
roles="[comma separated list of roles]"/>
-->
</authorization>
<!-- APPLICATION-LEVEL TRACE LOGGING
Application-level tracing enables trace log output for every page within an application.
Set trace enabled="true" to enable application trace logging. If pageOutput="true", the
trace information will be displayed at the bottom of each page. Otherwise, you can view the
application trace log by browsing the "trace.axd" page from your web application
root.
-->
<trace
enabled="false"
requestLimit="10"
pageOutput="false"
traceMode="SortByTime"
localOnly="true"
/>
<!-- SESSION STATE SETTINGS
By default ASP.NET uses cookies to identify which requests belong to a particular session.
If cookies are not available, a session can be tracked by adding a session identifier to the URL.
To disable cookies, set sessionState cookieless="true".
-->
<sessionState
mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
cookieless="false"
timeout="20"
/>
<!-- GLOBALIZATION
This section sets the globalization settings of the application.
-->
<globalization
requestEncoding="utf-8"
responseEncoding="utf-8"
/>
</system.web>
</configuration>
--- NEW FILE: login.aspx ---
<%@ Page language="c#" Codebehind="login.aspx.cs" AutoEventWireup="false" Inherits="slugtalk.login" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>login</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
<link rel="stylesheet" type="text/css" href="style.css">
</HEAD>
<body>
<!-- Title -->
<div id="title">
Slug Boards
</div>
<!-- Categories -->
<div id="left">
<div id="boardtitle" align="center">Boards</div>
<br>
<a href="majors.html">Majors</a>
<br>
<a href="colleges.html">Colleges</a><br>
<a href="organizations.html">Organizations</a><br>
<a href="recreation.html">Recreation</a><br>
<a href="incoming.html">Incoming Students</a><br>
</div>
<DIV> </DIV>
<form id="Form1" method="post" runat="server">
<div id="right">
<h3 align="center">
<asp:Label id="Message" runat="server">Welcome To Slugboards</asp:Label>
<table border="0">
<tr>
<td>Username:</td>
<td><asp:TextBox id="Username" runat="server" Width="150px"></asp:TextBox></td>
</tr>
<tr>
<td>Password:</td>
<td><asp:TextBox id="Password" runat="server" TextMode="Password" Width="150px"></asp:TextBox></td>
</tr>
</table>
<asp:Button id="Submit" runat="server" Text="Login"></asp:Button><BR>
</h3>
<h5 align="center">
Not registered? Register <a href="register.aspx">here</a>.
</h5>
</div>
</form>
</body>
</HTML>
--- NEW FILE: login.aspx.cs ---
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Web.Security;
namespace slugtalk
{
/// <summary>
/// Summary description for login.
/// </summary>
public class login : System.Web.UI.Page
{
protected System.Web.UI.WebControls.TextBox Username;
protected System.Web.UI.WebControls.TextBox Password;
protected System.Web.UI.WebControls.Label Message;
protected System.Web.UI.WebControls.Button Submit;
private void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the page here
}
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.Submit.Click += new System.EventHandler(this.Submit_Click);
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
private void Submit_Click(object sender, System.EventArgs e)
{
// What do I want to do?
// (1) Read in username
// (2) Read in password
// (3) Convert password to MD5
// (4) Query SQL database
// (5) If found, create a session object
// (6) If not found, print error message
// hash the password
string hashedPassword = FormsAuthentication.HashPasswordForStoringInConfigFile(Password.Text, "MD5");
// open the SQL database
SqlConnection sqlConn = new SqlConnection("data source=(local)\\ESQL;" +
"database=slugboards;integrated security=false;user id=test;password=test;");
sqlConn.Open();
// let's run our query and fill a dataset
SqlCommand command = new SqlCommand("SELECT * FROM Users WHERE Username='" +
Username.Text + "' AND password='" + hashedPassword + "'", sqlConn);
SqlDataReader reader = command.ExecuteReader();
// check to see if the passwords match
if(reader.HasRows)
{
// move to first row
reader.Read();
// save the user id to the session object
Message.ForeColor = System.Drawing.Color.Green;
Message.Text = "Logged in! User id - " + reader.GetInt32(13).ToString();
Session["id"] = reader.GetInt32(13).ToString();
}
else
{
Message.ForeColor = System.Drawing.Color.Red;
Message.Text = "Incorrect Username/Login";
Username.Text = "";
Password.Text = "";
}
// close the connection
sqlConn.Close();
}
}
}
--- NEW FILE: login.aspx.resx ---
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 1.3
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">1.3</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1">this is my long string</data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
[base64 mime encoded serialized .NET Framework object]
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
[base64 mime encoded string representing a byte array form of the .NET Framework object]
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used forserialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>1.3</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="$this.TrayAutoArrange" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</data>
<data name="$this.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
</root>
--- NEW FILE: register.aspx ---
<%@ Page language="c#" Codebehind="register.aspx.cs" AutoEventWireup="false" Inherits="slugtalk.register" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>register</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
<link rel="stylesheet" type="text/css" href="style.css">
</HEAD>
<body MS_POSITIONING="GridLayout">
<!-- Title -->
<div id="title">
Slug Boards
</div>
<!-- Categories -->
<div id="left">
<div id="boardtitle" align="center">Boards</div>
<br>
<a href="majors.html">Majors</a>
<br>
<a href="colleges.html">Colleges</a><br>
<a href="organizations.html">Organizations</a><br>
<a href="recreation.html">Recreation</a><br>
<a href="incoming.html">Incoming Students</a><br>
</div>
<DIV> </DIV>
<form id="Form1" method="post" runat="server">
<div id="right">
<h3 align="center">
<asp:Label id="Message" runat="server">User Registration</asp:Label>
<table border="0">
<tr>
<td><font color="red">*</font>Username:</td>
<td><asp:TextBox id="Username" runat="server" Width="150px"></asp:TextBox></td>
</tr>
<tr>
<td><font color="red">*</font>Password:</td>
<td><asp:TextBox id="Password" runat="server" TextMode="Password" Width="150px"></asp:TextBox></td>
</tr>
<tr>
<td><font color="red">*</font>Confirm Password:</td>
<td><asp:TextBox id="ConfirmPassword" runat="server" TextMode="Password" Width="150px"></asp:TextBox></td>
</tr>
<tr>
<td>Real Name:</td>
<td><asp:TextBox id="Name" runat="server" Width="150px"></asp:TextBox></td>
</tr>
<tr>
<td style="HEIGHT: 15px">Major:</td>
<td style="HEIGHT: 15px"><asp:DropDownList id="Major" runat="server" Width="150px"></asp:DropDownList></td>
</tr>
<tr>
<td>College:</td>
<td style="HEIGHT: 15px"><asp:DropDownList id="College" runat="server" Width="150px"></asp:DropDownList></td>
</tr>
<tr>
<td>Homepage:</td>
<td><asp:TextBox id="Homepage" runat="server" Width="150px">http://</asp:TextBox></td>
</tr>
<tr>
<td>AIM SN:</td>
<td><asp:TextBox id="AIM" runat="server" Width="150px"></asp:TextBox></td>
</tr>
<tr>
<td>ICQ #:</td>
<td><asp:TextBox id="ICQ" runat="server" Width="150px"></asp:TextBox></td>
</tr>
<tr>
<td>Yahoo SN:</td>
<td><asp:TextBox id="Yahoo" runat="server" Width="150px"></asp:TextBox></td>
</tr>
<tr>
<td>MSN SN:</td>
<td><asp:TextBox id="MSN" runat="server" Width="150px"></asp:TextBox></td>
</tr>
<tr>
<td>Birthdate:</td>
<td>
<asp:TextBox id="Month" runat="server" Width="48px" MaxLength="2"></asp:TextBox>
/
<asp:TextBox id="Day" runat="server" Width="48px" MaxLength="2"></asp:TextBox>
/
<asp:TextBox id="Year" runat="server" Width="72px" MaxLength="4"></asp:TextBox>
</td>
</tr>
<tr>
<td>Bio:</td>
<td><asp:TextBox id="Bio" runat="server" Width="200px" Height="100px" TextMode="MultiLine"></asp:TextBox></td>
</tr>
</table>
<br>
<asp:Button id="Submit" runat="server" Text="Submit"></asp:Button>
</h3>
</div>
</form>
</body>
</HTML>
--- NEW FILE: register.aspx.cs ---
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Web;
using System.Web.Security;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
namespace slugtalk
{
/// <summary>
/// Summary description for register.
/// </summary>
public class register : System.Web.UI.Page
{
protected System.Web.UI.WebControls.TextBox Username;
protected System.Web.UI.WebControls.TextBox Password;
protected System.Web.UI.WebControls.TextBox Name;
protected System.Web.UI.WebControls.DropDownList Major;
protected System.Web.UI.WebControls.DropDownList College;
protected System.Web.UI.WebControls.TextBox Homepage;
protected System.Web.UI.WebControls.TextBox AIM;
protected System.Web.UI.WebControls.TextBox ICQ;
protected System.Web.UI.WebControls.TextBox Yahoo;
protected System.Web.UI.WebControls.TextBox MSN;
protected System.Web.UI.WebControls.TextBox Month;
protected System.Web.UI.WebControls.TextBox Day;
protected System.Web.UI.WebControls.TextBox Year;
protected System.Web.UI.WebControls.TextBox Bio;
protected System.Web.UI.WebControls.Button Submit;
protected string[] majors =
{
"Undecided",
"American Literature",
"American Studies",
"Anthropology",
"Arabic",
"Art",
"Astronomy and Astrophysics",
"Biochemistry and Molecular Bio",
"Biology",
"Biomolecular Engineering",
"British Literature",
"Chemistry and Biochemistry",
"Chinese",
"Community Studies",
"Computer Engineering",
"Computer Science",
"Cowell College",
"Creative Writing",
"Earth Sciences",
"Economics",
"Education",
"Electrical Engineering",
"Engineering",
"Environmental Studies",
"Environmental Toxicology",
"Film and Digital Media",
"French",
"French Literature",
"German",
"Germal Literature",
"Greek",
"Greek Literature",
"Hebrew",
"Hindi",
"History",
"History of Art & Visual Culture",
"History of Consciousness",
"Humanities and Arts Division",
"Information Systems Management",
"Italian",
"Italian Literature",
"Japanese",
"Latin",
"Latin American Studies",
"Latin Literature",
"Legal Studies",
"Linguistics",
"Literature",
"Mathematics",
"Modern Literary Studies",
"Music",
"Ocean Sciences",
"Philosophy",
"Physics",
"Politics",
"Portugese",
"Pre & Early Modern Literature",
"Psychology",
"Russian",
"Science Communication",
"Sociology",
"Spanish",
"Spanish Literature",
"Theater Arts",
"Women's Studies",
"World Lit & Cultural Studies",
"Writing"
};
protected System.Web.UI.WebControls.Label Message;
protected System.Web.UI.WebControls.TextBox ConfirmPassword;
protected string[] colleges =
{
"Unaffiliated",
"Cowell College",
"Stevenson College",
"Crown College",
"Merrill College",
"Porter College",
"Kresge College",
"Oakes College",
"College Eight",
"College Nine",
"College Ten"
};
private void Page_Load(object sender, System.EventArgs e)
{
// initialize majors drop-down list
foreach(string major in majors)
{
Major.Items.Add(major);
}
// initialize colleges drop-down list
foreach(string college in colleges)
{
College.Items.Add(college);
}
}
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.Submit.Click += new System.EventHandler(this.Submit_Click);
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
private void Submit_Click(object sender, System.EventArgs e)
{
SqlConnection sqlConn = new SqlConnection("data source=(local)\\ESQL;" +
"database=slugboards;integrated security=false;user id=test;password=test;");
sqlConn.Open();
// set up command string to verify username
string command = "SELECT * FROM Users WHERE Username='" + Username.Text + "'";
// execute command to get a reader
SqlCommand comm = new SqlCommand(command, sqlConn);
SqlDataReader reader = comm.ExecuteReader();
if(Username.Text == "" || Password.Text == "" || ConfirmPassword.Text == "")
{
Message.ForeColor = System.Drawing.Color.Red;
Message.Text = "Fields marked with a '*' are required";
// close the connection
sqlConn.Close();
return;
}
// row found? username exists
if(reader.HasRows)
{
Message.ForeColor = System.Drawing.Color.Red;
Message.Text = "Username already exists";
// clear username
Username.Text = "";
// close connection
sqlConn.Close();
return;
}
// close the data reader
reader.Close();
// verify username != password
if(Username.Text == Password.Text)
{
Message.ForeColor = System.Drawing.Color.Red;
Message.Text = "Username and Password must be different";
// close connection
sqlConn.Close();
return;
}
// verify passwords
if(ConfirmPassword.Text != Password.Text)
{
Message.ForeColor = System.Drawing.Color.Red;
Message.Text = "Passwords do not match!";
// close connection
sqlConn.Close();
return;
}
// hash password
string hashedPassword = FormsAuthentication.HashPasswordForStoringInConfigFile(Password.Text, "MD5");
// complete the INSERT INTO command
command = "INSERT INTO Users (Username,Password";
if(Name.Text != "")
command += ",Name";
command += ",Major";
command += ",College";
if(Homepage.Text != "")
command += ",Homepage";
if(AIM.Text != "")
command += ",AIM";
if(ICQ.Text != "")
command += ",ICQ";
if(Yahoo.Text != "")
command += ",Yahoo";
if(MSN.Text != "")
command += ",MSN";
if(Bio.Text != "")
command += ",Bio";
command += ") VALUES (";
// fill in the data
command += "'" + Username.Text + "',";
command += "'" + hashedPassword + "'";
if(Name.Text != "")
command += ",'" + Name.Text + "'";
command += ",'" + Major.SelectedIndex.ToString() + "'";
command += ",'" + College.SelectedIndex.ToString() + "'";
if(Homepage.Text != "")
command += ",'" + Homepage.Text + "'";
if(AIM.Text != "")
command += ",'" + AIM.Text + "'";
if(ICQ.Text != "")
command += ",'" + ICQ.Text + "'";
if(Yahoo.Text != "")
command += ",'" + Yahoo.Text + "'";
if(MSN.Text != "")
command += ",'" + MSN.Text + "'";
if(Bio.Text != "")
command += ",'" + Bio.Text + "'";
command += ")";
// create an SQL command
comm.CommandText = command;
// insert non query command
comm.ExecuteNonQuery();
// close the connection
sqlConn.Close();
// redirect to login page
Response.Redirect("login.aspx");
}
}
}
--- NEW FILE: register.aspx.resx ---
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 1.3
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">1.3</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1">this is my long string</data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
[base64 mime encoded serialized .NET Framework object]
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
[base64 mime encoded string representing a byte array form of the .NET Framework object]
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used forserialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>1.3</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="$this.TrayAutoArrange" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</data>
<data name="$this.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
</root>
--- NEW FILE: slugtalk.csproj ---
<VisualStudioProject>
<CSHARP
ProjectType = "Web"
ProductVersion = "7.10.3077"
SchemaVersion = "2.0"
ProjectGuid = "{99B7ECB2-6F29-44B2-8230-CFA64462472A}"
>
<Build>
<Settings
ApplicationIcon = ""
AssemblyKeyContainerName = ""
AssemblyName = "slugtalk"
AssemblyOriginatorKeyFile = ""
DefaultClientScript = "JScript"
DefaultHTMLPageLayout = "Grid"
DefaultTargetSchema = "IE50"
DelaySign = "false"
OutputType = "Library"
PreBuildEvent = ""
PostBuildEvent = ""
RootNamespace = "slugtalk"
RunPostBuildEvent = "OnBuildSuccess"
StartupObject = ""
>
<Config
Name = "Debug"
AllowUnsafeBlocks = "false"
BaseAddress = "285212672"
CheckForOverflowUnderflow = "false"
ConfigurationOverrideFile = ""
DefineConstants = "DEBUG;TRACE"
DocumentationFile = ""
DebugSymbols = "true"
FileAlignment = "4096"
IncrementalBuild = "false"
NoStdLib = "false"
NoWarn = ""
Optimize = "false"
OutputPath = "bin\"
RegisterForComInterop = "false"
RemoveIntegerChecks = "false"
TreatWarningsAsErrors = "false"
WarningLevel = "4"
/>
<Config
Name = "Release"
AllowUnsafeBlocks = "false"
BaseAddress = "285212672"
CheckForOverflowUnderflow = "false"
ConfigurationOverrideFile = ""
DefineConstants = "TRACE"
DocumentationFile = ""
DebugSymbols = "false"
FileAlignment = "4096"
IncrementalBuild = "false"
NoStdLib = "false"
NoWarn = ""
Optimize = "true"
OutputPath = "bin\"
RegisterForComInterop = "false"
RemoveIntegerChecks = "false"
TreatWarningsAsErrors = "false"
WarningLevel = "4"
/>
</Settings>
<References>
<Reference
Name = "System"
AssemblyName = "System"
HintPath = "..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.dll"
/>
<Reference
Name = "System.Drawing"
AssemblyName = "System.Drawing"
HintPath = "..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Drawing.dll"
/>
<Reference
Name = "System.Data"
AssemblyName = "System.Data"
HintPath = "..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Data.dll"
/>
<Reference
Name = "System.Web"
AssemblyName = "System.Web"
HintPath = "..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Web.dll"
/>
<Reference
Name = "System.XML"
AssemblyName = "System.Xml"
HintPath = "..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.XML.dll"
/>
</References>
</Build>
<Files>
<Include>
<File
RelPath = "AssemblyInfo.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "Global.asax"
SubType = "Component"
BuildAction = "Content"
/>
<File
RelPath = "Global.asax.cs"
DependentUpon = "Global.asax"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "Global.asax.resx"
DependentUpon = "Global.asax.cs"
BuildAction = "EmbeddedResource"
/>
<File
RelPath = "login.aspx"
SubType = "Form"
BuildAction = "Content"
/>
<File
RelPath = "login.aspx.cs"
DependentUpon = "login.aspx"
SubType = "ASPXCodeBehind"
BuildAction = "Compile"
/>
<File
RelPath = "login.aspx.resx"
DependentUpon = "login.aspx.cs"
BuildAction = "EmbeddedResource"
/>
<File
RelPath = "register.aspx"
SubType = "Form"
BuildAction = "Content"
/>
<File
RelPath = "register.aspx.cs"
DependentUpon = "register.aspx"
SubType = "ASPXCodeBehind"
BuildAction = "Compile"
/>
<File
RelPath = "register.aspx.resx"
DependentUpon = "register.aspx.cs"
BuildAction = "EmbeddedResource"
/>
<File
RelPath = "Web.config"
BuildAction = "Content"
/>
</Include>
</Files>
</CSHARP>
</VisualStudioProject>
--- NEW FILE: slugtalk.csproj.webinfo ---
<VisualStudioUNCWeb>
<Web URLPath = "http://localhost/slugtalk/slugtalk.csproj" />
</VisualStudioUNCWeb>
--- NEW FILE: slugtalk.sln ---
Microsoft Visual Studio Solution File, Format Version 8.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "slugtalk", "http://localhost/slugtalk/slugtalk.csproj", "{99B7ECB2-6F29-44B2-8230-CFA64462472A}"
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfiguration) = preSolution
Debug = Debug
Release = Release
EndGlobalSection
GlobalSection(ProjectConfiguration) = postSolution
{99B7ECB2-6F29-44B2-8230-CFA64462472A}.Debug.ActiveCfg = Debug|.NET
{99B7ECB2-6F29-44B2-8230-CFA64462472A}.Debug.Build.0 = Debug|.NET
{99B7ECB2-6F29-44B2-8230-CFA64462472A}.Release.ActiveCfg = Release|.NET
{99B7ECB2-6F29-44B2-8230-CFA64462472A}.Release.Build.0 = Release|.NET
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection
GlobalSection(ExtensibilityAddIns) = postSolution
EndGlobalSection
EndGlobal
--- NEW FILE: slugtalk.suo ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: style.css ---
/* Layout */
body{
margin: 0;
padding:0;
background:#ffffcc;
color: #000066;
font-family: sans-serif;
scrollbar-face-color:#99ccff;
scrollbar-shadow-color:#999999;
scrollbar-highlight-color:#ffffcc;
scrollbar-3dlight-color:#99ccff;
scrollbar-darkshadow-color:000066;
scrollbar-track-color:#99ccff;
scrollbar-arrow-color:#ffffcc;
}
#title{
height:35px;
background:#99ccff;
color:#000066;
border:dashed #000066;
border-width:2px 0px;
margin:40px 0 0 0;
font-weight:bold;
font-variant: small-caps;
font-size:x-large;
filter:alpha(Opacity=100, FinishOpacity=25, Style=1, StartX=0, StartY=0, FinishX=100, FinishY=0);
}
#left{
position: absolute;
top: 99px;
left: 20px;
width: 180px;
border: 1px solid #000066;
background: #99ccff;
color: #000066;
padding: 5px;
margin: 0px;
height: 400px;
font-size: large;
}
#leftlinks1{
margin: 5px;
font-size:medium;
}
#leftlinks2{
margin:10px;
font-size:small;
}
#right{
margin: 20px 20px 20px 220px;
border: 2px solid #000066;
background: #ffffff;
color: #000066;
padding: 20px;
position: relative;
}
/* Text Decorations */
#boardtitle{
background: #000066;
font-size: large;
color: #ffffcc;
line-height: 150%;
}
h3{
margin:0;
padding: 5px 0;
font-weight: bold;
font-size: large;
}
a:link, a:active, a:visited{
cursor: crosshair;
color: #000066;
text-decoration: none;
font-weight: normal;
}
a:hover{
font-weight: bold;
}
--- NEW FILE: vs-113516760029603174_tmp.htm ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: vs-180432980829603174_tmp.htm ---
(This appears to be a binary file; contents omitted.)
|