-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdirectory.cfm
More file actions
42 lines (34 loc) · 1.15 KB
/
directory.cfm
File metadata and controls
42 lines (34 loc) · 1.15 KB
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
<cfparam name="url.directory" default="#expandPath('/')#" />
<cfsetting requesttimeout="900" />
<cf_layout title="Directory Listing" directory="#url.directory#">
<!--- if it's just a file check, forward to the appropriate place --->
<cfif Not directoryExists(url.directory)>
<cflocation url="file.cfm?file=#url.directory#" />
</cfif>
<cfset complexityReport = application.complexity.getDirectoryComplexityReport(url.directory) />
<cfset dirReport = complexityReport.getDirectoryReport() />
<cfoutput><h2>Directory #url.directory#</h2></cfoutput>
<table class="dirReport">
<thead>
<tr>
<td>Path</td>
<td>Complexity</td>
</tr>
</thead>
<tbody>
<cfoutput query="dirReport">
<tr>
<td><cfif type EQ "file"><a href="file.cfm?directory=#url.directory#&file=#path#" class="mono">#relativePath#</a><cfelse>#relativePath#</cfif></td>
<td align="right"><cfif complexity>#complexity#<cfelse>--</cfif></td>
</tr>
</cfoutput>
</tbody>
</table>
<script type="text/javascript">
$("table.dirReport tbody tr").colorFade(function(){
return parseInt($(this).find("td:last").html());
}, function(){
return $(this);//.find("td:last");
});
</script>
</cf_layout>