示例#1
0
文件: new.php 项目: Kmartynov/cms
foreach ($query->result_array() as $row) {
    if ($f_page_type == $row['page_type_id']) {
        $che = 'checked="checked"';
    } else {
        $che = '';
    }
    $page_type_desc = $row['page_type_desc'] ? ' <em>(' . t($row['page_type_desc']) . ')</em>' : '';
    $all_post_types .= '<label class="nocell"><input name="f_page_type[]" type="radio" ' . $che . ' value="' . $row['page_type_id'] . '"> ' . $row['page_type_name'] . $page_type_desc . '</label><br>';
    $page_type_js_obj .= $row['page_type_name'] . ':' . $row['page_type_id'] . ',';
}
$page_type_js_obj .= '}';
$page_type_js_obj = str_replace(',}', '}', $page_type_js_obj);
// получаем все рубрики чекбоксы
require_once $MSO->config['common_dir'] . 'category.php';
// $all_cat = mso_cat('<input name="f_cat[]" type="checkbox" %CHECKED% value="%ID%"> %NAME%', $f_cat);
$all_cat = mso_cat_ul('<label><input name="f_cat[]" type="checkbox" %CHECKED% value="%ID%" title="id = %ID%"> %NAME%</label>', true, $f_cat, $f_cat);
// опция по-умолчанию разрешение комментирования отмечать или нет
if (isset($editor_options['comment_allow_checked'])) {
    $comment_allow_checked = $editor_options['comment_allow_checked'] == 0 ? '' : 'checked="checked"';
} else {
    $comment_allow_checked = 'checked="checked"';
}
if ($f_comment_allow) {
    $f_comment_allow = $comment_allow_checked;
} else {
    $f_comment_allow = '';
}
// опция по-умолчанию разрешение rss отмечать или нет
if (isset($editor_options['feed_allow_checked'])) {
    $feed_allow_checked = $editor_options['feed_allow_checked'] == 0 ? '' : 'checked="checked"';
} else {
示例#2
0
文件: remote.php 项目: Kmartynov/cms
function mso_remote_f_getcategorylist($post)
{
    $out = '';
    require_once getinfo('common_dir') . 'category.php';
    // функции рубрик
    $pages = mso_cat_array('page', 0);
    $out = mso_cat_ul('%ID% %NAME%', true, array(), array());
    $out = str_replace('</li>', '', $out);
    $out = str_replace('</ul>', '', $out);
    $out = str_replace('<ul>', '', $out);
    $out = str_replace('<ul class="child">', '', $out);
    $out = str_replace('<ul class="category">', '', $out);
    $out = str_replace("\t", '', $out);
    $out = str_replace("\n\n", "\n", $out);
    $out = str_replace("\n\n", "\n", $out);
    $out = str_replace(" ", " ", $out);
    $out = str_replace('<li class="', '', $out);
    $out = str_replace('">', ' ', $out);
    $out = str_replace('count', '', $out);
    $out = str_replace('level', '', $out);
    return trim($out);
}