'); // the expected argument is an (ordered) associative array // ( label => todo , ...) // label is expected to be the string to display in the menu // todo can be either // (*) a string : it is then taken to be a URL to move to // (*) or an associative array with the following keys // (*) 'label' : if set, this overrides the string key just above // this is used for functions that return a tab, more convenient to write&use // (*) 'method': 'POST' or 'GET' -- default is 'GET' // (*) 'url': where to go // (*) 'values': an associative array of (key,value) pairs to send to the URL; values are strings // (*) 'confirm': a question to display before actually triggering // (*) 'bubble': a longer message displayed when the mouse stays quite for a while on the label // (*) 'image' : the url of an image used instead of the label // (*) 'height' : used for the image // (*) 'id' : assign given id to the
  • element // NOTE // (*) values can also be set in the URL, e.g. ?var=value&foo=bar, even for POST'ing // (*) several instances can appear on the same page but you need to give them different id's // EXAMPLES // function my_tab () { return array('label'=>'Go to google','url'=>'http://google.com'); } // $tabs=array(); // $tabs[] = my_tab(); // $tabs['Simple Tab']="http://planet-lab.org"; // $tabs['Complex Tab']=array('url'=>'http://planet-lab.org/', // 'bubble'=>'This text gets displayed when the mouse remains over for a while'); // plekit_linetabs($tabs); ////////// Notes: limited support for images // (*) for some reason, confirmation does not work with image tabs // (the form gets submitted whatever the confirmation....) // (*) you need to tune the image size, which is wrong, as the image should rather be bottom-aligned function plekit_linetabs ($tabs, $id=NULL) { // do not output anything if $tabs has no entry (unpleasant rendering) if (empty ($tabs)) return; $active_line_tab=get_array($_GET, 'active_line_tab'); // need id to pass to the onclick function attached to the input buttons $id="linetabs"; if (! $id) $id .= '-' + $id; print "
    "; print "'; print '
    '; print "

    \n"; } ?>