root/trunk/website/blog/admin/subscribers.cfm @ 32

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

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

Line 
1<cfsetting enablecfoutputonly=true>
2<cfprocessingdirective pageencoding="utf-8">
3<!---
4        Name         : C:\projects\blogcfc5\client\admin\subscribers.cfm
5        Author       : Raymond Camden
6        Created      : 04/07/06
7        Last Updated : 7/21/06
8        History      : Show how many people are verified (rkc 7/7/06)
9                                 : Button to let you nuke all the unverified people at once. (rkc 7/21/06)
10--->
11
12<!--- handle deletes --->
13<cfif structKeyExists(form, "mark")>
14        <cfloop index="u" list="#form.mark#">
15                <cfset application.blog.removeSubscriber(u)>
16        </cfloop>
17</cfif>
18
19<!--- handle mass delete --->
20<cfif structKeyExists(form, "nukeunverified")>
21                <cfset application.blog.removeUnverifiedSubscribers()>
22</cfif>
23
24<cfif structKeyExists(url, "verify")>
25        <cfset application.blog.confirmSubscription(email=url.verify)>
26</cfif>
27
28<cfset subscribers = application.blog.getSubscribers()>
29
30<cfquery name="verifiedSubscriber" dbtype="query">
31select  count(email) as total
32from    subscribers
33where   verified = 1
34</cfquery>
35
36<cfmodule template="../tags/adminlayout.cfm" title="Subscribers">
37
38        <cfoutput>
39        <p>
40        Your blog currently has
41                <cfif subscribers.recordCount gt 1>
42                #subscribers.recordcount# subscribers
43                <cfelseif subscribers.recordCount is 1>
44                1 subscriber
45                <cfelse>
46                0 subscribers
47                </cfif>. There <cfif verifiedSubscriber.total is 1>is<cfelse>are</cfif> <cfif verifiedSubscriber.total neq "">#verifiedSubscriber.total#<cfelse>no</cfif> <b>verified</b> subscriber<cfif verifiedSubscriber.total is not 1>s</cfif>.
48        </p>
49       
50        <p>
51        You may use the button below to delete all non-verified subscribers. You should note that this will delete ALL of them,
52        even people who just subscribed a minute ago. This should be used rarely!
53        </p>
54       
55        <form action="subscribers.cfm" method="post">
56        <input type="submit" name="nukeunverified" value="Remove Unverified">
57        </form>
58        </cfoutput>
59       
60        <cfmodule template="../tags/datatable.cfm" data="#subscribers#" editlink="" label="Subscribers"
61                          linkcol="" linkval="email" showAdd="false" defaultsort="email">
62                <cfmodule template="../tags/datacol.cfm" colname="email" label="Email" />
63                <cfmodule template="../tags/datacol.cfm" colname="verified" label="Verified" format="yesno"/>
64                <cfmodule template="../tags/datacol.cfm" label="Verify" data="<a href=""subscribers.cfm?verify=$email$"">Verify</a>" sort="false"/>
65               
66        </cfmodule>
67       
68</cfmodule>
69
70
71<cfsetting enablecfoutputonly=false>
Note: See TracBrowser for help on using the browser.