root/trunk/website/soundings/admin/textviewer.cfm @ 5

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<cfmodule template="../handlers/#qt.handlerRoot#/stats.cfm"
19                        questionidfk="#url.questionidfk#"
20                        r_data="data"
21/>
22
23<cfparam name="url.start" default="1">
24<cfset perpage = 20>
25
26<tags:layout templatename="plain" title="Text Answers">
27
28<cfoutput>
29<h2>Text Answers for #question.question#</h2>
30</cfoutput>
31
32<cfif data.recordCount is 0>
33
34        <cfoutput>
35        <p>
36        There are no results for this answer.
37        </p>
38        </cfoutput>
39       
40<cfelse>
41
42        <cfif data.recordCount gt perpage>
43                <cfoutput>
44                <p align="right">
45                </cfoutput>
46                <cfif url.start gt 1>
47                        <cfoutput>
48                        <a href="textviewer.cfm?questionidfk=#url.questionidfk#&start=#url.start-perpage#">Previous</a>
49                        </cfoutput>
50                </cfif>
51                <cfif (url.start + perpage - 1) lt data.recordCount>
52                        <cfoutput>
53                        <a href="textviewer.cfm?questionidfk=#url.questionidfk#&start=#url.start+perpage#">Next</a>
54                        </cfoutput>
55                </cfif>
56        </cfif>
57       
58        <cfoutput>
59        <p>
60        <table width="100%" border="1">
61        </cfoutput>
62       
63        <cfset column = listFirst(data.columnlist)>
64        <cfoutput query="data" startrow="#url.start#" maxrows="#perpage#">
65                <cfset val = data[column][currentRow]>
66                <tr
67                        <cfif currentRow mod 2>bgcolor="yellow"</cfif>
68                >
69                <td>#currentRow#</td>
70                <td width="95%">#val#</td>
71                </tr>
72        </cfoutput>
73       
74        <cfoutput>
75        </table>
76        </p>
77        </cfoutput>
78
79</cfif>
80
81</tags:layout>
82
Note: See TracBrowser for help on using the browser.