Location: PHPKode > projects > Content*Builder > contentbuilder/plugins/article2/editor_v2/inslink.php
<?php
extract($_GET);
?>
<HTML>
<HEAD>
<TITLE>Link einfuegen/bearbeiten</TITLE>
<STYLE TYPE="text/css">
 BODY   {margin-left:10; font-family:Verdana; font-size:12; background:menu}
 BUTTON {width:5em}
 TABLE  {font-family:Verdana; font-size:12}
 P      {text-align:center}
 SPAN.help    {font-family:Verdana; font-size:9;}
 SELECT    {font-family:Verdana; font-size:10;}
</STYLE>

<SCRIPT LANGUAGE=JavaScript>
<!--
function IsDigit()
{
  return ((event.keyCode >= 48) && (event.keyCode <= 57))
}
// -->
</SCRIPT>
<SCRIPT LANGUAGE=JavaScript FOR=window EVENT=onload>
<!--
  for ( elem in window.dialogArguments )
  {
    switch( elem )
    {
    case "UploadDirRoot":
         // why what here? please look in insimage.php and dhtml.inc for more information
      var str = window.dialogArguments["LinkUrl"];
      var str2 = window.dialogArguments["UploadDirRoot"];
      if ((str)&&(str.indexOf(str2)>=0)){
        if (document.frmLinkPick.UploadDirRoot.value=str.substring(str2.length-1,str.lastIndexOf("/"))){
            document.LNKPICK.location.href="browselink.php?dir="+document.frmLinkPick.UploadDirRoot.value;
        }
      }
      break;
    case "LinkUrl":
      document.frmLinkPick.LinkUrl.value=window.dialogArguments["LinkUrl"];
      break;
    case "LinkLabel":
      document.frmLinkPick.LinkLabel.value=window.dialogArguments["LinkLabel"];
      break;
    case "LinkTarget":
      document.frmLinkPick.LinkTarget.value=window.dialogArguments["LinkTarget"];
      break;

    }
  }
// -->
</SCRIPT>

<SCRIPT LANGUAGE=JavaScript FOR=Ok EVENT=onclick>
<!--
  var arr = new Array();
  if (document.frmLinkPick.LinkUrl.value ==''){
    alert('You did not select a link. Existing link will be retained.');
  }
  //if (document.frmLinkPick.LinkUrl.value.substr(0,1)=='/'){
    // attach the BASE so that it will be converted to relative links
  //  arr["LinkUrl"] =  '<dtml-var BASE0>' + document.frmLinkPick.LinkUrl.value;
  //} else {
    arr["LinkUrl"] =  document.frmLinkPick.LinkUrl.value;
  //}
  arr["LinkLabel"] = document.frmLinkPick.LinkLabel.value;
  arr["LinkTarget"] = document.frmLinkPick.LinkTarget[document.frmLinkPick.LinkTarget.selectedIndex].value;
  window.returnValue = arr;
  window.close();
// -->
</SCRIPT>
</HEAD>
<BODY>
<FORM NAME="frmLinkPick" method="post" action="">
<TABLE CELLSPACING=10>
 <TR>
  <TD VALIGN="top" align="left">Browse :<span class="help">
You can browse your sites and subsites. Click on the item you want to link to and the URL will be automatically filled up.<br>
For your convinience we start in assigned media folder <a href="#" onClick="document.LNKPICK.location.href='browselink.php?dir=<?php echo urlencode($BASEURL);?>'"><?php echo $BASEURL;?></a>)
</span>
<INPUT TYPE=HIDDEN SIZE=150 value="123" NAME="UploadDirRoot" style="width : 380px;"><br>
<iframe name="LNKPICK" src="browselink.php?dir=<?php echo urlencode($BASEURL); ?>" style="border: solid black 1px; width: 340px; height:240px; z-index:1"></iframe>
</TD>
</TR>

<TR>
<TD VALIGN="middle" align="left" nowrap>Type : <span class="help">Protocols for different type of links.</span>
<SELECT NAME=LinkType onChange="document.forms[0].elements['LinkUrl'].value=document.forms[0].elements['LinkType'][document.forms[0].elements['LinkType'].selectedIndex].value;document.forms[0].elements['LinkUrl'].focus();">
<option value="" selected> -- Normal -- </option>
<option value="http://www.mysite.com/thatfolder/thisfile.html">External Sites</option>
<option value="mailto:hide@address.com">Email</option>
<option value="ftp://www.mysite.com/somefolder/somefile.zip">FTP</option>
</SELECT></TD>
</TR>

<TR>
<TD VALIGN="middle" align="left" nowrap>URL : <span class="help">This is the internet location of the document/folder.</span><br><INPUT TYPE=TEXT SIZE=40 NAME=LinkUrl style="width : 340px;" value="">
</TD>
</TR>
<TD VALIGN="middle" align="left" nowrap>Target : <span class="help">Where to
open the link?</span>
<SELECT NAME=LinkTarget>
<option value="_self">_self</option>
<option value="_top">_top</option>
<option value="_blank">_blank</option>
</SELECT></TD>
</TR>
<TR>
<TD VALIGN="top" align="center">
<BUTTON ID=Ok>   OK   </BUTTON>
<BUTTON ONCLICK="window.close();">Cancel</BUTTON>
</TD>
</TR>
</TABLE>
<INPUT TYPE=HIDDEN NAME=LinkLabel value="">
</FORM>
</BODY>
</HTML>
Return current item: Content*Builder