Hi,
Our support desk is requesting a status page that they can update to alert our user community of problems. I want to have a page where our support desk people can login, AND show the current status. (Update dynamically) So what I'm looking to do is have the login page show the current status. When they want to change the status, they login, go to the form, change the status, click modify, and it will re-direct back to the first login page and update it with those changes... I'm having a problem, here's my code thus far; this may even be wrong.
login page:
<cfparam name="technician" default="">
<cfparam name="problem" default="">
<cfparam name="resolution" default="">
<cfparam name="comments" default="">
<html>
<head>
<title>IS NJ Campus Status</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#ffffff" text="#000000">
<CFFORM name="UserLogin" method="post" action="results.cfm">
<div align="center">
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<table width="45%" border="1" bordercolor="#000000">
<tr>
<td width="26%"><font size="2" face="Arial, Helvetica, sans-serif"><IMG height=75 src="../../images/CS_LOGO.jpg" width=93></font></td>
<td width="74%"><font size="2" face="Arial, Helvetica, sans-serif">Welcome
to the Campus Support Status page.<br>
This page will be maintained daily by our Support Desk to update any Network
related problems affecting the IS user community.</font></td>
<CFQUERY datasource="my data source" NAME="showStatus">
SELECT *
FROM tblstatus2
</CFQUERY>
</tr>
<tr valign="bottom"> <cfoutput>
<td colspan="2"><font size="2" face="Arial, Helvetica, sans-serif">
<br>
Technician Reporting: #Technician#
<br>
Time: #CreateODBCDate(dateformat(Now(),"dd-mmm-yyyy"
)#
<br>
Problem:#problem#
<br>
Resolution: #resolution#
<br>
<br>
<br>
<br>
<br></cfoutput>
<font color="#990000"><i>For Campus Support Personnel Only:</i></font><br>
<br>
</font>
<DIV align=center>
<table width="101%" border="1" cellpadding="5" cellspacing="0" align=center>
<tr>
<td width="45%"><font size="2" face="Arial, Helvetica, sans-serif">Login:</font></td>
<td width="55%">
<CFINPUT type="Text" name="UserName" required="Yes" message="A User Name is required!">
</td>
</tr>
<tr>
<td width="45%"><font size="2" face="Arial, Helvetica, sans-serif">Password:</font></td>
<td valign="bottom" width="55%">
<CFINPUT type="Password" name="Password" required="Yes" message="A Password is Required!">
</td>
</tr>
</table></DIV>
<INPUT type=submit value="Login"> <INPUT type=reset value=Reset>
</td>
</tr>
</table></CFFORM>
<p> </p>
<p> </p>
</div>
</body>
</html>
Results Page:
<CFSET Session.LoggedIn = FALSE>
<cfparam name="Form.UserName" default="">
<cfparam name="Form.password" default="">
<CFQUERY NAME="GetUser" DATASOURCE="my data source">
SELECT *
FROM tblstatus
WHERE UserName = '#Form.UserName#'
</CFQUERY>
<CFIF GETUSER.RECORDCOUNT GREATER THAN 0 and #form.password# IS '#getuser.password#'>
<CFSET Session.LoggedIn = TRUE>
<CFSET Session.UserName = GetUser.Username>
<cfcookie name="UserName" value="#GetUser.UserName#">
<cflocation url="insertform.cfm" addtoken="No">
<CFELSEIF #form.password# is not "#getuser.password#">
<html>
<body>
<font face="Verdana"><b><font size="-1"><div align="center">Sorry! You either mistyped the password;<br>
or you are trying to bypass the login screen. Please try again!</div></font></b></font>
<cfinclude template="status_Login.cfm">
</body></html>
</cfif>
Insert Form Page: (Page where they would enter the status)
<CFQUERY datasource="my data source" NAME="writeStatus">
SELECT *
FROM tblstatus2
</CFQUERY>
<TR>
<TD WIDTH=100 ALIGN="center" VALIGN="TOP" HEIGHT="150"> </TD>
<TD VALIGN="TOP">
<FORM ACTION="insertaction.cfm" METHOD="POST">
<FONT FACE="Helvetica" SIZE="-1">
<P>Technician<BR>
<INPUT TYPE="TEXT" NAME="Technician"></P>
<P>Problem<BR>
<INPUT TYPE="TEXT" NAME="Problem"></P>
<P>Resolution<BR>
<INPUT TYPE="TEXT" NAME="resolution"></P>
<cfoutput><P>Date<BR>
<INPUT TYPE="TEXT" name="date" value="#CreateODBCDate(dateformat(Now(),"dd-mmm-yyyy"
)#"></P></cfoutput>
<P>Comments<BR>
<TEXTAREA NAME="comments" COLS="25" ROWS="5"></TEXTAREA>
<P><INPUT TYPE="SUBMIT" VALUE="Upload Status"></P>
</FONT>
</FORM>
</TD>
<TD WIDTH=100 ALIGN="RIGHT" VALIGN="TOP" HEIGHT="150"> </TD>
</TR>
<TR>
<TD HEIGHT="35" COLSPAN="3"> </TD>
</TR>
</TABLE>
Insert Action Page: (input the changes into a database and return to the login page showing the update)
<!--- This INSERT statement does the actual adding
of the data to the database; notice that the
SQL statement contains Cold Fusion #variables# --->
<CFQUERY datasource="my data source" NAME="AddStatus">
INSERT INTO tblstatus2 (
technician,
Problem,
resolution,
comments)
VALUES (
'#Form.technician#',
'#Form.problem#',
'#Form.resolution#',
'#Form.comments#')
</CFQUERY>
<CFLOCATION URL="status_login.cfm">
any direction is appreciated; so in a nutshell, I just want to have our techs login to a page, update a status and return to the same login page so everyone can see the current status.
Help!,
Thanks,
Lisa... UPS
Our support desk is requesting a status page that they can update to alert our user community of problems. I want to have a page where our support desk people can login, AND show the current status. (Update dynamically) So what I'm looking to do is have the login page show the current status. When they want to change the status, they login, go to the form, change the status, click modify, and it will re-direct back to the first login page and update it with those changes... I'm having a problem, here's my code thus far; this may even be wrong.
login page:
<cfparam name="technician" default="">
<cfparam name="problem" default="">
<cfparam name="resolution" default="">
<cfparam name="comments" default="">
<html>
<head>
<title>IS NJ Campus Status</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#ffffff" text="#000000">
<CFFORM name="UserLogin" method="post" action="results.cfm">
<div align="center">
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<table width="45%" border="1" bordercolor="#000000">
<tr>
<td width="26%"><font size="2" face="Arial, Helvetica, sans-serif"><IMG height=75 src="../../images/CS_LOGO.jpg" width=93></font></td>
<td width="74%"><font size="2" face="Arial, Helvetica, sans-serif">Welcome
to the Campus Support Status page.<br>
This page will be maintained daily by our Support Desk to update any Network
related problems affecting the IS user community.</font></td>
<CFQUERY datasource="my data source" NAME="showStatus">
SELECT *
FROM tblstatus2
</CFQUERY>
</tr>
<tr valign="bottom"> <cfoutput>
<td colspan="2"><font size="2" face="Arial, Helvetica, sans-serif">
<br>
Technician Reporting: #Technician#
<br>
Time: #CreateODBCDate(dateformat(Now(),"dd-mmm-yyyy"

<br>
Problem:#problem#
<br>
Resolution: #resolution#
<br>
<br>
<br>
<br>
<br></cfoutput>
<font color="#990000"><i>For Campus Support Personnel Only:</i></font><br>
<br>
</font>
<DIV align=center>
<table width="101%" border="1" cellpadding="5" cellspacing="0" align=center>
<tr>
<td width="45%"><font size="2" face="Arial, Helvetica, sans-serif">Login:</font></td>
<td width="55%">
<CFINPUT type="Text" name="UserName" required="Yes" message="A User Name is required!">
</td>
</tr>
<tr>
<td width="45%"><font size="2" face="Arial, Helvetica, sans-serif">Password:</font></td>
<td valign="bottom" width="55%">
<CFINPUT type="Password" name="Password" required="Yes" message="A Password is Required!">
</td>
</tr>
</table></DIV>
<INPUT type=submit value="Login"> <INPUT type=reset value=Reset>
</td>
</tr>
</table></CFFORM>
<p> </p>
<p> </p>
</div>
</body>
</html>
Results Page:
<CFSET Session.LoggedIn = FALSE>
<cfparam name="Form.UserName" default="">
<cfparam name="Form.password" default="">
<CFQUERY NAME="GetUser" DATASOURCE="my data source">
SELECT *
FROM tblstatus
WHERE UserName = '#Form.UserName#'
</CFQUERY>
<CFIF GETUSER.RECORDCOUNT GREATER THAN 0 and #form.password# IS '#getuser.password#'>
<CFSET Session.LoggedIn = TRUE>
<CFSET Session.UserName = GetUser.Username>
<cfcookie name="UserName" value="#GetUser.UserName#">
<cflocation url="insertform.cfm" addtoken="No">
<CFELSEIF #form.password# is not "#getuser.password#">
<html>
<body>
<font face="Verdana"><b><font size="-1"><div align="center">Sorry! You either mistyped the password;<br>
or you are trying to bypass the login screen. Please try again!</div></font></b></font>
<cfinclude template="status_Login.cfm">
</body></html>
</cfif>
Insert Form Page: (Page where they would enter the status)
<CFQUERY datasource="my data source" NAME="writeStatus">
SELECT *
FROM tblstatus2
</CFQUERY>
<TR>
<TD WIDTH=100 ALIGN="center" VALIGN="TOP" HEIGHT="150"> </TD>
<TD VALIGN="TOP">
<FORM ACTION="insertaction.cfm" METHOD="POST">
<FONT FACE="Helvetica" SIZE="-1">
<P>Technician<BR>
<INPUT TYPE="TEXT" NAME="Technician"></P>
<P>Problem<BR>
<INPUT TYPE="TEXT" NAME="Problem"></P>
<P>Resolution<BR>
<INPUT TYPE="TEXT" NAME="resolution"></P>
<cfoutput><P>Date<BR>
<INPUT TYPE="TEXT" name="date" value="#CreateODBCDate(dateformat(Now(),"dd-mmm-yyyy"

<P>Comments<BR>
<TEXTAREA NAME="comments" COLS="25" ROWS="5"></TEXTAREA>
<P><INPUT TYPE="SUBMIT" VALUE="Upload Status"></P>
</FONT>
</FORM>
</TD>
<TD WIDTH=100 ALIGN="RIGHT" VALIGN="TOP" HEIGHT="150"> </TD>
</TR>
<TR>
<TD HEIGHT="35" COLSPAN="3"> </TD>
</TR>
</TABLE>
Insert Action Page: (input the changes into a database and return to the login page showing the update)
<!--- This INSERT statement does the actual adding
of the data to the database; notice that the
SQL statement contains Cold Fusion #variables# --->
<CFQUERY datasource="my data source" NAME="AddStatus">
INSERT INTO tblstatus2 (
technician,
Problem,
resolution,
comments)
VALUES (
'#Form.technician#',
'#Form.problem#',
'#Form.resolution#',
'#Form.comments#')
</CFQUERY>
<CFLOCATION URL="status_login.cfm">
any direction is appreciated; so in a nutshell, I just want to have our techs login to a page, update a status and return to the same login page so everyone can see the current status.
Help!,
Thanks,
Lisa... UPS