Skip to content

Instantly share code, notes, and snippets.

@PintuKumarPal
Last active December 22, 2015 06:19
Show Gist options
  • Save PintuKumarPal/6429786 to your computer and use it in GitHub Desktop.
Save PintuKumarPal/6429786 to your computer and use it in GitHub Desktop.
<cfoutput>
<script Language="JavaScript">
var popUpWin2=0;
function OpenPopUp(URLStr, left, top, width, height, winName)
{
if(popUpWin2)
{
if(!popUpWin2.closed) popUpWin2.close();
}
popUpWin2 = window.open(URLStr, winName, 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}
</script>
<table width="500" cellpadding="0" cellspacing="7" border="0" bordercolor="red" bgcolor="##ffffff">
<tr>
<td align="center" valign="middle">
<table width="100%" cellpadding="0" cellspacing="0" border="0" bordercolor="Blue">
<tr>
<td valign="top" align="left">
&nbsp;&nbsp;<font class="BHeading">Uploaded Files</font>
</td>
<td valign="middle" align="right" width="100">
<a href="javascript:OpenPopUp('uploadfiles.cfm?',100,100,850,500,'PopUp');"><input type="button" value="UploadFiles" border="0" /></a></td>
</tr>
</table>
<table border="0" width="100%" cellpadding="0" cellspacing="1" bordercolor="Green">
<tr><td height="5"></td></tr>
<tr>
<td colspan="9" height="1" bgcolor="##ffffff"></td>
</tr>
<CFDIRECTORY action="LIST" DIRECTORY="E:\ColdFusion10\cfusion\wwwroot\AjaxUpload\uploads" NAME="Files" SORT="datelastmodified DESC">
<cfif Files.recordcount NEQ 0>
<tr>
<td valign="top" align="left" bgcolor="##ffffff">
&nbsp;&nbsp;Document Name
</td>
<td valign="top" align="left" bgcolor="##ffffff">
&nbsp;&nbsp;File Size
</td>
<td valign="top" align="left" width="100" bgcolor="##ffffff">
&nbsp;&nbsp;Upload Date
</td>
</tr>
<tr><td colspan="9" height="1" bgcolor="##ffffff"></td></tr>
<cfset Total=0>
<cfset FileSize=0>
<cfloop query="Files">
<tr>
<td valign="top" align="left" >
&nbsp;&nbsp;#Name#
</td>
<td valign="top" align="left" >
&nbsp;&nbsp;#NumberFormat(Evaluate(Size/1024),'______.__')# KB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</td>
<td valign="top" align="left" >
&nbsp;&nbsp;#DateFormat(dateLastModified,'dd-mmm-yyyy')#
</td>
</tr>
</cfloop>
</table>
<cfelse>
<center>
<br><br>
<table width="100%">
<tr>
<td align="center">
<font class="Title">Sorry, no records found.<br><br></font><br>
</td>
</tr>
</table>
</center>
</cfif>
</td>
</tr>
</table>
</cfoutput>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment