Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
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

In reply to how can i also show sub folders by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2023-12-06 05:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?











    Results (29 votes). Check out past polls.

    Notices?