Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== Lotar's SlackBuilds Repository ====== <php> date_default_timezone_set('UTC'); $server_signature = sprintf('%s Server at <a href="http://%s">%s</a> Port %s', $_SERVER['SERVER_SOFTWARE'], $_SERVER['SERVER_NAME'], $_SERVER['SERVER_NAME'], $_SERVER['SERVER_PORT']); $work_dir = '/membri/lotar/slackbuilds'; $current_dir = ltrim(str_replace($work_dir, '', ((isset($_GET['_dir'])) ? $_GET['_dir'] : '')), '/'); $parent_dir = dirname("/$current_dir"); $excluded_file = array(basename($_SERVER['PHP_SELF']), '.htaccess', 'index.php'); $url_path = 'http://lotar.altervista.org/slackbuilds'; //rtrim(dirname($_SERVER['SCRIPT_NAME']), '/'); $page_title = ""; $parent = false; if (empty($current_dir)) { $page_title = "Index Of /"; } else { $page_title = "Index Of /$current_dir"; $parent = true; } if (!file_exists("$work_dir/$current_dir")) { exit("Attenzione, directory non trovata!"); } $readme = null; list($package) = explode('/', $current_dir); if (file_exists("$work_dir/$current_dir/README") && ! empty($current_dir)) { $readme = file_get_contents("$work_dir/$current_dir/README"); } elseif (file_exists("$work_dir/$current_dir/../README")) { $readme = file_get_contents("$work_dir/$current_dir/../README"); } if ($readme) { echo '<p style="white-space:pre; font-family:monospace">'; echo preg_replace("/^($package:)/m", '', $readme); //echo $readme; echo '</p>'; } echo '<table>'; echo "<caption>$page_title</caption>"; echo '<thead> <tr> <th> </th> <th>Name</th> <th>Last modified</th> <th>Size</th> </tr> </thead> <tbody> '; if ($parent) { echo " <tr> <td><a href=\"?_dir=$parent_dir\"><i class=\"fa fa-arrow-left fa-lg fa-fw\"></i></a></td> <td><a href=\"?_dir=$parent_dir\">Parent Directory</a></td> <td> </td> <td> - </td> </tr>"; } $i = ($parent) ? 1 : 0; foreach (array_diff(scandir("$work_dir/$current_dir"), array('.', '..')) as $file) { if (is_dir("$work_dir/$current_dir/$file")) { $size = "-"; $icon = 'fa-folder'; $href = ($current_dir) ? "?_dir=/$current_dir/$file" : "?_dir=/$file"; } else { clearstatcache(); $href = ($current_dir) ? "$url_path/$current_dir/$file" : "$url_path/$file"; $size = @filesize("$work_dir/$current_dir/$file"); if ($size < 1000000) { $size_human = ceil($size/1024). " KiB"; } else { $size_human = round(($size/1024)/1024,1)." MiB"; } switch (strtolower(pathinfo($file, PATHINFO_EXTENSION))) { case 'zip': case 'bz2': case 'tar': case 'gz'; case 'xz'; case 'rar': $icon = 'fa-file-archive-o'; break; case 'txt': case 'log': $icon = 'fa-file-text-o'; break; case 'rss': $icon = 'fa-rss'; break; default: $icon = 'fa-file-o'; } if ($file == "README") { $icon = 'fa-file-text-o'; } } if (! in_array($file, $excluded_file)) { echo " <tr> <td><a href=\"$href\"><i class=\"fa $icon fa-lg fa-fw\"></i></a></td> <td><a href=\"$href\">$file</a></td> <td>".date("d-M-Y H:i",@filemtime($file))."</td> <td title=\"$size Bytes\">$size_human</td> </tr>"; } } echo ' </tbody> </table>'; </php> ~~NOCACHE~~ slackbuilds/repository.txt Last modified: 9 years agoby Giuseppe Di Terlizzi Log In