Esempio n. 1
0
			for ($i = 0; $i < $csscount; $i++) {
				$dummylayout .= "\n" . $css[$i]->getVar('tpl_source');
			}

			$dummylayout .= "\n" . '</style></head><body><div id="xo-canvas"><{$content}></div></body></html>';
			if ($tplfile->getVar('tpl_type') == 'block') {

				$block = new icms_view_block_Object($tplfile->getVar('tpl_refid'));
				$xoopsTpl->assign('block', $block->buildBlock());
			}

			$dummytpl = '_dummytpl_' . time() . '.html';
			$fp = fopen(ICMS_CACHE_PATH . '/' . $dummytpl, 'w');
			fwrite($fp, $html);
			fclose($fp);
			$xoopsTpl->assign('content', $xoopsTpl->fetch('file:' . ICMS_CACHE_PATH . '/' . $dummytpl));
			$xoopsTpl->clear_compiled_tpl('file:' . ICMS_CACHE_PATH . '/' . $dummytpl);
			unlink(ICMS_CACHE_PATH . '/' . $dummytpl);
			$dummyfile = '_dummy_' . time() . '.html';
			$fp = fopen(ICMS_CACHE_PATH . '/' . $dummyfile, 'w');
			fwrite($fp, $dummylayout);
			fclose($fp);
			$tplset= $tplfile->getVar('tpl_tplset');
			$tform = array('tpl_tplset' => $tplset, 'tpl_id' => $id, 'tpl_file' => $tplfile->getVar('tpl_file'), 'tpl_desc' => $tplfile->getVar('tpl_desc'), 'tpl_lastmodified' => $tplfile->getVar('tpl_lastmodified'), 'tpl_source' => htmlspecialchars($html, ENT_QUOTES), 'tpl_module' => $moddir);
			include_once ICMS_MODULES_PATH . '/system/admin/tplsets/tplform.php';
			icms_cp_header();
			echo '<a href="admin.php?fct=tplsets">'. _MD_TPLMAIN .'</a>' 
				. '&nbsp;<span style="font-weight:bold;">&raquo;&raquo;</span>&nbsp;'
				. '<a href="./admin.php?fct=tplsets&amp;op=listtpl&amp;moddir=' . $moddir 
				. '&amp;tplset=' . urlencode($tplset) . '">' . htmlspecialchars($tplset, ENT_QUOTES) . '</a>'
				. '&nbsp;<span style="font-weight:bold;">&raquo;&raquo;</span>&nbsp;' . _MD_EDITTEMPLATE 
Esempio n. 2
0
}
$img = array();
$img['name'] = $temp_img_name;
$img['originalname'] = $original_image->getVar('image_name');
$img['id'] = $original_image->getVar('image_id');
$img['title'] = $original_image->getVar('image_nicename');
$img['url'] = ICMS_IMANAGER_FOLDER_URL . '/temp/' . $temp_img_name;
$img['previewurl'] = ICMS_IMANAGER_FOLDER_URL . '/temp/' . $temp_img_name . '?' . time();
$img['originalurl'] = ICMS_IMANAGER_FOLDER_URL . '/temp/' . $orig_img_name;
$img['path'] = ICMS_IMANAGER_FOLDER_PATH . '/temp/' . $temp_img_name;
$img['width'] = $temp_img->getWidth();
$img['height'] = $temp_img->getHeight();
$img['size'] = icms_convert_size(filesize(ICMS_IMANAGER_FOLDER_PATH . '/temp/' . $temp_img_name));
$img['ori_width'] = $orig_img->getWidth();
$img['ori_height'] = $orig_img->getHeight();
$img['ori_size'] = icms_convert_size(filesize(ICMS_IMANAGER_FOLDER_PATH . '/temp/' . $orig_img_name));
$icmsTpl->assign('image', $img);
#Getting the plugins for the editor
$plugins_arr = icms_core_Filesystem::getDirList(ICMS_LIBRARIES_PATH . '/image-editor/plugins');
foreach ($plugins_arr as $plugin_folder) {
    if (file_exists(ICMS_LIBRARIES_PATH . '/image-editor/plugins/' . $plugin_folder . '/icms_plugin_version.php')) {
        if (file_exists(ICMS_LIBRARIES_PATH . '/image-editor/plugins/' . $plugin_folder . '/language/' . $icmsConfig['language'] . '/main.php')) {
            include_once ICMS_LIBRARIES_PATH . '/image-editor/plugins/' . $plugin_folder . '/language/' . $icmsConfig['language'] . '/main.php';
        }
        include_once ICMS_LIBRARIES_PATH . '/image-editor/plugins/' . $plugin_folder . '/icms_plugin_version.php';
        $icmsTpl->append('plugins', $plugversion);
        unset($plugversion);
    }
}
echo $icmsTpl->fetch(ICMS_LIBRARIES_PATH . '/image-editor/templates/image-editor.html');