[slbackup-commit] CVS update: slbackup-php index.php

finnarne-guest at alioth.debian.org finnarne-guest at alioth.debian.org
Wed Apr 11 12:37:56 UTC 2007


  User: finnarne-guest
  Date: 07/04/11 12:37:56

  Modified:    .        index.php
  Log:
  Define some variables to easier change configuration during development
  
  Revision  Changes    Path
  1.2       +15 -2     slbackup-php/index.php
  
  Index: index.php
  ===================================================================
  RCS file: /cvsroot/slbackup/slbackup-php/index.php,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- index.php	10 Apr 2007 20:06:28 -0000	1.1
  +++ index.php	11 Apr 2007 12:37:55 -0000	1.2
  @@ -1,5 +1,11 @@
   <?php
   
  +# Define some variables to easier change configuration during development
  +$backuphost="localhost" ; 
  +$backupuser="root" ; 
  +$backupconf="/etc/slbackup/slbackup.conf" ; 
  +$ssh_options="-o StrictHostKeyChecking=no" ; 
  +
   printf ("<html>\n") ; 
   printf ("<head>\n") ; 
   printf ("<title>%s</title>\n", _("SLBackup Configuration")) ; 
  @@ -9,10 +15,16 @@
   $passwd = $_POST["Passwd"] ; 
   $client = $_POST["client"] ; 
   
  +printf ("<pre>") ; 
  +print_r ($_SERVER) ; 
  +printf ("</pre>") ; 
  +
   switch ($action) {
       case "read": 
           if (! empty ($passwd)) {
  -	    $cmd = 'ssh -o StrictHostKeyChecking=no root at localhost cat /etc/slbackup/slbackup.conf' ; 
  +	    $cmd = sprintf ("ssh %s %s@%s cat %s", 
  +	                     $ssh_options, $backupuser, 
  +	                     $backuphost, $backupconf) ; 
   	    break ; 
           }
       default:
  @@ -85,7 +97,7 @@
       fclose ($pipes[1]) ; 
       proc_close ($proc) ; 
   ?>
  -<form name=server method=post>
  +<form name=server method=get>
   <H2><?php echo _("Server info") ?></H2>
   <TABLE>
       <TR>
  @@ -114,6 +126,7 @@
       </TR>
       <TR>
           <TD colspan=4 align=right>
  +            <INPUT type=hidden name=Action value=write>
               <INPUT type=submit name=submit 
                      value="<?php echo _("Submit") ?>">
               <INPUT type=reset name=reset 
  
  
  



More information about the slbackup-commit mailing list