| [5] | 1 | <cfsetting enablecfoutputonly=true> |
|---|
| 2 | <cfprocessingdirective pageencoding="utf-8"> |
|---|
| 3 | <!--- |
|---|
| 4 | Name : unsubscribe.cfm |
|---|
| 5 | Author : Raymond Camden |
|---|
| 6 | Created : October 20, 2004 |
|---|
| 7 | Last Updated : August 20, 2006 |
|---|
| 8 | History : Removed mapping (3/20/05) |
|---|
| 9 | Adding cfsetting, procdirective (rkc 7/21/05) |
|---|
| 10 | Use of rb (rkc 8/20/06) |
|---|
| 11 | Purpose : Allows you to unsubscribe |
|---|
| 12 | ---> |
|---|
| 13 | |
|---|
| 14 | <cfif not isDefined("url.email")> |
|---|
| 15 | <cflocation url = "#application.blog.getProperty("blogURL")#"> |
|---|
| 16 | </cfif> |
|---|
| 17 | |
|---|
| 18 | |
|---|
| 19 | <cfmodule template="tags/layout.cfm" title="#rb("unsubscribe")#"> |
|---|
| 20 | |
|---|
| 21 | <cfoutput> |
|---|
| 22 | <div class="date">#rb("unsubscribe")#</div> |
|---|
| 23 | </cfoutput> |
|---|
| 24 | |
|---|
| 25 | <cfif isDefined("url.commentID")> |
|---|
| 26 | |
|---|
| 27 | <!--- Attempt to unsub ---> |
|---|
| 28 | <cftry> |
|---|
| 29 | <cfset result = application.blog.unsubscribeThread(url.commentID, url.email)> |
|---|
| 30 | <cfcatch> |
|---|
| 31 | <cfset result = false> |
|---|
| 32 | </cfcatch> |
|---|
| 33 | </cftry> |
|---|
| 34 | |
|---|
| 35 | <cfif result> |
|---|
| 36 | <cfoutput> |
|---|
| 37 | <p>#rb("unsubscribesuccess")#</p> |
|---|
| 38 | </cfoutput> |
|---|
| 39 | <cfelse> |
|---|
| 40 | <cfoutput> |
|---|
| 41 | <p>#rb("unsubscribefailure")#</p> |
|---|
| 42 | </cfoutput> |
|---|
| 43 | </cfif> |
|---|
| 44 | |
|---|
| 45 | <cfelseif isDefined("url.token")> |
|---|
| 46 | |
|---|
| 47 | <!--- Attempt to unsub ---> |
|---|
| 48 | <cftry> |
|---|
| 49 | <cfset result = application.blog.removeSubscriber(url.email, url.token)> |
|---|
| 50 | <cfcatch> |
|---|
| 51 | <cfset result = false> |
|---|
| 52 | </cfcatch> |
|---|
| 53 | </cftry> |
|---|
| 54 | |
|---|
| 55 | <cfif result> |
|---|
| 56 | <cfoutput> |
|---|
| 57 | <p>#rb("unsubscribeblogsuccess")#</p> |
|---|
| 58 | </cfoutput> |
|---|
| 59 | <cfelse> |
|---|
| 60 | <cfoutput> |
|---|
| 61 | <p>#rb("unsubscribeblogfailure")#</p> |
|---|
| 62 | </cfoutput> |
|---|
| 63 | </cfif> |
|---|
| 64 | |
|---|
| 65 | </cfif> |
|---|
| 66 | |
|---|
| 67 | <cfoutput><p><a href="#application.blog.getProperty("blogurl")#">#rb("returntoblog")#</a></p></cfoutput> |
|---|
| 68 | |
|---|
| 69 | </cfmodule> |
|---|
| 70 | <cfsetting enablecfoutputonly=false> |
|---|