root/trunk/website/soundings/admin/otherviewer.cfm

Revision 5, 1.8 kB (checked in by DanWilson, 17 years ago)

Initial Commit Of ModelGlue? Website (upgrade to blogcfc 511)

Line 
1<cfsetting enablecfoutputonly=true>
2<!---
3        Name         : textviewer.cfm
4        Author       : Raymond Camden
5        Created      : September 16, 2004
6        Last Updated : September 16, 2004
7        History      :
8        Purpose          :
9--->
10<cfimport taglib="../tags/" prefix="tags">
11
12<cfif not isDefined("url.questionidfk")>
13        <cfabort>
14</cfif>
15
16<cfset question = application.question.getQuestion(url.questionidfk)>
17<cfset qt = application.questiontype.getQuestionType(question.questiontypeidfk)>
18
19<cfmodule template="../handlers/#qt.handlerRoot#/stats.cfm"
20                        questionidfk="#url.questionidfk#"
21                        getOther=true
22                        r_data="data"
23/>
24
25<cfparam name="url.start" default="1">
26<cfset perpage = 20>
27
28<tags:layout templatename="plain" title="Text Answers">
29
30<cfoutput>
31<h2>Text Answers for #question.question#</h2>
32</cfoutput>
33
34<cfif data.recordCount is 0>
35
36        <cfoutput>
37        <p>
38        There are no results for this answer.
39        </p>
40        </cfoutput>
41       
42<cfelse>
43
44        <cfif data.recordCount gt perpage>
45                <cfoutput>
46                <p align="right">
47                </cfoutput>
48                <cfif url.start gt 1>
49                        <cfoutput>
50                        <a href="textviewer.cfm?questionidfk=#url.questionidfk#&start=#url.start-perpage#">Previous</a>
51                        </cfoutput>
52                </cfif>
53                <cfif (url.start + perpage - 1) lt data.recordCount>
54                        <cfoutput>
55                        <a href="textviewer.cfm?questionidfk=#url.questionidfk#&start=#url.start+perpage#">Next</a>
56                        </cfoutput>
57                </cfif>
58        </cfif>
59       
60        <cfoutput>
61        <p>
62        <table width="100%" border="1">
63        </cfoutput>
64       
65        <cfset column = listFirst(data.columnlist)>
66        <cfoutput query="data" startrow="#url.start#" maxrows="#perpage#">
67                <cfset val = data[column][currentRow]>
68                <tr
69                        <cfif currentRow mod 2>bgcolor="yellow"</cfif>
70                >
71                <td>#currentRow#</td>
72                <td width="95%">#val#</td>
73                </tr>
74        </cfoutput>
75       
76        <cfoutput>
77        </table>
78        </p>
79        </cfoutput>
80
81</cfif>
82
83</tags:layout>
84
Note: See TracBrowser for help on using the browser.