Esempio n. 1
0
    if (isset($site_mods['comment']) and isset($module_config[$module_name]['activecomm'])) {
        define('NV_COMM_ID', $id);
        //ID bài viết hoặc
        define('NV_COMM_AREA', $module_info['funcs'][$op]['func_id']);
        //để đáp ứng comment ở bất cứ đâu không cứ là bài viết
        //check allow comemnt
        $allowed = $module_config[$module_name]['allowed_comm'];
        //tuy vào module để lấy cấu hình. Nếu là module news thì có cấu hình theo bài viết
        if ($allowed == '-1') {
            $allowed = $news_contents['allowed_comm'];
        }
        define('NV_PER_PAGE_COMMENT', 5);
        //Số bản ghi hiển thị bình luận
        require_once NV_ROOTDIR . '/modules/comment/comment.php';
        $area = defined('NV_COMM_AREA') ? NV_COMM_AREA : 0;
        $checkss = md5($module_name . '-' . $area . '-' . NV_COMM_ID . '-' . $allowed . '-' . NV_CACHE_PREFIX);
        $content_comment = nv_comment_module($module_name, $checkss, $area, NV_COMM_ID, $allowed, 1);
    } else {
        $content_comment = '';
    }
    $contents = detail_theme($news_contents, $array_keyword, $related_new_array, $related_array, $topic_array, $content_comment);
    $id_profile_googleplus = $news_contents['gid'];
    $page_title = $news_contents['title'];
    $key_words = implode(', ', $key_words);
    $description = $news_contents['hometext'];
} else {
    $contents = no_permission($global_array_cat[$catid]['groups_view']);
}
include NV_ROOTDIR . '/includes/header.php';
echo nv_site_theme($contents);
include NV_ROOTDIR . '/includes/footer.php';
Esempio n. 2
0
        }
        $ratingdetail = array_map("intval", explode("|", $news_contents['ratingdetail']));
        $ratingdetail[0] = isset($ratingdetail[0]) ? intval($ratingdetail[0]) : 0;
        $ratingdetail[1] = isset($ratingdetail[1]) ? intval($ratingdetail[1]) : 0;
        $news_contents['stringrating'] = sprintf($lang_module['stringrating'], $ratingdetail[0], $ratingdetail[1]);
        $ratingdetail[1] = $ratingdetail[1] > 0 ? $ratingdetail[1] : 1;
        $news_contents['numberrating'] = round($ratingdetail[0] / $ratingdetail[1]) - 1;
        $news_contents['langstar'] = array("note" => $lang_module['star_note'], "verypoor" => $lang_module['star_verypoor'], "poor" => $lang_module['star_poor'], "ok" => $lang_module['star_ok'], "good" => $lang_module['star_good}'], "verygood" => $lang_module['star_verygood']);
    }
    $page_title = $news_contents['title'];
    $key_words = $news_contents['keywords'];
    $description = $news_contents['hometext'];
    if (empty($news_contents['author'])) {
        $sql = $db->sql_query(" SELECT `username`, `full_name` FROM `" . NV_USERS_GLOBALTABLE . "` WHERE `userid` = '" . $news_contents['admin_id'] . "' LIMIT 0,1 ");
        $chk_u = $db->sql_numrows($sql);
        if ($chk_u) {
            list($row) = $db->sql_fetchrowset($sql);
        }
        $news_contents['author_name'] = empty($row['full_name']) ? $row['username'] : $row['full_name'];
    } else {
        $news_contents['author_name'] = $news_contents['author'];
    }
    $contents = detail_theme($news_contents, $related_new_array, $related_array, $topic_array, $commentenable);
} else {
    $contents = no_permission($func_who_view);
}
include NV_ROOTDIR . "/includes/header.php";
$results = nv_site_theme($contents);
// new dBug($results);
echo $results;
include NV_ROOTDIR . "/includes/footer.php";
Esempio n. 3
0
        //check allow comemnt
        $allowed = $module_config[$module_name]['allowed_comm'];
        //tuy vào module để lấy cấu hình. Nếu là module news thì có cấu hình theo bài viết
        if ($allowed == '-1') {
            $allowed = $news_contents['allowed_comm'];
        }
        define('NV_PER_PAGE_COMMENT', 5);
        //Số bản ghi hiển thị bình luận
        require_once NV_ROOTDIR . '/modules/comment/comment.php';
        $area = defined('NV_COMM_AREA') ? NV_COMM_AREA : 0;
        $checkss = md5($module_name . '-' . $area . '-' . NV_COMM_ID . '-' . $allowed . '-' . NV_CACHE_PREFIX);
        $content_comment = nv_comment_module($module_name, $checkss, $area, NV_COMM_ID, $allowed, 1);
    } else {
        $content_comment = '';
    }
    // call user playlist
    if ($user_info['userid'] > 0) {
        $sql = 'SELECT playlist_id, title, status FROM ' . NV_PREFIXLANG . '_' . $module_data . '_playlist_cat WHERE userid=' . $user_info['userid'] . ' AND status > 0 ORDER BY weight ASC';
        $array_user_playlist = $db->query($sql)->fetchAll();
    }
    $contents = detail_theme($news_contents, $href_vid, $array_keyword, $related_new_array, $related_array, $content_comment, $array_user_playlist);
    $id_profile_googleplus = $news_contents['gid'];
    $page_title = $news_contents['title'];
    $key_words = implode(', ', $key_words);
    $description = $news_contents['hometext'];
} else {
    $contents = no_permission($global_array_cat[$catid]['groups_view']);
}
include NV_ROOTDIR . '/includes/header.php';
echo nv_site_theme($contents);
include NV_ROOTDIR . '/includes/footer.php';
Esempio n. 4
0
 } else {
     $content_comment = '';
 }
 $news_contents['link_made_up'] = nv_url_rewrite(NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=' . $global_array_fam[$news_contents['fid']]['alias'] . '/' . $news_contents['alias'] . '/' . $alias_made_up . $global_config['rewrite_exturl'], true);
 $news_contents['link_convention'] = nv_url_rewrite(NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=' . $global_array_fam[$news_contents['fid']]['alias'] . '/' . $news_contents['alias'] . '/' . $alias_convention . $global_config['rewrite_exturl'], true);
 $news_contents['link_collapse'] = nv_url_rewrite(NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=' . $global_array_fam[$news_contents['fid']]['alias'] . '/' . $news_contents['alias'] . '/' . $alias_collapse . $global_config['rewrite_exturl'], true);
 $news_contents['link_anniversary'] = nv_url_rewrite(NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=' . $global_array_fam[$news_contents['fid']]['alias'] . '/' . $news_contents['alias'] . '/' . $alias_anniversary . $global_config['rewrite_exturl'], true);
 $news_contents['link_family_tree'] = nv_url_rewrite(NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=' . $global_array_fam[$news_contents['fid']]['alias'] . '/' . $news_contents['alias'] . '/' . $alias_family_tree . $global_config['rewrite_exturl'], true);
 $news_contents['link_main'] = nv_url_rewrite(NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=' . $global_array_fam[$news_contents['fid']]['alias'] . '/' . $news_contents['alias'] . $global_config['rewrite_exturl'], true);
 $news_contents['ftitle'] = $global_array_fam[$fid]['title'];
 $array_mod_title[] = array('title' => $news_contents['title'], 'link' => $news_contents['link_main']);
 $body_contents = $db->query('SELECT bodyhtml as bodytext, rule, content, imgposition, copyright, allowed_send, allowed_print, allowed_save, gid FROM ' . NV_PREFIXLANG . '_' . $module_data . '_bodyhtml_' . ceil($news_contents['id'] / 2000) . ' where id=' . $news_contents['id'])->fetch();
 $news_contents = array_merge($news_contents, $body_contents);
 unset($body_contents);
 if ($news_contents['id'] > 0 and empty($array_op[2])) {
     $contents = detail_theme($news_contents, $array_keyword, $content_comment);
 } elseif ($news_contents['id'] > 0 and $array_op[2] == $alias_made_up) {
     $array_mod_title[] = array('title' => $lang_module['made_up'], 'link' => $base_url_rewrite);
     $contents = view_detail('made_up', $news_contents, $array_keyword, $content_comment);
 } elseif ($news_contents['id'] > 0 and $array_op[2] == $alias_convention) {
     $array_mod_title[] = array('title' => $lang_module['convention'], 'link' => $base_url_rewrite);
     $contents = view_detail('convention', $news_contents, $array_keyword, $content_comment);
 } elseif ($news_contents['id'] > 0 and $array_op[2] == $alias_collapse) {
     $array_mod_title[] = array('title' => $lang_module['collapse'], 'link' => $base_url_rewrite);
     $contents = view_detail('collapse', $news_contents, $array_keyword, $content_comment);
 } elseif ($news_contents['id'] > 0 and $array_op[2] == $alias_anniversary) {
     $array_mod_title[] = array('title' => $lang_module['anniversary'], 'link' => $base_url_rewrite);
     $contents = view_detail('anniversary', $news_contents, $array_keyword, $content_comment);
 } elseif ($news_contents['id'] > 0 and $array_op[2] == $alias_family_tree and $count_op == 4 and $array_op[3] != '') {
     $link_alias_family_tree = nv_url_rewrite(NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=' . $global_array_fam[$news_contents['fid']]['alias'] . '/' . $news_contents['alias'] . '/' . $alias_family_tree . $global_config['rewrite_exturl'], true);
     $array_mod_title[] = array('title' => $lang_module['family_tree'], 'link' => $link_alias_family_tree);