Exemple #1
0
 public function getContent()
 {
     if (!self::isInCategory($this->sql->get('is-structure'), $this->sql->getArray('structure'))) {
         return '';
     }
     $pageArea = new pageArea($this->sql);
     return $pageArea->OutputFilter($this->sql->get('output'), $this->sql);
 }
Exemple #2
0
 public static function getBlock($name)
 {
     $sql = sql::factory();
     $sql->query("SELECT * FROM " . sql::table('blocks') . " WHERE name = '" . $name . "'")->result();
     if (!self::isInCategory($sql->get('is-structure'), $sql->getArray('structure'))) {
         return '';
     } else {
         if (!pageCache::exist($sql->get('id'), false, 'block')) {
             pageCache::generateArticle($sql->get('id'), true);
         }
         $content = pageCache::read($sql->get('id'), 'block');
         return pageArea::getEval($content);
     }
 }
Exemple #3
0
 public function getTemplate()
 {
     ob_start();
     if (!pageCache::exist($this->get('id'))) {
         pageCache::generateArticle($this->get('id'));
     }
     $content = pageCache::read($this->get('id'));
     $content = pageArea::getEval($content);
     $content = extension::get('FRONTEND_OUTPUT', $content);
     dyn::add('content', $content);
     include dir::template(dyn::get('template'), $this->get('template'));
     $content = ob_get_contents();
     ob_end_clean();
     return $content;
 }
Exemple #4
0
userPerm::add('media[category][delete]', lang::get('media[category][delete]'));
if (dyn::get('user')->hasPerm('media[edit]') || dyn::get('user')->hasPerm('media[delete]') || dyn::get('user')->hasPerm('media[category][edit]') || dyn::get('user')->hasPerm('media[category][delete]')) {
    backend::addNavi(lang::get('media'), url::backend('media'), 'picture-o', 2, function () {
        return dir::addon('mediamanager', 'page' . DIRECTORY_SEPARATOR . 'media.php');
    });
}
form::addClassMethod('addMediaField', function ($name, $value) {
    return $this->addField($name, $value, 'formMedia');
});
form::addClassMethod('addMediaListField', function ($name, $value) {
    return $this->addField($name, $value, 'formMediaList');
});
$page = type::super('page', 'string');
$subpage = type::super('subpage', 'string');
$action = type::super('action', 'string');
pageArea::addType('varsMedia');
pageArea::addType('varsMedialist');
if (addonConfig::isActive('metainfos')) {
    metainfosPage::addType('DYN_MEDIA');
    metainfosPage::addType('DYN_MEDIA_LIST');
    if ($page == 'meta') {
        backend::addSubNavi(lang::get('media'), url::backend('meta', ['subpage' => 'media']), 'circle', -1, function () {
            return dir::addon('mediamanager', 'page' . DIRECTORY_SEPARATOR . 'meta.media.php');
        });
    }
    if ($page == 'media' && $subpage == 'files' && in_array($action, ['add', 'edit'])) {
        extension::add('FORM_BEFORE_ACTION', function ($form) {
            $form = metainfos::getMetaInfos($form, 'media');
        });
    }
}
    ?>
" class="btn btn-sm btn-default"><?php 
    echo lang::get('back');
    ?>
</a>
					</div>
					<div class="clearfix"></div>
                </div>
            	<div class="panel-body">
    
                    <div id="ajax-content"></div>
                    <ul id="structure-content">
                    <?php 
    while ($sql->isNext()) {
        $sqlId = $action == 'add' ? 0 : $sql->get('id');
        $module = new pageArea($sql);
        if (in_array($action, ['add', 'edit'])) {
            if ($action == 'add') {
                $module->setNew(true);
            }
            $form = pageAreaHtml::formBlock($module);
        }
        ?>
                            <li data-id="<?php 
        echo $sql->get('id');
        ?>
">
                                <div class="row">
                        <?php 
        // Wenn Aktion == add
        // UND Wenn Sortierung von SQL gleich der $_GET['sort']
Exemple #6
0
 public function getContent()
 {
     $pageArea = new pageArea($this->sql);
     return $pageArea->OutputFilter($this->sql->get('output'), $this->sql);
 }
    if (!is_null(type::post('save-back')) || !is_null(type::post('save'))) {
        slot::saveBlock();
        echo message::success(lang::get('structure_content_save'), true);
    }
    if ($secondpage == 'show') {
        $sql = sql::factory();
        $sql->query('
		SELECT 
		  s.*, m.output 
		FROM 
		  ' . sql::table('slots') . ' AS s
		  LEFT JOIN
		  	' . sql::table('module') . ' AS m
				ON m.id = s.modul
		WHERE s.id=' . $id)->result();
        $pageArea = new pageArea($sql);
        $form = form::factory('module', 'id=' . $sql->get('modul'), 'index.php');
        $form->setSave(false);
        $form->addFormAttribute('class', '');
        $form->setSuccessMessage(null);
        $input = $pageArea->OutputFilter($form->get('input'), $sql);
        $form->addRawField($input);
        $form->addHiddenField('secondpage', $secondpage);
        $form->addHiddenField('id', $id);
        ?>
	<div class="row">
			<div class="col-lg-12">
				<div class="panel panel-default">
					<div class="panel-heading">
						<h3 class="panel-title">"<?php 
        echo $sql->get('name');