You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(23) |
Dec
(2) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(7) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <slu...@li...> - 2004-01-05 12:23:08
|
Update of /cvsroot/slugtalk/slugboards/slugtalk In directory sc8-pr-cvs1:/tmp/cvs-serv5897 Modified Files: Slugboards.cs delete.aspx.cs Log Message: More updates again! Deleting works now! Index: Slugboards.cs =================================================================== RCS file: /cvsroot/slugtalk/slugboards/slugtalk/Slugboards.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Slugboards.cs 5 Jan 2004 11:54:13 -0000 1.1 --- Slugboards.cs 5 Jan 2004 12:23:05 -0000 1.2 *************** *** 211,215 **** HtmlCode += "\t<TR>\n"; ! if((short)Webpage.Session["Type"] == 2) HtmlCode += "\t\t<TD width=\"1%\" bgcolor=#eeffff><A href=\"delete.aspx?TopicID=" + Topics.GetColumn("ID").ToString() + "\"><IMG src=\"bigX.gif\" border=0></A></TD>\n"; else --- 211,215 ---- HtmlCode += "\t<TR>\n"; ! if((short)Webpage.Session["Type"] == 2 || (int)Boards.GetColumn("ModeratorID") == (int)Webpage.Session["ID"]) HtmlCode += "\t\t<TD width=\"1%\" bgcolor=#eeffff><A href=\"delete.aspx?TopicID=" + Topics.GetColumn("ID").ToString() + "\"><IMG src=\"bigX.gif\" border=0></A></TD>\n"; else *************** *** 296,304 **** // Only display the delete button if the user posted the message or the user is an admin ! if((int)Users.GetColumn("ID") == (int)Webpage.Session["ID"] || (short)Webpage.Session["Type"] == 2) { HtmlCode += "\t\t<TD width=50% bgColor=#ffff99 align=right>"; HtmlCode += "<A href=\"user.aspx?UserID=" + Users.GetColumn("ID").ToString() + "\"><IMG src=\"userinfo.gif\" border=0></IMG></A>"; ! HtmlCode += "<IMG src=\"delete.gif\"></IMG></TD>\n"; } else --- 296,305 ---- // Only display the delete button if the user posted the message or the user is an admin ! if((int)Users.GetColumn("ID") == (int)Webpage.Session["ID"] || (short)Webpage.Session["Type"] == 2 || ! (int)Boards.GetColumn("ModeratorID") == (int)Webpage.Session["ID"]) { HtmlCode += "\t\t<TD width=50% bgColor=#ffff99 align=right>"; HtmlCode += "<A href=\"user.aspx?UserID=" + Users.GetColumn("ID").ToString() + "\"><IMG src=\"userinfo.gif\" border=0></IMG></A>"; ! HtmlCode += "<A href=\"delete.aspx?TopicID=" + TopicID + "&MessageID=" + MessageID + "\"><IMG src=\"delete.gif\" border=0></IMG></A></TD>\n"; } else Index: delete.aspx.cs =================================================================== RCS file: /cvsroot/slugtalk/slugboards/slugtalk/delete.aspx.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** delete.aspx.cs 5 Jan 2004 11:54:13 -0000 1.1 --- delete.aspx.cs 5 Jan 2004 12:23:05 -0000 1.2 *************** *** 151,155 **** Response.Redirect("error.aspx?Message=Topic no longer exists"); ! if(!Boards.Read("SELECT * FROM Boards WHERE ID='" + Topics.GetColumn("BoardID").ToString() + "'")) Response.Redirect("error.aspx?Message=Unknown error"); --- 151,157 ---- Response.Redirect("error.aspx?Message=Topic no longer exists"); ! string BoardID = Topics.GetColumn("BoardID").ToString(); ! ! if(!Boards.Read("SELECT * FROM Boards WHERE ID='" + BoardID + "'")) Response.Redirect("error.aspx?Message=Unknown error"); *************** *** 179,183 **** Boards.Update(); ! Response.Redirect("slugboards.aspx?BoardID=" + Topics.GetColumn("BoardID").ToString()); } --- 181,185 ---- Boards.Update(); ! Response.Redirect("slugboards.aspx?BoardID=" + BoardID); } *************** *** 189,192 **** --- 191,291 ---- private void DeleteMessage() { + bool RedirectToTopic = true; + + EzSqlConnection SqlConn = new EzSqlConnection(this); + + EzSqlTable Boards = new EzSqlTable(SqlConn, "Boards", Server.MapPath("boards.xsd")); + EzSqlTable Topics = new EzSqlTable(SqlConn, "Topics", Server.MapPath("topics.xsd")); + EzSqlTable Messages = new EzSqlTable(SqlConn, "Messages", Server.MapPath("messages.xsd")); + + // First, read the topic and board from the database + if(!Topics.Read("SELECT * FROM Topics WHERE ID='" + TopicID + "'")) + Response.Redirect("error.aspx?Message=Topic no longer exists"); + + string BoardID = Topics.GetColumn("BoardID").ToString(); + + if(!Boards.Read("SELECT * FROM Boards WHERE ID='" + BoardID + "'")) + Response.Redirect("error.aspx?Message=Unknown error"); + + // Now, read in the message + if(!Messages.Read("SELECT * FROM Messages WHERE ID='" + MessageID + "'")) + Response.Redirect("error.aspx?Message=Message no longer exists"); + + // First message? + if((long)Messages.GetColumn("PrevMessageID") == -1) + { + // Only message in the topic + if((long)Messages.GetColumn("NextMessageID") == -1) + { + // Delete the message and delete the topic + Messages.Delete(); + Topics.Delete(); + Boards.SetColumn("Posts", (int)Boards.GetColumn("Posts") - 1); + Boards.SetColumn("LastUpdate", DateTime.Now); + RedirectToTopic = false; + } + // There are multiple messages, remove this message from the front + else + { + long NextMessageID = (long)Messages.GetColumn("NextMessageID"); + + Topics.SetColumn("FirstMessageID", NextMessageID); + Topics.SetColumn("Replies", (int)Topics.GetColumn("Replies") - 1); + Messages.Delete(); + Messages.Update(); + if(Messages.Read("SELECT * FROM Messages WHERE ID='" + NextMessageID + "'")) + { + Messages.SetColumn("PrevMessageID", -1); + } + Boards.SetColumn("LastUpdate", DateTime.Now); + } + } + else + { + // Last message + if((long)Messages.GetColumn("NextMessageID") == -1) + { + long PrevMessageID = (long)Messages.GetColumn("PrevMessageID"); + + Topics.SetColumn("LastMessageID", PrevMessageID); + Topics.SetColumn("Replies", (int)Topics.GetColumn("Replies") - 1); + Messages.Delete(); + Messages.Update(); + if(Messages.Read("SELECT * FROM Messages WHERE ID='" + PrevMessageID + "'")) + { + Messages.SetColumn("NextMessageID", -1); + } + Boards.SetColumn("LastUpdate", DateTime.Now); + } + // A message somewhere in the middle + else + { + long PrevMessageID = (long)Messages.GetColumn("PrevMessageID"), + NextMessageID = (long)Messages.GetColumn("NextMessageID"); + + Topics.SetColumn("Replies", (int)Topics.GetColumn("Replies") - 1); + Messages.Delete(); + Messages.Update(); + if(Messages.Read("SELECT * FROM Messages WHERE ID='" + PrevMessageID + "'")) + { + Messages.SetColumn("NextMessageID", NextMessageID); + Messages.Update(); + } + if(Messages.Read("SELECT * FROM Messages WHERE ID='" + NextMessageID + "'")) + { + Messages.SetColumn("PrevMessageID", PrevMessageID); + } + } + } + + // Update the message the topic and the board with the changes + Messages.Update(); + Topics.Update(); + Boards.Update(); + + if(RedirectToTopic) + Response.Redirect("slugboards.aspx?TopicID=" + TopicID); + else + Response.Redirect("slugboards.aspx?BoardID=" + BoardID); } |
Update of /cvsroot/slugtalk/slugboards/slugtalk In directory sc8-pr-cvs1:/tmp/cvs-serv1059 Modified Files: CheckLogin.cs SQL.cs Thumbs.db login.aspx login.aspx.cs messages.xsd messages.xsx post.aspx post.aspx.cs post.aspx.resx register.aspx register.aspx.cs slugboards.aspx slugboards.aspx.cs slugtalk.csproj slugtalk.suo style.css user.aspx user.aspx.cs users.xsd users.xsx Added Files: Slugboards.cs bigX.gif blank.gif delete.aspx delete.aspx.cs delete.aspx.resx error.aspx error.aspx.cs error.aspx.resx logout.aspx logout.aspx.cs logout.aspx.resx newpass.aspx newpass.aspx.cs newpass.aspx.resx password.gif verify_delete.gif Log Message: More updates! --- NEW FILE: Slugboards.cs --- using System; using System.Data; using System.Web.UI; public class Slugboards { // // GenerateHTML() // // Generates HTML for the message board depending on the values of BoardID and TopicID // public string GenerateHTML(Page NewWebpage) { // Set the server object Webpage = NewWebpage; BoardID = Webpage.Request.QueryString.Get("BoardID"); TopicID = Webpage.Request.QueryString.Get("TopicID"); // See if the inputs are valid. If any are not, redirect the user to the // error page try { // Get BoardID query string if(BoardID != null) int.Parse(BoardID); // Get TopicID query string if(TopicID != null) int.Parse(TopicID); // Get TopicsPerPage query string string TopicsPerPageString = Webpage.Request.QueryString.Get("TopicsPerPage"); if(TopicsPerPageString != null) TopicsPerPage = int.Parse(TopicsPerPageString); if(TopicsPerPageString == null || TopicsPerPage < 30) TopicsPerPage = 30; // Get PageNum query string string PageNumString = Webpage.Request.QueryString.Get("PageNum"); if(PageNumString != null) PageNum = int.Parse(PageNumString); if(PageNumString == null || PageNum < 1) PageNum = 1; } catch(System.Exception exception) { Webpage.Response.Redirect("error.aspx?Message=" + exception.Message); return null; } // Generate a string to hold the HTML string HtmlCode = ""; // Decide how to display the board if(BoardID != null) GenerateHTML_Board(BoardID, ref HtmlCode); else if(TopicID != null) GenerateHTML_Topic(TopicID, ref HtmlCode); else GenerateHTML_AllBoards(ref HtmlCode); return HtmlCode; } // // GenerateHTML_AllBoards() // // Generates HTML for the message board listing // private void GenerateHTML_AllBoards(ref string HtmlCode) { // Try to connect to the database EzSqlConnection SqlConn = new EzSqlConnection(Webpage); // Initialize tables EzSqlTable Boards = new EzSqlTable(SqlConn, "Boards", Webpage.Server.MapPath("boards.xsd")); EzSqlTable Users = new EzSqlTable(SqlConn, "Users", Webpage.Server.MapPath("users.xsd")); EzSqlTable Groups = new EzSqlTable(SqlConn, "Groups", Webpage.Server.MapPath("groups.xsd")); // Display table header HtmlCode += "<P align=center><TABLE cellSpacing=\"1\" cellPadding=\"1\" width=\"95%\" border=\"0\">\n"; HtmlCode += "\t<TR>\n"; HtmlCode += "\t\t<TD colSpan=5>Welcome <STRONG>" + Webpage.Session["Username"] + "</STRONG>. Last login was on " + ((DateTime)Webpage.Session["LastLogin"]).ToLongDateString() + ".</TD>\n"; HtmlCode += "\t</TR>\n"; HtmlCode += "\t<TR>\n"; HtmlCode += "\t\t<TD width=\"1%\" bgColor=\"#ffff99\"></TD>\n"; HtmlCode += "\t\t<TD width=\"55%\" bgColor=\"#ffff99\">\n"; HtmlCode += "\t\t\t<P>Forum</P>\n"; HtmlCode += "\t\t</TD>\n"; HtmlCode += "\t\t<TD width=\"8%\" bgColor=\"#ffff99\">\n"; HtmlCode += "\t\t\t<P>Posts</P>\n"; HtmlCode += "\t\t</TD>\n"; HtmlCode += "\t\t<TD width=\"22%\" bgColor=\"#ffff99\">\n"; HtmlCode += "\t\t\t<P>Last Post</P>\n"; HtmlCode += "\t\t</TD>\n"; HtmlCode += "\t\t<TD width=\"14%\" bgColor=\"#ffff99\">\n"; HtmlCode += "\t\t\t<P>Moderator</P>\n"; HtmlCode += "\t\t</TD>\n"; HtmlCode += "\t</TR>\n"; // Display groups for(int GroupID = 0; ; GroupID++) { // If we can't read any more rows from the groups table, this GroupID does not // exist if(!Groups.Read("SELECT * FROM Groups WHERE GroupID='" + GroupID.ToString() + "'")) break; HtmlCode += "\t<TR>\n"; HtmlCode += "\t\t<TD width=\"100%\" bgColor=\"#eeeeee\" colSpan=\"5\"><STRONG>" + Groups.GetColumn("Name") + "</STRONG></TD>\n"; HtmlCode += "\t</TR>\n"; Boards.Read("SELECT * FROM Boards WHERE GroupID='" + GroupID + "' ORDER BY ID"); // Now, display topics for(int BoardNum = 0; BoardNum < Boards.GetNumRows(); BoardNum++) { Boards.SetCurrentRow(BoardNum); Users.Read("SELECT * FROM Users WHERE ID='" + Boards.GetColumn("ModeratorID").ToString() + "'"); HtmlCode += "\t<TR>\n"; HtmlCode += "\t\t<TD width=\"1%\" bgcolor=#eeffff><IMG src=\"blank.gif\"></TD>\n"; // Display board name... HtmlCode += "\t\t<TD width=\"55%\" bgcolor=#ffffee><FONT size=\"2\"><A href=\"slugboards.aspx?BoardID=" + Boards.GetColumn("ID").ToString() + "\"><STRONG>" + Boards.GetColumn("Name") + "</STRONG></A><BR>"; // ...and board details HtmlCode += "<EM>" + Boards.GetColumn("Description") + "</EM></FONT></TD>\n"; HtmlCode += "\t\t<TD align=\"center\" width=\"8%\" bgcolor=#eeffff><FONT size=\"2\">" + Boards.GetColumn("Posts").ToString() + "</FONT></TD>\n"; HtmlCode += "\t\t<TD align=\"center\" width=\"22%\" bgcolor=#ffffee><FONT size=\"2\">" + ((DateTime)Boards.GetColumn("LastUpdate")).ToLongDateString() + "</FONT><BR><FONT size=\"2\" color=red>" + ((DateTime)Boards.GetColumn("LastUpdate")).ToLongTimeString() + "</FONT></TD>\n"; HtmlCode += "\t\t<TD align=\"center\" width=\"14%\" bgcolor=#eeffff><FONT size=\"2\"><A href=\"user.aspx?UserID=" + Boards.GetColumn("ModeratorID").ToString() + "\">" + Users.GetColumn("Username") + "</A></FONT></TD>\n"; HtmlCode += "\t</TR>\n"; } } HtmlCode += "\t<TR>\n"; HtmlCode += "\t\t<TD width=\"1%\" bgColor=\"#ffff99\"></TD>\n"; HtmlCode += "\t\t<TD width=\"55%\" bgColor=\"#ffff99\">\n"; HtmlCode += "\t\t\t<P>Forum</P>\n"; HtmlCode += "\t\t</TD>\n"; HtmlCode += "\t\t<TD width=\"8%\" bgColor=\"#ffff99\">\n"; HtmlCode += "\t\t\t<P>Posts</P>\n"; HtmlCode += "\t\t</TD>\n"; HtmlCode += "\t\t<TD width=\"22%\" bgColor=\"#ffff99\">\n"; HtmlCode += "\t\t\t<P>Last Post</P>\n"; HtmlCode += "\t\t</TD>\n"; HtmlCode += "\t\t<TD width=\"14%\" bgColor=\"#ffff99\">\n"; HtmlCode += "\t\t\t<P>Moderator</P>\n"; HtmlCode += "\t\t</TD>\n"; HtmlCode += "\t</TR>\n"; // Finish off this bad boy HtmlCode += "</TABLE></P>\n"; SqlConn.Close(); } // // GenerateHTML_Board() // // Generates HTML for a single message board // private void GenerateHTML_Board(string BoardID, ref string HtmlCode) { // Try to connect to the database EzSqlConnection SqlConn = new EzSqlConnection(Webpage); EzSqlTable Boards = new EzSqlTable(SqlConn, "Boards", Webpage.Server.MapPath("boards.xsd")); EzSqlTable Topics = new EzSqlTable(SqlConn, "Topics", Webpage.Server.MapPath("topics.xsd")); EzSqlTable Users = new EzSqlTable(SqlConn, "Users", Webpage.Server.MapPath("users.xsd")); // Read the board name from the database Boards.Read("SELECT * FROM Boards WHERE ID='" + BoardID + "'"); HtmlCode += "</span><P align=center><TABLE cellSpacing=1 cellPadding=1 width=95% border=0>\n"; HtmlCode += "\t<TR>\n"; HtmlCode += "\t\t<TD colSpan=6>Welcome <STRONG>" + Webpage.Session["Username"] + "</STRONG>. Last login was on " + ((DateTime)Webpage.Session["LastLogin"]).ToLongDateString() + ".</TD>\n"; HtmlCode += "\t</TR>\n"; HtmlCode += "\t<TR>\n"; HtmlCode += "\t\t<TD width=1% bgColor=#ffff99></TD>\n"; HtmlCode += "\t\t<TD width=40% bgColor=#ffff99>\n"; HtmlCode += "\t\t\t<P>Subject</P>\n"; HtmlCode += "\t\t</TD>\n"; HtmlCode += "\t\t<TD width=8% bgColor=#ffff99>\n"; HtmlCode += "\t\t\t<P>Replies</P>\n"; HtmlCode += "\t\t</TD>\n"; HtmlCode += "\t\t<TD width=7% bgColor=#ffff99>\n"; HtmlCode += "\t\t\t<P>Views</P>\n"; HtmlCode += "\t\t</TD>\n"; HtmlCode += "\t\t<TD width=15% bgColor=#ffff99>\n"; HtmlCode += "\t\t\t<P>Topic Starter</P>\n"; HtmlCode += "\t\t</TD>\n"; HtmlCode += "\t\t<TD width=30% bgColor=#ffff99>\n"; HtmlCode += "\t\t\t<P>Last Post Date</P>\n"; HtmlCode += "\t\t</TD>\n"; HtmlCode += "\t</TR>\n"; Topics.Read("SELECT * FROM Topics WHERE BoardID='" + BoardID + "' ORDER BY LastUpdate DESC"); PageNum--; int NumPages = (int)System.Math.Ceiling((double)Topics.GetNumRows() / (double)TopicsPerPage), StartTopic = TopicsPerPage * PageNum, EndTopic = System.Math.Min(StartTopic + TopicsPerPage, Topics.GetNumRows()); // Loop through all of the posts and output them to the HTML for(int TopicNum = StartTopic; TopicNum < EndTopic; TopicNum++) { Topics.SetCurrentRow(TopicNum); Users.Read("SELECT * FROM Users WHERE ID='" + Topics.GetColumn("UserID").ToString() + "'"); HtmlCode += "\t<TR>\n"; if((short)Webpage.Session["Type"] == 2) HtmlCode += "\t\t<TD width=\"1%\" bgcolor=#eeffff><A href=\"delete.aspx?TopicID=" + Topics.GetColumn("ID").ToString() + "\"><IMG src=\"bigX.gif\" border=0></A></TD>\n"; else HtmlCode += "\t\t<TD width=\"1%\" bgcolor=#eeffff><IMG src=\"blank.gif\"></TD>\n"; // Display topic subject HtmlCode += "\t\t<TD width=\"40%\" bgcolor=#ffffee><FONT size=\"2\"><A href=\"slugboards.aspx?TopicID=" + Topics.GetColumn("ID").ToString() + "\">" + Topics.GetColumn("Subject") + "</A></TD>"; // Number of replies HtmlCode += "\t\t<TD align=\"center\" width=\"8%\" bgcolor=#eeffff><FONT size=\"2\">" + Topics.GetColumn("Replies").ToString() + "</FONT></TD>\n"; // Number of views HtmlCode += "\t\t<TD align=\"center\" width=\"7%\" bgcolor=#ffffee><FONT size=\"2\">" + Topics.GetColumn("Views").ToString() + "</FONT></TD>\n"; // Topic starter HtmlCode += "\t\t<TD align=\"center\" width=\"15%\" bgcolor=#eeffff><FONT size=\"2\"><A href=\"user.aspx?UserID=" + Topics.GetColumn("UserID").ToString() + "\">" + Users.GetColumn("Username") + "</A></FONT></TD>\n"; // Last post date HtmlCode += "\t\t<TD align=\"center\" width=\"30%\" bgcolor=#ffffee><FONT size=\"1\">" + ((DateTime)Topics.GetColumn("LastUpdate")).ToLongDateString() + "</FONT><FONT size=\"1\" color=red> " + ((DateTime)Topics.GetColumn("LastUpdate")).ToLongTimeString() + "</FONT></TD>\n"; HtmlCode += "\t</TR>\n"; } // Display page numbers HtmlCode += "\t<TR>\n"; HtmlCode += "\t\t<TD colSpan=6 align=right>Pages: "; for(PageNum = 1; PageNum <= NumPages; PageNum++) { HtmlCode += "<A href=\"slugboards.aspx?BoardID=" + BoardID + "&TopicsPerPage=" + TopicsPerPage + "&PageNum=" + PageNum.ToString() + "\">" + PageNum.ToString() + "</A>"; if(PageNum != NumPages) HtmlCode += ", "; } HtmlCode += "\n\t</TR>\n"; // Finish off this bad boy HtmlCode += "</TABLE></P>\n"; // Display return link HtmlCode += "<P align=center><A href=\"slugboards.aspx\">Return to the boards</A><BR>\n"; // Display 'New Topic' button HtmlCode += "<P align=center><A href=\"post.aspx?type=post&BoardID=" + BoardID + "\"><IMG src=\"post.gif\" border=0/></A><BR>\n"; SqlConn.Close(); } // // GenerateHTML_Topic() // // Generates HTML for a single topic // private void GenerateHTML_Topic(string TopicID, ref string HtmlCode) { // Connect to the boards database table string BoardID; // Try to connect to the database EzSqlConnection SqlConn = new EzSqlConnection(Webpage); // Initialize tables EzSqlTable Boards = new EzSqlTable(SqlConn, "Boards", Webpage.Server.MapPath("boards.xsd")); EzSqlTable Topics = new EzSqlTable(SqlConn, "Topics", Webpage.Server.MapPath("topics.xsd")); EzSqlTable Messages = new EzSqlTable(SqlConn, "Messages", Webpage.Server.MapPath("messages.xsd")); EzSqlTable Users = new EzSqlTable(SqlConn, "Users", Webpage.Server.MapPath("users.xsd")); // Read the topic Topics.Read("SELECT * FROM Topics WHERE ID='" + TopicID + "'"); // Get the BoardID BoardID = Topics.GetColumn("BoardID").ToString(); // Read the board info Boards.Read("SELECT * FROM Boards WHERE ID='" + BoardID + "'"); // One more topic viewing... Topics.SetColumn("Views", (int)Topics.GetColumn("Views") + 1); Topics.Update(); // Clear the HTML code HtmlCode = ""; // Get the id of the first post for(long MessageID = (long)Topics.GetColumn("FirstMessageID"); MessageID != -1;) { Messages.Read("SELECT * FROM Messages WHERE ID='" + MessageID.ToString() + "'"); Users.Read("SELECT * FROM Users WHERE ID='" + Messages.GetColumn("UserID").ToString() + "'"); HtmlCode += "<P align=center>\n"; HtmlCode += "<TABLE cellSpacing=1 cellPadding=3 width=95% border=0>\n"; HtmlCode += "\t<TR>\n"; HtmlCode += "\t\t<TD width=50% bgColor=#ffff99>"; HtmlCode += Users.GetColumn("Username") + "</TD>\n"; // Only display the delete button if the user posted the message or the user is an admin if((int)Users.GetColumn("ID") == (int)Webpage.Session["ID"] || (short)Webpage.Session["Type"] == 2) { HtmlCode += "\t\t<TD width=50% bgColor=#ffff99 align=right>"; HtmlCode += "<A href=\"user.aspx?UserID=" + Users.GetColumn("ID").ToString() + "\"><IMG src=\"userinfo.gif\" border=0></IMG></A>"; HtmlCode += "<IMG src=\"delete.gif\"></IMG></TD>\n"; } else { HtmlCode += "\t\t<TD width=50% bgColor=#ffff99 align=right>"; HtmlCode += "<A href=\"user.aspx?UserID=" + Users.GetColumn("ID").ToString() + "\"><IMG src=\"userinfo.gif\" border=0></IMG></A></TD>\n"; } HtmlCode += "\t</TR>\n"; HtmlCode += "\t<TR>\n"; HtmlCode += "\t\t<TD width=100% colSpan=2 bgColor=#eeffff>"; HtmlCode += Messages.GetColumn("Subject") + "</TD>\n"; HtmlCode += "\t</TR>\n"; HtmlCode += "\t<TR>\n"; HtmlCode += "\t\t<TD width=100% colSpan=2 bgColor=#ffffee cellpadding=4>" + Messages.GetColumn("Text") + "<BR><BR></TD>\n"; HtmlCode += "\t</TR>\n"; HtmlCode += "</TABLE>\n"; HtmlCode += "<BR>\n"; MessageID = (long)Messages.GetColumn("NextMessageID"); } HtmlCode += "<P align=center><A href=\"slugboards.aspx?BoardID=" + BoardID + "\">Return to " + Boards.GetColumn("Name") + "</A><BR>\n"; HtmlCode += "<P align=center><A href=\"post.aspx?type=reply&TopicID=" + TopicID + "#Post\"><IMG src=\"reply.gif\" border=0/></A><BR>\n"; SqlConn.Close(); } private string BoardID, TopicID; private int TopicsPerPage, PageNum; private Page Webpage; }; --- NEW FILE: bigX.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: blank.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: delete.aspx --- <%@ Page language="C#" Codebehind="delete.aspx.cs" AutoEventWireup="false" Inherits="slugtalk.delete" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > <HTML> <HEAD> <title>delete</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 href="style.css" type="text/css" rel="stylesheet"> </HEAD> <body> <form id="Form1" method="post" runat="server"> <IMG src="slugboard.jpg"> <P align="center"><FONT size="6"> Delete</FONT></P> <P align="center"> <asp:Label id="Message" runat="server"></asp:Label></P> <P align="center"> <asp:ImageButton id="DeleteIt" runat="server" ImageUrl="verify_delete.gif"></asp:ImageButton></P> <P align="center"> <asp:Label id="Message2" runat="server"></asp:Label></P> </form> </body> </HTML> --- NEW FILE: delete.aspx.cs --- using System; using System.Collections; using System.ComponentModel; using System.Data; using System.Drawing; using System.Web; using System.Web.SessionState; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.HtmlControls; namespace slugtalk { /// <summary> /// Summary description for delete. /// </summary> public class delete : System.Web.UI.Page { protected System.Web.UI.WebControls.Label Message; protected System.Web.UI.WebControls.Label Message2; protected System.Web.UI.WebControls.ImageButton DeleteIt; private void Page_Load(object sender, System.EventArgs e) { TopicID = Request.QueryString.Get("TopicID"); MessageID = Request.QueryString.Get("MessageID"); try { if(TopicID != null) int.Parse(TopicID); else throw(new System.Exception("TopicID required by delete.aspx")); if(MessageID != null) int.Parse(MessageID); } catch(System.Exception exception) { Response.Redirect("error.aspx?Message=" + exception.Message); } // Create a connection and two tables EzSqlConnection SqlConn = new EzSqlConnection(this); EzSqlTable Boards = new EzSqlTable(SqlConn, "Boards", Server.MapPath("boards.xsd")); EzSqlTable Topics = new EzSqlTable(SqlConn, "Topics", Server.MapPath("topics.xsd")); EzSqlTable Messages = null; if(!Topics.Read("SELECT * FROM Topics WHERE ID='" + TopicID + "'")) Response.Redirect("error.aspx?Message=Topic does not exist"); if(!Boards.Read("SELECT * FROM Boards WHERE ID='" + Topics.GetColumn("BoardID").ToString() + "'")) Response.Redirect("error.aspx?Message=Unknown error"); // Deleting an entire topic? if(MessageID == null) { Message.Text = "Are you sure you want to delete the topic '<STRONG>" + Topics.GetColumn("Subject") + "</STRONG>'?"; } // Deleting an message in a topic else { Messages = new EzSqlTable(SqlConn, "Messages", Server.MapPath("messages.xsd")); if(!Messages.Read("SELECT * FROM Messages WHERE ID='" + MessageID + "'")) Response.Redirect("error.aspx?Message=Message does not exist"); Message.Text = "Are you sure you want to delete the message with subject <STRONG>" + Messages.GetColumn("Subject") + "</STRONG> in the topic <STRONG>" + Topics.GetColumn("Subject") + "</STRONG>?"; } // See if the user has proper authority to delete if((short)Session["Type"] == 2 || (Messages != null && ((int)Messages.GetColumn("UserID") == (int)Session["ID"])) || ((int)Boards.GetColumn("ModeratorID") == (int)Session["ID"])) { CanDelete = true; } else { Message.Text = "You do <STRONG>not</STRONG> have proper permissions to delete this topic and or message\n"; DeleteIt.Visible = false; } // Display return message if(MessageID != null) { Message2.Text = "Please, <A href=\"slugboards.aspx?TopicID=" + TopicID + "\">return</A> me to the boards"; } else { Message2.Text = "Please, <A href=\"slugboards.aspx?BoardID =" + Topics.GetColumn("BoardID").ToString() + "\">return</A> me to the boards"; } } #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.DeleteIt.Click += new System.Web.UI.ImageClickEventHandler(this.DeleteIt_Click); this.Load += new System.EventHandler(this.Page_Load); } #endregion private void DeleteIt_Click(object sender, System.Web.UI.ImageClickEventArgs e) { // First, check to see if the user has proper authority to be deleting this // shiznit if(!CanDelete) return; if(MessageID == null) { DeleteTopic(); } else { DeleteMessage(); } } // // DeleteTopic() // // Deletes a topic from the message board. // private void DeleteTopic() { EzSqlConnection SqlConn = new EzSqlConnection(this); EzSqlTable Boards = new EzSqlTable(SqlConn, "Boards", Server.MapPath("boards.xsd")); EzSqlTable Topics = new EzSqlTable(SqlConn, "Topics", Server.MapPath("topics.xsd")); EzSqlTable Messages = new EzSqlTable(SqlConn, "Messages", Server.MapPath("messages.xsd")); // First, read the topic and board from the database if(!Topics.Read("SELECT * FROM Topics WHERE ID='" + TopicID + "'")) Response.Redirect("error.aspx?Message=Topic no longer exists"); if(!Boards.Read("SELECT * FROM Boards WHERE ID='" + Topics.GetColumn("BoardID").ToString() + "'")) Response.Redirect("error.aspx?Message=Unknown error"); // Now, delete the messages from the database table long MessageID = (long)Topics.GetColumn("FirstMessageID"); while(MessageID != -1) { // Error in the messages, we don't want to crap out because we still // want to delete the topic if(!Messages.Read("SELECT * FROM Messages WHERE ID='" + MessageID + "'")) break; MessageID = (long)Messages.GetColumn("NextMessageID"); // Delete the message Messages.Delete(); Messages.Update(); } // Now, delete the topic Topics.Delete(); Topics.Update(); Boards.SetColumn("Posts", (int)Boards.GetColumn("Posts") - 1); Boards.SetColumn("LastUpdate", DateTime.Now); Boards.Update(); Response.Redirect("slugboards.aspx?BoardID=" + Topics.GetColumn("BoardID").ToString()); } // // DeleteMessage() // // Deletes a message from the message board. // private void DeleteMessage() { } private string TopicID, MessageID; private bool CanDelete = false; }; } --- NEW FILE: delete.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: error.aspx --- <%@ Page language="c#" Codebehind="error.aspx.cs" AutoEventWireup="false" Inherits="slugtalk.error" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > <HTML> <HEAD> <title>error</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 href="style.css" type="text/css" rel="stylesheet"> </HEAD> <body> <form id="Form1" method="post" runat="server"> <IMG src="slugboard.jpg"> <P align="center"><FONT size="6">Error</FONT></P> <P align=center>An error has occurred (Message: <asp:Label id="Message" runat="server"></asp:Label>). Please contact the system administrator.</P> <P align=center>Click <A href="slugboards.aspx">here</A> to return to the message board home page</P> <P align=center> </P> <P align=center><FONT size=2>© 2003 University of California at Santa Cruz. All rights reserved.</FONT></P> <P align=center> <BR> </P> </form> </body> </HTML> --- NEW FILE: error.aspx.cs --- using System; using System.Collections; using System.ComponentModel; using System.Data; using System.Drawing; using System.Web; using System.Web.SessionState; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.HtmlControls; // ERROR CODES // // 0 - Sql Connection Error // 1 - URL Query String Error // 999 - Unknown error namespace slugtalk { /// <summary> /// Summary description for error. /// </summary> public class error : System.Web.UI.Page { protected System.Web.UI.WebControls.Label Message; private void Page_Load(object sender, System.EventArgs e) { string MessageString; MessageString = Request.QueryString.Get("Message"); if(MessageString == null) MessageString = "Unknown"; Message.Text = MessageString; } #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.Load += new System.EventHandler(this.Page_Load); } #endregion } } --- NEW FILE: error.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: logout.aspx --- <%@ Page language="c#" Codebehind="logout.aspx.cs" AutoEventWireup="false" Inherits="slugtalk.logout" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > <HTML> <HEAD> <title>logout</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 href="style.css" type="text/css" rel="stylesheet"> </HEAD> <body> <form id="Form1" method="post" runat="server"> <IMG src="slugboard.jpg"> <P align="center"><FONT size="4"></FONT> </P> <P align="center"><FONT size="4">Logging out... Please wait...</FONT></P> <P align="center"> </P> <P align="center"><FONT size="2">© 2003 University of California at Santa Cruz. All rights reserved.</FONT></P> </form> </body> </HTML> --- NEW FILE: logout.aspx.cs --- using System; using System.Collections; using System.ComponentModel; using System.Data; using System.Drawing; using System.Web; using System.Web.SessionState; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.HtmlControls; namespace slugtalk { /// <summary> /// Summary description for logout. /// </summary> public class logout : CheckLogin { private void Page_Load(object sender, System.EventArgs e) { Logout(); // Redirect to the login page Response.Redirect("login.aspx"); } #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.Load += new System.EventHandler(this.Page_Load); } #endregion } } --- NEW FILE: logout.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: newpass.aspx --- <%@ Page language="c#" Codebehind="newpass.aspx.cs" AutoEventWireup="false" Inherits="slugtalk.newpass" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > <HTML> <HEAD> <title>newpass</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 href="style.css" type="text/css" rel="stylesheet"> </HEAD> <body> <form id="Form1" method="post" runat="server"> <IMG src="slugboard.jpg"> <P align="center"><FONT size="6">New Password Request</FONT></P> <P align="center">Please, enter your Username and Email you registered with and we will send you a new password.</P> <TABLE id="Table1" cellSpacing="1" cellPadding="1" width="300" align="center" border="0"> <TR> <TD style="HEIGHT: 22px" align="center" colSpan="2"><asp:label id="Message" runat="server" Font-Bold="True" ForeColor="Red"></asp:label></TD> </TR> <TR> <TD style="WIDTH: 126px; HEIGHT: 18px">Username:</TD> <TD style="HEIGHT: 18px"><asp:textbox id="Username" runat="server" Width="144px"></asp:textbox></TD> </TR> <TR> <TD style="WIDTH: 126px">Email:</TD> <TD><asp:textbox id="Email" runat="server" TextMode="Password"></asp:textbox></TD> </TR> <TR> <TD align="center" colSpan="2" rowSpan="1"> <P><asp:imagebutton id="Submit" runat="server" ImageUrl="password.gif"></asp:imagebutton></P> </TD> </TR> </TABLE> <P align="center"><FONT size="2">© 2003 University of California at Santa Cruz. All rights reserved.</FONT></P> </form> </body> </HTML> --- NEW FILE: newpass.aspx.cs --- using System; using System.Collections; using System.ComponentModel; using System.Data; 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.Mail; namespace slugtalk { /// <summary> /// Summary description for newpass. /// </summary> public class newpass : System.Web.UI.Page { protected System.Web.UI.WebControls.Label Message; protected System.Web.UI.WebControls.TextBox Username; protected System.Web.UI.WebControls.TextBox Email; protected System.Web.UI.WebControls.ImageButton 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.Web.UI.ImageClickEventHandler(this.Submit_Click); this.Load += new System.EventHandler(this.Page_Load); } #endregion private void Submit_Click(object sender, System.Web.UI.ImageClickEventArgs e) { SmtpMail mail; } } } --- NEW FILE: newpass.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: password.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: verify_delete.gif --- (This appears to be a binary file; contents omitted.) Index: CheckLogin.cs =================================================================== RCS file: /cvsroot/slugtalk/slugboards/slugtalk/CheckLogin.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CheckLogin.cs 4 Jan 2004 05:08:31 -0000 1.1 --- CheckLogin.cs 5 Jan 2004 11:54:13 -0000 1.2 *************** *** 23,33 **** public bool CheckForLogin() { ! // check to see if one of three things is true ! // (1) there is no username stored in the session ! // (2) there is no password stored in the session ! // (3) the username and/or password are invalid ! // if any of the above are true, return false ! if(Session["username"] == null || Session["password"] == null || ! !TryLogin((string)Session["username"], (string)Session["password"])) { return false; --- 23,33 ---- public bool CheckForLogin() { ! // Check to see if one of three things is true ! // (1) There is no username stored in the session ! // (2) There is no password stored in the session ! // (3) The username and/or password are invalid ! // If any of the above are true, return false ! if(Session["Username"] == null || Session["Password"] == null || ! !TryLogin((string)Session["Username"], (string)Session["Password"])) { return false; *************** *** 44,88 **** public bool TryLogin(string Username, string Password) { ! bool retVal = false; ! EzSqlConnection sqlConn = new EzSqlConnection(); ! EzSqlTable users = new EzSqlTable("Users", Server.MapPath("users.xsd")); ! ! // hash the password string HashedPassword = FormsAuthentication.HashPasswordForStoringInConfigFile(Password, "MD5"); ! // open the SQL database ! sqlConn.Open(); ! ! // let's run our query and fill a dataset ! if(users.Read(sqlConn.GetConnection(), "SELECT * FROM Users WHERE Username='" + Username + "'")) { ! if((string)users.GetColumn("Password") == HashedPassword) { // Save all of the user information in the session object Session["Username"] = Username; Session["Password"] = Password; ! Session["Email"] = users.GetColumn("Email"); ! Session["Name"] = users.GetColumn("Name"); ! Session["Major"] = users.GetColumn("Major"); ! Session["College"] = users.GetColumn("College"); ! Session["Homepage"] = users.GetColumn("Homepage"); ! Session["AIM"] = users.GetColumn("AIM"); ! Session["ICQ"] = users.GetColumn("ICQ"); ! Session["Yahoo"] = users.GetColumn("Yahoo"); ! Session["MSN"] = users.GetColumn("MSN"); ! Session["Birthdate"]= users.GetColumn("Birthdate"); ! Session["Bio"] = users.GetColumn("Bio"); ! Session["Type"] = users.GetColumn("Type"); ! Session["UserInfo"] = users.GetColumn("UserInfo"); ! Session["ID"] = users.GetColumn("ID"); ! retVal = true; } } ! // close the connection ! sqlConn.Close(); ! return retVal; } }; --- 44,110 ---- public bool TryLogin(string Username, string Password) { ! bool RetVal = false; ! ! // Try to connect to the database ! EzSqlConnection SqlConn = new EzSqlConnection(this); ! ! // Hash the password string HashedPassword = FormsAuthentication.HashPasswordForStoringInConfigFile(Password, "MD5"); ! // Let's run our query and fill a dataset ! EzSqlTable Users = new EzSqlTable(SqlConn, "Users", Server.MapPath("users.xsd")); ! if(Users.Read("SELECT * FROM Users WHERE Username='" + Username + "'")) { ! if((string)Users.GetColumn("Password") == HashedPassword) { // Save all of the user information in the session object Session["Username"] = Username; Session["Password"] = Password; ! Session["Email"] = Users.GetColumn("Email"); ! Session["Type"] = Users.GetColumn("Type"); ! Session["UserInfo"] = Users.GetColumn("UserInfo"); ! Session["LastLogin"]= Users.GetColumn("LastLogin"); ! Session["ID"] = Users.GetColumn("ID"); ! // Set the last login time ! Users.SetColumn("LastLogin", DateTime.Now); ! Users.Update(); ! ! RetVal = true; } } ! SqlConn.Close(); ! return RetVal; } + + // + // Logout() + // + public void Logout() + { + // Try to connect to the database + EzSqlConnection SqlConn = new EzSqlConnection(this); + + // Let's run our query and fill a dataset + EzSqlTable Users = new EzSqlTable(SqlConn, "Users", Server.MapPath("users.xsd")); + if(Users.Read("SELECT * FROM Users WHERE Username='" + Session["Username"] + "'")) + { + // Remove all of the Session information + Session.Remove("Username"); + Session.Remove("Password"); + Session.Remove("Email"); + Session.Remove("Type"); + Session.Remove("UserInfo"); + Session.Remove("LastLogin"); + Session.Remove("ID"); + + // Store the datetime in the database + Users.SetColumn("LastLogin", DateTime.Now); + Users.Update(); + } + + SqlConn.Close(); + } }; Index: SQL.cs =================================================================== RCS file: /cvsroot/slugtalk/slugboards/slugtalk/SQL.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SQL.cs 4 Jan 2004 05:08:31 -0000 1.1 --- SQL.cs 5 Jan 2004 11:54:13 -0000 1.2 *************** *** 2,5 **** --- 2,6 ---- using System.Data.SqlClient; using System.Web; + using System.Web.UI; // EzSqlConnection *************** *** 8,47 **** class EzSqlConnection { ! // ! // Open() ! // ! // Opens the connection. ! // ! public bool Open() ! { ! // !!!!make changes here to open a connection to a different SQL source!!!! ! sqlConn = new SqlConnection("data source=(local)\\ESQL;" + ! "database=slugboards;integrated security=false;user id=test;password=test;"); ! sqlConn.Open(); ! ! return true; ! } ! // ! // Close() ! // ! // Closes the connection. ! // ! public void Close() ! { ! sqlConn.Close(); ! } ! // ! // GetConnection() ! // ! // Returns the SqlConnection object that corresponds to the connection. ! // ! public SqlConnection GetConnection() ! { ! return sqlConn; ! } ! private SqlConnection sqlConn; // the actual connection }; --- 9,55 ---- class EzSqlConnection { ! // ! // EzSqlConnection() ! // ! // Constructor for class EzSqlConnection ! ... [truncated message content] |
Update of /cvsroot/slugtalk/slugboards/slugtalk In directory sc8-pr-cvs1:/tmp/cvs-serv25636 Added Files: CheckLogin.cs HeaderFooter.cs SQL.cs Thumbs.db UCSC.cs base.gif boards.xsd boards.xsx delete.gif groups.xsd groups.xsx help.gif info.gif logout.gif messages.xsd messages.xsx newtopic.gif on.gif post.aspx post.aspx.cs post.aspx.resx register.gif reply.gif slugboards.aspx slugboards.aspx.cs slugboards.aspx.resx stats.gif submit.gif textbox.gif topics.xsd topics.xsx user.aspx user.aspx.cs user.aspx.resx userinfo.gif users.xsd users.xsx vs-76543744029610391_tmp.htm Log Message: New files. --- NEW FILE: CheckLogin.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; // Just derive a class from this class to add Login capabilities to your // webpage! Awesome! public class CheckLogin : System.Web.UI.Page { // // CheckForLogin() // // Checks the Session state for a login. // public bool CheckForLogin() { // check to see if one of three things is true // (1) there is no username stored in the session // (2) there is no password stored in the session // (3) the username and/or password are invalid // if any of the above are true, return false if(Session["username"] == null || Session["password"] == null || !TryLogin((string)Session["username"], (string)Session["password"])) { return false; } return true; } // // TryLogin() // // Tries to login the user with the specified username and password. // public bool TryLogin(string Username, string Password) { bool retVal = false; EzSqlConnection sqlConn = new EzSqlConnection(); EzSqlTable users = new EzSqlTable("Users", Server.MapPath("users.xsd")); // hash the password string HashedPassword = FormsAuthentication.HashPasswordForStoringInConfigFile(Password, "MD5"); // open the SQL database sqlConn.Open(); // let's run our query and fill a dataset if(users.Read(sqlConn.GetConnection(), "SELECT * FROM Users WHERE Username='" + Username + "'")) { if((string)users.GetColumn("Password") == HashedPassword) { // Save all of the user information in the session object Session["Username"] = Username; Session["Password"] = Password; Session["Email"] = users.GetColumn("Email"); Session["Name"] = users.GetColumn("Name"); Session["Major"] = users.GetColumn("Major"); Session["College"] = users.GetColumn("College"); Session["Homepage"] = users.GetColumn("Homepage"); Session["AIM"] = users.GetColumn("AIM"); Session["ICQ"] = users.GetColumn("ICQ"); Session["Yahoo"] = users.GetColumn("Yahoo"); Session["MSN"] = users.GetColumn("MSN"); Session["Birthdate"]= users.GetColumn("Birthdate"); Session["Bio"] = users.GetColumn("Bio"); Session["Type"] = users.GetColumn("Type"); Session["UserInfo"] = users.GetColumn("UserInfo"); Session["ID"] = users.GetColumn("ID"); retVal = true; } } // close the connection sqlConn.Close(); return retVal; } }; --- NEW FILE: HeaderFooter.cs --- using System.Web.UI; public class HeaderFooter { // // WriteHeader // // Writes the HTML header for the page // public void WriteHeader(HtmlTextWriter output) { output.WriteLine(" <div id=\"top\">"); output.WriteLine(" <img src=\"slugboard.jpg\"><br/>"); output.WriteLine(" </div>"); output.WriteLine(" <div id=\"layer1\">"); output.WriteLine(" <table cellpadding=\"20\"/>"); output.WriteLine(" <tr>"); output.WriteLine(" <td valign='top'>"); output.WriteLine(" <a href=\"slugboards.aspx?topic=0\">Majors</a><br/>"); output.WriteLine(" <a href=\"slugboards.aspx?topic=1\">Colleges</a><br/>"); output.WriteLine(" <a href=\"slugboards.aspx?topic=2\">Organizations</a><br/>"); output.WriteLine(" <a href=\"slugboards.aspx?topic=3\">Recreation</a><br/>"); output.WriteLine(" <a href=\"slugboards.aspx?topic=4\">Incoming Students</a><br/>"); output.WriteLine(" <a href=\"slugboards.aspx?topic=5\">Dating</a><br/>"); output.WriteLine(" </td>"); output.WriteLine(" <td width='650'>"); } // // WriteFooter // // Writes the HTML footer for the page // public void WriteFooter(HtmlTextWriter output) { output.WriteLine(" </td>"); output.WriteLine(" </tr>"); output.WriteLine(" </table>"); output.WriteLine(" </div>"); } }; --- NEW FILE: SQL.cs --- using System.Data; using System.Data.SqlClient; using System.Web; // EzSqlConnection // // Simplifies establishing an SQL connection class EzSqlConnection { // // Open() // // Opens the connection. // public bool Open() { // !!!!make changes here to open a connection to a different SQL source!!!! sqlConn = new SqlConnection("data source=(local)\\ESQL;" + "database=slugboards;integrated security=false;user id=test;password=test;"); sqlConn.Open(); return true; } // // Close() // // Closes the connection. // public void Close() { sqlConn.Close(); } // // GetConnection() // // Returns the SqlConnection object that corresponds to the connection. // public SqlConnection GetConnection() { return sqlConn; } private SqlConnection sqlConn; // the actual connection }; // EzSqlUsersTable // // Simplifies accessing SQL tables class EzSqlTable { // // EzSqlTable() // // Constructor for EzSqlTable. Initializes the name of the table that we are // accessing. // public EzSqlTable(string NewTableName, string NewXMLSchema) { TableName = NewTableName; XMLSchema = NewXMLSchema; } // // Read() // // Reads a row from a table. // public bool Read(SqlConnection SqlConn, string Command) { // Let's run our query and fill a dataset Adapter = new SqlDataAdapter(Command, SqlConn); CommandBuilder = new SqlCommandBuilder(Adapter); CommandBuilder.QuotePrefix = "["; CommandBuilder.QuoteSuffix = "]"; // Reset the data set DS = new DataSet(); DS.ReadXmlSchema(XMLSchema); // Read the rows! if(Adapter.Fill(DS, TableName) == 0) { // Since we weren't able to read the table or the row from the data source, // create a new table and insert into it a default row DS.Tables[TableName].Rows.Add(DS.Tables[TableName].NewRow()); return false; } return true; } // // NewRow() // // Creates a new row in the table. // public void NewRow(SqlConnection SqlConn) { // Let's run our query and fill a dataset Adapter = new SqlDataAdapter("SELECT * FROM " + TableName, SqlConn); CommandBuilder = new SqlCommandBuilder(Adapter); CommandBuilder.QuotePrefix = "["; CommandBuilder.QuoteSuffix = "]"; // Reset the data set DS = new DataSet(); DS.ReadXmlSchema(XMLSchema); // Read the rows! if(!DS.Tables.Contains(TableName)) DS.Tables.Add(TableName); DS.Tables[TableName].Rows.Add(DS.Tables[TableName].NewRow()); } // // Write() // // Writes a row into the table. // public void Write() { // Update the database with the new data Adapter.Update(DS, TableName); } // // GetNumRows() // // Returns the number of rows in the datatable. // public int GetNumRows() { return DS.Tables[TableName].Rows.Count; } // // SetCurrentRow() // // Sets the current row. // public void SetCurrentRow(int NewCurrentRow) { if(NewCurrentRow >= 0 && NewCurrentRow < DS.Tables[TableName].Rows.Count) CurrentRow = NewCurrentRow; } // // GetColumn() // // Returns a column from the table. // public object GetColumn(string ColName) { return DS.Tables[TableName].Rows[CurrentRow][ColName]; } // // SetColumn() // // Sets a column of the table. // public void SetColumn(string ColName, object NewValue) { DS.Tables[TableName].Rows[CurrentRow][DS.Tables[TableName].Columns[ColName]] = NewValue; } private string TableName; private string XMLSchema; private int CurrentRow = 0; private DataSet DS = new DataSet(); // The data read in private SqlDataAdapter Adapter; private SqlCommandBuilder CommandBuilder; }; --- NEW FILE: Thumbs.db --- (This appears to be a binary file; contents omitted.) --- NEW FILE: UCSC.cs --- using System.Collections.Specialized; class UCSCInfo { public UCSCInfo() { // Add the majors Majors.Add("Undecided", "0"); Majors.Add("American Studies", "1"); Majors.Add("Anthropology", "2"); Majors.Add("Art", "3"); Majors.Add("Astrophysics", "4"); Majors.Add("Biochemistry and Molecular Biology", "5"); Majors.Add("Bioinformatics", "6"); Majors.Add("Biological Sciences", "7"); Majors.Add("Business Management Economics", "8"); Majors.Add("Chemistry and Biochemistry", "9"); Majors.Add("Classical Studies", "10"); Majors.Add("Community Studies", "11"); Majors.Add("Computer Engineering", "12"); Majors.Add("Computer Science", "13"); Majors.Add("Dual-Degree Engineering", "14"); Majors.Add("Earth Sciences", "15"); Majors.Add("East Asian Studies", "16"); Majors.Add("Ecology and Evolution", "17"); Majors.Add("Economics", "18"); Majors.Add("Education and Teaching", "19"); Majors.Add("Electrical Engineering", "20"); Majors.Add("Environmental Studies", "21"); Majors.Add("Field and Exchange Programs", "22"); Majors.Add("Film and Digital Media", "23"); Majors.Add("German Studies", "24"); Majors.Add("Global Economics", "25"); Majors.Add("Health Sciences", "26"); Majors.Add("History", "27"); Majors.Add("History of Art and Visual Culture", "28"); Majors.Add("Individual Study", "29"); Majors.Add("Information Systems Management", "30"); Majors.Add("Italian Studies", "31"); Majors.Add("Language Studies", "32"); Majors.Add("Latin American and Latino Studies", "33"); Majors.Add("Legal Studies", "34"); Majors.Add("Linguistics", "35"); Majors.Add("Literature", "36"); Majors.Add("Marine Biology", "37"); Majors.Add("Mathematics", "38"); Majors.Add("Molecular, Cell, and Developmental Biology", "39"); Majors.Add("Music", "39"); Majors.Add("Neuroscience and Behavior", "40"); Majors.Add("Ocean Sciences", "41"); Majors.Add("Philosophy", "42"); Majors.Add("Physics", "43"); Majors.Add("Plant Sciences", "44"); Majors.Add("Politics", "45"); Majors.Add("Prelaw", "46"); Majors.Add("Premedicine", "47"); Majors.Add("Psychology", "48"); Majors.Add("Sociology", "49"); Majors.Add("South and Southeast Asian Studies", "50"); Majors.Add("Theater Arts", "51"); Majors.Add("Women's Studies", "52"); Majors.Add("Writing", "53"); // Add the colleges Colleges.Add("Unaffiliated", "0"); Colleges.Add("Cowell", "1"); Colleges.Add("Stevenson", "2"); Colleges.Add("Crown", "3"); Colleges.Add("Merrill", "4"); Colleges.Add("Porter", "5"); Colleges.Add("Kresge", "6"); Colleges.Add("Oakes", "7"); Colleges.Add("College 8", "8"); Colleges.Add("College 9", "9"); Colleges.Add("College 10", "10"); } // // GetNumColleges() // // Returns the number of colleges at the university // public int GetNumColleges() { return Colleges.Count; } // // GetCollege() // // Returns the name of the college corresponding to the index. // public string GetCollege(int CollegeNum) { return Colleges.Keys.Get(CollegeNum); } // // GetCollegeIndex() // // Returns the index that corresponds to the college that corresponds to index. // public string GetCollegeIndex(int CollegeNum) { return Colleges.Get(CollegeNum); } // // GetNumMajors() // // Returns the number of majors at the university // public int GetNumMajors() { return Majors.Count; } // // GetMajor() // // Returns the name of the major corresponding to the index. // public string GetMajor(int MajorNum) { return Majors.Keys.Get(MajorNum); } // // GetMajorIndex() // // Returns the index that corresponds to the major that corresponds to index. // public string GetMajorIndex(int MajorNum) { return Majors.Get(MajorNum); } // List of majors private NameValueCollection Majors = new NameValueCollection(); private NameValueCollection Colleges = new NameValueCollection(); }; --- NEW FILE: base.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: boards.xsd --- <?xml version="1.0" standalone="yes"?> <xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xs:element name="NewDataSet" msdata:IsDataSet="true"> <xs:complexType> <xs:choice maxOccurs="unbounded"> <xs:element name="Boards"> <xs:complexType> <xs:sequence> <xs:element name="Name" type="xs:string" minOccurs="0" /> <xs:element name="Description" type="xs:string" minOccurs="0" /> <xs:element name="Posts" type="xs:int" minOccurs="0" /> <xs:element name="ModeratorID" type="xs:int" minOccurs="0" /> <xs:element name="LastUpdate" type="xs:dateTime" minOccurs="0" /> <xs:element name="ID" type="xs:int" minOccurs="0" /> </xs:sequence> </xs:complexType> </xs:element> </xs:choice> </xs:complexType> </xs:element> </xs:schema> --- NEW FILE: boards.xsx --- <?xml version="1.0" encoding="utf-8"?> <!--This file is auto-generated by the XML Schema Designer. It holds layout information for components on the designer surface.--> <XSDDesignerLayout layoutVersion="2" viewPortLeft="-1082" viewPortTop="0" zoom="100"> <Boards_XmlElement left="-1032" top="1005" width="9366" height="4657" selected="0" zOrder="1" index="0" expanded="1" /> </XSDDesignerLayout> --- NEW FILE: delete.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: groups.xsd --- <?xml version="1.0" standalone="yes" ?> <xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xs:element name="NewDataSet" msdata:IsDataSet="true"> <xs:complexType> <xs:choice maxOccurs="unbounded"> <xs:element name="Groups"> <xs:complexType> <xs:sequence> <xs:element name="Name" type="xs:string" minOccurs="0" /> <xs:element name="GroupID" type="xs:string" minOccurs="0" /> </xs:sequence> </xs:complexType> </xs:element> </xs:choice> </xs:complexType> </xs:element> </xs:schema> --- NEW FILE: groups.xsx --- <?xml version="1.0" encoding="utf-8"?> <!--This file is auto-generated by the XML Schema Designer. It holds layout information for components on the designer surface.--> <XSDDesignerLayout layoutVersion="2" viewPortLeft="0" viewPortTop="0" zoom="100"> <Groups_XmlElement left="317" top="254" width="5292" height="2963" selected="0" zOrder="1" index="0" expanded="1" /> </XSDDesignerLayout> --- NEW FILE: help.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: info.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: logout.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: messages.xsd --- <?xml version="1.0" standalone="yes"?> <xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xs:element name="NewDataSet" msdata:IsDataSet="true"> <xs:complexType> <xs:choice maxOccurs="unbounded"> <xs:element name="Messages"> <xs:complexType> <xs:sequence> <xs:element name="Subject" type="xs:string" minOccurs="0" /> <xs:element name="Text" type="xs:string" minOccurs="0" /> <xs:element name="UserID" type="xs:int" minOccurs="0" /> <xs:element name="PostDate" type="xs:dateTime" minOccurs="0" /> <xs:element name="NextMessageID" type="xs:long" minOccurs="0" /> <xs:element name="ID" type="xs:long" minOccurs="0" /> </xs:sequence> </xs:complexType> </xs:element> </xs:choice> </xs:complexType> </xs:element> </xs:schema> --- NEW FILE: messages.xsx --- <?xml version="1.0" encoding="utf-8"?> <!--This file is auto-generated by the XML Schema Designer. It holds layout information for components on the designer surface.--> <XSDDesignerLayout layoutVersion="2" viewPortLeft="-3119" viewPortTop="0" zoom="100"> <Messages_XmlElement left="-3069" top="265" width="12065" height="4656" selected="0" zOrder="1" index="0" expanded="1" /> </XSDDesignerLayout> --- NEW FILE: newtopic.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: on.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: post.aspx --- <%@ Page language="c#" Codebehind="post.aspx.cs" AutoEventWireup="false" Inherits="slugtalk.post" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > <HTML> <HEAD> <title>post</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 href="style.css" type="text/css" rel="stylesheet"> </HEAD> <body> <form id="Form1" method="post" runat="server"> <P align="left"> <IMG src="slugboard.jpg"> </P> <P align="center"><FONT size="6">Post</FONT></P> <P align="center"> <TABLE id="Table1" cellSpacing="1" cellPadding="1" width="300" border="0"> <TR> <TD><A href="user.aspx"><IMG src="info.gif" border="0"></A></TD> <TD><A href="stats.aspx"><IMG src="stats.gif" border="0"></A></TD> <TD><A href="help.aspx"><IMG src="help.gif" border="0"></A></TD> <TD><A href="logout.aspx"><IMG src="logout.gif" border="0"></A></TD> </TR> </TABLE> </P> <P> <asp:Label id="HtmlCode" runat="server"></asp:Label></P> <P align="center"> <TABLE id="Table2" cellSpacing="1" cellPadding="1" width="500" border="0"> <TR> <TD width="100%" align="left" bgColor="#ffffcc" colSpan="2"> <P align="center"> <asp:Label id="Message" runat="server" BackColor="#FFFFCC"></asp:Label></P> </TD> </TR> <TR> <TD style="WIDTH: 78px" align="left" bgColor="#ffffcc" colSpan="1" rowSpan="1"> <P align="left">Subject</P> </TD> <TD bgColor="#ffffcc"> <asp:TextBox id="Subject" runat="server" Width="247px"></asp:TextBox></TD> </TR> <TR> <TD style="WIDTH: 78px" bgColor="#ccffff" vAlign="top" colSpan="1" rowSpan="1">Message</TD> <TD bgColor="#ccffff"> <asp:TextBox id="Text" runat="server" Width="344px" Height="170px" TextMode="MultiLine"></asp:TextBox></TD> </TR> <TR> </TR> </TABLE> </P> <P align="center"> <asp:ImageButton id="Submit" runat="server" ImageUrl="submit.gif"></asp:ImageButton></P> </form> </body> </HTML> --- NEW FILE: post.aspx.cs --- using System; using System.Collections; using System.ComponentModel; using System.Data; using System.Drawing; using System.Web; using System.Web.SessionState; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.HtmlControls; namespace slugtalk { /// <summary> /// Summary description for post. /// </summary> public class post : CheckLogin { protected System.Web.UI.WebControls.TextBox Subject; protected System.Web.UI.WebControls.Label Message; protected System.Web.UI.WebControls.ImageButton Submit; protected System.Web.UI.WebControls.Label HtmlCode; protected string BoardID = null; protected System.Web.UI.WebControls.TextBox Text; protected string TopicID = null; private void Page_Load(object sender, System.EventArgs e) { // Protect this page if(!CheckForLogin()) { Response.Redirect("login.aspx"); } // Get the BoardID and TopicID from the URL BoardID = Request.QueryString.Get("BoardID"); TopicID = Request.QueryString.Get("TopicID"); EzSqlConnection SqlConn = new EzSqlConnection(); // Connect to the SQL database SqlConn.Open(); // Replying to a post if(TopicID != null) { EzSqlTable Topics = new EzSqlTable("Topics", Server.MapPath("topics.xsd")); Topics.Read(SqlConn.GetConnection(), "SELECT * FROM Topics WHERE ID='" + TopicID.ToString() + "'"); Message.Text = "User <B>" + Session["Username"] + "</B> replying to topic <B>" + Topics.GetColumn("Subject") + "</B>\n"; Subject.Text = "RE: " + Topics.GetColumn("Subject"); Page_DisplayTopic(); } // Starting a new post else { EzSqlTable Boards = new EzSqlTable("Boards", Server.MapPath("boards.xsd")); Boards.Read(SqlConn.GetConnection(), "SELECT * FROM Boards WHERE ID='" + BoardID.ToString() + "'"); Message.Text = "User <B>" + Session["Username"] + "</B> posting to board <B>" + Boards.GetColumn("Name") + "</B>\n"; } SqlConn.Close(); } private void Page_DisplayTopic() { // Connect to the boards database table EzSqlConnection SqlConn = new EzSqlConnection(); EzSqlTable Topics = new EzSqlTable("Topics", Server.MapPath("topics.xsd")); EzSqlTable Messages = new EzSqlTable("Messages", Server.MapPath("messages.xsd")); EzSqlTable Users = new EzSqlTable("Users", Server.MapPath("users.xsd")); // Open the SQL connection SqlConn.Open(); Topics.Read(SqlConn.GetConnection(), "SELECT * FROM Topics WHERE ID='" + TopicID + "'"); // Clear the HTML code HtmlCode.Text = ""; // Get the id of the first post for(long MessageID = (long)Topics.GetColumn("FirstMessageID"); MessageID != -1;) { Messages.Read(SqlConn.GetConnection(), "SELECT * FROM Messages WHERE ID='" + MessageID.ToString() + "'"); Users.Read(SqlConn.GetConnection(), "SELECT * FROM Users WHERE ID='" + Messages.GetColumn("UserID").ToString() + "'"); HtmlCode.Text += "<P align=center>\n"; HtmlCode.Text += "<TABLE cellSpacing=1 cellPadding=1 width=95% border=0>\n"; HtmlCode.Text += "\t<TR>\n"; HtmlCode.Text += "\t\t<TD width=100% bgColor=#ffff99>"; HtmlCode.Text += Users.GetColumn("Username") + "</TD>\n"; HtmlCode.Text += "\t</TR>\n"; HtmlCode.Text += "\t<TR>\n"; HtmlCode.Text += "\t\t<TD width=100% bgColor=#ccffff>"; HtmlCode.Text += "Subject: " + Messages.GetColumn("Subject") + "</TD>\n"; HtmlCode.Text += "\t</TR>\n"; HtmlCode.Text += "\t<TR>\n"; HtmlCode.Text += "\t\t<TD width=100% border=1>" + Messages.GetColumn("Text") + "</TD>\n"; HtmlCode.Text += "\t</TR>\n"; HtmlCode.Text += "</TABLE>\n"; HtmlCode.Text += "<BR>\n"; MessageID = (long)Messages.GetColumn("NextMessageID"); } // Close the SQL connection SqlConn.Close(); } #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.Web.UI.ImageClickEventHandler(this.Submit_Click); this.Load += new System.EventHandler(this.Page_Load); } #endregion private void Submit_Click(object sender, System.Web.UI.ImageClickEventArgs e) { // Are we posting a reply? if(TopicID != null) { Post_Reply(); } // No, we are posting a new topic else { Post_NewTopic(); } } // // Post_Reply() // // Posts a reply to the SQL database. // private void Post_Reply() { EzSqlConnection SqlConn = new EzSqlConnection(); EzSqlTable Topics = new EzSqlTable("Topics", Server.MapPath("topics.xsd")); EzSqlTable Messages = new EzSqlTable("Messages", Server.MapPath("messages.xsd")); // Open the connection SqlConn.Open(); Topics.Read(SqlConn.GetConnection(), "SELECT * FROM Topics WHERE ID='" + TopicID + "'"); // Get the current date and time and convert it into an ID number DateTime CurrentDateTime = DateTime.Now; long ID = ((CurrentDateTime.Year & 0x000003FF) << 30) | ((CurrentDateTime.DayOfYear & 0x000001FF) << 21) | ((CurrentDateTime.Hour & 0x0000001F) << 16) | ((CurrentDateTime.Second & 0x0000003F) << 10) | ((CurrentDateTime.Millisecond & 0x000003FF)); // Update old last post Messages.Read(SqlConn.GetConnection(), "SELECT * FROM Messages WHERE ID='" + Topics.GetColumn("LastMessageID").ToString() + "'"); Messages.SetColumn("NextMessageID", ID); Messages.Write(); // Initialize post Messages.NewRow(SqlConn.GetConnection()); Messages.SetColumn("Subject", Subject.Text); Messages.SetColumn("Text", Text.Text); Messages.SetColumn("UserID", Session["ID"]); Messages.SetColumn("PostDate", CurrentDateTime); Messages.SetColumn("NextMessageID", -1); Messages.SetColumn("ID", ID); Messages.Write(); // Update topic Topics.SetColumn("LastMessageID", ID); Topics.SetColumn("Replies", (int)Topics.GetColumn("Replies") + 1); Topics.SetColumn("LastUpdate", CurrentDateTime); Topics.Write(); SqlConn.Close(); // Redirect the user back to the boards Response.Redirect("slugboards.aspx?BoardID=" + BoardID + "&TopicID=" + TopicID); } // // Post_NewTopic() // // Posts a new topic to the SQL database. // private void Post_NewTopic() { EzSqlConnection SqlConn = new EzSqlConnection(); EzSqlTable Boards = new EzSqlTable("Boards", Server.MapPath("boards.xsd")); EzSqlTable Topics = new EzSqlTable("Topics", Server.MapPath("topics.xsd")); EzSqlTable Messages = new EzSqlTable("Messages", Server.MapPath("messages.xsd")); // Open the connection to the SQL database SqlConn.Open(); Boards.Read(SqlConn.GetConnection(), "SELECT * FROM Boards WHERE ID='" + BoardID + "'"); Topics.NewRow(SqlConn.GetConnection()); Messages.NewRow(SqlConn.GetConnection()); // Get the current date and time DateTime CurrentDateTime = DateTime.Now; long ID = ((CurrentDateTime.Year & 0x000003FF) << 30) | ((CurrentDateTime.DayOfYear & 0x000001FF) << 21) | ((CurrentDateTime.Hour & 0x0000001F) << 16) | ((CurrentDateTime.Second & 0x0000003F) << 10) | ((CurrentDateTime.Millisecond & 0x000003FF)); // Update board info Boards.SetColumn("Posts", (int)Boards.GetColumn("Posts") + 1); Boards.SetColumn("LastUpdate", CurrentDateTime); Boards.Write(); // Initialize post Messages.SetColumn("Subject", Subject.Text); Messages.SetColumn("Text", Text.Text); Messages.SetColumn("UserID", Session["ID"]); Messages.SetColumn("PostDate", CurrentDateTime); Messages.SetColumn("NextMessageID", -1); Messages.SetColumn("ID", ID); Messages.Write(); // Initialize board post Topics.SetColumn("Subject", Subject.Text); Topics.SetColumn("UserID", Session["ID"]); Topics.SetColumn("Replies", 0); Topics.SetColumn("Views", 0); Topics.SetColumn("PostDate", CurrentDateTime); Topics.SetColumn("LastUpdate", CurrentDateTime); Topics.SetColumn("BoardID", int.Parse(BoardID)); Topics.SetColumn("FirstMessageID", ID); Topics.SetColumn("LastMessageID", ID); Topics.Write(); SqlConn.Close(); // Redirect the user back to the boards Response.Redirect("slugboards.aspx?BoardID=" + BoardID); } } } --- NEW FILE: post.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.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: reply.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: slugboards.aspx --- <%@ Page language="c#" Codebehind="slugboards.aspx.cs" AutoEventWireup="false" Inherits="slugtalk.slugboards" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > <HTML> <HEAD> <title>Slugboards</title> <meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR"> <meta content="C#" name="CODE_LANGUAGE"> <meta content="JavaScript" name="vs_defaultClientScript"> <meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema"> <LINK href="style.css" type="text/css" rel="stylesheet"> </HEAD> <body> <form id="Form1" method="post" runat="server"> <P align="left"> <IMG src="slugboard.jpg"> </P> <P align="center"><FONT size="6">Slugboards</FONT></P> <P align="center"> <TABLE id="Table1" cellSpacing="1" cellPadding="1" width="300" border="0"> <TR> <TD><A href="user.aspx"><IMG src="info.gif" border="0"></A></TD> <TD><A href="stats.aspx"><IMG src="stats.gif" border="0"></A></TD> <TD><A href="help.aspx"><IMG src="help.gif" border="0"></A></TD> <TD><A href="logout.aspx"><IMG src="logout.gif" border="0"></A></TD> </TR> </TABLE> </P> <P align="left"> <asp:Label id="HtmlCode" runat="server"></asp:Label></P> </form> </body> </HTML> --- NEW FILE: slugboards.aspx.cs --- using System; using System.Collections; using System.ComponentModel; using System.Data; using System.Drawing; using System.Web; using System.Web.SessionState; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.HtmlControls; namespace slugtalk { /// <summary> /// Summary description for slugboards. /// </summary> public class slugboards : CheckLogin { private string BoardID; protected System.Web.UI.WebControls.Label HtmlCode; private string TopicID; private void Page_Load(object sender, System.EventArgs e) { // Check to see that the user is logged in if(!CheckForLogin()) { Response.Redirect("login.aspx"); } // Get the BoardID and TopicID if(Request.QueryString.Get("BoardID") != null) BoardID = Request.QueryString.Get("BoardID"); if(Request.QueryString.Get("TopicID") != null) TopicID = Request.QueryString.Get("TopicID"); if(BoardID != null && TopicID == null) Page_DisplayBoard(); else if(BoardID != null && TopicID != null) Page_DisplayTopic(); else Page_DisplayAllBoards(); } // // Page_DisplayAllBoards() // // Displays all message boards // private void Page_DisplayAllBoards() { // Connect to the boards database table EzSqlConnection SqlConn = new EzSqlConnection(); EzSqlTable Boards = new EzSqlTable("Boards", Server.MapPath("boards.xsd")); EzSqlTable Users = new EzSqlTable("Users", Server.MapPath("users.xsd")); EzSqlTable Groups = new EzSqlTable("Groups", Server.MapPath("groups.xsd")); // Open the connection SqlConn.Open(); // Display table header HtmlCode.Text = "</span><TABLE cellSpacing=\"1\" cellPadding=\"1\" width=\"95%\" border=\"0\">\n"; HtmlCode.Text += "\t<TR>\n"; HtmlCode.Text += "\t\t<TD width=\"1%\" bgColor=\"#ffff99\"></TD>\n"; HtmlCode.Text += "\t\t<TD width=\"55%\" bgColor=\"#ffff99\">\n"; HtmlCode.Text += "\t\t\t<P>Forum</P>\n"; HtmlCode.Text += "\t\t</TD>\n"; HtmlCode.Text += "\t\t<TD width=\"8%\" bgColor=\"#ffff99\">\n"; HtmlCode.Text += "\t\t\t<P>Posts</P>\n"; HtmlCode.Text += "\t\t</TD>\n"; HtmlCode.Text += "\t\t<TD width=\"22%\" bgColor=\"#ffff99\">\n"; HtmlCode.Text += "\t\t\t<P>Last Post</P>\n"; HtmlCode.Text += "\t\t</TD>\n"; HtmlCode.Text += "\t\t<TD width=\"14%\" bgColor=\"#ffff99\">\n"; HtmlCode.Text += "\t\t\t<P>Moderator</P>\n"; HtmlCode.Text += "\t\t</TD>\n"; HtmlCode.Text += "\t</TR>\n"; // Display groups for(int GroupID = 0; ; GroupID++) { // If we can't read any more rows from the groups table, this GroupID does not // exist if(!Groups.Read(SqlConn.GetConnection(), "SELECT * FROM Groups WHERE GroupID='" + GroupID.ToString() + "'")) break; HtmlCode.Text += "\t<TR>\n"; HtmlCode.Text += "\t\t<TD width=\"100%\" bgColor=\"#ccffff\" colSpan=\"5\"><STRONG>" + Groups.GetColumn("Name") + "</STRONG></TD>\n"; HtmlCode.Text += "\t</TR>\n"; Boards.Read(SqlConn.GetConnection(), "SELECT * FROM Boards WHERE GroupID='" + GroupID + "' ORDER BY ID"); // Now, display topics for(int BoardNum = 0; BoardNum < Boards.GetNumRows(); BoardNum++) { Boards.SetCurrentRow(BoardNum); Users.Read(SqlConn.GetConnection(), "SELECT * FROM Users WHERE ID='" + Boards.GetColumn("ModeratorID").ToString() + "'"); HtmlCode.Text += "\t<TR>\n"; HtmlCode.Text += "\t\t<TD width=\"1%\"><IMG src=\"on.gif\"></TD>\n"; // Display board name... HtmlCode.Text += "\t\t<TD width=\"55%\"><FONT size=\"2\"><A href=\"slugboards.aspx?BoardID=" + Boards.GetColumn("ID").ToString() + "\"><STRONG>" + Boards.GetColumn("Name") + "</STRONG></A><BR>"; // ...and board details HtmlCode.Text += "<EM>" + Boards.GetColumn("Description") + "</EM></FONT></TD>\n"; HtmlCode.Text += "\t\t<TD align=\"center\" width=\"8%\"><FONT size=\"2\">" + Boards.GetColumn("Posts").ToString() + "</FONT></TD>\n"; HtmlCode.Text += "\t\t<TD align=\"center\" width=\"22%\"><FONT size=\"2\">" + ((DateTime)Boards.GetColumn("LastUpdate")).ToLongDateString() + "<BR>" + ((DateTime)Boards.GetColumn("LastUpdate")).ToLongTimeString() + "</FONT></TD>\n"; HtmlCode.Text += "\t\t<TD align=\"center\" width=\"14%\"><FONT size=\"2\"><A href=\"user.aspx?UserID=" + Boards.GetColumn("ModeratorID").ToString() + "\">" + Users.GetColumn("Username") + "</A></FONT></TD>\n"; HtmlCode.Text += "\t</TR>\n"; } } // Finish off this bad boy HtmlCode.Text += "</TABLE>\n"; SqlConn.Close(); } // // Page_DisplayBoard() // // Displays a single message board // private void Page_DisplayBoard() { // Connect to the boards database table EzSqlConnection SqlConn = new EzSqlConnection(); EzSqlTable Topics = new EzSqlTable("Topics", Server.MapPath("topics.xsd")); EzSqlTable Users = new EzSqlTable("Users", Server.MapPath("users.xsd")); // Open the SQL connection SqlConn.Open(); HtmlCode.Text += "</span><TABLE cellSpacing=1 cellPadding=1 width=95% border=0>\n"; HtmlCode.Text += "\t<TR>\n"; HtmlCode.Text += "\t\t<TD width=1% bgColor=#ffff99></TD>\n"; HtmlCode.Text += "\t\t<TD width=40% bgColor=#ffff99>\n"; HtmlCode.Text += "\t\t\t<P>Subject</P>\n"; HtmlCode.Text += "\t\t</TD>\n"; HtmlCode.Text += "\t\t<TD width=8% bgColor=#ffff99>\n"; HtmlCode.Text += "\t\t\t<P>Replies</P>\n"; HtmlCode.Text += "\t\t</TD>\n"; HtmlCode.Text += "\t\t<TD width=7% bgColor=#ffff99>\n"; HtmlCode.Text += "\t\t\t<P>Views</P>\n"; HtmlCode.Text += "\t\t</TD>\n"; HtmlCode.Text += "\t\t<TD width=15% bgColor=#ffff99>\n"; HtmlCode.Text += "\t\t\t<P>Topic Starter</P>\n"; HtmlCode.Text += "\t\t</TD>\n"; HtmlCode.Text += "\t\t<TD width=25% bgColor=#ffff99>\n"; HtmlCode.Text += "\t\t\t<P>Last Post Date</P>\n"; HtmlCode.Text += "\t\t</TD>\n"; HtmlCode.Text += "\t</TR>\n"; // Query the posts SQL table Topics.Read(SqlConn.GetConnection(), "SELECT * FROM Topics WHERE BoardID='" + BoardID + "' ORDER BY LastUpdate DESC"); // Loop through all of the posts and output them to the HTML for(int TopicNum = 0; TopicNum < Topics.GetNumRows(); TopicNum++) { Topics.SetCurrentRow(TopicNum); Users.Read(SqlConn.GetConnection(), "SELECT * FROM Users WHERE ID='" + Topics.GetColumn("UserID").ToString() + "'"); HtmlCode.Text += "\t<TR>\n"; HtmlCode.Text += "\t\t<TD width=\"1%\"><IMG src=\"on.gif\"></TD>\n"; // Display topic subject HtmlCode.Text += "\t\t<TD width=\"50%\"><FONT size=\"2\"><A href=\"slugboards.aspx?BoardID=" + BoardID + "&TopicID=" + Topics.GetColumn("ID").ToString() + "\">" + Topics.GetColumn("Subject") + "</A></TD>"; // Number of replies HtmlCode.Text += "\t\t<TD align=\"center\" width=\"8%\"><FONT size=\"2\">" + Topics.GetColumn("Replies").ToString() + "</FONT></TD>\n"; // Number of views HtmlCode.Text += "\t\t<TD align=\"center\" width=\"7%\"><FONT size=\"2\">" + Topics.GetColumn("Views").ToString() + "</FONT></TD>\n"; // Topic starter HtmlCode.Text += "\t\t<TD align=\"center\" width=\"15%\"><FONT size=\"2\"><A href=\"user.aspx?UserID=" + Topics.GetColumn("UserID").ToString() + "\">" + Users.GetColumn("Username") + "</A></FONT></TD>\n"; // Last post date HtmlCode.Text += "\t\t<TD align=\"center\" width=\"30%\"><FONT size=\"2\">" + Topics.GetColumn("LastUpdate").ToString() + "</FONT></TD>\n"; HtmlCode.Text += "\t</TR>\n"; } // Finish off this bad boy HtmlCode.Text += "</TABLE>\n"; // Display 'New Topic' button HtmlCode.Text += "<P align=center><A href=\"post.aspx?type=post&BoardID=" + BoardID + "\"><IMG src=\"post.gif\" border=0/></A><BR>\n"; // Close the SQL connection SqlConn.Close(); } private void Page_DisplayTopic() { // Connect to the boards database table EzSqlConnection SqlConn = new EzSqlConnection(); EzSqlTable Topics = new EzSqlTable("Topics", Server.MapPath("topics.xsd")); EzSqlTable Messages = new EzSqlTable("Messages", Server.MapPath("messages.xsd")); EzSqlTable Users = new EzSqlTable("Users", Server.MapPath("users.xsd")); // Open the SQL connection SqlConn.Open(); Topics.Read(SqlConn.GetConnection(), "SELECT * FROM Topics WHERE ID='" + TopicID + "'"); // One more topic viewing... Topics.SetColumn("Views", (int)Topics.GetColumn("Views") + 1); Topics.Write(); // Clear the HTML code HtmlCode.Text = ""; // Get the id of the first post for(long MessageID = (long)Topics.GetColumn("FirstMessageID"); MessageID != -1;) { Messages.Read(SqlConn.GetConnection(), "SELECT * FROM Messages WHERE ID='" + MessageID.ToString() + "'"); Users.Read(SqlConn.GetConnection(), "SELECT * FROM Users WHERE ID='" + Messages.GetColumn("UserID").ToString() + "'"); HtmlCode.Text += "<P align=center>\n"; HtmlCode.Text += "<TABLE cellSpacing=0 cellPadding=0 width=95% border=0>\n"; HtmlCode.Text += "\t<TR>\n"; HtmlCode.Text += "\t\t<TD width=50% bgColor=#ffff99>"; HtmlCode.Text += Users.GetColumn("Username") + "</TD>\n"; // Only display the delete button if the user posted the message if((int)Users.GetColumn("ID") == (int)Session["ID"]) { HtmlCode.Text += "\t\t<TD width=50% bgColor=#ffff99 align=right>"; HtmlCode.Text += "<A href=\"user.aspx?UserID=" + Users.GetColumn("ID").ToString() + "\"><IMG src=\"userinfo.gif\" border=0></IMG></A>"; HtmlCode.Text += "<IMG src=\"delete.gif\"></IMG></TD>\n"; } else { HtmlCode.Text += "\t\t<TD width=50% bgColor=#ffff99 align=right>"; HtmlCode.Text += "<A href=\"user.aspx?UserID=" + Users.GetColumn("ID").ToString() + "\"><IMG src=\"userinfo.gif\" border=0></IMG></A></TD>\n"; } HtmlCode.Text += "\t</TR>\n"; /* HtmlCode.Text += "\t<TR>\n"; HtmlCode.Text += "\t\t<TD width=100% colSpan=2 bgColor=#ccffff>"; HtmlCode.Text += "Subject: " + Messages.GetColumn("Subject") + "</TD>\n"; HtmlCode.Text += "\t</TR>\n";*/ HtmlCode.Text += "\t<TR>\n"; HtmlCode.Text += "\t\t<TD width=100% colSpan=2 border=1>" + Messages.GetColumn("Text") + "</TD>\n"; HtmlCode.Text += "\t</TR>\n"; HtmlCode.Text += "</TABLE>\n"; HtmlCode.Text += "<BR>\n"; MessageID = (long)Messages.GetColumn("NextMessageID"); } HtmlCode.Text += "<P align=center><A href=\"post.aspx?type=reply&BoardID=" + BoardID + "&TopicID=" + TopicID + "\"><IMG src=\"reply.gif\" border=0/></A><BR>\n"; // Close the SQL connection SqlConn.Close(); } #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.Load += new System.EventHandler(this.Page_Load); } #endregion } } --- NEW FILE: slugboards.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.TrayLargeIcon" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>False</value> </data> <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> </root> --- NEW FILE: stats.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: submit.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: textbox.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: topics.xsd --- <?xml version="1.0" standalone="yes"?> <xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xs:element name="NewDataSet" msdata:IsDataSet="true"> <xs:complexType> <xs:choice maxOccurs="unbounded"> <xs:element name="Topics"> <xs:complexType> <xs:sequence> <xs:element name="Subject" type="xs:string" minOccurs="0" /> <xs:element name="UserID" type="xs:int" minOccurs="0" /> <xs:element name="Replies" type="xs:int" minOccurs="0" /> <xs:element name="Views" type="xs:int" minOccurs="0" /> <xs:element name="PostDate" type="xs:dateTime" minOccurs="0" /> <xs:element name="LastUpdate" type="xs:dateTime" minOccurs="0" /> <xs:element name="BoardID" type="xs:int" minOccurs="0" /> <xs:element name="FirstMessageID" type="xs:long" minOccurs="0" /> <xs:element name="LastMessageID" type="xs:long" minOccurs="0" /> <xs:element name="ID" type="xs:int" minOccurs="0" /> </xs:sequence> </xs:complexType> </xs:element> </xs:choice> </xs:complexType> </xs:element> </xs:schema> --- NEW FILE: topics.xsx --- <?xml version="1.0" encoding="utf-8"?> <!--This file is auto-generated by the XML Schema Designer. It holds layout information for components on the designer surface.--> <XSDDesignerLayout layoutVersion="2" viewPortLeft="0" viewPortTop="0" zoom="100"> <Topics_XmlElement left="317" top="254" width="5292" height="2963" selected="0" zOrder="1" index="0" expanded="1" /> </XSDDesignerLayout> --- NEW FILE: user.aspx --- <%@ Page language="c#" Codebehind="user.aspx.cs" AutoEventWireup="false" Inherits="slugtalk.user" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > <HTML> <HEAD> <title>Slugboards - User Information</title> <meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR"> <meta content="C#" name="CODE_LANGUAGE"> <meta content="JavaScript" name="vs_defaultClientScript"> <meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema"> <LINK href="style.css" type="text/css" rel="stylesheet"> </HEAD> <body> <form id="Form1" method="post" runat="server"> <IMG src="slugboard.jpg"> <P align="center"><FONT size="6">User Information</FONT></P> <P title="Slugboards -- User Information" align="center"><asp:label id="Message" runat="server"></asp:label> <TABLE id="Table1" cellSpacing="1" cellPadding="1" width="300" border="0"> <TR> <TD style="WIDTH: 97px">Name:</TD> <TD><asp:textbox id="Name" runat="server" MaxLength="64"></asp:textbox></TD> </TR> <TR> <TD style="WIDTH: 97px">Email:</TD> <TD> <asp:textbox id="Email" runat="server" MaxLength="64"></asp:textbox></TD> </TR> <TR> <TD style="WIDTH: 97px; HEIGHT: 16px">Major:</TD> <TD style="HEIGHT: 16px"><asp:dropdownlist id="Major" runat="server" Width="157px"></asp:dropdownlist></TD> </TR> <TR> <TD style="WIDTH: 97px; HEIGHT: 24px">College:</TD> <TD style="HEIGHT: 24px"><asp:dropdownlist id="College" runat="server" Width="157px"></asp:dropdownlist></TD> </TR> <TR> <TD style="WIDTH: 97px">Homepage:</TD> <TD><asp:textbox id="Homepage" runat="server" MaxLength="96"></asp:textbox></TD> </TR> <TR> <TD style="WIDTH: 97px"> <P>AIM:</P> </TD> <TD><asp:textbox id="AIM" runat="server" MaxLength="50"></asp:textbox></TD> </TR> <TR> <TD style="WIDTH: 97px; HEIGHT: 26px">ICQ:</TD> <TD style="HEIGHT: 26px"><asp:textbox id="ICQ" runat="server" MaxLength="50"></asp:textbox></TD> </TR> <TR> <TD style="WIDTH: 97px">Yahoo IM:</TD> <TD><asp:textbox id="Yahoo" runat="server" MaxLength="50"></asp:textbox></TD> </TR> <TR> <TD style="WIDTH: 97px">MSN:</TD> <TD><asp:textbox id="MSN" runat="server" MaxLength="64"></asp:textbox></TD> </TR> <TR> <TD style="WIDTH: 97px">Birthdate:</TD> <TD> <P> <asp:textbox id="Birthdate" runat="server" MaxLength="32"></asp:textbox></P> </TD> </TR> <TR> <TD style="WIDTH: 97px">Bio:</TD> <TD><asp:textbox id="Bio" runat="server" Width="286px" Height="144px" TextMode="MultiLine" MaxLength="1024"></asp:textbox></TD> </TR> <TR> <TD align="center" colSpan="2"> <P><asp:imagebutton id="Submit" runat="server" ImageUrl="submit.gif"></asp:imagebutton></P> </TD> </TR> </TABLE> </P> <P> </P> </form> </body> </HTML> --- NEW FILE: user.aspx.cs --- using System; using System.Collections; using System.ComponentModel; using System.Data; using System.Drawing; using System.Web; using System.Web.SessionState... [truncated message content] |
From: <slu...@li...> - 2004-01-04 05:06:29
|
Update of /cvsroot/slugtalk/slugboards/slugtalk/HeaderAndFooter/bin/Debug In directory sc8-pr-cvs1:/tmp/cvs-serv25484/Debug Log Message: Directory /cvsroot/slugtalk/slugboards/slugtalk/HeaderAndFooter/bin/Debug added to the repository |
From: <slu...@li...> - 2004-01-04 05:06:19
|
Update of /cvsroot/slugtalk/slugboards/slugtalk/HeaderAndFooter/bin In directory sc8-pr-cvs1:/tmp/cvs-serv25464/bin Log Message: Directory /cvsroot/slugtalk/slugboards/slugtalk/HeaderAndFooter/bin added to the repository |
From: <slu...@li...> - 2004-01-04 05:03:35
|
Update of /cvsroot/slugtalk/slugboards/slugtalk/HeaderAndFooter In directory sc8-pr-cvs1:/tmp/cvs-serv25124/HeaderAndFooter Log Message: Directory /cvsroot/slugtalk/slugboards/slugtalk/HeaderAndFooter added to the repository |
From: <slu...@li...> - 2004-01-04 05:02:40
|
Update of /cvsroot/slugtalk/slugboards/slugtalk In directory sc8-pr-cvs1:/tmp/cvs-serv24953 Modified Files: login.aspx login.aspx.cs login.aspx.resx login.gif post.gif register.aspx register.aspx.cs slugboard.jpg slugtalk.csproj slugtalk.suo style.css Log Message: New Version. Everything works except deleting. Index: login.aspx =================================================================== RCS file: /cvsroot/slugtalk/slugboards/slugtalk/login.aspx,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** login.aspx 28 Nov 2003 22:56:20 -0000 1.1 --- login.aspx 4 Jan 2004 05:02:34 -0000 1.2 *************** *** 3,52 **** <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> --- 3,39 ---- <HTML> <HEAD> ! <title>Slugboards - Login</title> ! <meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR"> ! <meta content="C#" name="CODE_LANGUAGE"> ! <meta content="JavaScript" name="vs_defaultClientScript"> ! <meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema"> ! <LINK href="style.css" type="text/css" rel="stylesheet"> </HEAD> <body> <form id="Form1" method="post" runat="server"> ! <IMG src="slugboard.jpg"> ! <P align="center"><FONT size="6">Welcome to Slug Boards</FONT></P> ! <TABLE id="Table1" cellSpacing="1" cellPadding="1" width="300" align="center" border="0"> ! <TR> ! <TD style="HEIGHT: 22px" align="center" colSpan="2"><asp:label id="Message" runat="server" Font-Bold="True" ForeColor="Red"></asp:label></TD> ! </TR> ! <TR> ! <TD style="WIDTH: 126px; HEIGHT: 18px">Username:</TD> ! <TD style="HEIGHT: 18px"><asp:textbox id="Username" runat="server" Width="144px"></asp:textbox></TD> ! </TR> ! <TR> ! <TD style="WIDTH: 126px">Password:</TD> ! <TD><asp:textbox id="Password" runat="server" TextMode="Password"></asp:textbox></TD> ! </TR> ! <TR> ! <TD align="center" colSpan="2" rowSpan="1"> ! <P><asp:imagebutton id="Submit" runat="server" ImageUrl="login.gif"></asp:imagebutton></P> ! </TD> ! </TR> ! </TABLE> </form> + <P title="Slugboards -- Login" align="center">Not registered? Register <A href="register.aspx"> + here</A> + </P> </body> </HTML> Index: login.aspx.cs =================================================================== RCS file: /cvsroot/slugtalk/slugboards/slugtalk/login.aspx.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** login.aspx.cs 28 Nov 2003 22:56:20 -0000 1.1 --- login.aspx.cs 4 Jan 2004 05:02:34 -0000 1.2 *************** *** 3,7 **** using System.ComponentModel; using System.Data; - using System.Data.SqlClient; using System.Drawing; using System.Web; --- 3,6 ---- *************** *** 10,14 **** using System.Web.UI.WebControls; using System.Web.UI.HtmlControls; - using System.Web.Security; namespace slugtalk --- 9,12 ---- *************** *** 17,30 **** /// 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 } --- 15,27 ---- /// Summary description for login. /// </summary> ! public class login : CheckLogin { protected System.Web.UI.WebControls.TextBox Username; protected System.Web.UI.WebControls.TextBox Password; + protected System.Web.UI.WebControls.ImageButton Submit; protected System.Web.UI.WebControls.Label Message; private void Page_Load(object sender, System.EventArgs e) { } *************** *** 45,49 **** private void InitializeComponent() { ! this.Submit.Click += new System.EventHandler(this.Submit_Click); this.Load += new System.EventHandler(this.Page_Load); --- 42,46 ---- private void InitializeComponent() { ! this.Submit.Click += new System.Web.UI.ImageClickEventHandler(this.Submit_Click); this.Load += new System.EventHandler(this.Page_Load); *************** *** 51,100 **** #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(); } } --- 48,65 ---- #endregion ! private void Submit_Click(object sender, System.Web.UI.ImageClickEventArgs e) { ! // Attempt to login using the username and password ! if(!TryLogin(Username.Text, Password.Text)) { ! Message.Text = "Invalid username/password"; ! return; } ! // Has the user filled in his user info? ! if((string)Session["UserInfo"] == "N") ! Response.Redirect("user.aspx"); ! else ! Response.Redirect("slugboards.aspx"); } } Index: login.aspx.resx =================================================================== RCS file: /cvsroot/slugtalk/slugboards/slugtalk/login.aspx.resx,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** login.aspx.resx 28 Nov 2003 22:56:20 -0000 1.1 --- login.aspx.resx 4 Jan 2004 05:02:35 -0000 1.2 *************** *** 98,101 **** --- 98,104 ---- <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> + <data name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>False</value> + </data> <data name="$this.TrayAutoArrange" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>True</value> *************** *** 103,109 **** <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> --- 106,109 ---- Index: login.gif =================================================================== RCS file: /cvsroot/slugtalk/slugboards/slugtalk/login.gif,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsJE9B4z and /tmp/cvsI2Q3WZ differ Index: post.gif =================================================================== RCS file: /cvsroot/slugtalk/slugboards/slugtalk/post.gif,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsSz4bzE and /tmp/cvsy8JBV8 differ Index: register.aspx =================================================================== RCS file: /cvsroot/slugtalk/slugboards/slugtalk/register.aspx,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** register.aspx 28 Nov 2003 22:56:20 -0000 1.1 --- register.aspx 4 Jan 2004 05:02:35 -0000 1.2 *************** *** 3,98 **** <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> --- 3,50 ---- <HTML> <HEAD> ! <title>Slugboards - Register</title> ! <meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR"> ! <meta content="C#" name="CODE_LANGUAGE"> ! <meta content="JavaScript" name="vs_defaultClientScript"> ! <meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema"> ! <LINK href="style.css" type="text/css" rel="stylesheet"> </HEAD> ! <body> <form id="Form1" method="post" runat="server"> ! <IMG src="slugboard.jpg"> ! <P align="center"><FONT size="6">Register With Slug Boards</FONT></P> ! <TABLE id="Table1" cellSpacing="1" cellPadding="1" width="300" align="center" border="0"> ! <TR> ! <TD vAlign="middle" align="center" colSpan="2"><asp:label id="Message" runat="server" Font-Bold="True" ForeColor="Red"></asp:label></TD> ! </TR> ! <TR> ! <TD style="WIDTH: 126px">Username:</TD> ! <TD><asp:textbox id="Username" runat="server" Width="145px"></asp:textbox></TD> ! </TR> ! <TR> ! <TD style="WIDTH: 126px">Password:</TD> ! <TD><asp:textbox id="Password" runat="server" TextMode="Password"></asp:textbox></TD> ! </TR> ! <TR> ! <TD style="WIDTH: 126px">Verify Password:</TD> ! <TD><asp:textbox id="VerifyPassword" runat="server" TextMode="Password"></asp:textbox></TD> ! </TR> ! <TR> ! <TD style="WIDTH: 126px">Email:</TD> ! <TD> ! <asp:textbox id="Email" runat="server" Width="145px"></asp:textbox></TD> ! </TR> ! <TR> ! <TD style="WIDTH: 126px">Verify Email:</TD> ! <TD> ! <asp:textbox id="VerifyEmail" runat="server" Width="145px"></asp:textbox></TD> ! </TR> ! <TR> ! <TD align="center" colSpan="2"> ! <P align="center"><asp:imagebutton id="Submit" runat="server" ImageUrl="register.gif"></asp:imagebutton></P> ! </TD> ! </TR> ! </TABLE> ! <P align="center">Already registered? Login <A href="login.aspx">here</A></P> </form> </body> Index: register.aspx.cs =================================================================== RCS file: /cvsroot/slugtalk/slugboards/slugtalk/register.aspx.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** register.aspx.cs 28 Nov 2003 22:56:20 -0000 1.1 --- register.aspx.cs 4 Jan 2004 05:02:35 -0000 1.2 *************** *** 3,14 **** 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 --- 3,14 ---- using System.ComponentModel; using System.Data; 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; + using System.Data.SqlClient; namespace slugtalk *************** *** 19,139 **** 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); ! } } --- 19,33 ---- public class register : System.Web.UI.Page { + protected System.Web.UI.WebControls.Label Message; protected System.Web.UI.WebControls.TextBox Username; protected System.Web.UI.WebControls.TextBox Password; ! protected System.Web.UI.WebControls.TextBox VerifyPassword; ! protected System.Web.UI.WebControls.TextBox Email; ! protected System.Web.UI.WebControls.TextBox VerifyEmail; ! protected System.Web.UI.WebControls.ImageButton Submit; private void Page_Load(object sender, System.EventArgs e) { ! // Put user code to initialize the page here } *************** *** 154,158 **** private void InitializeComponent() { ! this.Submit.Click += new System.EventHandler(this.Submit_Click); this.Load += new System.EventHandler(this.Page_Load); --- 48,52 ---- private void InitializeComponent() { ! this.Submit.Click += new System.Web.UI.ImageClickEventHandler(this.Submit_Click); this.Load += new System.EventHandler(this.Page_Load); *************** *** 160,286 **** #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"); } } --- 54,126 ---- #endregion ! private void Submit_Click(object sender, System.Web.UI.ImageClickEventArgs e) { ! // Verify that every field has been filled in ! if( Username.Text == "" || ! Password.Text == "" || ! VerifyPassword.Text == "" || ! Email.Text == "" || ! VerifyEmail.Text == "") { ! Message.Text = "All fields must be filled in"; return; } ! // Verify that passwords fields are the same ! if(Password.Text != VerifyPassword.Text) { ! Message.Text = "Password fields do not match"; return; } ! // Verify that the email fields are the same ! if(Email.Text != VerifyEmail.Text) { ! Message.Text = "Email fields do not match"; return; } ! // Hash the password ! string HashedPassword = FormsAuthentication.HashPasswordForStoringInConfigFile(Password.Text, "MD5"); ! EzSqlConnection SqlConn = new EzSqlConnection(); ! EzSqlTable Users = new EzSqlTable("Users", Server.MapPath("users.xsd")); ! ! // Open a connection to the sql data source ! SqlConn.Open(); + // Query the table to see if the username has already been taken + if(Users.Read(SqlConn.GetConnection(), "SELECT * FROM Users WHERE Username='" + Username.Text + "'")) + { + Message.Text = "Username already taken"; + Username.Text = ""; return; } ! // Write a new row to the users table ! Users.SetColumn("Username", Username.Text); ! Users.SetColumn("Password", HashedPassword); ! Users.SetColumn("Email", Email.Text); ! // All users created with the regular user type ! Users.SetColumn("Type", 0); ! // Fill in default values for all columns ! Users.SetColumn("Name", ""); ! Users.SetColumn("Homepage", "http://"); ! Users.SetColumn("AIM", ""); ! Users.SetColumn("ICQ", ""); ! Users.SetColumn("Yahoo", ""); ! Users.SetColumn("MSN", ""); ! Users.SetColumn("Birthdate", ""); ! Users.SetColumn("Bio", ""); ! Users.SetColumn("College", 0); ! Users.SetColumn("Major", 0); ! Users.SetColumn("UserInfo", "N"); ! Users.Write(); ! // Close the connection to the sql data source ! SqlConn.Close(); ! // Redirect the user to the login page ! Response.Redirect("login.aspx"); } } Index: slugboard.jpg =================================================================== RCS file: /cvsroot/slugtalk/slugboards/slugtalk/slugboard.jpg,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsBCpeiK and /tmp/cvsqXC2fk differ Index: slugtalk.csproj =================================================================== RCS file: /cvsroot/slugtalk/slugboards/slugtalk/slugtalk.csproj,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** slugtalk.csproj 28 Nov 2003 22:56:20 -0000 1.1 --- slugtalk.csproj 4 Jan 2004 05:02:35 -0000 1.2 *************** *** 100,103 **** --- 100,117 ---- /> <File + RelPath = "boards.xsd" + BuildAction = "Content" + /> + <File + RelPath = "boards.xsx" + DependentUpon = "boards.xsd" + BuildAction = "None" + /> + <File + RelPath = "CheckLogin.cs" + SubType = "ASPXCodeBehind" + BuildAction = "Compile" + /> + <File RelPath = "Global.asax" SubType = "Component" *************** *** 116,119 **** --- 130,142 ---- /> <File + RelPath = "groups.xsd" + BuildAction = "Content" + /> + <File + RelPath = "groups.xsx" + DependentUpon = "groups.xsd" + BuildAction = "None" + /> + <File RelPath = "login.aspx" SubType = "Form" *************** *** 132,135 **** --- 155,182 ---- /> <File + RelPath = "messages.xsd" + BuildAction = "Content" + /> + <File + RelPath = "messages.xsx" + DependentUpon = "messages.xsd" + BuildAction = "None" + /> + <File + RelPath = "post.aspx" + BuildAction = "Content" + /> + <File + RelPath = "post.aspx.cs" + DependentUpon = "post.aspx" + SubType = "ASPXCodeBehind" + BuildAction = "Compile" + /> + <File + RelPath = "post.aspx.resx" + DependentUpon = "post.aspx.cs" + BuildAction = "EmbeddedResource" + /> + <File RelPath = "register.aspx" SubType = "Form" *************** *** 146,149 **** --- 193,260 ---- DependentUpon = "register.aspx.cs" BuildAction = "EmbeddedResource" + /> + <File + RelPath = "slugboards.aspx" + SubType = "Form" + BuildAction = "Content" + /> + <File + RelPath = "slugboards.aspx.cs" + DependentUpon = "slugboards.aspx" + SubType = "ASPXCodeBehind" + BuildAction = "Compile" + /> + <File + RelPath = "slugboards.aspx.resx" + DependentUpon = "slugboards.aspx.cs" + BuildAction = "EmbeddedResource" + /> + <File + RelPath = "SQL.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "style.css" + BuildAction = "Content" + /> + <File + RelPath = "topics.xsd" + BuildAction = "Content" + /> + <File + RelPath = "topics.xsx" + DependentUpon = "topics.xsd" + BuildAction = "None" + /> + <File + RelPath = "UCSC.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "user.aspx" + SubType = "Form" + BuildAction = "Content" + /> + <File + RelPath = "user.aspx.cs" + DependentUpon = "user.aspx" + SubType = "ASPXCodeBehind" + BuildAction = "Compile" + /> + <File + RelPath = "user.aspx.resx" + DependentUpon = "user.aspx.cs" + BuildAction = "EmbeddedResource" + /> + <File + RelPath = "users.xsd" + BuildAction = "Content" + /> + <File + RelPath = "users.xsx" + DependentUpon = "users.xsd" + BuildAction = "None" /> <File Index: slugtalk.suo =================================================================== RCS file: /cvsroot/slugtalk/slugboards/slugtalk/slugtalk.suo,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvshjBHYM and /tmp/cvswKLyFp differ Index: style.css =================================================================== RCS file: /cvsroot/slugtalk/slugboards/slugtalk/style.css,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** style.css 28 Nov 2003 22:56:20 -0000 1.1 --- style.css 4 Jan 2004 05:02:35 -0000 1.2 *************** *** 1,95 **** - - /* 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; } - - - --- 1,8 ---- body{ margin: 0; ! padding: 0; background: #99ccff; color: #000066; ! font-family: sans-serif; } |
From: <slu...@li...> - 2003-12-06 09:34:13
|
Update of /cvsroot/slugtalk/slugboards/slugtalk In directory sc8-pr-cvs1:/tmp/cvs-serv5470 Added Files: login.gif post.gif slugboard.jpg Log Message: New images --- NEW FILE: login.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: post.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: slugboard.jpg --- (This appears to be a binary file; contents omitted.) |
From: <slu...@li...> - 2003-12-05 21:05:54
|
Update of /cvsroot/slugtalk/slugboards/slugtalk/bin In directory sc8-pr-cvs1:/tmp/cvs-serv31573/bin Removed Files: slugtalk.dll slugtalk.pdb Log Message: /bin == bad --- slugtalk.dll DELETED --- --- slugtalk.pdb DELETED --- |
From: <slu...@li...> - 2003-11-28 22:56:24
|
Update of /cvsroot/slugtalk/slugboards/slugtalk/bin In directory sc8-pr-cvs1:/tmp/cvs-serv18871/slugtalk/bin Added Files: slugtalk.dll slugtalk.pdb Log Message: Slugboards v1.0 --- NEW FILE: slugtalk.dll --- (This appears to be a binary file; contents omitted.) --- NEW FILE: slugtalk.pdb --- (This appears to be a binary file; contents omitted.) |
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.) |
From: <slu...@li...> - 2003-11-28 22:56:23
|
Update of /cvsroot/slugtalk/slugboards/slugtalk/_vti_pvt In directory sc8-pr-cvs1:/tmp/cvs-serv18871/slugtalk/_vti_pvt Added Files: access.cnf deptodoc.btr doctodep.btr service.cnf service.lck services.cnf Log Message: Slugboards v1.0 --- NEW FILE: access.cnf --- vti_encoding:SR|utf8-nl RealmName:bigpimpin InheritPermissions:true PasswordDir:c:\\inetpub\\wwwroot\\_vti_pvt --- NEW FILE: deptodoc.btr --- (This appears to be a binary file; contents omitted.) --- NEW FILE: doctodep.btr --- (This appears to be a binary file; contents omitted.) --- NEW FILE: service.cnf --- vti_encoding:SR|utf8-nl vti_casesensitiveurls:IX|0 vti_httpdversion:SX|Microsoft-IIS/5.1 vti_textextensions:SX|.txt.asm.c.cc.cod.cpp.cs.cxx.dbs.def.dsp.dsw.ext.fky.h.hpp.hxx.i.idl.inc.inl.jsl.kci.lgn.lst.mak.map.mk.odh.odl.prc.rc.rc2.rct.rgs.rul.s.sql.srf.tab.tlh.tli.trg.txt.udf.udt.user.usr.vb.vcproj.viw.vspscc.vsscc.vssscc. vti_featurelist:VX|vti_ACIPAddresses vti_ACCreateNewUsers vti_ACChangePassword vti_ACNoUserGroup vti_ACCreateNewGroups vti_ACModifyGroups vti_ServiceMarkUrlDirExec vti_ServerEmailTransport vti_ServerIndexServer vti_dependenciesood:IR|0 vti_webservertype:SR|msiis vti_publishmetainfokeys:VR|vti_assignedto vti_approvallevel vti_categories vti_description vti_categories:VR|Travel Expense\\ Report Business Competition Goals/Objectives Ideas Miscellaneous Waiting VIP In\\ Process Planning Schedule vti_htmlextensions:SX|.htm.html.stm.html.htm.shtml.shtm.htt.htx.asp.alx.asa. vti_approvallevels:VR|Content\\ Review Legal\\ Review Code\\ Review Manager\\ Review vti_timecreated:TR|28 Nov 2003 02:48:43 -0000 vti_extenderversion:SR|4.0.2.6513 vti_longfilenames:IX|1 vti_welcomenames:VX|Default.htm Default.asp index.htm iisstart.asp Default.aspx vti_insecureserverurl:SR|http://localhost vti_secureserverurl:SR|https://localhost vti_disableautoimgsizeexts:SX|.asp vti_oldestcompatibleversion:SR|2.0.0.0 vti_restartmanual:IX|0 --- NEW FILE: service.lck --- --- NEW FILE: services.cnf --- / |
From: <slu...@li...> - 2003-11-28 22:55:29
|
Update of /cvsroot/slugtalk/slugboards/slugtalk/_vti_txt In directory sc8-pr-cvs1:/tmp/cvs-serv18660/_vti_txt Log Message: Directory /cvsroot/slugtalk/slugboards/slugtalk/_vti_txt added to the repository |
From: <slu...@li...> - 2003-11-28 22:55:28
|
Update of /cvsroot/slugtalk/slugboards/slugtalk/_vti_cnf In directory sc8-pr-cvs1:/tmp/cvs-serv18660/_vti_cnf Log Message: Directory /cvsroot/slugtalk/slugboards/slugtalk/_vti_cnf added to the repository |
From: <slu...@li...> - 2003-11-28 22:55:28
|
Update of /cvsroot/slugtalk/slugboards/slugtalk/_vti_pvt In directory sc8-pr-cvs1:/tmp/cvs-serv18660/_vti_pvt Log Message: Directory /cvsroot/slugtalk/slugboards/slugtalk/_vti_pvt added to the repository |
From: <slu...@li...> - 2003-11-28 22:55:28
|
Update of /cvsroot/slugtalk/slugboards/slugtalk/_vti_script In directory sc8-pr-cvs1:/tmp/cvs-serv18660/_vti_script Log Message: Directory /cvsroot/slugtalk/slugboards/slugtalk/_vti_script added to the repository |
From: <slu...@li...> - 2003-11-28 22:55:28
|
Update of /cvsroot/slugtalk/slugboards/slugtalk/bin In directory sc8-pr-cvs1:/tmp/cvs-serv18660/bin Log Message: Directory /cvsroot/slugtalk/slugboards/slugtalk/bin added to the repository |
From: <slu...@li...> - 2003-11-28 22:55:22
|
Update of /cvsroot/slugtalk/slugboards/slugtalk In directory sc8-pr-cvs1:/tmp/cvs-serv18635/slugtalk Log Message: Directory /cvsroot/slugtalk/slugboards/slugtalk added to the repository |
From: <slu...@li...> - 2003-11-28 22:50:05
|
Update of /cvsroot/slugtalk/slugtalk/slugtalk/_vti_script In directory sc8-pr-cvs1:/tmp/cvs-serv17768/_vti_script Log Message: Directory /cvsroot/slugtalk/slugtalk/slugtalk/_vti_script added to the repository |
From: <slu...@li...> - 2003-11-28 22:50:05
|
Update of /cvsroot/slugtalk/slugtalk/slugtalk/_vti_txt In directory sc8-pr-cvs1:/tmp/cvs-serv17768/_vti_txt Log Message: Directory /cvsroot/slugtalk/slugtalk/slugtalk/_vti_txt added to the repository |
From: <slu...@li...> - 2003-11-28 22:50:05
|
Update of /cvsroot/slugtalk/slugtalk/slugtalk/bin In directory sc8-pr-cvs1:/tmp/cvs-serv17768/bin Log Message: Directory /cvsroot/slugtalk/slugtalk/slugtalk/bin added to the repository |
From: <slu...@li...> - 2003-11-28 22:50:05
|
Update of /cvsroot/slugtalk/slugtalk/slugtalk/_vti_pvt In directory sc8-pr-cvs1:/tmp/cvs-serv17768/_vti_pvt Log Message: Directory /cvsroot/slugtalk/slugtalk/slugtalk/_vti_pvt added to the repository |
From: <slu...@li...> - 2003-11-28 22:50:05
|
Update of /cvsroot/slugtalk/slugtalk/slugtalk/_vti_cnf In directory sc8-pr-cvs1:/tmp/cvs-serv17768/_vti_cnf Log Message: Directory /cvsroot/slugtalk/slugtalk/slugtalk/_vti_cnf added to the repository |
From: <slu...@li...> - 2003-11-28 22:45:32
|
Update of /cvsroot/slugtalk/slugtalk/slugtalk In directory sc8-pr-cvs1:/tmp/cvs-serv17024/slugtalk Log Message: Directory /cvsroot/slugtalk/slugtalk/slugtalk added to the repository |
From: <slu...@li...> - 2003-11-25 08:20:58
|
Update of /cvsroot/slugtalk/test/WebApplication1/_vti_pvt In directory sc8-pr-cvs1:/tmp/cvs-serv27477/WebApplication1/_vti_pvt Added Files: access.cnf deptodoc.btr doctodep.btr service.cnf service.lck services.cnf Log Message: Initial checkin --- NEW FILE: access.cnf --- vti_encoding:SR|utf8-nl RealmName:Fry InheritPermissions:true PasswordDir:c:\\inetpub\\wwwroot\\_vti_pvt --- NEW FILE: deptodoc.btr --- (This appears to be a binary file; contents omitted.) --- NEW FILE: doctodep.btr --- (This appears to be a binary file; contents omitted.) --- NEW FILE: service.cnf --- vti_encoding:SR|utf8-nl vti_casesensitiveurls:IX|0 vti_httpdversion:SX|Microsoft-IIS/5.1 vti_textextensions:SX|.txt.actproj.asm.c.cc.cod.cpp.cs.cxx.dbs.def.dsp.dsw.etp.ext.fky.h.hpp.hxx.i.idl.inc.inl.jsl.kci.lgn.lst.mak.map.mk.odh.odl.prc.py.pyw.rc.rc2.rct.rgs.rul.s.sql.srf.tab.tlh.tli.trg.txt.udf.udt.user.usr.vap.vb.vcproj.viw.vspscc.vsscc.vssscc. vti_featurelist:VX|vti_ACIPAddresses vti_ACCreateNewUsers vti_ACChangePassword vti_ACNoUserGroup vti_ACCreateNewGroups vti_ACModifyGroups vti_ServiceMarkUrlDirExec vti_ServerEmailTransport vti_ServerIndexServer vti_dependenciesood:IR|0 vti_webservertype:SR|msiis vti_publishmetainfokeys:VR|vti_assignedto vti_approvallevel vti_categories vti_description vti_categories:VR|Travel Expense\\ Report Business Competition Goals/Objectives Ideas Miscellaneous Waiting VIP In\\ Process Planning Schedule vti_htmlextensions:SX|.htm.html.stm.html.htm.shtml.shtm.htt.htx.asp.alx.asa. vti_approvallevels:VR|Content\\ Review Legal\\ Review Code\\ Review Manager\\ Review vti_timecreated:TR|07 Nov 2003 01:49:22 -0000 vti_extenderversion:SR|4.0.2.6513 vti_longfilenames:IX|1 vti_welcomenames:VX|Default.htm Default.asp index.htm iisstart.asp vti_insecureserverurl:SR|http://localhost vti_secureserverurl:SR|https://localhost vti_disableautoimgsizeexts:SX|.asp vti_oldestcompatibleversion:SR|2.0.0.0 vti_restartmanual:IX|0 --- NEW FILE: service.lck --- --- NEW FILE: services.cnf --- / |