define('NV_COMM_ID', $data_content['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 = $data_content['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_product($data_content, $data_unit, $data_others, $array_other_view, $content_comment, $compare_id, $popup, $idtemplate, $array_keyword); } else { $nv_redirect = NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name; redict_link($lang_module['detail_no_permission'], $lang_module['redirect_to_back_shops'], $nv_redirect); } if ($popup) { echo $contents; } else { include NV_ROOTDIR . '/includes/header.php'; echo nv_site_theme($contents); include NV_ROOTDIR . '/includes/footer.php'; }
<?php /** * @Project NUKEVIET 4.x * @Author VINADES.,JSC (contact@vinades.vn) * @Copyright (C) 2014 VINADES.,JSC. All rights reserved * @License GNU/GPL version 2 or any later version * @Createdate Mon, 27 Jan 2014 00:08:04 GMT */ if (!defined('NV_IS_MOD_COMMENT')) { die('Stop!!!'); } $module = $nv_Request->get_string('module', 'post,get'); // Kiểm tra module có được Sử dụng chức năng bình luận if (!empty($module) and isset($module_config[$module]['activecomm'])) { $area = $nv_Request->get_int('area', 'post,get', 0); $id = $nv_Request->get_int('id', 'post,get', 0); $allowed_comm = $nv_Request->get_title('allowed', 'post,get', 0); $checkss = $nv_Request->get_title('checkss', 'post,get'); $page = $nv_Request->get_int('page', 'get', 1); $status_comment = $nv_Request->get_title('status_comment', 'post,get', ''); define('NV_PER_PAGE_COMMENT', $nv_Request->get_int('perpage', 'get', 5)); //per_page_comment require_once NV_ROOTDIR . '/modules/comment/comment.php'; $content_comment = nv_comment_module($module, $checkss, $area, $id, $allowed_comm, $page, $status_comment); include NV_ROOTDIR . '/includes/header.php'; echo $content_comment; include NV_ROOTDIR . '/includes/footer.php'; } Header('Location: ' . nv_url_rewrite(NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA, true)); die;
<?php /** * @Project NUKEVIET 3.0 * @Author VINADES.,JSC (contact@vinades.vn) * @Copyright (C) 2010 VINADES., JSC. All rights reserved * @Createdate 3-6-2010 0:14 */ if (!defined('NV_IS_MOD_NEWS')) { die('Stop!!!'); } if (!defined('NV_IS_AJAX')) { die('Wrong URL'); } $contents = ""; $id = $nv_Request->get_int('id', 'get', 0); $checkss = $nv_Request->get_string('checkss', 'get', ''); $page = $nv_Request->get_int('page', 'get', 0); if ($module_config[$module_name]['activecomm'] and $id > 0 and $checkss == md5($id . session_id() . $global_config['sitekey'])) { $comment_array = nv_comment_module($id, $page); $contents = comment_theme($comment_array); } include NV_ROOTDIR . "/includes/header.php"; echo $contents; include NV_ROOTDIR . "/includes/footer.php";
if ($news_contents['topicid'] > 0) { list($topic_title, $topic_alias) = $db->sql_fetchrow($db->sql_query("SELECT `title`,`alias` FROM `" . NV_PREFIXLANG . "_" . $module_data . "_topics` WHERE `topicid` = '" . $news_contents['topicid'] . "'")); $topic = $db->sql_query("SELECT `id`, `listcatid`, `title`, `alias`,`publtime` FROM `" . NV_PREFIXLANG . "_" . $module_data . "_rows` WHERE `status`=1 AND `topicid` = '" . $news_contents['topicid'] . "' AND `id` != '{$id}' AND `publtime` < " . NV_CURRENTTIME . " AND (`exptime`=0 OR `exptime`>" . NV_CURRENTTIME . ") ORDER BY `id` DESC LIMIT 0, " . $st_links . ""); while ($row = $db->sql_fetchrow($topic)) { $catid_arr = explode(",", $row['listcatid']); $topiclink = "" . NV_BASE_SITEURL . "index.php?" . NV_LANG_VARIABLE . "=" . NV_LANG_DATA . "&" . NV_NAME_VARIABLE . "=" . $module_name . "&" . NV_OP_VARIABLE . "=topic/" . $topic_alias . ""; $link = NV_BASE_SITEURL . "index.php?" . NV_LANG_VARIABLE . "=" . NV_LANG_DATA . "&" . NV_NAME_VARIABLE . "=" . $module_name . "&" . NV_OP_VARIABLE . "=" . $global_array_cat[$catid_arr[0]]['alias'] . "/" . $row['alias'] . "-" . $row['id'] . ""; $topic_array[] = array("title" => $row['title'], "link" => $link, "time" => nv_date("d/m/Y", $row['publtime']), "topiclink" => $topiclink, "topictitle" => $topic_title); } $db->sql_freeresult($topic); unset($topic, $rows); } //Check: comment $commentenable = 0; if ($news_contents['allowed_comm'] and $module_config[$module_name]['activecomm']) { $comment_array = nv_comment_module($news_contents['id'], 0); $news_contents['comment'] = comment_theme($comment_array); if ($news_contents['allowed_comm'] == 1 or $news_contents['allowed_comm'] == 2 and defined('NV_IS_USER')) { $commentenable = 1; } elseif ($news_contents['allowed_comm'] == 2) { $commentenable = 2; } } else { $news_contents['comment'] = ""; } if ($news_contents['allowed_rating']) { $time_set_rating = $nv_Request->get_int($module_name . '_' . $op . '_' . $news_contents['id'], 'cookie', 0); if ($time_set_rating > 0) { $news_contents['disablerating'] = 1; } else { $news_contents['disablerating'] = 0;