-
Notifications
You must be signed in to change notification settings - Fork 0
/
paging.cfm
86 lines (86 loc) · 4.66 KB
/
paging.cfm
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
<cfset pagination = createObject("component", "#request.cfcPath#.Pagination").init() />
<cfif IsDefined('URL.action') AND url.action IS 'toprated'>
<cfset pagination.setQueryToPaginate(toprated) />
<cfelseif IsDefined('URL.action') AND url.action IS 'toprecentfeatured'>
<cfset pagination.setQueryToPaginate(mostrecent) />
<cfelseif IsDefined('URL.action') AND url.action IS 'topviewed'>
<cfset pagination.setQueryToPaginate(topviewed) />
<cfelseif IsDefined('URL.action') AND url.action IS 'topdiscussed'>
<cfset pagination.setQueryToPaginate(mostdiscussed) />
<cfelseif IsDefined('URL.action') AND url.action IS 'toplinked'>
<cfset pagination.setQueryToPaginate(toplinked) />
<cfelseif IsDefined('URL.action') AND url.action IS 'toprecent'>
<cfset pagination.setQueryToPaginate(toprecent) />
<cfelseif IsDefined('URL.action') AND url.action IS 'toprespond'>
<cfset pagination.setQueryToPaginate(toprespond) />
<cfelseif IsDefined('URL.action') AND url.action IS 'topFavs'>
<cfset pagination.setQueryToPaginate(topFavs) />
<cfelseif IsDefined('URL.action') AND url.action IS 'mobiles'>
<cfset pagination.setQueryToPaginate(mobilevideo) />
<cfelseif IsDefined('URL.action') AND url.action IS 'author'>
<cfset pagination.setQueryToPaginate(byAuthor) />
<cfelseif IsDefined('URL.action') AND url.action IS 'categories' OR url.action IS 'subcategories'>
<cfset pagination.setQueryToPaginate(showus) />
<cfelseif IsDefined('url.searchvideos')>
<cfset pagination.setQueryToPaginate(searched) />
</cfif>
<cfif isDefined('url.searchstring')>
<cfset pagination.setBaseLink("advresults.cfm?searchstring=#url.searchstring#&select_lang=#url.select_lang#&racedcondition=#url.racedcondition#&timeconstraint=#url.timeconstraint#&author=#url.author#&sbtSearch=Search+Videos") />
<cfelseif IsDefined('URL.action') AND url.action IS 'toprated'>
<cfif isDefined('url.time')>
<cfset pagination.setBaseLink("videos.cfm?action=toprated&time=#url.time#") />
<cfelse>
<cfset pagination.setBaseLink("videos.cfm?action=toprated") />
</cfif>
<cfelseif IsDefined('URL.action') AND url.action IS 'toprecentfeatured'>
<cfset pagination.setBaseLink("videos.cfm?action=toprecentfeatured") />
<cfelseif IsDefined('URL.action') AND url.action IS 'topviewed'>
<cfif isDefined('url.time')>
<cfset pagination.setBaseLink("videos.cfm?action=topviewed&time=#url.time#") />
<cfelse>
<cfset pagination.setBaseLink("videos.cfm?action=topviewed") />
</cfif>
<cfelseif IsDefined('URL.action') AND url.action IS 'topdiscussed'>
<cfif isDefined('url.time')>
<cfset pagination.setBaseLink("videos.cfm?action=topdiscussed&time=#url.time#") />
<cfelse>
<cfset pagination.setBaseLink("videos.cfm?action=topdiscussed") />
</cfif>
<cfelseif IsDefined('URL.action') AND url.action IS 'toplinked'>
<cfif isDefined('url.time')>
<cfset pagination.setBaseLink("videos.cfm?action=toplinked&time=#url.time#") />
<cfelse>
<cfset pagination.setBaseLink("videos.cfm?action=toplinked") />
</cfif>
<cfelseif IsDefined('URL.action') AND url.action IS 'toprecent'>
<cfset pagination.setBaseLink("videos.cfm?action=toprecent") />
<cfelseif IsDefined('URL.action') AND url.action IS 'toprespond'>
<cfif isDefined('url.time')>
<cfset pagination.setBaseLink("videos.cfm?action=toprespond&time=#url.time#") />
<cfelse>
<cfset pagination.setBaseLink("videos.cfm?action=toprespond") />
</cfif>
<cfelseif IsDefined('URL.action') AND url.action IS 'topFavs'>
<cfif isDefined('url.time')>
<cfset pagination.setBaseLink("videos.cfm?action=topFavs&time=#url.time#") />
<cfelse>
<cfset pagination.setBaseLink("videos.cfm?action=topFavs") />
</cfif>
<cfelseif IsDefined('URL.action') AND url.action IS 'mobiles'>
<cfset pagination.setBaseLink("videos.cfm?action=mobiles") />
<cfelseif IsDefined('URL.action') AND url.action IS 'author'>
<cfif isDefined('url.code')>
<cfset pagination.setBaseLink("videos.cfm?action=author&code=#url.code#") />
<cfelse>
<cfset pagination.setBaseLink("videos.cfm?action=author") />
</cfif>
<cfelseif IsDefined('URL.action') AND url.action IS 'categories'>
<cfset pagination.setBaseLink("videos.cfm?action=categories&catname=#url.catname#&ID=#url.ID#") />
<cfelseif IsDefined('URL.action') AND url.action IS 'subcategories'>
<cfset pagination.setBaseLink("videos.cfm?action=subcategories&subcatname=#url.subcatname#&subID=#url.subID#") />
<cfelse>
<cfset pagination.setBaseLink("videos.cfm?searchvideos=#url.searchvideos#&action=Go") />
</cfif>
<cfset pagination.setItemsPerPage(12) />
<cfset pagination.setShowNumericLinks(true) />
<cfset pagination.getTotalNumberOfPages()/>