Building a Dual Pane File Manager

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bohn002
    New Member
    • May 2007
    • 1

    Building a Dual Pane File Manager

    I am using php to display 2 folders contents in a dual pane form. Folder A and Folder B. I generate checkboxes next to each file, and want to use a submit button to change what folder the file appears in. i.e. Move File 4 into Folder A from File B by checking the box and hitting the Move to Folder A button. here is what I have so far.[PHP]<html>
    <head>
    </head>
    <body>
    <form id="file_mover" >
    <TABLE BORDER=5 CELLPADDING=10 CELLSPACING=10 ALIGN="CENTER">
    <TR>
    <TD><?php
    $dir = scandir('.');
    $files = count( $dir );
    for ( $i = 0; $i < $files; $i++ )
    {
    if ( is_file($dir[$i]) )
    echo "<input type='checkbox' name='filename[]' value=$ip><a href=\"$dir[$i]\">$dir[$i]</a><br>";
    }
    ?></TD>
    <TD><?php
    $dir = scandir('.');
    $files = count( $dir );
    $filename = array_shift(exp lode('?', basename('')));
    for ( $i = 0; $i < $files; $i++ )
    {
    if ( is_file($dir[$i]) )
    echo "<input type='checkbox' name='filename[]' value=$iu><a href=\"$dir[$i]\">$dir[$i]</a><br>";
    }
    ?></TD>
    </TR>
    <TR ALIGN="CENTER">
    <TD><input type="button" value="Move to Published" onclick="moveTo Published();"></TD>
    <TD><input type="button" value="Move to Unpublished" onclick="moveTo Unpublished();" ></TD>
    </TR>
    </TABLE>
    </form>
    </body>
    </html>
    [/PHP]
    I am getting a bit lost so any help would be great!
  • pbmods
    Recognized Expert Expert
    • Apr 2007
    • 5821

    #2
    Originally posted by bohn002
    I am getting a bit lost so any help would be great!
    As in... it's not working? It's not working the way you thought it would? It's working great but you have no idea why?

    Comment

    Working...