Example #1
0
if (!empty($_GET['start'])) {
    $from = $_GET['start'];
}
$stats = file_exists($_SESSION['stats_file']) ? unserialize(gzinflate(base64_decode(substr(file_get_contents($_SESSION['stats_file']), 9, -strlen(6))))) : array();
$stats = array_reverse($stats);
if (empty($stats)) {
    $message = e('No stats', false);
} else {
    for ($index = $from; $index < $from + $_SESSION['stats_max_lines']; $index++) {
        //($stats as $client){
        if (!empty($stats[$index])) {
            $log_list .= '
				<tr>
					<td class="date">' . date("d/m/Y", strtotime($stats[$index]['date'])) . '</td>
					<td class="file">' . $stats[$index]['file'] . ' (' . $stats[$index]['id'] . ')</td>
					<td class="owner">' . return_owner($stats[$index]['id']) . '</td>
					<td class="ip">' . $stats[$index]['ip'] . '</td>
					<td class="origin">' . $stats[$index]['referrer'] . '</td>
					<td class="host">' . $stats[$index]['host'] . '</td>
				</tr>';
        }
    }
}
$t = returnToken();
if (!empty($stats[$from + $_SESSION['stats_max_lines']])) {
    $start = $from + $_SESSION['stats_max_lines'];
    $button_next = '<a class="button" href="index.php?p=stats&start=' . $start . '&token=' . $t . '">&#8680;</a>';
}
if ($from > 0) {
    $start = $from - $_SESSION['stats_max_lines'];
    if ($start < 0) {
Example #2
0
                                header('Content-Transfer-Encoding: binary');
                                header('Content-Length: ' . filesize($f));
                                # lance le téléchargement des fichiers non affichables
                                header('Content-Disposition: attachment; filename="' . _basename($f) . '"');
                                readfile($f);
                            }
                        }
                    }
                }
                # burn access ?
                burned($id);
                exit;
            } else {
                if ($f && is_dir($f)) {
                    # folder request: return the folder & subfolders tree
                    $tree = tree($f, return_owner($id), false, true);
                    if (!isset($_GET['rss']) && !isset($_GET['json'])) {
                        # no html, header etc for rss feed & json data
                        require THEME_PATH . '/header.php';
                        echo $qrcode;
                        echo '<div id="share">';
                        draw_tree($tree);
                        echo '</div>';
                        echo '
						<div class="feeds">' . $call_qrcode;
                        if ($allow_shared_folder_RSS_feed || $allow_shared_folder_JSON_feed) {
                            echo '<br/>' . e('This page in', false);
                        }
                        if ($allow_shared_folder_RSS_feed) {
                            echo ' <a href="' . $_SESSION['home'] . '?f=' . $id . '&rss" class="rss btn">RSS</a>';
                        }
Example #3
0
        rename($oldfile, $newfile);
        if (is_file(get_thumbs_name($oldfile))) {
            rename(get_thumbs_name($oldfile), get_thumbs_name($newfile));
        }
        $tree = rename_branch($newfile, $oldfile, $_GET['id'], $_SESSION['login'], $tree);
    }
    header('location:index.php?p=admin&token=' . TOKEN);
    exit;
}
# zip and download a folder
if (!empty($_GET['zipfolder']) && $_SESSION['zip']) {
    $folder = id2file($_GET['zipfolder']);
    if (!is_dir($_SESSION['temp_folder'])) {
        mkdir($_SESSION['temp_folder']);
    }
    $zipfile = $_SESSION['temp_folder'] . return_owner($_GET['zipfolder']) . '-' . _basename($folder) . '.zip';
    zip($folder, $zipfile);
    header('location: ' . $zipfile);
    exit;
}
######################################################################
# $_POST DATA
######################################################################
# Move file folder
if (!empty($_POST['file']) && !empty($_POST['destination'])) {
    # init
    $destination = $to = $_POST['destination'];
    $file = $_POST['file'];
    $me = _basename($file);
    if ($destination == '/') {
        $destination = '';