Ejemplo n.º 1
0
            if ($_SESSION['logged_in']) {
                echo '<div style="float:right"><img border="0" src="dirLIST_files/edit_files/edit.png" onclick="show_div(1, \'' . $count . '\');" style="cursor:pointer"></div>';
            }
            echo '</td>';
            echo '<td width="' . $width_of_sizes_column . '">' . letter_size($files['size'][$key]) . '</td>
		<td width="' . $width_of_dates_column . '">' . $files['date'][$key] . '</td></tr>';
            $count++;
            echo '';
        }
        echo '</table>';
    }
    //Palce the content into a table -done
}
//Output if the directory is empty
if (empty($folders['name']) && empty($files['name'])) {
    echo display_error_message('No files or folders in this directory: <span class="path_font"><b>' . $url_folder . '</b></span>');
}
//Output if the directory is empty -done
//Display load time
if ($load_time == 1) {
    echo "<br>" . $local_text['this_page_loaded_in'] . " " . sprintf("%.3f", array_sum(explode(" ", microtime())) - $start_time) . " " . $local_text['seconds'];
}
//File uploading
if ($file_uploads == 1 && $listing_mode == 0) {
    ?>
<br />
<br />
<table width="<?php 
    echo $table_width;
    ?>
" border="0" cellpadding="2" cellspacing="2" class="table_border">
Ejemplo n.º 2
0
require '../config.php';
require '../functions.php';
$local_text = empty($_SESSION['lang_id']) ? set_local_text(0) : set_local_text($_SESSION['lang_id']);
$rename_action = FALSE;
if ($_POST['Submit'] == 'Rename') {
    if ($listing_mode == 0) {
        $old_name = '../../' . $dir_to_browse . '/' . base64_decode($_GET['folder']) . '/' . base64_decode($_GET['item_name']);
        $new_name = '../../' . $dir_to_browse . '/' . base64_decode($_GET['folder']) . '/' . $_POST['new_name'];
        if (rename($old_name, $new_name)) {
            $rename_action = TRUE;
        } else {
            die('Could not rename file/folder. Permission denied');
        }
    } elseif ($listing_mode == 1) {
        $ftp_stream = ftp_connect($ftp_host) or die(display_error_message("<b>Could not connect to FTP host</b>"));
        ftp_login($ftp_stream, $ftp_username, $ftp_password) or die(display_error_message("<b>Could not login to FTP host</b>"));
        $old_name = $dir_to_browse . base64_decode($_GET['folder']) . '/' . base64_decode($_GET['item_name']);
        $new_name = $dir_to_browse . base64_decode($_GET['folder']) . '/' . $_POST['new_name'];
        if (@ftp_rename($ftp_stream, $old_name, $new_name)) {
            $rename_action = TRUE;
        } else {
            die('Could not rename file/folder. Permission denied');
        }
    }
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>dirLIST - Rename File/Folder</title>
Ejemplo n.º 3
0
 ?>"></td>
              <td><?php 
        echo $row['Subject'];
        ?>
</td>
              <td><?php 
        echo $row['ControlNo'];
        ?>
</td>  
              <td><?php 
        echo $row['FName'] . " " . $row['LName'];
        ?>
</td>       
              <td><?php 
        echo $row['Description'];
        ?>
</td>
            </tr>  
        <?php 
    }
    echo "</table>";
} else {
    echo display_error_message('This Subject is empty');
}
?>
      </div> 
    </div>      
  </div>
 </form> 

Ejemplo n.º 4
0
            echo '<tr class="' . $file_class . '">
			<td width="' . $width_of_files_column . '">';
            echo '<div style="float:left;width:' . ($width_of_files_column - 40) . 'px">';
            if ($file_icons == 1) {
                echo '<img width="30" height="30" src="dirLIST_files/icons/' . $files_icons_array[$key] . '">';
            }
            $file_link = $limit_download_speed == 1 || $listing_mode == 1 ? 'dirLIST_files/download.php?file=' . base64_encode($files['link'][$key]) : $files['link'][$key];
            echo $files['name'][$key] . '</div>';
            if ($_SESSION['logged_in']) {
                echo '<div style="float:right"><img border="0" src="dirLIST_files/edit_files/edit.png" onclick="show_div(1, \'' . $count . '\');" style="cursor:pointer"></div>';
            }
            echo '</td>';
            echo '<td width="' . $width_of_sizes_column . '">' . letter_size($files['size'][$key]) . '</td>
			<td width="' . $width_of_dates_column . '">' . $files['date'][$key] . '</td></tr>';
            $count++;
            echo '';
        }
        ?>
			</table>
	<?php 
    }
    //Palce the content into a table -done
}
//Output if the directory is empty
if (empty($folders['name']) && empty($files['name'])) {
    echo display_error_message('This folder is empty');
}
//Output if the directory is empty -done
?>

}
while ($dn_entry = ldif_fetch_dn_entry()) {
    $action = ldif_get_action();
    if ($action == "add") {
        echo "Adding dn:" . utf8_decode($dn_entry) . "... ";
        flush();
        if ($attributes = ldif_fetch_attributes_for_entry()) {
            if (@ldap_add($ds, $dn_entry, $attributes)) {
                echo "<span style=\"color:green;\">Success</span><br>";
            } else {
                echo "<span style=\"color:red;\">failed</span><br><br>";
                pla_error("Could not add object: " . htmlspecialchars(utf8_decode($dn)), ldap_error($ds), ldap_errno($ds));
            }
        } else {
            echo "<span style=\"color:red;\">failed</span><br><br>";
            echo "<div style=\"color:red\">" . display_error_message(ldif_error_message()) . "</div>";
            flush();
        }
    } elseif ($action == "delete") {
        echo "Deleting dn: " . $dn_entry . " ";
        if (@ldap_delete($ds, $dn_entry)) {
            echo "<span style=\"color:green;\">Success</span><br>";
            flush();
        } else {
            echo "<span style=\"color:red;\">Failed</span><br><br>";
            flush();
            pla_error("Could not delete object: " . htmlspecialchars(utf8_decode($dn)), ldap_error($ds), ldap_errno($ds));
        }
    }
}
reload_left_frame();