44a9fa122b807450dba7a16874b348a416826d70
[plewww.git] / planetlab / includes / plc_forms.php
1 <?php
2
3 // $Id: plc_details.php 11645 2009-01-21 23:09:49Z thierry $
4
5 require_once 'plc_functions.php';
6
7 function plc_form_start ($url, $values, $options=array()) {
8   $method = array_key_exists('method',$options) ? $options['method'] : 'POST';
9   print "<form method=$method action='$url' enctype='multipart/form-data'>";
10   foreach ($values as $key=>$value) {
11     print "<input type=hidden name='$key' value='$value'>";
12   }
13 }
14
15 function plc_form_end($options=array()) {
16   print "</form>";
17 }
18
19 function plc_form_checkbox_text ($name,$value,$selected=false) {
20   return "<input type=checkbox name='$key' value='$value'>";
21 }
22
23 function plc_form_submit_text ($name,$display) {
24   return "<input type=submit name='$name' value='$display'>";
25 }
26   
27 function plc_form_file_text ($name,$size) {
28   return "<input type=file name='$name' size=$size>";
29 }
30
31 function plc_form_label_text ($label,$name) {
32   return "<label for=$name>$text </label>";
33 }
34  
35 ?>