示例#1
0
文件: edit.php 项目: rb2/MaxSite-CMS
             // pr($row);
             $f_content = $row['page_content'];
             $f_header = $row['page_title'];
             $f_slug = $row['page_slug'];
             $f_status = $row['page_status'];
             $f_page_type = $row['page_type_id'];
             $f_password = $row['page_password'];
             $f_comment_allow = $row['page_comment_allow'];
             $f_ping_allow = $row['page_ping_allow'];
             $f_feed_allow = $row['page_feed_allow'];
             $f_page_parent = $row['page_id_parent'];
             $f_user_id = $row['page_id_autor'];
             $page_date_publish = $row['page_date_publish'];
             $page_menu_order = $row['page_menu_order'];
         }
         $f_cat = mso_get_cat_page($id);
         // рубрики в виде массива
         $f_tags = implode(', ', mso_get_tags_page($id));
         // метки страницы в виде массива
     } else {
         echo '<div class="error">' . t('Ошибочная страница (нет такой страницы)') . '</div>';
         return;
     }
 }
 // получим все опции редактора
 $editor_options = mso_get_option('editor_options', 'admin', array());
 $f_header = htmlspecialchars($f_header);
 $f_tags = htmlspecialchars($f_tags);
 $f_all_tags = '';
 // все метки
 if (function_exists('tagclouds_widget_custom')) {
示例#2
0
文件: index.php 项目: rb2/MaxSite-CMS
function _sitemap_cat_elem($elem)
{
    static $all_cat = false;
    static $all_page = array();
    $out = '';
    if ($all_cat === false) {
        $all_cat = mso_cat_array_single();
    }
    foreach ($elem['pages'] as $page) {
        // page_id page_title page_date_publish page_status page_slug
        if ($page['page_status'] == 'publish') {
            // все рубрики этой записи
            if (isset($all_page[$page['page_id']])) {
                $cur_cats = $all_page[$page['page_id']];
            } else {
                $cur_cats = mso_get_cat_page($page['page_id']);
                $all_page[$page['page_id']] = $cur_cats;
            }
            if ($cur_cats) {
                $max_level = 0;
                $cat_vybr = 0;
                foreach ($cur_cats as $cat) {
                    $level = $all_cat[$cat]['level'];
                    if ($level > $max_level) {
                        $max_level = $level;
                        $cat_vybr = $cat;
                    }
                }
                if ($cat_vybr == $elem['category_id'] or $cat_vybr == 0) {
                    $out .= '<li><a href="' . getinfo('siteurl') . 'page/' . $page['page_slug'] . '">' . htmlspecialchars($page['page_title']) . '</a></li>';
                }
            } else {
                $out .= '<li><a href="' . getinfo('siteurl') . 'page/' . $page['page_slug'] . '">' . htmlspecialchars($page['page_title']) . '</a></li>';
            }
        }
    }
    if ($out) {
        $out = '<ul>' . $out . '</ul>';
    }
    return $out;
}