Advertisement
friendlysoviet

cookies_die_on_meta_reload

Jan 23rd, 2012
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  2. <html>
  3. <head>
  4.     <title>WAIT</title>
  5. </head>
  6.  
  7. <body BGCOLOR="#00CCFF">
  8.  
  9. <cfif IsDefined("cookie.userID") is True>
  10.     <!--- Now we pull all the information from the cookies --->
  11.     <cfscript>
  12.         userID = cookie.userID;
  13.         userSite = cookie.userSite;
  14.         userSess = cookie.userSess;
  15.         userFName = cookie.userFName;
  16.         userLName = cookie.userLName;
  17.         userEmail = cookie.userEmail;  
  18.         userSiteFirst = cookie.userSiteFirst; //If userSiteFirst <> userSite, than s/he gets to stay here for a while.
  19.     </cfscript>
  20.  
  21.     <CFQUERY DATASOURCE="tr3" NAME="qrySessionRun">
  22.         SELECT *
  23.         FROM RunTR2
  24.         WHERE session = #userSess#
  25.     </CFQUERY>
  26.  
  27.     <CFQUERY DATASOURCE="tr3" NAME="qryMatchDone">
  28.         SELECT choice_1
  29.         FROM UsrMatchPrefTR2
  30.         WHERE session = #userSess# AND user_id = #userID#
  31.     </CFQUERY>
  32.        
  33.     <CFOUTPUT>
  34.         <cfif userSite eq userSiteFirst>
  35.             <h2 align="center">When the Experiment is ready to begin the matching process, a CONTINUE Button will appear.</H2>
  36.         <cfelse>
  37.             <h2 align="center">The other experiment site is choosing their partners.</H2>
  38.         </cfif>
  39.         <h2 align="center">Please wait.</H2>
  40.         <h3 align="center">Thank you for your patience #userFName# #userLName#.
  41.         You are assigned at Machine: #userID#</h3>
  42.     </cfoutput>
  43.  
  44.     <cfif userSite eq userSiteFirst>
  45.         <!--- So yeah, we check to see if match = 1, and if so, we will print out the form of matching people --->
  46.         <cfif (qrySessionRun.matching eq 1)>
  47.             <!--- If the users are ready to be matched AND they haven't arleady made their choice print the choices and let them select their preferences --->
  48.             <!---- We are going to do this at match.cfm so yeah let's send them over there --->
  49.             <cflocation url="/newTR3/match.cfm">
  50.         <cfelse>
  51.             <br><center>Still waiting for other people to enter their information.</center><br>
  52.             <meta http-equiv=Refresh content="5;url=http://cbees-dev.utdallas.edu/newTR3/wait.cfm"> <!--- Change --->
  53.         </cfif>
  54.     <cfelseif userSite neq userSiteFirst>
  55.         <!--- People who are not matching will be just waiting here while their counterparts make their decision --->
  56.         <!--- We will loop through this page checking to see if RunTR2.ready ==  1 --->
  57.         <cfif qrySessionRun.ready eq 1>
  58.             <!--- The matches have been made, lets send them to the experiment! --->
  59.             <cflocation url="/newTR3/experiment/exp1.cfm">
  60.         <cfelseif qrySessionRun.ready neq 1>
  61.             <!--- We stil get to wait. :D Going to refresh cookies refresh the page. --->
  62.             <meta http-equiv=Refresh content="5;url=http://cbees-dev.utdallas.edu/newTR3/wait.cfm">
  63.         </cfif>
  64.     </cfif>
  65. <cfelse>
  66.     <cfoutput> So some how the cookie no longer exists. :S</cfoutput>  
  67. </cfif>
  68.  
  69.  
  70. </body>
  71. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement