<?php
/*
 * Smarty plugin
 * -------------------------------------------------------------
 * File:     function.messageOptions.php
 * Type:     function
 * Name:     link
 * Purpose:  przyciski wiadomosci specjalnej w htmlu
 * -------------------------------------------------------------
 */


function smarty_function_messageOptions($params, &$smarty){

    if(isset($params['value'])) {
        $buttons = unserialize($params['value']);
        if(is_a($buttons, 'PhysicianMessageOptions')) {
            $array = $buttons->GetButtons();
            $reply = null;
            foreach($array as $button) {
                if($button['type']=='image') {
                    $reply .= " <a href=\"".$button['url']."\" class=\"lbOn\"><img src=\"".URL_STATIC_CONTENT."/image/".$button['file']."\" alt=\"\" title=\"\" border=\"0\" /></a> ";
                }

            }
        
        return "<div>".$reply."</div>";

        }
    }

//    $input = $smarty->get_template_vars('breadCrumbs');
//    $return = array();
//    if(is_array($input)) {
//        foreach($smarty->get_template_vars('breadCrumbs') as $row) {
//            if($row['url']!='') {
//                $return[] = " <a href=\"".$row['url']."\">".$row['title']."</a> ";
//            }else {
//                $return[] = " ".$row['title']." ";
//            }
//        }

        //return implode(BREAD_CRUMB_DELIMITER, $return);
   // }
}
?>