Example #1
0
<?php

// kontrola jadra
if (!defined('_core')) {
    exit;
}
// titulek, obsah
$title = $query['title'];
if (_template_autoheadings && $query['autotitle'] == 1) {
    $content .= "<h1>" . $title . "</h1>";
}
_extend('call', 'page.section.aftertitle', $extend_args);
_extend('call', 'page.section.content.before', $extend_args);
$content .= _parseHCM($query['content']);
_extend('call', 'page.section.content.after', $extend_args);
// komentare
if ($query['var1'] == 1 and _comments) {
    require_once _indexroot . 'require/functions-posts.php';
    $content .= _postsOutput(1, $id, $query['var3']);
}
Example #2
0
<?php

// kontrola jadra
if (!defined('_core')) {
    exit;
}
// titulek
$title = $query['title'];
if (_template_autoheadings && $query['autotitle']) {
    $content .= "<h1>" . $query['title'] . "</h1>\n";
    _extend('call', 'page.gallery.aftertitle', $extend_args);
}
// obsah
_extend('call', 'page.gallery.content.before', $extend_args);
if ($query['content'] != "") {
    $content .= _parseHCM($query['content']) . "\n\n<div class='hr'><hr /></div>\n\n";
}
_extend('call', 'page.gallery.content.after', $extend_args);
// obrazky
$paging = _resultPaging(_indexOutput_url, $query['var2'], "images", "home=" . $id);
$images = DB::query("SELECT * FROM `" . _mysql_prefix . "-images` WHERE home=" . $id . " ORDER BY ord " . $paging[1]);
$images_number = DB::size($images);
if ($images_number != 0) {
    $usetable = $query['var1'] != -1;
    if (_pagingmode == 1 or _pagingmode == 2) {
        $content .= $paging[0];
    }
    if ($usetable) {
        $content .= "<table class='gallery'>\n";
    } else {
        $content .= "<div class='gallery'>\n";
/**
 * Vypis boxu daneho sloupce
 * @param string $column nazev sloupce
 * @param bool $return vratit misto vypisu 1/0
 * @return string|null
 */
function _templateBoxes($column = 1, $return = false)
{
    $output = "\n";
    if (!_notpublicsite or _loginindicator) {
        // nacist boxy
        if (isset(SL::$registry['template_columns'][$column])) {
            $boxes = SL::$registry['template_columns'][$column];
        } else {
            $boxes = array();
            $query = DB::query('SELECT title,content,class FROM `' . _mysql_prefix . '-boxes` WHERE visible=1 AND `column`=' . DB::val($column) . (_loginindicator ? '' : ' AND `public`=1') . ' ORDER BY ord');
            while ($item = DB::row($query)) {
                $boxes[] = $item;
            }
            DB::free($query);
        }
        // extend
        $extendOutput = _extend('buffer', 'tpl.boxes', array('boxes' => $boxes, 'column' => $column));
        if ('' !== $extendOutput) {
            return $extendOutput;
        }
        // obsah
        if (_template_boxes_parent != "") {
            $output .= "<" . _template_boxes_parent . ">\n";
        }
        foreach ($boxes as $item) {
            // kod titulku
            if ($item['title'] != "") {
                $title = "<" . _template_boxes_title . " class='box-title'>" . $item['title'] . "</" . _template_boxes_title . ">\n";
            } else {
                $title = "";
            }
            // titulek venku
            if (_template_boxes_title_inside == 0 and $title != "") {
                $output .= $title;
            }
            // starttag polozky
            if (_template_boxes_item != "") {
                $output .= "<" . _template_boxes_item . " class='box-item" . (isset($item['class']) ? ' ' . $item['class'] : '') . "'>\n";
            }
            // titulek vevnitr
            if (_template_boxes_title_inside == 1 and $title != "") {
                $output .= $title;
            }
            // obsah
            $output .= _parseHCM($item['content']);
            // endtag polozky
            if (_template_boxes_item != "") {
                $output .= "\n</" . _template_boxes_item . ">";
            }
            // spodek boxu
            if (_template_boxes_bottom == 1) {
                $output .= "<" . _template_boxes_item . " class='box-bottom'></" . _template_boxes_item . ">\n\n";
            } else {
                $output .= "\n\n";
            }
        }
        if (_template_boxes_parent != "") {
            $output .= "</" . _template_boxes_parent . ">\n";
        }
    }
    // vypis vysledku
    if ($return) {
        return $output;
    }
    echo $output;
}
Example #4
0
/style/system.css" type="text/css" rel="stylesheet" />
<title><?php 
            echo $query['title'] . " " . _titleseparator . " " . _title;
            ?>
</title>
</head>

<body onload="setTimeout('this.print();', 500);">

<p id="informations"><?php 
            echo "<strong>" . $_lang['global.source'] . ":</strong> <a href='" . $url . "'>" . $url . "</a>" . _template_listinfoseparator . "<strong>" . $_lang['article.posted'] . ":</strong> " . _formatTime($query['time']) . _template_listinfoseparator . "<strong>" . $_lang['article.author'] . ":</strong> " . _linkUser($query['author'], null, true, true);
            ?>
</p>

<h1><?php 
            echo $query['title'];
            ?>
</h1>
<p><?php 
            echo (isset($query['picture_uid']) ? "<img class='list-perex-image' src='" . _pictureStorageGet(_indexroot . 'pictures/articles/', null, $query['picture_uid'], 'jpg') . "' alt='" . $query['title'] . "' />" : '') . $query['perex'];
            ?>
</p>
<?php 
            echo _parseHCM($query['content']);
            ?>

</body>
</html><?php 
        }
    }
}
<base href="./../" target="_blank" />
<link href="admin/remote/style.css.php?s=<?php 
echo _adminscheme . ($scheme_dark ? '&amp;d' : '') . '&amp;' . _cacheid;
?>
" type="text/css" rel="stylesheet" />
<link href="admin/remote/style.custom.css?<?php 
echo _cacheid;
?>
" type="text/css" rel="stylesheet" />
<script type="text/javascript">/* <![CDATA[ */var sl_indexroot = '';/* ]]> */</script>
<script type="text/javascript" src="<?php 
echo _indexroot;
?>
remote/jscript.php?<?php 
echo _cacheid . '&amp;' . _language;
?>
"></script>
<title>Admin custom index</title>
</head>

<body>

<div id="custom-wrapper">
<?php 
echo _parseHCM(SL::$settings['admin_index_custom']);
?>
</div>

</body>
</html>
/**
 * Filtorvat HCM moduly v textu na zaklade opravneni
 * @param string $content vstupni text
 * @return string
 */
function _filtrateHCM($content)
{
    // odstraneni HCM php modulu
    if (!_loginright_adminhcmphp) {
        $filter = array('php', 'setlayout');
        _extend('call', 'hcm.filter.php', array('filter' => &$filter));
        $GLOBALS['__input'] = array(true, $filter);
        $content = _parseHCM($content, '_parseHCM_filter');
        unset($GLOBALS['__input']);
    }
    return $content;
}
Example #7
0
                } else {
                    $info['rateform'] .= "<td>" . $x . "</td>\n";
                }
            }
            if ($i == 0) {
                $info['rateform'] .= "<td rowspan='2'><img src='" . _templateImage("icons/rate-bad.png") . "' alt='bad' class='icon' /></td>\n";
            }
            $info['rateform'] .= "</tr>\n";
        }
        $info['rateform'] .= "\n<tr><td colspan='7'><input type='submit' value='" . $_lang['article.rate.submit'] . " &gt;' /></td></tr>\n</table>\n";
    }
    $info['rateform'] .= _xsrfProtect() . "</form>\n";
}
// infobox
if ($query['infobox'] != "") {
    $info['infobox'] = _parseHCM($query['infobox']);
}
// sestaveni kodu
if (count(_arrayRemoveValue($info, null)) != 0) {
    // zacatek tabulky
    $content .= "\n<div class='anchor'><a name='ainfo'></a></div>\n<table class='article-info'>\n<tr class='valign-top'>\n";
    // prvni bunka
    if ($info['basicinfo'] != null or $info['idlink'] != null or $info['rateresults'] != null or $info['infobox'] != null and $info['rateform'] != null) {
        $content .= "<td>" . $info['basicinfo'] . $info['idlink'] . $info['rateresults'];
        // vlozeni formulare pro hodnoceni, pokud je infobox obsazen
        if ($info['rateform'] != null and ($info['infobox'] != null or $info['basicinfo'] == null)) {
            $content .= ($info['basicinfo'] != null ? "<br />" : '') . "<br />" . $info['rateform'];
            $rateform_used = true;
        }
        $content .= "\n</td>\n";
    }