');
$to = array('<', '>');
$html_code = str_replace($from, $to, $html_code);
return $html_code;
}
//Load this editfile
function filetext($templatename,$templatefile,$templates) {
$sFileName=$templates[$templatename].'/'.$templatefile;
if (file_exists($sFileName))
{
return file_get_contents($sFileName);
}
else
{
return '';
}
}
function mkdir_p($target){
//creates a new directory
//Returns 1 for success
// 2 for "directory/file by that name exists
// 0 for other errors
if(file_exists($target) || is_dir($target))
return 2;
if(mkdir($target,0777)){
return 1;
}
if(mkdir_p(substr($target, 0, (strrpos($target, '/')))) == 1){
if(mkdir_p($target) == 1)
return 1;
else
return 0;
} else {
return 0;
}
}
function makeoptions($array, $value, $text, $selectedvalue) {
$return='';
foreach ($array as $ar) {
$return .= "