Location: PHPKode > projects > Content*Builder > contentbuilder/plugins/article2/editor_v2/browselink.php
<html><head><title>Browse For Pictures</title>
<style type="text/css">
<!--
body {font-family:Verdana, Arial, sans-serif; font-size: 10pt;}
-->
</style>
</head>
<body bgcolor="white">
<?php
// doesn't like to set any global vars here ....
include("editor_prepend.php");
/*
 S Babu. hide@address.com
 http://vsbabu.org
*/
// dirwalk.php introduces neccessary constant definitions and cust. functions
// for DHTML editor
/* include("../dirwalk.php"); */

// outsourced to <cb-path>/root.inc
//$valid_file_types =  array("html","htm","doc","pdf","xls","ppt","txt","jpg","gif");
/* $ret=mysql_query("select name, extension from ".TABLE."_mm_type where name like 'Documents' or name like 'Dokumente'");
 */
$cbOption = new CBOption();
$cbOption->setModule("art");
$cbOption->getOptionList();

if ($optValue = $cbOption->getSingleOption("editorValidLinkTypes")){
//if ($row=mysql_fetch_row($ret)){
    $tmp=trim(ereg_replace(" ","",$optValue),";");
    $valid_file_types=explode(";",$tmp);
}else{
    $valid_file_types = $valid_docfile_types;
}
//trigger_error("\$valid_file_types=".implode(":",$valid_file_types),E_USER_WARNING);
//trigger_error("\$IMGURL=".$IMGURL,E_USER_WARNING);
// 1 for enabling the printing of debug messages. 0 for normal use
define("DEBUG",0);

//Prints a link for copying the path to some form field
//todo - quote processing so that it won't make bad Javascript

function print_copy_link($path, $name) {
  // DOS: URLs are different from DOS directory seps
  //$path = "/" & str_replace("/","\\",cut_root_folder($path));
  $path=ereg_replace("/+","/",$path);
  $path=ereg_replace(ROOTFOLDER,SITEROOT,$path);
  $name=ereg_replace("\..+$","",$name);
  // remove the extension in the name won't work for multiple dots in the file name
  $name=ucfirst(ereg_replace("_"," ",$name)); // replace underscores by spaces and capitalize
  echo "<a href=\"#\" onClick=\"top.document.forms[0].elements['LinkUrl'].value='$path';";
  echo "top.document.forms[0].elements['LinkLabel'].value='$name';\">$name</a>";
}

if(DEBUG)
	echo "<-- $PHP_SELF --><br>\n";

if (isset($BASEURL)){$dir=$BASEURL;}

main_process($dir);

?>
</body>
</html>

Return current item: Content*Builder