
G_Man
stranger
Nov 20, 2001, 7:01 PM
Post #1 of 1
(151 views)
|
|
how to make this also show sub folders??
|
Can't Post
|
|
Im trying to find a way to make this code also show sub folders and i need it to add all the files sizes in the sub folders to the file sizes in the root DIR, and i would like it to show the DIR list like this <A_folder> <B_folder> A_file B_file ------------------------------------------------- heres the code i have now sub manager_html { print qq~ <html> <head> <title>..::Clan [ptbs] Web Hosting::.. $in{'username'}</title> <style> input { color: #000000; font-family: Monospac821 BT; font-size: 8pt; background-color: #A0A0A0; border-style: ridge; border-color: #909090 } </style> </head> <body bgcolor="#000000" text="#FFFFFF" link="#999999" vlink="#CCCCCC" alink="#666666" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> <p align="center"><big><big><strong><font face="Arial">Clan [ptbs] Web Hosting v1.0</font></strong></big></big></p> <p align="center"><font face="Arial">Hello $user_info[2], your website URL is <a href="$config{'root_url'}/$in{'username'}/">$config{'root_url'}/$in{'username'}/</a></font></p> ~; @dir = sort {lc($a) cmp lc($b)} @dir; foreach $line (@dir) { if (-f "$config{'root_dir'}/$in{'username'}/$line") { @stat=stat("$config{'root_dir'}/$in{'username'}/$line"); if ($stat[7] > 1000) { $stat[7] *= .001; $stat[7] = int($stat[7]); $stat[7] .= " KB"; } else { $stat[7] = int($stat[7]); $stat[7] .= " Bytes"; } $stat[9] = localtime($stat[9]); $list .= qq~ <tr> <td width="30"><input type="radio" value="$line" name="file" onclick="document.files.file_input.value='$line'"></td> <td width="250"><font face="Arial"><a href="$config{'root_url'}/$in{'username'}/$line" target="_window">$line</a></font></td> <td width="100"><font face="Arial">$stat[7]</font></td> <td><font face="Arial">$stat[9]</font></td> </tr>~; } } if ($list) { print qq~ <form method="POST" name="files"> <input type="hidden" name="password" value="$in{'password'}"><input type="hidden" name="username" value="$in{'username'}"> <div align="center"><center><table border="0" cellpadding="0" cellspacing="0" bgcolor="#999999"> <tr> <td><table border="0" cellpadding="2" cellspacing="1" width="600"> <tr> <td><strong><font face="Arial" color="#000000">Files</font></strong></td> </tr> <tr> <td bgcolor="#000000"> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td width="30"><strong><font face="Arial"> </font></strong></td> <td width="250"><strong><font face="Arial">Name</font></strong></td> <td width="100"><strong><font face="Arial">Size</font></strong></td> <td><strong><font face="Arial">Date</font></strong></td> </tr> $list </table> <p><input type="submit" value="Delete" name="delete"> <input type="submit" value="Rename" name="rename"> <input type="text" name="file_input" size="20"></td> </tr> </table> </td> </tr> </table> </center></div> </form> ~; } print qq~ <form method="POST" enctype="multipart/form-data"> <input type="hidden" name="password" value="$in{'password'}"><input type="hidden" name="username" value="$in{'username'}"> <div align="center"><center><table border="0" cellpadding="0" cellspacing="0" bgcolor="#999999"> <tr> <td><table border="0" cellpadding="2" cellspacing="1" width="600"> <tr> <td><font face="Arial" color="#000000"><strong>Upload</strong></font></td> </tr> <tr> <td bgcolor="#000000"><table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td width="50%"><input type="file" name="file1" size="20"> <input type="file" name="file2" size="20"> <input type="file" name="file3" size="20"> <input type="file" name="file4" size="20"> <input type="file" name="file5" size="20"><p> <input type="submit" value="Upload" name="upload"></td> <td width="50%"><div align="center"><center><p><font face="Arial">Usage: <strong>$usage KB</strong> Available: <strong>$available KB</strong> Total: <strong>$config{'space_limit'} KB</strong></font></td> </tr> </table> </td> </tr> </table> </td> </tr> </table> </center></div> </form> </body> </html> ~; }
|