Potrzebuję pomocy, gdy chce wejść na panel administratora mojej strony to wyświetla mi się pusta strona. Najprawdopodobniej problem znajduje się w tym kodzie w linijce 55, co zrobić?
Oto kod:
<?php
require_once DIR_PLUGINS.'ckeditor/ckeditor.php';
/**
* Function returns editor
* @return string
* @param string $sName
* @param int $iH
* @param int $iW
* @param string $sContent
*/
function htmlEditor( $sName = 'sDescriptionFull', $iH = '300', $iW = '100%', $sContent = '', $aOption = null ){
$sEdit = '';
$iH .= 'px';
$iW .= 'px';
if( WYSIWYG === true ){
if( defined( 'TinyMceFullActive' ) && TinyMceFullActive
=== true ){ if( defined( 'CKEditorActive' ) && CKEditorActive
=== true ){ $oCKEditor = new CKEditor() ;
$oCKEditor->returnOutput = true;
$oCKEditor->basePath = DIR_PLUGINS.'ckeditor/';
$oCKEditor->config['width'] = $iW;
$oCKEditor->config['height'] = $iH;
$oCKEditor->config['language'] = $GLOBALS['config']['admin_lang'];
return $oCKEditor->editor($sName, $sContent);
}
else{
$sEdit .= '<script language="javascript" type="text/javascript" src="'.DIR_PLUGINS.'tinymce-full/jscripts/tiny_mce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript">
<!--
tinyMCE.init({
theme : "advanced",
plugins : "autolink,lists,pagebreak,style,layer,table,save,advhr,advimage,advlink,emot
ions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contex
tmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxt
ras,template,wordcount,advlist,autosave,visualblocks",
mode : "exact",
entity_encoding : "raw",
elements : "sDescriptionShort,sDescriptionFull,sContent",
theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justif
ycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizesele
ct",
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,out
dent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|
,insertdate,inserttime,preview,|,forecolor,backcolor",
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iesp
ell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acro
nym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,restoredraft,vis
ualblocks",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_resizing : true,
theme_advanced_resize_horizontal : false,
debug : false
});
//-->
</script>';
}
}
else{
if( defined( 'CKEditorActive' ) && CKEditorActive
=== true ){ $oCKEditor = new CKEditor() ;
$oCKEditor->returnOutput = true;
$oCKEditor->basePath = DIR_PLUGINS.'ckeditor/';
$oCKEditor->config['width'] = $iW;
$oCKEditor->config['height'] = $iH;
$oCKEditor->config['language'] = $GLOBALS['config']['admin_lang'];
return $oCKEditor->editor($sName, $sContent);
}
else{
define( 'WYSIWYG_START', true ); $sEdit .= '<script language="javascript" type="text/javascript" src="'.$GLOBALS['config']['dir_plugins'].'tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript">
<!--
var theme_advanced_buttons1 = "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyrigh
t,justifyfull,|,bullist,numlist,|,undo,redo";
var theme_advanced_buttons2 = "";
var additional_buttons = ",link,unlink,cleanup,removeformat,|,help,code";
if( parseInt( window.screen.availWidth ) < 1130 )
theme_advanced_buttons2 = additional_buttons;
else
theme_advanced_buttons1 += ",|"+additional_buttons;
tinyMCE.init({
theme : "advanced",
mode : "exact",
entity_encoding : "raw",
elements : "sDescriptionShort,sDescriptionFull,sContent",
theme_advanced_buttons1 : theme_advanced_buttons1,
theme_advanced_buttons2 : theme_advanced_buttons2,
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_resizing : true,
theme_advanced_resize_horizontal : false,
debug : false
});
//-->
</script>';
}
}
}
}
$sEdit .= '<textarea name="'.$sName.'" id="'.$sName.'" rows="20" cols="60" style="width:'.$iW.';height:'.$iH.';" tabindex="1">'.$sContent.'</textarea>';
return $sEdit;
} // end function htmlEditor
?>