Created
October 21, 2009 22:12
-
-
Save modius/215522 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--- @@Copyright: Daemon Pty Limited 2002-2008, http://www.daemon.com.au ---> | |
<!--- @@License: | |
This file is part of FarCry. | |
FarCry is free software: you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by | |
the Free Software Foundation, either version 3 of the License, or | |
(at your option) any later version. | |
FarCry is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
GNU General Public License for more details. | |
You should have received a copy of the GNU General Public License | |
along with FarCry. If not, see <http://www.gnu.org/licenses/>. | |
---> | |
<!--- @@Description: Displays a summary of webskin usage. Logging Webskin Usage can be turned on using request.mode.bLogWebskinUsage ---> | |
<cfsetting enablecfoutputonly="yes"> | |
<!--- set up page header ---> | |
<cfimport taglib="/farcry/core/tags/admin/" prefix="admin" /> | |
<cfimport taglib="/farcry/core/tags/security/" prefix="sec" /> | |
<admin:header writingDir="#session.writingDir#" userLanguage="#session.userLanguage#"> | |
<cfset aContent = arrayNew(1) /> | |
<cfset arrayAppend(aContent,listSort(structKeyList(application.types),"textnocase","asc"))> | |
<cfset arrayAppend(aContent,listSort(structKeyList(application.rules),"textnocase","asc"))> | |
<cfoutput> | |
<a name="index" /> | |
<h1>Webskin Usage Summary</h1> | |
<table> | |
<tr> | |
<td> | |
<h3>Types</h3> | |
<ul> | |
<cfloop list="#aContent[1]#" index="i"> | |
<li><a href="###i#" >#application.stCoapi[i].displayName# (#i#)</a></li> | |
</cfloop> | |
</ul> | |
</td> | |
<td> | |
<h3>Rules</h3> | |
<ul> | |
<cfloop list="#aContent[2]#" index="i"> | |
<li><a href="###i#" >#application.stCoapi[i].displayName# (#i#)</a></li> | |
</cfloop> | |
</ul> | |
</td> | |
</tr> | |
</table> | |
</cfoutput> | |
<cfloop from="1" to="2" index="j"> | |
<cfloop list="#aContent[j]#" index="i"> | |
<cfoutput> | |
<a name="#i#" /> | |
<div style="float:right;"><a href="##index">top</a></div> | |
<h3>#application.stCoapi[i].displayName# (#i#)</h3> | |
<table> | |
<tr> | |
<th>Webskin</th> | |
<th>Path</th> | |
<th>Usage </th> | |
</tr> | |
</cfoutput> | |
<cfset qWebskins = application.stCoapi[i].qWebskins /> | |
<cfoutput query="qWebskins"> | |
<cfif structKeyExists(application.stCoapi[i].STWEBSKINS[qWebskins.methodname], "webskinUsageQty")> | |
<cfset usage = application.stCoapi[i].STWEBSKINS[qWebskins.methodname].webskinUsageQty /> | |
<cfelse> | |
<cfset usage = 0 /> | |
</cfif> | |
<tr> | |
<td>#qWebskins.displayName# (#qWebskins.name#)</td> | |
<td>#qWebskins.path#</td> | |
<td>#usage#</td> | |
</tr> | |
</cfoutput> | |
<cfoutput> | |
</table> | |
</cfoutput> | |
</cfloop> | |
</cfloop> | |
<admin:footer> | |
<cfsetting enablecfoutputonly="no"> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment