/**
  * Returns the HTML for the link part in the properties view
  *
  * @return string
  */
 function formLink()
 {
     $yuiSuggest =& weSuggest::getInstance();
     $textname = 'we_' . $this->Name . '_txt[LinkPath]';
     $idname = 'we_' . $this->Name . '_txt[LinkID]';
     $extname = 'we_' . $this->Name . '_txt[LinkHref]';
     $linkType = $this->getElement('LinkType') ?: 'no';
     $linkPath = f('SELECT Path FROM ' . FILE_TABLE . ' WHERE ID = ' . intval($this->getElement('LinkID')), '', $this->DB_WE);
     $RollOverFlagName = 'we_' . $this->Name . '_txt[RollOverFlag]';
     $RollOverFlag = $this->getElement('RollOverFlag') ? 1 : 0;
     $RollOverIDName = 'we_' . $this->Name . '_txt[RollOverID]';
     $RollOverID = $this->getElement('RollOverID') ?: '';
     $RollOverPathname = 'we_' . $this->Name . '_txt[RollOverPath]';
     $RollOverPath = f('SELECT Path FROM ' . FILE_TABLE . ' WHERE ID = ' . intval($RollOverID), '', $this->DB_WE);
     $checkFlagName = 'check_' . $this->Name . '_RollOverFlag';
     $cmd1 = "document.we_form.elements['" . $idname . "'].value";
     $but1 = we_html_button::create_button(we_html_button::SELECT, "javascript:we_cmd('we_selector_document', " . $cmd1 . ",'" . FILE_TABLE . "','" . we_base_request::encCmd($cmd1) . "','" . we_base_request::encCmd("document.we_form.elements['" . $textname . "'].value") . "','" . we_base_request::encCmd("opener._EditorFrame.setEditorIsHot(true);opener.document.we_form.elements['we_" . $this->Name . "_txt[LinkType]'][2].checked=true;") . "','',0,''," . (permissionhandler::hasPerm("CAN_SELECT_OTHER_USERS_FILES") ? 0 : 1) . ");");
     $cmd1 = "document.we_form.elements['" . $RollOverIDName . "'].value";
     $but2 = we_html_button::create_button(we_html_button::SELECT, "javascript:we_cmd('we_selector_image', " . $cmd1 . ",'" . FILE_TABLE . "','" . we_base_request::encCmd($cmd1) . "','" . we_base_request::encCmd("document.we_form.elements['" . $RollOverPathname . "'].value") . "','" . we_base_request::encCmd("opener._EditorFrame.setEditorIsHot(true);opener.document.we_form.elements['" . $RollOverFlagName . "'].value=1;opener.document.we_form.elements['" . $checkFlagName . "'].checked=true;") . "','',0,'" . we_base_ContentTypes::IMAGE . "'," . (permissionhandler::hasPerm("CAN_SELECT_OTHER_USERS_FILES") ? 0 : 1) . ");");
     $cmd1 = "document.we_form.elements['" . $extname . "'].value";
     $butExt = permissionhandler::hasPerm('CAN_SELECT_EXTERNAL_FILES') ? we_html_button::create_button(we_html_button::SELECT, "javascript:we_cmd('browse_server','" . we_base_request::encCmd($cmd1) . "',''," . $cmd1 . ",'" . we_base_request::encCmd("opener._EditorFrame.setEditorIsHot(true);opener.document.we_form.elements['we_" . $this->Name . "_txt[LinkType]'][1].checked=true;") . "')") : "";
     if (defined('OBJECT_TABLE')) {
         $objidname = 'we_' . $this->Name . '_txt[ObjID]';
         $objtextname = 'we_' . $this->Name . '_txt[ObjPath]';
         $objPath = f('SELECT Path FROM ' . OBJECT_FILES_TABLE . ' WHERE ID = ' . intval($this->getElement('ObjID')), '', $this->DB_WE);
         $cmd1 = "document.we_form.elements['" . $objidname . "'].value";
         $butObj = we_html_button::create_button(we_html_button::SELECT, "javascript:we_cmd('we_selector_document'," . $cmd1 . ",'" . OBJECT_FILES_TABLE . "','" . we_base_request::encCmd($cmd1) . "','" . we_base_request::encCmd("document.we_form.elements['" . $objtextname . "'].value") . "','" . we_base_request::encCmd("opener._EditorFrame.setEditorIsHot(true);opener.document.we_form.elements['we_" . $this->Name . "_txt[LinkType]'][3].checked=true;") . "','','','objectFile'," . (permissionhandler::hasPerm("CAN_SELECT_OTHER_USERS_OBJECTS") ? 0 : 1) . ");");
     }
     // Create table
     $_content = new we_html_table(array('class' => 'default'), defined('OBJECT_TABLE') ? 11 : 9, 2);
     $row = 0;
     // No link
     $_content->setCol($row, 0, array('style' => 'vertical-align:top;padding-bottom:10px;'), we_html_forms::radiobutton('no', $linkType === 'no', 'we_' . $this->Name . '_txt[LinkType]', g_l('weClass', '[nolink]'), true, 'defaultfont', '_EditorFrame.setEditorIsHot(true);'));
     $_content->setCol($row++, 1, null, '');
     // External link
     $_ext_link_table = new we_html_table(array('class' => 'default'), 1, 2);
     $_ext_link_table->setCol(0, 0, null, $this->htmlTextInput('we_' . $this->Name . '_txt[LinkHref]', 25, $this->getElement('LinkHref'), '', 'onchange="_EditorFrame.setEditorIsHot(true);"', "text", 280));
     $_ext_link_table->setCol(0, 1, null, $butExt);
     $_ext_link = "href" . we_html_element::htmlBr() . $_ext_link_table->getHtml();
     $_content->setCol($row, 0, array('style' => 'vertical-align:top;padding-bottom:10px;'), we_html_forms::radiobutton(we_base_link::TYPE_EXT, $linkType == we_base_link::TYPE_EXT, 'we_' . $this->Name . '_txt[LinkType]', g_l('weClass', '[extern]'), true, 'defaultfont', '_EditorFrame.setEditorIsHot(true)'));
     $_content->setCol($row++, 1, array('class' => 'defaultfont', 'style' => 'vertical-align:top'), $_ext_link);
     // Internal link
     $yuiSuggest->setAcId('internalPath');
     $yuiSuggest->setContentType(implode(',', array(we_base_ContentTypes::FOLDER, we_base_ContentTypes::WEDOCUMENT, we_base_ContentTypes::IMAGE, we_base_ContentTypes::JS, we_base_ContentTypes::CSS, we_base_ContentTypes::HTML, we_base_ContentTypes::APPLICATION, we_base_ContentTypes::QUICKTIME)));
     $yuiSuggest->setInput($textname, $linkPath);
     $yuiSuggest->setResult($idname, $this->getElement('LinkID'));
     $yuiSuggest->setTable(FILE_TABLE);
     $yuiSuggest->setSelectButton($but1);
     $yuiSuggest->setMaxResults(10);
     $yuiSuggest->setMayBeEmpty(0);
     $yuiSuggest->setWidth(280);
     $yuiSuggest->setSelector(weSuggest::DocSelector);
     $yuiSuggest->setLabel('href');
     $_int_link = $yuiSuggest->getHTML();
     $_content->setCol($row, 0, array('style' => 'vertical-align:top'), we_html_forms::radiobutton(we_base_link::TYPE_INT, $linkType == we_base_link::TYPE_INT, 'we_' . $this->Name . '_txt[LinkType]', g_l('weClass', '[intern]'), true, 'defaultfont', '_EditorFrame.setEditorIsHot(true);'));
     $_content->setCol($row++, 1, array('class' => 'defaultfont', 'style' => 'vertical-align:top'), $_int_link);
     // Object link
     if (defined('OBJECT_TABLE')) {
         $yuiSuggest->setAcId('objPathLink');
         $yuiSuggest->setContentType("folder," . we_base_ContentTypes::OBJECT_FILE);
         $yuiSuggest->setInput($objtextname, $objPath);
         $yuiSuggest->setResult($objidname, $this->getElement('ObjID'));
         $yuiSuggest->setTable(OBJECT_FILES_TABLE);
         $yuiSuggest->setSelectButton($butObj);
         $yuiSuggest->setMaxResults(10);
         $yuiSuggest->setMayBeEmpty(0);
         $yuiSuggest->setWidth(280);
         $yuiSuggest->setSelector(weSuggest::DocSelector);
         $yuiSuggest->setLabel('href');
         $_obj_link = $yuiSuggest->getHTML();
         $_content->setCol($row, 0, array('style' => 'vertical-align:top;padding-top:10px;'), we_html_forms::radiobutton(we_base_link::TYPE_OBJ, $linkType == we_base_link::TYPE_OBJ, 'we_' . $this->Name . '_txt[LinkType]', g_l('linklistEdit', '[objectFile]'), true, 'defaultfont', '_EditorFrame.setEditorIsHot(true);'));
         $_content->setCol($row++, 1, array('class' => 'defaultfont', 'style' => 'vertical-align:top'), $_obj_link);
     }
     // Target
     $_content->setCol($row++, 0, array('colspan' => 2, 'class' => 'defaultfont', 'style' => 'vertical-align:top;padding:20px 0px;'), g_l('weClass', '[target]') . we_html_element::htmlBr() . we_html_tools::targetBox('we_' . $this->Name . '_txt[LinkTarget]', 33, 0, '', $this->getElement('LinkTarget'), '_EditorFrame.setEditorIsHot(true);', 20, 97));
     // Rollover image
     $yuiSuggest->setAcId('rollOverPath');
     $yuiSuggest->setContentType(implode(',', array(we_base_ContentTypes::FOLDER, we_base_ContentTypes::WEDOCUMENT, we_base_ContentTypes::IMAGE, we_base_ContentTypes::JS, we_base_ContentTypes::CSS, we_base_ContentTypes::HTML, we_base_ContentTypes::APPLICATION, we_base_ContentTypes::QUICKTIME)));
     $yuiSuggest->setInput($RollOverPathname, $RollOverPath);
     $yuiSuggest->setResult($RollOverIDName, $RollOverID);
     $yuiSuggest->setTable(FILE_TABLE);
     $yuiSuggest->setSelectButton($but2);
     $yuiSuggest->setMaxResults(10);
     $yuiSuggest->setMayBeEmpty(0);
     $yuiSuggest->setWidth(280);
     $yuiSuggest->setSelector(weSuggest::DocSelector);
     $yuiSuggest->setLabel('href');
     $_rollover = $yuiSuggest->getHTML();
     $_content->setCol($row, 0, array('style' => 'vertical-align:top'), we_html_forms::checkbox(1, $RollOverFlag, $checkFlagName, 'Roll Over', false, 'defaultfont', "_EditorFrame.setEditorIsHot(true); this.form.elements['" . $RollOverFlagName . "'].value = (this.checked ? 1 : 0); ") . we_html_element::htmlHidden($RollOverFlagName, $RollOverFlag));
     $_content->setCol($row, 1, array('class' => 'defaultfont', 'style' => 'vertical-align:top'), $_rollover);
     return $_content->getHtml();
 }
 * $Author: mokraemer $
 * $Date: 2015-08-25 00:57:29 +0200 (Tue, 25 Aug 2015) $
 *
 * This source is part of webEdition CMS. webEdition CMS is
 * free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 3 of the License, or
 * any later version.
 *
 * The GNU General Public License can be found at
 * http://www.gnu.org/copyleft/gpl.html.
 * A copy is found in the textfile
 * webEdition/licenses/webEditionCMS/License.txt
 *
 * @category   webEdition
 * @package none
 * @license    http://www.gnu.org/copyleft/gpl.html  GPL
 */
echo we_html_tools::getHtmlTop() . we_html_element::jsScript(JS_DIR . 'windows.js');
require_once WE_INCLUDES_PATH . 'we_editors/we_editor_script.inc.php';
echo STYLESHEET . weSuggest::getYuiFiles();
?>
</head>
<body class="weEditorBody">
	<form name="we_form" method="post" onsubmit="return false;"><?php 
echo we_class::hiddenTrans() . we_html_multiIconBox::getJS() . we_html_multiIconBox::getHTML("weImgProp", array(array("icon" => "upload.gif", "headline" => "", "html" => $GLOBALS['we_doc']->formUpload(), "space" => 140), array("icon" => "attrib.gif", "headline" => g_l('weClass', '[attribs]'), "html" => $GLOBALS['we_doc']->formProperties(), "space" => 140), array("icon" => "meta.gif", "headline" => g_l('weClass', '[metadata]'), "html" => $GLOBALS['we_doc']->formMetaInfos() . $GLOBALS['we_doc']->formMetaData(), "space" => 140), array('icon' => 'imgfocus.gif', 'headline' => 'Bildfokus', 'html' => $GLOBALS['we_doc']->formImageFocus(), 'space' => 140)), 20) . we_html_element::htmlHidden("we_complete_request", 1);
?>
	</form>
</body>

</html>