Skip to content

Commit

Permalink
Merge pull request #1 from ngoclam99/develop
Browse files Browse the repository at this point in the history
Nâng cấp module từ NukeViet 4.3.01 lên NukeViet 4.5.00
  • Loading branch information
ngoclam99 authored Jul 12, 2021
2 parents 60fc375 + a0ec17f commit 93efbc7
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 18 deletions.
3 changes: 3 additions & 0 deletions modules/dispatch/funcs/detail.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
$fileupload = array();
$array_data = array();

$page_url = $base_url = NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name;
$canonicalUrl = getCanonicalUrl($page_url, true, true);

if (isset($array_op[1]) and preg_match("/^([a-zA-Z0-9\-\_]+)\-([\d]+)$/", $array_op[1], $matches)) {
$id = $matches[2];
$alias = $matches[0];
Expand Down
5 changes: 4 additions & 1 deletion modules/dispatch/funcs/down.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@

$session_files = $nv_Request->get_string('session_files', 'session', '');

$page_url = $base_url = NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name;
$canonicalUrl = getCanonicalUrl($page_url, true, true);

if (empty($session_files)) {
die('Wrong URL');
}
Expand All @@ -32,7 +35,7 @@
$sql = "UPDATE " . NV_PREFIXLANG . "_" . $module_data . " SET download_hits=download_hits+1 WHERE id=" . intval($session_files['linkdirect'][$code]['id']);
$db->query($sql);

$content = "<br /><img border=\"0\" src=\"" . NV_BASE_SITEURL . NV_ASSETS_DIR . "images/load_bar.gif\"><br /><br />\n";
$content = "<br /><img border=\"0\" src=\"" . NV_STATIC_URL . NV_ASSETS_DIR . "images/load_bar.gif\"><br /><br />\n";
$content .= sprintf($lang_module['download_wait2'], $session_files['linkdirect'][$code]['link']);
$content .= "<meta http-equiv=\"refresh\" content=\"5;url=" . $session_files['linkdirect'][$code]['link'] . "\" />";

Expand Down
16 changes: 15 additions & 1 deletion modules/dispatch/funcs/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
$array = array();
$error = '';
$sql = "FROM " . NV_PREFIXLANG . "_" . $module_data . "_document WHERE id!=0";
$base_url = NV_BASE_SITEURL . "index.php?" . NV_NAME_VARIABLE . "=" . $module_name;
$page_url = $base_url = NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&amp;' . NV_NAME_VARIABLE . '=' . $module_name;

$listcats = nv_listcats(0);
$listdes = nv_listdes(0);
Expand Down Expand Up @@ -128,6 +128,16 @@
$sql .= " ORDER BY from_time DESC";

$page = $nv_Request->get_int('page', 'get', 0);

// URL chính tắc: $page_url, $base_url và $canonicalUrl
if (isset($array_op[0]) and substr($array_op[0], 0, 5) == 'page-') {
$page = intval(substr($array_op[0], 5));
}
if ($page > 1) {
$page_url .= '&amp;' . NV_OP_VARIABLE . '=page-' . $page;
}
$canonicalUrl = getCanonicalUrl($page_url, true, true);

$per_page = 30;
$sql2 = "SELECT * " . $sql . " LIMIT " . $page . ", " . $per_page;

Expand Down Expand Up @@ -177,6 +187,10 @@
$error = $lang_module['error_rows'];
}

// 2.Đánh số trang
$urlappend = '&amp;' . NV_OP_VARIABLE . '=page-';
betweenURLs($page, ceil($all_page/$per_page), $base_url, $urlappend, $prevPage, $nextPage);

$contents = nv_theme_congvan_main($error, $array, $page_title, $base_url, $all_page, $per_page, $page, $type, $se, $to, $from, $from_signer, $content, $code);

include NV_ROOTDIR . '/includes/header.php';
Expand Down
4 changes: 2 additions & 2 deletions modules/dispatch/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
'submenu' => 'main,detail',
'is_sysmod' => 0,
'virtual' => 1,
'version' => '4.3.01',
'date' => 'Tue, 14 Nov 2017 01:50:53 GMT',
'version' => '4.5.00',
'date' => 'Mon, 12 Jul 2021 14:28:00 GMT',
'author' => 'VINADES <[email protected]>',
'uploads_dir' => array($module_name),
'note' => ''
Expand Down
6 changes: 3 additions & 3 deletions themes/admin_default/modules/dispatch/add_document.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</div>
<!-- END: error -->

<link rel="stylesheet" type="text/css" href="{NV_BASE_SITEURL}{NV_ASSETS_DIR}/js/jquery-ui/jquery-ui.min.css">
<link rel="stylesheet" type="text/css" href="{NV_STATIC_URL}{NV_ASSETS_DIR}/js/jquery-ui/jquery-ui.min.css">

<form action="{FORM_ACTION}" method="post">
<table class="table table-striped table-bordered table-hover">
Expand Down Expand Up @@ -162,8 +162,8 @@
</table>
</form>

<script type="text/javascript" src="{NV_BASE_SITEURL}{NV_ASSETS_DIR}/js/jquery-ui/jquery-ui.min.js"></script>
<script type="text/javascript" src="{NV_BASE_SITEURL}{NV_ASSETS_DIR}/js/language/jquery.ui.datepicker-{NV_LANG_INTERFACE}.js"></script>
<script type="text/javascript" src="{NV_STATIC_URL}{NV_ASSETS_DIR}/js/jquery-ui/jquery-ui.min.js"></script>
<script type="text/javascript" src="{NV_STATIC_URL}{NV_ASSETS_DIR}/js/language/jquery.ui.datepicker-{NV_LANG_INTERFACE}.js"></script>
<script type="text/javascript">
$("#from_time,#date_iss, #date_first, #date_die").datepicker({
showOn : "both",
Expand Down
6 changes: 3 additions & 3 deletions themes/admin_default/modules/dispatch/main.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<!-- END: error -->

<script type="text/javascript">var pro_del_cofirm = "{LANG.product_del_cofirm}";</script>
<link rel="stylesheet" type="text/css" href="{NV_BASE_SITEURL}{NV_ASSETS_DIR}/js/jquery-ui/jquery-ui.min.css">
<link rel="stylesheet" type="text/css" href="{NV_STATIC_URL}{NV_ASSETS_DIR}/js/jquery-ui/jquery-ui.min.css">

<div class="well">
<form class="form-inline" action="{FORM_ACTION}" method="get">
Expand Down Expand Up @@ -79,8 +79,8 @@
</table>
</div>

<script type="text/javascript" src="{NV_BASE_SITEURL}{NV_ASSETS_DIR}/js/jquery-ui/jquery-ui.min.js"></script>
<script type="text/javascript" src="{NV_BASE_SITEURL}{NV_ASSETS_DIR}/js/language/jquery.ui.datepicker-{NV_LANG_INTERFACE}.js"></script>
<script type="text/javascript" src="{NV_STATIC_URL}{NV_ASSETS_DIR}/js/jquery-ui/jquery-ui.min.js"></script>
<script type="text/javascript" src="{NV_STATIC_URL}{NV_ASSETS_DIR}/js/language/jquery.ui.datepicker-{NV_LANG_INTERFACE}.js"></script>
<script type="text/javascript">
$(function() {
$("#from,#to").datepicker({
Expand Down
4 changes: 2 additions & 2 deletions themes/default/modules/dispatch/block_category.tpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!-- BEGIN: main -->
<link rel="stylesheet" type="text/css" href="{NV_BASE_SITEURL}themes/{TEMPLATE_CSS}/css/jquery.metisMenu.css" />
<script type="text/javascript" src="{NV_BASE_SITEURL}{NV_ASSETS_DIR}/js/jquery/jquery.metisMenu.js"></script>
<link rel="stylesheet" type="text/css" href="{NV_STATIC_URL}themes/{TEMPLATE_CSS}/css/jquery.metisMenu.css" />
<script type="text/javascript" src="{NV_STATIC_URL}{NV_ASSETS_DIR}/js/jquery/jquery.metisMenu.js"></script>

<div class="clearfix panel metismenu">
<aside class="sidebar">
Expand Down
4 changes: 2 additions & 2 deletions themes/default/modules/dispatch/detail.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<tbody>
<tr>
<td width="200px"><strong>{LANG.dis}</strong></td>
<td><strong><a href="{TYPELINK}">{TYPENAME}</a> </strong></td>
<td><strong><a href="{TYPELINK}" rel="dofollow">{TYPENAME}</a> </strong></td>
</tr>

<tr>
Expand Down Expand Up @@ -52,7 +52,7 @@
<!-- BEGIN: taifile -->
<tr>
<td><strong> {LANG.file}</strong></td>
<td><!-- BEGIN: row --><a href="{NV_BASE_SITEURL}uploads/{module}/{FILEUPLOAD}"><em class="fa fa-download">&nbsp;</em>{FILEUPLOAD} </a>
<td><!-- BEGIN: row --><a href="{NV_BASE_SITEURL}uploads/{module}/{FILEUPLOAD}" rel="dofollow"><em class="fa fa-download">&nbsp;</em>{FILEUPLOAD} </a>
<br />
<!-- END: row --></td>
</tr>
Expand Down
8 changes: 4 additions & 4 deletions themes/default/modules/dispatch/main.tpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- BEGIN: main -->
<link rel="stylesheet" type="text/css" href="{NV_BASE_SITEURL}{NV_ASSETS_DIR}/js/jquery-ui/jquery-ui.min.css">
<link rel="stylesheet" type="text/css" href="{NV_STATIC_URL}{NV_ASSETS_DIR}/js/jquery-ui/jquery-ui.min.css">

<!-- BEGIN: btn_timkiem -->
<a class="btn btn-primary" href="{SE_LINK}">{LANG.sereach}</a>
Expand Down Expand Up @@ -89,7 +89,7 @@
<td> {ROW.to_org} </td>
<td>
<!-- BEGIN: loop1 -->
<a href="{NV_BASE_SITEURL}uploads/{module}/{FILEUPLOAD}" title="Download"><em class="fa fa-download">&nbsp;</em></a>
<a href="{NV_BASE_SITEURL}uploads/{module}/{FILEUPLOAD}" title="Download" rel="dofollow"><em class="fa fa-download">&nbsp;</em></a>
<!-- END: loop1 -->
</td>
</tr>
Expand All @@ -104,8 +104,8 @@
<!-- END: data -->
</form>

<script type="text/javascript" src="{NV_BASE_SITEURL}{NV_ASSETS_DIR}/js/jquery-ui/jquery-ui.min.js"></script>
<script type="text/javascript" src="{NV_BASE_SITEURL}{NV_ASSETS_DIR}/js/language/jquery.ui.datepicker-{NV_LANG_INTERFACE}.js"></script>
<script type="text/javascript" src="{NV_STATIC_URL}{NV_ASSETS_DIR}/js/jquery-ui/jquery-ui.min.js"></script>
<script type="text/javascript" src="{NV_STATIC_URL}{NV_ASSETS_DIR}/js/language/jquery.ui.datepicker-{NV_LANG_INTERFACE}.js"></script>
<script type="text/javascript">
$("#from, #to").datepicker({
showOn : "both",
Expand Down

0 comments on commit 93efbc7

Please sign in to comment.