[slbackup-commit] CVS update: slbackup-php index.php
finnarne-guest at alioth.debian.org
finnarne-guest at alioth.debian.org
Wed Apr 11 14:21:38 UTC 2007
User: finnarne-guest
Date: 07/04/11 14:21:38
Modified: . index.php
Log:
Tried to clean up a bit the <SELECT > statement
added more debugging
Revision Changes Path
1.6 +28 -8 slbackup-php/index.php
Index: index.php
===================================================================
RCS file: /cvsroot/slbackup/slbackup-php/index.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- index.php 11 Apr 2007 13:52:10 -0000 1.5
+++ index.php 11 Apr 2007 14:21:38 -0000 1.6
@@ -12,10 +12,13 @@
case "Passwd":
$passwd = $value ;
break ;
+ case "addclient":
case "server":
case "chooseclient":
+ case "delclient":
case "clientconfig":
- case "addclient":
+ case "delloc":
+ case "addloc":
$submit=$key ;
break ;
case "client":
@@ -128,8 +131,15 @@
<TR>
<TD>Servertype</TD>
<TD>
- <INPUT type=text name=server_type
- value="<?php echo $config[server_type] ?>">
+ <SELECT name=server_type>
+<?php
+ foreach (array ('local', 'remote') as $value)
+ printf ("<OPTION value=%s %s>%s</option>",
+ $value,
+ ($config[server_type] == $value ? "selected": ""),
+ $value) ;
+?>
+ </SELECT>
</TD>
<TD>User</TD>
<TD>
@@ -160,6 +170,8 @@
?>
</select>
<INPUT type=submit name=chooseclient value="Choose">
+<INPUT type=submit name=addclient value="New">
+<INPUT type=submit name=delclient value="Remove">
<TABLE>
<TR>
<TD>Address</TD>
@@ -176,8 +188,15 @@
<TR>
<TD>Clienttype</TD>
<TD>
- <INPUT type=text name=client_type
- value="<?php echo $config["client"][$client]["type"] ?>">
+ <SELECT name=client_type>
+<?php
+ foreach (array ('local', 'remote') as $value)
+ printf ("<OPTION value=%s %s>%s</option>",
+ $value,
+ ($config["client"][$client]["type"] == $value ? "selected": ""),
+ $value) ;
+?>
+ </SELECT>
</TD>
<TD>User</TD>
<TD>
@@ -196,7 +215,7 @@
<TR>
<TD>Locations:</TD>
<TD><INPUT type=text name=newloc></TD>
- <TD><INPUT Type=submit name=addclient value="Add"></TD>
+ <TD><INPUT Type=submit name=addloc value="Add"></TD>
</TR>
<TR>
<TD/>
@@ -210,7 +229,7 @@
?>
</select>
</TD>
- <TD valign=top><INPUT type=delete name=del value="Delete"></TD>
+ <TD valign=top><INPUT type=submit name=delloc value="Delete"></TD>
</TR>
</TABLE>
</FORM>
@@ -221,7 +240,8 @@
printf ("<pre>") ;
print_r (array ('submit' => $submit,
'client' => $client,
- 'newconf' => $newconf)) ;
+ 'newconf' => $newconf,
+ 'config' => $config)) ;
printf ("</pre>") ;
?>
More information about the slbackup-commit
mailing list