setQuery( $query );
$plugins = $database->loadResultArray();
$plugin = cleanInput( mosGetParam( $_REQUEST, 'plugin' ) );
if( in_array( $plugin, $plugins ) ){
$file = cleanInput( basename( mosGetParam( $_REQUEST, 'file' ) ) );
$path = $mainframe->getCfg('absolute_path') . '/mambots/editors/jce/jscripts/tiny_mce/plugins/' . $plugin;
if( is_dir( $path ) && file_exists( $path . '/' . $file ) ){
include_once $path . '/' . $file;
}else{
die('File not found!');
}
}else{
die('Plugin not found!');
}
break;
case 'help':
$file = cleanInput( basename( mosGetParam( $_REQUEST, 'file' ) ) );
$path = $mainframe->getCfg('absolute_path') . '/mambots/editors/jce/jscripts/tiny_mce/libraries/help/' . $file;
if( file_exists( $path ) ){
include_once $path;
}else{
die('File not found!');
}
break;
}
function getInput( $item, $def='' ){
return htmlspecialchars( mosGetParam( $_REQUEST, $item, $def ) );
}
function showPopup(){
global $mainframe;
$img = getInput( 'img' );
$title = str_replace( '_', ' ', getInput( 'title', 'Image' ) );
$mode = getInput( 'mode', '0' );
$right_click = getInput( 'click', '0' );
$print = getInput( 'print', '0' );
$w = getInput( 'w' );
$h = getInput( 'h' );
$img = str_replace( $mainframe->getCfg('live_site') . '/', '', $img );
?>
|
|
|