Esempio n. 1
0
<?php

if (!defined('BASEPATH')) {
    exit('No direct script access allowed');
}
/*
    (c) MaxSite CMS, http://max-3000.com/
*/
// условие вывода компонента
// php-условие как в виджетах
if ($rules = trim(mso_get_option('file1_rules_output', getinfo('template'), ''))) {
    $rules_result = eval('return ( ' . $rules . ' ) ? 1 : 0;');
    if ($rules_result === false) {
        $rules_result = 1;
    }
    if ($rules_result !== 1) {
        return;
    }
}
if ($fn = mso_fe(mso_get_option('file1_file', getinfo('template'), ''))) {
    if (mso_get_option('file1_use_tmpl', getinfo('template'), '')) {
        eval(mso_tmpl($fn));
    } else {
        require $fn;
    }
}
# end of file
Esempio n. 2
0
function mso_tmpl_ts($fn, $replace = true)
{
    if ($fn = mso_find_ts_file($fn)) {
        return mso_tmpl($fn, $replace);
    } else {
        return '?>';
    }
}
Esempio n. 3
0
    $edit_link = '';
}
if ($comments or $page['page_comment_allow']) {
    echo NR . '<div class="mso-type-page-comments">' . NR;
}
if ($f = mso_page_foreach('page-comments-do-list')) {
    require $f;
}
if ($page_text_ok and $comments) {
    echo '<div class="mso-comments">';
    eval(mso_tmpl_ts('type/page/units/page-comments-count-tmpl.php'));
    echo '<section>';
    static $comment_num = 0;
    // номер комментария по порядку - если нужно выводить в type_foreach-файле
    if ($fn = mso_find_ts_file('type/page/units/page-comments-article-tmpl.php')) {
        $tmpl = mso_tmpl($fn);
    }
    foreach ($comments as $comment) {
        $comment_num++;
        if ($f = mso_page_foreach('page-comments')) {
            require $f;
            continue;
            // следующая итерация
        }
        extract($comment);
        if ($comment_num & 1) {
            $a_class = 'mso-comment-odd';
        } else {
            $a_class = 'mso-comment-even';
        }
        // четное