<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
// meikelator doesn't like to set any global vars here ....
include("editor_prepend.php");
/* require_once("../../../root.inc");
require_once("dhtml.inc");
include("../../../editors.config.php");
*//*
S Babu. hide@address.com
http://vsbabu.org
*/
// 1 for enabling the printing of debug messages. 0 for normal use
define("DEBUG",0);
// dirwalk.php introduces neccessary constant definitions and cust. functions
// for DHTML editor
/* include("../dirwalk.php"); */
// setup for Contentbuilder here (should be self-configuring)
// $valid_imagefile_types is outsourced to <cb-path>/root.inc
$cbOption = new CBOption();
$cbOption->setModule("art");
$cbOption->getOptionList();
if ($optValue = $cbOption->getSingleOption("editorValidImageTypes")){
//if ($row=mysql_fetch_row($ret)){
$tmp=trim(ereg_replace(" ","",$optValue),";");
$valid_file_types=explode(";",$tmp);
}else{
$valid_file_types = $valid_imagefile_types;
}
//trigger_error("\$valid_file_types=".implode(":",$valid_file_types),E_USER_WARNING);
//trigger_error("\$IMGURL=".$IMGURL,E_USER_WARNING);
//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) {
if ($imgsize=GetImageSize($path) ) {
$width=$imgsize[0];
$height=$imgsize[1];
// 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
$name=ucfirst(ereg_replace("_"," ",$name)); // replace underscores by spaces and capitalize
echo "<a href=\"#\" onClick=\"top.document.forms[0].elements['ImgUrl'].value='$path';";
echo "top.document.forms[0].elements['ImgWidth'].value=$width;";
echo "top.document.forms[0].elements['ImgHeight'].value=$height;";
echo "top.document.PREVIEWPIC.src='$path';\">$name</a>";
}
}
if(DEBUG)
echo "<-- $PHP_SELF --><br>\n";
// meikelator 2002-11-24: Dealing with mediaID for DHTML-Editor
// but he himself does not know, what it mean indeep :-/
if (isset($BASEURL)){$dir=$BASEURL;}
main_process($dir);
?>
</body>
</html>