foreach ($tree as $branch) { $id_tree[file2id(substr($branch, $upload_path_size))] = $branch; } # burn access ? burned($id); exit(json_encode($id_tree)); } # RSS format of a shared folder (but not for a locked one) if (isset($_GET['rss']) && !empty($tree) && strlen($id) <= 23) { $rss = array('infos' => '', 'items' => ''); $rss['infos'] = array('title' => basename($f), 'description' => e('Rss feed of ', false) . basename($f), 'link' => htmlentities($_SESSION['home'] . '?f=' . $id . '&rss')); include 'core/Array2feed.php'; $upload_path_size = strlen($_SESSION['upload_path']); foreach ($tree as $branch) { $id_branch = file2id(substr($branch, $upload_path_size)); $rss['items'][] = array('title' => basename($branch), 'description' => '', 'pubDate' => makeRSSdate(date("d-m-Y H:i:s.", filemtime($branch))), 'link' => $_SESSION['home'] . '?f=' . $id_branch, 'guid' => $_SESSION['home'] . '?f=' . $id_branch); } array2feed($rss); # burn access ? burned($id); exit; } } } } else { $message = '<div class="error"> <br/> ' . e('This link is no longer available, sorry.', false) . ' <br/> </div>'; }
echo '<li><input type="checkbox" ' . $class . ' id="check_' . $login . '" value="' . $login . '" name="users[]"' . $check . '><label for="check_' . $login . '">' . $login . '</label></li>'; } } else { echo '<li class="empty">' . e('The users list is empty', false) . '</li>'; } exit; } // essayer de s'identifier ou de se déconnecter ? => auto_restrict if (!empty($_POST['pass']) && !empty($_POST['login']) || isset($_GET['logout']) || isset($_GET['deconnexion'])) { require_once __DIR__ . '/auto_restrict.php'; exit; } // afficher les statistiques en RSS if (isset($_GET['statrss']) && !empty($_GET['key']) && hash_user($_GET['key'])) { $rss = ['infos' => '', 'items' => '']; $rss['infos'] = ['title' => 'ShareMe - stats', 'description' => e('Rss feed of stats', false), 'link' => htmlentities($_SESSION['home'])]; include_once 'core/Array2feed.php'; $stats = load($_SESSION['stats_file']); for ($index = 0; $index < $_SESSION['stats_max_lines']; $index++) { if (!empty($stats[$index])) { $rss['items'][] = ['title' => $stats[$index]['file'], 'description' => '[ip:' . $stats[$index]['ip'] . '] ' . '[referrer:' . $stats[$index]['referrer'] . '] ' . '[host:' . $stats[$index]['host'] . '] ', 'pubDate' => makeRSSdate($stats[$index]['date']), 'link' => $_SESSION['home'] . '?f=' . $stats[$index]['id'], 'guid' => $_SESSION['home'] . '?f=' . $stats[$index]['id']]; } } array2feed($rss); exit; } // afficher les statistiques en Json if (isset($_GET['statjson']) && !empty($_GET['key']) && hash_user($_GET['key'])) { $stats = load($_SESSION['stats_file']); exit(json_encode($stats)); }