示例#1
0
 function NewItem(&$level, &$params, &$row, &$subMenus, &$name, &$cssRepeatNum, &$target, &$link)
 {
     /**
     /* Function Desc - Writes html for a new drop down item
     */
     $parentImgStr = "";
     $menuImage = "";
     $menuImgStr = "";
     $spanStyle = "";
     $levTabs = str_repeat("\t", $level);
     if ($level == 0) {
         $itemClass = "parentItem";
     } else {
         $itemClass = "subItem_{$cssRepeatNum}";
     }
     // class for menu item
     if ($level == 0 && $this->DDownPositioning == "horizontal") {
         echo "\t\t<td>\n";
     }
     if ($params->get('show_img')) {
         mygosu_menus::showImage($row, $params, $menuImgStr, $spanStyle);
     }
     if ($subMenus && $params->get('img_parent') != -1 && $params->get('show_img_rgt') == "1") {
         // bug fix by Srdan Mahmutovic 2005-06-21 (before it wasn't checking the show img_parent parameter)
         $parentImgStr = "<img class='rgtImg' border='0' src='" . $this->imgPath . $params->get('img_parent') . "' alt='" . $name . "'/>";
     }
     if ($row->type != "separator") {
         // Search engine friendly url code mod by Srdan Mahmutovic 2005-06-30
         print "\t\t\t" . $levTabs . "<div class='menuCont_{$cssRepeatNum}' ><a class='" . $itemClass . "' target=" . $target . " href='" . htmlspecialchars(sefRelToAbs($link)) . "'>" . $menuImgStr . "<span" . $spanStyle . ">" . htmlentities($row->name) . " </span>" . $parentImgStr . "</a></div>\n";
     } else {
         print "\t\t\t" . $levTabs . "<div class='separator' ><a href='javascript:void();'>" . $row->name . "</a></div>\n";
     }
 }