*
* @return string Formatted anchor tag with everything needed
*/
function lnk($url = null, $text = null, $match = null, $class = ' active')
{
// $url should be "controller/action", no need to give full url
$url = site_url($url);
// Test matching, are we on the page we want to match against?
if (empty($match)) {
$match = current_url();
} else {
$match = site_url($match);
}
// Return correctly formatted link
if ($url == $match) {
return '' . $text . '';
} else {
return '' . $text . '';
}
}
function checkboxed(
$name,
$data,
$value,
$label,
$data_id = null,
$disabled = false,
$disabletext = null
) {
$fieldname = null;
$labelname = null;
$string = null;
$fieldname = 'data['.$data_id.']['.$name.']';
$labelname = $fieldname .'['. $data .']';
$string = '' . $label . '';
}
$string .= '>';
if (!empty($label)) {
$string = '';
}
return $string;
}