Ejemplo n.º 1
0
<?php

$Layouter = new cmsLayouter3($Cont->vs['module']);
$Layouter->init();
$LPage = $Layouter->getLayoutPage();
if (is_file($Layouter->customPath() . 'main.js')) {
    html::addJsFile(preg_replace('/\\/$/', '', path2uri($Layouter->customPath() . 'main.js')));
}
include $Layouter->customTemplatePath();
Ejemplo n.º 2
0
<?php

$Layouter = new cmsLayouter3($Cont->vs['module']);
$LPage = $Layouter->getLayoutPage();
if (is_file($Layouter->customPath() . '../options.php')) {
    include $Layouter->customPath() . '../options.php';
    echo '<br><br>';
}
if ($LPage->access() < 2) {
    return;
}
?>
<b>Layout</b>
<hr>
<div id=customLayoutSettings>
  	<button style="font-size:18px; float:right" id="layoutCssEditor">css-Editor</button>
  	<script>
	$('#layoutCssEditor').on('click', function(e) {
		e.preventDefault();
		cmsLayouter3_styleEditor();
	});
  	</script>

  	<?php 
$_SESSION['fileEditor']['allow'][$Layouter->customPath() . 'custom.css'] = 1;
?>
  	<a target=editor href="<?php 
echo appURL . 'editor/index.php?file=' . urldecode($Layouter->customPath() . 'custom.css');
?>
">
  		custom.css Datei bearbeiten<br>
Ejemplo n.º 3
0
    function getImages()
    {
        $path = $this->customPath() . 'img/';
        !is_dir($path) && mkdir($path);
        $url = path2uri($path);
        $ret = array();
        foreach (scanDir($path) as $f) {
            if (!is_file($path . $f)) {
                continue;
            }
            $ret[] = $url . $f;
        }
        return $ret;
    }
}
qg::on('action', function () {
    // deprecated?
    if (isset($_GET['mCmsLayouter3_uploadPid'])) {
        $pid = (int) $_GET['mCmsLayouter3_uploadPid'];
        $Cont = Page($pid);
        $Layouter = new cmsLayouter3($Cont->vs['module']);
        $Layouter->init();
        $LPage = $Layouter->getLayoutPage();
        if ($LPage->access() < 2) {
            exit(0);
        }
        $File = $_FILES['file'];
        move_uploaded_file($File['tmp_name'], $Layouter->customPath() . 'img/' . $File['name']);
        exit(1);
    }
});