Hi all, Im trying to get my script to let users change and upload into sub-DIR's and also for the script to add the size of the files in the sub DIR's to the file in the root DIR and i would to print the list like this
A_dir
B_dir
A_file
B_file
===============================================
This is the code im using now
@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($s
+tat[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{'u
+sername'}/$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>~;
I have setup a temp accout so that you can see what it dose now and maby it will help you see what i mean.
CLICK HERE
just use this to log-ig
username-temp
password-temp
Thank You
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.