Hi Admin, I love your script, but I am trying to incorporate CKEditor, which I have working fine. The problem I have is that I want to use an IF statement. Basically if file_extension equals .xml don't use CKEditor, else please use.
In admin\_include\fun_edit.php lines 132-145 you have this
Code:
echo "<textarea name=\"code\" rows=\"25\" cols=\"120\" wrap=\"off\">";
// Show File In TextArea
$buffer="";
while(!feof ($fp)) {
$buffer .= fgets($fp, 4096);
}
@fclose($fp);
if( get_magic_quotes_runtime()) {
$buffer = stripslashes( $buffer );
}
// echo htmlspecialchars($buffer, ENT_COMPAT , "UTF-8");
echo htmlspecialchars($buffer);
echo "</textarea><br/>";
I have changed this code to read
Code:
echo "<textarea name=\"code\" rows=\"25\" cols=\"120\" wrap=\"off\">";
// Show File In TextArea
$buffer="";
while(!feof ($fp)) {
$buffer .= fgets($fp, 4096);
}
@fclose($fp);
if( get_magic_quotes_runtime()) {
$buffer = stripslashes( $buffer );
}
// echo htmlspecialchars($buffer, ENT_COMPAT , "UTF-8");
echo htmlspecialchars($buffer);
echo "</textarea>
<script type=\"text/javascript\">
CKEDITOR.replace( 'code',
{
filebrowserBrowseUrl : './ckfinder/ckfinder.html',
filebrowserImageBrowseUrl : './ckfinder/ckfinder.html?Type=Images',
filebrowserFlashBrowseUrl : './ckfinder/ckfinder.html?Type=Flash',
filebrowserUploadUrl : './ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files',
filebrowserImageUploadUrl : './ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images',
filebrowserFlashUploadUrl : './ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Flash'
});
</script>
But what I require is to use both sets of code, but with an IF statement.
Whhat code would I use for IF file_extesnion equals .xml use code One else use code two.
Unsure what your definations are for file_extension throughout your program.