public static function EditorPanel($fileName) { //$js = '<div id="pageEditorDiv"><form name="editor" action="" method="post">'; //$js .= self::GetEditor('pageEditor', self::Parse(self::ReadFile($fileName), 'php')); //$js .= '<input type="submit" name="edit_page_content" value="Сохранить" /></form></div>'; $html = '<div id="siteEditorPanel">'; $js = '<div id="dialog-window-form"></div>'; $arPanelItems = Panel::getItems(); if (count($arPanelItems) > 0) { $html .= '<ul>'; foreach ($arPanelItems as $name => $link) { if (substr($link, 0, 4) == '<js>') { $url = 'javascript:void(0)" onClick="' . str_replace('<js>', '', $link); } elseif ($link == '<br>') { $name = ' | '; $url = 'javascript:void(0)'; } else { $url = $link; } $html .= '<li><a href="' . $url . '">' . $name . '</a></li>'; } $html .= '</ul>'; } $html .= '</div>'; $html .= '<div id="panelCloser"></div>'; if (isset($_POST['edit_page_content'])) { // self::WriteFile($fileName, $_POST['pageEditor']); //d($_POST['pageEditor']); } return $js . $html; }