| 1 | <cfsetting enablecfoutputonly=true> |
|---|
| 2 | <cfprocessingdirective pageencoding="utf-8"> |
|---|
| 3 | <!--- |
|---|
| 4 | Name : /client/admin/index.cfm |
|---|
| 5 | Author : Raymond Camden |
|---|
| 6 | Created : 04/06/06 |
|---|
| 7 | Last Updated : 8/1/07 |
|---|
| 8 | History : Added blog name (rkc 5/17/06) |
|---|
| 9 | : typo (rkc 8/20/06) |
|---|
| 10 | : JS alert when coming from settings page (rkc 9/5/06) |
|---|
| 11 | : htmlEditFormat the title (rkc 10/12/06) |
|---|
| 12 | : added top entries for past 7 days (rkc 2/28/07) |
|---|
| 13 | : fixed link to my blog, made "past few days" say seven to be more clear (rkc 8/1/07) |
|---|
| 14 | ---> |
|---|
| 15 | |
|---|
| 16 | <!--- As with my stats page, this should most likely be abstracted into the CFC. ---> |
|---|
| 17 | <cfset dsn = application.blog.getProperty("dsn")> |
|---|
| 18 | <cfset blog = application.blog.getProperty("name")> |
|---|
| 19 | <cfset sevendaysago = dateAdd("d", -7, now())> |
|---|
| 20 | <cfset username = application.blog.getProperty("username")> |
|---|
| 21 | <cfset password = application.blog.getProperty("password")> |
|---|
| 22 | |
|---|
| 23 | <cfquery name="topByViews" datasource="#dsn#" maxrows="5" username="#username#" password="#password#"> |
|---|
| 24 | select id, title, views, posted |
|---|
| 25 | from tblblogentries |
|---|
| 26 | where tblblogentries.blog = <cfqueryparam cfsqltype="cf_sql_varchar" value="#blog#"> |
|---|
| 27 | and posted > <cfqueryparam cfsqltype="cf_sql_timestamp" value="#sevendaysago#"> |
|---|
| 28 | order by views desc |
|---|
| 29 | </cfquery> |
|---|
| 30 | |
|---|
| 31 | <cfmodule template="../tags/adminlayout.cfm" title="Welcome"> |
|---|
| 32 | |
|---|
| 33 | <cfif structKeyExists(url, "reinit")> |
|---|
| 34 | <cfoutput> |
|---|
| 35 | <div style="margin: 15px 0; padding: 15px; border: 5px solid ##cd6f6f; background-color: ##f79992; color: ##c54043; font-weight: bold; text-align: center;"> |
|---|
| 36 | Your blog cache has been refreshed. |
|---|
| 37 | </div> |
|---|
| 38 | </cfoutput> |
|---|
| 39 | </cfif> |
|---|
| 40 | |
|---|
| 41 | |
|---|
| 42 | <cfoutput> |
|---|
| 43 | <h3>About</h3> |
|---|
| 44 | <p> |
|---|
| 45 | Welcome to BlogCFC Administrator. You are running BlogCFC version #application.blog.getVersion()#. This blog is named |
|---|
| 46 | #htmlEditFormat(application.blog.getProperty("blogtitle"))#. For more information, please visit the BlogCFC blog at <a href="http://www.blogcfc.com">http://www.blogcfc.com</a>. |
|---|
| 47 | BlogCFC was created by <a href="http://www.coldfusionjedi.com">Raymond Camden</a>. For support, please visit the <a href="http://www.coldfusionjedi.com/forums/forums.cfm?conferenceid=CBD210FD-AB88-8875-EBDE545BF7B67269">forums</a> |
|---|
| 48 | or send me an <a href="mailto:ray@camdenfamily.com">email</a>. |
|---|
| 49 | </p> |
|---|
| 50 | |
|---|
| 51 | <cfif topByViews.recordCount> |
|---|
| 52 | <h3>Top Entries</h3> |
|---|
| 53 | <p> |
|---|
| 54 | Here are the top entries over the past seven days based on the number of views: |
|---|
| 55 | </p> |
|---|
| 56 | <p> |
|---|
| 57 | <cfloop query="topByViews"> |
|---|
| 58 | <a href="#application.blog.makeLink(id)#">#title#</a> (#views#)<br/> |
|---|
| 59 | </cfloop> |
|---|
| 60 | </p> |
|---|
| 61 | </cfif> |
|---|
| 62 | |
|---|
| 63 | <h3>Credits</h3> |
|---|
| 64 | <p> |
|---|
| 65 | BlogCFC has had the support and active help of <i>many</i> people. I'd like to especially thank Scott Stroz, Jeff Coughlin, Charlie Griefer, and Paul Hastings. BlogCFC |
|---|
| 66 | also makes use of Lyla Captcha from Peter Farrell. The administrator makes use of the Spry framework from Adobe. |
|---|
| 67 | </p> |
|---|
| 68 | |
|---|
| 69 | <h3>Support</h3> |
|---|
| 70 | <p> |
|---|
| 71 | If you find this blog useful, please consider visiting my <a href="http://www.amazon.com/o/registry/2TCL1D08EZEYE">wishlist</a>. |
|---|
| 72 | </cfoutput> |
|---|
| 73 | |
|---|
| 74 | </cfmodule> |
|---|
| 75 | |
|---|
| 76 | <cfsetting enablecfoutputonly=false> |
|---|