コード例 #1
0
ファイル: tool.php プロジェクト: ircoco/BlackCatCMS
$width = $c->getWidth($config);
$height = $c->getHeight($config);
if (preg_match('~(\\d+)(.*)~', $width, $match)) {
    $width = $match[1];
    $width_unit = $match[2];
}
if (preg_match('~(\\d+)(.*)~', $height, $match)) {
    $height = $match[1];
    $height_unit = $match[2];
}
$skins = $c->getSkins($c->getSkinPath());
$current_skin = $c->getSkin($config);
$settings = $c->getAdditionalSettings();
$plugins = $c->getAdditionalPlugins();
$filemanager = $c->getFilemanager();
$toolbars = $c->getToolbars();
$preview = NULL;
$plugins_checked = array();
$filemanager_checked = array();
$enable_htmlpurifier = isset($config['enable_htmlpurifier']) ? $config['enable_htmlpurifier'] : false;
if (file_exists(CAT_Helper_Directory::sanitizePath(CAT_PATH . '/modules/' . WYSIWYG_EDITOR . '/images/' . $current_skin . '.png'))) {
    $preview = '<img src="' . sanitize_url(CAT_URL . '/modules/' . WYSIWYG_EDITOR . '/images/' . $current_skin . '.png') . '" alt="' . $current_skin . '" title="' . $current_skin . '" />';
}
// something to save?
$job = $val->sanitizePost('job');
if ($job && $job == "save") {
    $new_width = $new_height = $new_skin = $new_toolbar = $new_plugins = $new_fm = NULL;
    // validate width and height
    foreach (array('width', 'height') as $key) {
        if ($val->sanitizePost($key)) {
            if (!is_numeric($val->sanitizePost($key))) {