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

finnarne-guest at alioth.debian.org finnarne-guest at alioth.debian.org
Thu Apr 12 08:59:46 UTC 2007


  User: finnarne-guest
  Date: 07/04/12 08:59:46

  Modified:    .        index.php
  Log:
  Fixed a bit on client adding part of the form
  Added submit and reset to scheduler part of form
  
  Revision  Changes    Path
  1.10      +11 -6     slbackup-php/index.php
  
  Index: index.php
  ===================================================================
  RCS file: /cvsroot/slbackup/slbackup-php/index.php,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- index.php	12 Apr 2007 06:43:13 -0000	1.9
  +++ index.php	12 Apr 2007 08:59:45 -0000	1.10
  @@ -155,6 +155,7 @@
           case "clientconfig":
           case "delloc":
           case "addloc":
  +        case "scheduler":
               $submit=$key ; 
               break ;
           case "client":
  @@ -261,6 +262,11 @@
   	writeconf ($passwd, $config) ; 
   	break ;
   }
  +
  +if ($client == "<new>" and $submit != "addclient") {
  +    printf ("No client %s should be selected\n", $client) ; 
  +    $client = "" ;
  +}
   foreach ($scheduler as $line) {
       if ($line[0] == "#") 
           continue ; 
  @@ -292,7 +298,8 @@
                   $i, ($i == $hours ? "selected" : ""), $i) ; 
   ?>
   </select>
  -
  +<INPUT type=submit name=scheduler value="Update">
  +<INPUT type=reset name=reset value="Reset">
   <H2>Server config</H2>
   <TABLE>
       <TR>
  @@ -329,7 +336,7 @@
       <TR>
           <TD colspan=4 align=right>
               <INPUT type=submit name=server 
  -                   value="Submit">
  +                   value="Update">
               <INPUT type=reset name=reset 
                      value="Reset">
           </TD>
  @@ -340,12 +347,10 @@
   Client: 
   <select name=client>
   <?php
  -if ($submit == "addclient")
  -    printf ("<option value='<new>' selected>&lt;new&gt;</option>\n") ;
   foreach ($config["clients"] as $key => $value) {
       if (empty($client))
           $client=$key ; 
  -    printf ("<option value=%s %s>%s</option>\n", 
  +    printf ("<option value='%s' %s>%s</option>\n", 
               $key, ($key == $client) ? "selected" : "" , $key) ; 
   }
   ?>
  @@ -388,7 +393,7 @@
       <TR>
           <TD colspan=4 align=right>
               <INPUT type=submit name=clientconfig 
  -                   value="Submit">
  +                   value="<?php echo ($client == "<new>"? "Add": "Update") ?>">
               <INPUT type=reset name=reset 
                      value="reset">
           </TD>
  
  
  



More information about the slbackup-commit mailing list