$Href = Str_Replace($Key, $Replace[$Key] ? $Replace[$Key] : '0000', $Href); } #------------------------------------------------------------------------------- $Array[] = SPrintF("{Text:'%s',Href:'%s',Icon:'SRC:{Images/Icons/%s}'}", $Item['Text'], $Href, $Item['Icon']); #------------------------------------------------------------------------------- } #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- $String = Implode(',', $Array); #------------------------------------------------------------------------------- $Button = new TAG('BUTTON', array('class' => 'Standard', 'style' => 'width: 15px', 'onclick' => SPrintF('ListMenuShow(event,[%s]);', $String))); #------------------------------------------------------------------------------- $LinkID = UniqID('Button'); #------------------------------------------------------------------------------- $Links =& Links(); #------------------------------------------------------------------------------- $Links[$LinkID] =& $Button; #------------------------------------------------------------------------------- $Comp = Comp_Load('Form/Prompt', $LinkID, 'Расширенное меню'); if (Is_Error($Comp)) { return ERROR | @Trigger_Error(500); } #------------------------------------------------------------------------------- unset($Links[$LinkID]); #------------------------------------------------------------------------------- $Button->AddChild(new Tag('IMG', array('align' => 'center', 'width' => 5, 'height' => 10, 'style' => 'display:block;', 'src' => 'SRC:{Images/ListMenuArrow.gif}'))); #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- return $Button; #------------------------------------------------------------------------------- #-------------------------------------------------------------------------------