new frontend - FUSE
[mediadatabase.git] / php / inc.html.php
blob603a346ed338ccaf141162efcf5e4986174c776b
1 <?php
3 function XHTML_Text($text, $class = null)
5 if ($class != null)
7 echo "<div class=\"".$class."\">";
8 echo $text;
9 echo "</div>";
11 else
13 echo $text;
17 define("XHTML_FormMethodGET", "GET");
18 define("XHTML_FormMethodPOST", "POST");
20 function XHTML_Form_Begin($action, $method)
22 echo "<form action=\"".$action."\" method=\"".$method."\">\n";
25 function XHTML_Form_GET_Begin($action)
27 XHTML_Form_Begin($action, constant("XHTML_FormMethodGET"));
30 function XHTML_Form_POST_Begin($action)
32 XHTML_Form_Begin($action, constant("XHTML_FormMethodPOST"));
35 function XHTML_Form_End()
37 echo "</form>\n";
40 function XHTML_Form_Input_Text($name, $size = null)
42 echo "<input type=\"text\" class=\"input-text\" name=\"".$name."\"";
43 if ($size != null)
45 echo " size=\"".$size."\"";
47 echo " />\n";
50 function XHTML_Form_Input_Checkbox($name)
52 echo "<input type=\"checkbox\" class=\"input-checkbox\" name=\"".$name."\" />\n";
55 function XHTML_Form_Input_Choice($name, $value, $checked = false)
57 if ($checked)
59 echo "<input type=\"radio\" class=\"input-radio\" name=\"".$name."\" value=\"".$value."\" checked />\n";
61 else
63 echo "<input type=\"radio\" class=\"input-radio\" name=\"".$name."\" value=\"".$value."\" />\n";
67 function XHTML_Form_Input_Submit($value)
69 echo "<input type=\"submit\" value=\"".$value."\" class=\"input-button\">";
72 function XHTML_Form_Select_Begin($name)
74 echo "<select name=\"".$name."\">\n";
77 function XHTML_Form_Select_End()
79 echo "</select>\n";
82 function XHTML_Form_Option($description, $value, $selected=false)
84 if ($selected)
86 echo "<option value=\"".$value."\" selected>".$description."</option>\n";
88 else
90 echo "<option value=\"".$value."\">".$description."</option>\n";
94 function XHTML_Table_Begin()
96 echo "<table>\n";
99 function XHTML_Table_End()
101 echo "</table>\n";
104 function XHTML_Table_Row_Begin()
106 echo "</tr>\n";
109 function XHTML_Table_Row_End()
111 echo "<tr>\n";
114 function XHTML_Table_Cell_Begin()
116 echo "<td>\n";
119 function XHTML_Table_Cell_End()
121 echo "</td>\n";
124 function XHTML_Span_Begin($class)
126 echo "<span class=\"".$class."\">\n";
129 function XHTML_Span_End()
131 echo "</span>\n";
134 function XHTML_LineBreak()
136 echo "<br />\n";