table_expand_width BGCOLOR=$default->main_header_bgcolor CELLSPACING=0 CELLPADDING=0 BORDER=$default->table_border HEIGHT=30>"); ?> "); } print uid_to_name($userid); print (""); ?> $lang_logout");?> "); ?>

table_expand_width BGCOLOR=$default->main_header_bgcolor CELLSPACING=0 CELLPADDING=0 BORDER=$default->table_border HEIGHT=30>"); ?> "); } print uid_to_name($userid); print (""); ?> $lang_logout");?> "); ?>

owl_root_url/locale/$default->owl_lang/graphics/icons/blank.gif' height=16 width=18 align=top>"; if ($fDepth) print ""; $gray=0; // Work out when to gray out folders ... if ($fid==$excludeID) $gray=1; // current parent for all moves if (($action=="folder") && ($fid==$id)) $gray=1; // subtree for folder moves if (check_auth($fid, "folder_modify", $userid) == 0) $gray = 1; // check for permissions if ($gray) { print ""; print " $folder
\n"; } else { print " $folder
\n"; } if (($action=="folder") && ($fid==$id)) return; // Don't show subtree of selected folder as target for folder move for ($c=0; $c<$fCount; $c++) { if ($folderList[$c][2]==$fid) { $fDepth++; showFoldersIn( $folderList[$c][0] , $folderList[$c][1] ); $fDepth--; } } } if ($action=="$lang_cancel_button") { header("Location: browse.php?sess=$sess&parent=$parent&expand=$expand&order=$order&$sortorder=$sortname"); exit(); } checkForNewFolder(); if (isset($newFolder)) { $sql = new Owl_DB; $source=""; $fID=$parent; do { $sql->query("select name,parent from $default->owl_folders_table where id='$fID'"); while($sql->next_record()) { $tName = $sql->f("name"); $fID = $sql->f("parent"); } $source=$tName."/".$source; } while ($fID != 0); $dest=""; $fID=$newFolder; do { $sql->query("select name,parent from $default->owl_folders_table where id='$fID'"); while($sql->next_record()) { $tName = $sql->f("name"); $fID = $sql->f("parent"); } $dest=$tName."/".$dest; } while ($fID != 0); if ($action=="file") { $sql = new Owl_DB; $sql->query("select filename, parent from $default->owl_files_table where id = '$id'"); while($sql->next_record()) { $fname = $sql->f("filename"); $parent = $sql->f("parent"); } } else { $sql = new Owl_DB; $sql->query("select name, parent from $default->owl_folders_table where id='$id'"); while($sql->next_record()) { $fname = $sql->f("name"); $parent = $sql->f("parent"); } } if($default->owl_use_fs) { if ($type != "url") { if (!file_exists("$default->owl_FileDir/$dest$fname")) { if (substr(php_uname(), 0, 7) != "Windows") { $cmd="mv \"$default->owl_FileDir/$source$fname\" \"$default->owl_FileDir/$dest\" 2>&1"; $lines=array();$errco=0; $result = myExec($cmd,$lines,$errco); if ( $errco != 0 ) printError($lang_err_movecancel, $result); } else { // IF Windows just do a rename and hope for the best rename ("$default->owl_FileDir/$source$fname", "$default->owl_FileDir/$dest/$fname"); } } else printError($lang_err_fileexists,$result); } } if ($action=="file") { $sql->query("update $default->owl_files_table set parent='$newFolder' where id='$id'"); } else { $sql->query("update $default->owl_folders_table set parent='$newFolder' where id='$id'"); } header("Location: browse.php?sess=$sess&parent=$parent&expand=$expand&order=$order&$sortorder=$sortname"); } // First time through. Generate screen for selecting target directory include("./lib/header.inc"); print("table_expand_width BGCOLOR=$default->main_header_bgcolor CELLSPACING=0 CELLPADDING=0 BORDER=$default->table_border HEIGHT=30>"); ?>
"); } print uid_to_name($userid); print (""); ?> $lang_logout");?> ");?>
"); // Get information about file or directory we want to move if ($action=="file") { $sql = new Owl_DB; $sql->query("select filename, parent from $default->owl_files_table where id='$id'"); } else { $sql = new Owl_DB; $sql->query("select name, parent from $default->owl_folders_table where id='$id'"); } while($sql->next_record()) { if($action == "file") $fname = $sql->f("filename"); if($action == "folder") $fname = $sql->f("name"); $parent = $sql->f("parent"); } //print "

$lang_moving $action $fname. $lang_select

"; print "

$lang_moving $fname. $lang_select

"; ?>

query("select id,name,parent from $default->owl_folders_table order by name"); $i=0; while($sql->next_record()) { $folderList[$i][0] = $sql->f("id"); $folderList[$i][1] = $sql->f("name"); $folderList[$i][2] = $sql->f("parent"); $i++; } $fCount = count($folderList); $fDepth=0; $excludeID=$parent; // current location should not be a offered as a target showFoldersIn(1, fid_to_name("1")); ?>