"; } else echo ""; } else { if ($itemtype == "select"){ echo $item['items'][$itemvalue]['name']; } else if ($itemtype == "checkbox"){ echo $itemvalue=='yes' ? gettext('yes') : gettext('no'); } else echo $itemvalue; } } function haproxy_htmllist($tablename,$rowvalues,$items,$editstate=false,$itemdetails=null){ global $g, $counter; echo ""; foreach($items as $item){ echo ""; } echo ""; if (is_array($rowvalues)){ foreach($rowvalues as $value){ if (!$editstate) { echo ""; $leftitem = true; foreach($items as $item) { $tdclass = $leftitem ? "vtable listlr" : "vtable listr"; echo ""; $leftitem = false; } echo " "; echo ""; } $displaystyle = $editstate ? "" : "display: none;"; echo ""; foreach($items as $item){ $itemname = $item['name']; $itemvalue = $value[$itemname]; $itemnamenr = $itemname . $counter; echo ""; } echo " "; echo ""; if (isset($itemdetails)) { $colspan = count($items)-1; echo ""; ?> "; $itemnr = 0; echo "
"; $itemcount = count($itemdetails); foreach($itemdetails as $item) { echo "
"; $tdclass = "";//$leftitem ? "vtable listlr" : "vtable listr"; echo $item['columnheader'] . ": "; $itemname = $item['name']; $itemvalue = $value[$itemname]; if (isset($item['customdrawcell'])) { $item['customdrawcell']($item, $itemvalue, false); } else haproxy_htmllist_drawcell($item, $itemvalue, false); $leftitem = false; $itemnr++; if ($itemcount != $itemnr) echo ", "; echo "
"; } echo "
"; echo "
{$item['columnheader']}
"; $itemname = $item['name']; $itemvalue = $value[$itemname]; if (isset($item['customdrawcell'])) { $item['customdrawcell']($item, $itemvalue, false); } else haproxy_htmllist_drawcell($item, $itemvalue, false); echo "
"; if (isset($item['customdrawcell'])) { $item['customdrawcell']($item, $itemvalue, true, $itemnamenr); } else haproxy_htmllist_drawcell($item, $itemvalue, true, $itemnamenr); echo "
')"> _details_off" alt="Expand advanced server settings" src="tree/plus.gif" style="clip:rect(19px 13px 30px 2px); top:-19px;position:absolute;"/>
"; $leftitem = true; foreach($itemdetails as $item) { echo ""; $tdclass = "";//$leftitem ? "vtable listlr" : "vtable listr"; echo ""; echo ""; $leftitem = false; echo ""; } echo "
"; echo "{$item['columnheader']}: "; echo ""; $itemname = $item['name']; $itemvalue = $value[$itemname]; $itemnamenr = $itemname . $counter; echo "{$item['description']}
"; if (isset($item['customdrawcell'])) { $item['customdrawcell']($item, $itemvalue, true, $itemnamenr); } else haproxy_htmllist_drawcell($item, $itemvalue, true, $itemnamenr); echo "
"; echo ""; echo ""; echo ""; } if (isset($itemdetails)) { $colspan = count($items)-1; echo ""; echo " "; echo ""; echo ""; echo ""; } $counter++; } } echo " "; } function haproxy_htmllist_js(){ ?>