Advertisement
Advertisement
| 07.15.2008 at 02:35PM PDT, ID: 23567744 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
|
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: 91: 92: 93: 94: 95: 96: 97: 98: 99: 100: 101: 102: 103: 104: 105: 106: 107: 108: 109: 110: 111: 112: 113: 114: 115: 116: 117: 118: 119: 120: 121: 122: 123: 124: 125: 126: 127: 128: 129: 130: 131: 132: 133: 134: 135: 136: 137: 138: 139: 140: 141: 142: 143: 144: 145: 146: 147: 148: 149: 150: 151: 152: 153: 154: 155: 156: 157: 158: 159: 160: 161: 162: 163: 164: 165: 166: 167: 168: 169: 170: 171: 172: 173: 174: 175: 176: 177: 178: 179: 180: 181: 182: 183: 184: 185: 186: 187: 188: 189: 190: 191: 192: 193: 194: 195: 196: 197: 198: 199: 200: 201: 202: 203: 204: 205: 206: 207: 208: 209: 210: 211: 212: 213: 214: 215: 216: 217: 218: 219: 220: 221: 222: 223: 224: 225: 226: 227: 228: 229: 230: 231: 232: 233: 234: 235: 236: 237: 238: 239: 240: 241: 242: 243: 244: 245: 246: 247: 248: 249: 250: 251: 252: 253: 254: 255: 256: 257: 258: 259: 260: 261: 262: 263: 264: 265: 266: 267: 268: 269: 270: 271: 272: 273: 274: 275: 276: 277: 278: 279: 280: 281: 282: 283: 284: 285: 286: 287: 288: 289: 290: 291: 292: 293: 294: 295: 296: 297: 298: 299: 300: 301: 302: 303: 304: 305: 306: 307: 308: 309: 310: 311: 312: 313: 314: 315: 316: 317: 318: 319: 320: 321: 322: 323: 324: 325: 326: 327: 328: 329: 330: 331: 332: 333: 334: 335: 336: 337: 338: 339: 340: 341: 342: 343: 344: |
application.cfc:
<!---
Filename: Application.cfc
Created by: Raymond Camden (ray@camdenfamily.com)
Please Note: Executes for every page request
--->
<cfcomponent output="false">
<!--- Name the application. --->
<cfset this.name="GuardianHelpSite">
<!--- Turn on session management. --->
<cfset this.sessionManagement=true>
<cffunction name="onApplicationStart" output="false" returnType="void">
<!--- Any variables set here can be used by all of the application's pages --->
<cfset APPLICATION.dataSource = "ebwebwork">
<cfset APPLICATION.companyName = "Guardian Help">
</cffunction>
<cffunction name="onRequestStart" output="false" returnType="void">
<!--- Set up request variables here. --->
<cfset var secureDirectories = "stories,client,admin,board">
<cfset var loginRequired = false>
</cffunction>
<!--- METHOD: onSessionStart --->
<cffunction name="onSessionStart" returntype="void">
<!--- defined all session variables, so they will always exist ---->
<cfset session.auth.isLoggedIn = false>
<cfset session.auth.isLoggedIn.ContactID = "">
<cfset session.auth.isLoggedIn.FirstName = "">
<cfset session.auth.isLoggedIn.LastName = "">
<cfset session.auth.isLoggedIn.Address = "">
<cfset session.auth.isLoggedIn.City = "">
<cfset session.auth.isLoggedIn.State = "">
<cfset session.auth.isLoggedIn.ZIP = "">
<cfset session.auth.isLoggedIn.Email = "">
<cfset session.auth.isLoggedIn.UserLogin = "">
<cfset session.auth.isLoggedIn.UserPassword = "">
<cfset session.auth.isLoggedIn.UserRoleID = "">
</cffunction>
<!--- END METHOD: onSessionStart --->
</cfcomponent>
siteheader.cfm:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Guardian Help: The Uxoricide Research Project
University of Virginia School of Nursing
Charlottesville, Virginia</title>
<meta http-equiv="developer" content="Eric Bourland, ebwebwork.com" />
<META http-equiv="ROBOTS" CONTENT="NONE">
<link rel="stylesheet" type="text/css" href="/uva.css">
<script src="/rotateimages.js" type="text/javascript"></script>
</head>
<body OnLoad="rotateImage('rImage')">
<!-- begin page -->
<div id="page">
<!-- header section - invisible spacer used for logo link -->
<div id="header">
<div id="logo">
<a href="/"><img src="/images/spacer.gif" width="300" height="100"/></a>
<!-- /logo -->
</div>
<!--search box -->
<div id="search">
<form action="http://www.google.com/cse" id="cse-search-box">
<input type="hidden" name="cx" value="001382591411870128679:y4fzoklwmtk" />
<input type="hidden" name="ie" value="UTF-8" />
<input type="text" name="q" size="20" />
<input type="submit" name="sa" value="Go" />
</form>
<script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en"></script>
<div class="subsearch">
<cfif SESSION.auth.isLoggedIn>
Welcome, <cfoutput>#session.auth.isLoggedIn.FirstName#</cfoutput> | <a href="/logout.cfm">Log Out</a>
<cfelse>
<a href="/LoginForm.cfm">Please Log In</a>
</cfif>
</div>
<!-- /search box -->
</div>
<!--end header section -->
</div>
<div class="clear"></div>
<div id="container">
<div id="nav">
<ul>
<li><a href="/"><span>Home</span></a></li>
<li><a href="/stories/"><span>Client Stories</span></a></li>
<li><a href="/client/"><span>Client Resources</span></a></li>
<CFIF IsDefined('SESSION.auth.userRoleID') and SESSION.auth.UserRoleID LT 6>
<li><a href="/board/"><span>Discussion Board</span></a></li>
</CFIF>
<CFIF IsDefined('SESSION.auth.userRoleID') and SESSION.auth.UserRoleID IS 1>
<li><a href="/admin/"><span>Admin</span></a></li>
</CFIF>
<li><a href="/contact.cfm"><span>Contact</span></a></li>
</ul>
</div>
<!--- left content --->
<div id="content-left">
<div style="text-align:center; margin:20px 0;"><img src="/images/Nursing.sm.su.png" alt="UVA School of Nursing" class="border0" /></div>
<img name="rImage" src="/images/apuva0.jpg">
</div>
<!--- end left content --->
LoginForm.cfm:
<!---
Filename: LoginForm.cfm
Created by: Nate Weiss (NMW)
Purpose: Presented whenever a user has not logged in yet
Please Note Included by Application.cfc
--->
<!--- If the user is now submitting Login form, --->
<!--- Include Login Check code to validate user --->
<cfif isDefined("FORM.UserLogin")>
<cfinclude template="LoginCheck.cfm">
</cfif>
<cfinclude template="SiteHeader.cfm">
<cfif isDefined("FORM.UserLogin")>
<cfinclude template="LoginCheck.cfm">
</cfif>
<div id="content-right">
<div class="pageTitle">Please Log In</div>
<!--- Place cursor in "User Name" field when page loads--->
<body onLoad="document.LoginForm.userLogin.focus();">
<!--- Start our Login Form --->
<cfform action="#CGI.script_name#?#CGI.query_string#" name="LoginForm" method="post">
<!--- Make the UserLogin and UserPassword fields required --->
<input type="hidden" name="userLogin_required">
<input type="hidden" name="UserPassword_required">
<!--- Use an HTML table for simple formatting --->
<table border="0">
<tr><th colspan="2" bgcolor="silver">Please Log In</th></tr>
<tr>
<th>UserLogin:</th>
<td>
<!--- Text field for "User Name" --->
<cfinput
type="text"
name="userLogin"
size="20"
value=""
maxlength="100"
required="Yes"
message="Please type your UserLogin first.">
</td>
</tr><tr>
<th>UserPassword:</th>
<td>
<!--- Text field for UserPassword --->
<cfinput
type="Password"
name="UserPassword"
size="12"
value=""
maxlength="100"
required="Yes"
message="Please type your UserPassword first.">
<!--- Submit Button that reads "Enter" --->
<input type="Submit" value="Enter">
</td>
</tr>
</table>
</cfform>
<!-- end right content -->
</div>
<cfinclude template="SiteFooter.cfm">
LoginCheck.cfm:
<!---
Filename: LoginCheck.cfm
Created by: Nate Weiss (NMW)
Purpose: Validates a user's UserPassword entries
Please Note Included by LoginForm.cfm
--->
<!--- Make sure we have Login name and UserPassword --->
<cfparam name="FORM.userLogin" type="string">
<cfparam name="FORM.UserPassword" type="string">
<!--- Find record with this UserLogin/UserPassword --->
<!--- If no rows returned, UserPassword not valid --->
<cfquery name="getUser" datasource="#APPLICATION.dataSource#">
SELECT ContactID, FirstName
FROM GuardianHelpContacts
WHERE UserLogin = '#FORM.UserLogin#'
AND UserPassword = '#FORM.UserPassword#'
</cfquery>
<!--- If the UserLogin and UserPassword are correct --->
<cfif getUser.recordCount eq 1>
<!--- Remember user's logged-in status, plus --->
<!--- ContactID and First Name, in structure --->
<cfset SESSION.auth = structNew()>
<cfset SESSION.auth.isLoggedIn = "Yes">
<cfset SESSION.auth.contactID = getUser.contactID>
<cfset SESSION.auth.firstName = getUser.firstName>
<!--- Now that user is logged in, send them --->
<!--- to whatever page makes sense to start --->
<cflocation url="#CGI.script_name#?#CGI.query_string#">
</cfif>
ForceUserLogin.cfm:
<!---
Filename: ForceUserLogin.cfm
Created by: Nate Weiss (NMW)
Purpose: Requires each user to log in
Please Note Included by Application.cfc
--->
<!--- Force the user to log in --->
<!--- *** This code only executes if the user has not logged in yet! *** --->
<!--- Once the user is logged in via <cfloginuser>, this code is skipped --->
<cflogin>
<!--- If the user hasn't gotten the login form yet, display it --->
<cfif not (isDefined("FORM.userLogin") and isDefined("FORM.UserPassword"))>
<cfinclude template="LoginForm.cfm">
<cfabort>
<!--- Otherwise, the user is submitting the login form --->
<!--- This code decides whether the UserLogin and UserPassword are valid --->
<cfelse>
<!--- Find record with this UserLogin/UserPassword --->
<!--- If no rows returned, UserPassword not valid --->
<cfquery name="getUser" datasource="#APPLICATION.dataSource#">
SELECT ContactID, FirstName, rTrim(UserRoleName) as UserRoleName
FROM GuardianHelpContacts LEFT OUTER JOIN UserRoles
ON GuardianHelpContacts.UserRoleID = UserRoles.UserRoleID
WHERE UserLogin = '#FORM.UserLogin#'
AND UserPassword = '#FORM.UserPassword#'
</cfquery>
<!--- If the UserLogin and UserPassword are correct... --->
<cfif getUser.recordCount eq 1>
<!--- Tell ColdFusion to consider the user "logged in" --->
<!--- For the NAME attribute, we will provide the user's --->
<!--- ContactID number and first name, separated by commas --->
<!--- Later, we can access the NAME value via GetAuthUser() --->
<cfloginuser
name="#getUser.ContactID#,#getUser.FirstName#"
UserPassword="#FORM.UserPassword#"
roles="#getUser.userRoleName#">
<!--- Otherwise, re-prompt for a valid UserLogin and UserPassword --->
<cfelse>
Sorry, that UserLogin and UserPassword are not recognized.
Please try again.
<cfinclude template="LoginForm.cfm">
<cfabort>
</cfif>
</cfif>
</cflogin>
|