[Box Backup] Web interface for bbackupquery

dave bamford boxbackup@fluffy.co.uk
Sun, 28 May 2006 14:50:59 +0100


Here is a very simple web page to browse your backed up files from a web 
page.
You need a web server with PHP running on the client, and the bbackupquery
executable and associated dlls if needed  should be in the same folder 
as the web page.

Only tried on a windows client running 0.10.

Dave Bamford

> <html>
> <head>
> <meta http-equiv="Content-Language" content="en-gb">
> <title>box backup query</title>
> </head>
> <body>
> <?php
> //program to execute backup list command
> if (!isset($_GET['wd'])){
>     echo exec('bbackupquery "list -t" exit', $retval);
> }
> else    {
>     echo exec('bbackupquery "list -t \"'.$_GET['wd'].'\"" exit', $retval);
> }
> $i=1;
> While ($retval[$i] != "Session finished.")    {
>     if ($i==9)    {
>         echo '<br/><a 
> href="index.php?wd='.substr($_GET['wd'],0,strrpos($_GET['wd'],"/")).'">..</a>';
>     }
>     if (substr($retval[$i],10,1) == 'd'){
>         echo '<br/><a 
> href="index.php?wd='.$_GET['wd'].'/'.substr($retval[$i],36).'">'.substr($retval[$i],36).'</a>';
>     }
>     else    {
>         echo "<br/>".$retval[$i];
>     }
>     $i++;
> }
> ?>
> </body></html>