From 6a4bc3d04eca64d9db794b427e6377c8f9a673f6 Mon Sep 17 00:00:00 2001 From: Ian C Date: Fri, 30 Nov 2018 16:09:34 +0000 Subject: Initial working version. --- browse.php | 103 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 browse.php (limited to 'browse.php') diff --git a/browse.php b/browse.php new file mode 100644 index 0000000..2b00c60 --- /dev/null +++ b/browse.php @@ -0,0 +1,103 @@ +. +*/ + +require 'config.php'; +require 'common.php'; + +$url = Sanatise($_REQUEST['u']); +$name = Sanatise($_REQUEST['n']); +$path = Sanatise($_REQUEST['p']); + +?> + + + +<?php echo $name;?> + + + + +

+ +'; + echo '(Parent)'; + echo ''; +} +else +{ + echo '
'; + echo ''; + echo '(Parent)'; + echo '
'; +} + +$cmd = $config['svn'] . ' ls --non-interactive ' . + '--username=' . $config['username'] . ' ' . + '--password=' . $config['password'] . ' ' . + escapeshellarg($url . $path); + +$proc = popen($cmd, 'r'); + +while (($line = fgets($proc)) !== false) +{ + $line = trim($line); + + $is_dir = EndsWith($line, '/'); + + echo '
'; + + if ($is_dir) + { + echo ''; + echo $line, ''; + } + else + { + echo ''; + echo $line, ''; + } + + echo ' (log)'; + + echo '
'; +} + +pclose($proc); + +?> + + -- cgit v1.2.3