foreach ($tooltip as $t) { $xtpl->assign('EXTTOOLTIP', $t); $xtpl->parse('extUpd.loop.li'); } // Thong bao ung dung khong co phien ban (Khong hop le) if (!isset($value['version'])) { $xtpl->parse('extUpd.loop.note1'); } // Thong tin cap nhat if (!empty($value['new_version']) and nv_version_compare($value['version'], $value['new_version']) < 0) { $note = $lang_module['extNote4']; $icon = 'fa-bolt text-warning'; $updateVersion = array(); foreach ($value['updateable'] as $updateable) { if (in_array($value['version'], $updateable['old'])) { if (empty($updateVersion) or nv_version_compare($updateVersion['new'], $updateable['new']) < 0) { $updateVersion = $updateable; } } } if (empty($updateVersion)) { $xtpl->assign('UPDNOTE', sprintf($lang_module['extUpdNote1'], $value['link'])); $xtpl->parse('extUpd.loop.updateNotSuport'); } elseif ($updateVersion['new'] != $value['new_version']) { $xtpl->assign('UPDNOTE', sprintf($lang_module['extUpdNote2'], $updateVersion['new'], NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=extensions&' . NV_OP_VARIABLE . '=update&eid=' . $value['id'] . '&fid=' . $updateVersion['fid'] . '&checksess=' . md5($value['id'] . $updateVersion['fid'] . $global_config['sitekey'] . session_id()))); $xtpl->parse('extUpd.loop.updateNotLastest'); } else { $xtpl->assign('UPDNOTE', sprintf($lang_module['extUpdNote3'], NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=extensions&' . NV_OP_VARIABLE . '=update&eid=' . $value['id'] . '&fid=' . $updateVersion['fid'] . '&checksess=' . md5($value['id'] . $updateVersion['fid'] . $global_config['sitekey'] . session_id()))); $xtpl->parse('extUpd.loop.updateLastest'); } } elseif (!$value['origin']) {
/** * NvUpdate::module_com_info() * * @param mixed $onlineModules * @return */ public function module_com_info($onlineModules) { global $global_config; $xtpl = new XTemplate('updatestep3.tpl', NV_ROOTDIR . '/install/tpl'); $xtpl->assign('LANG', $this->lang); $xtpl->assign('CONFIG', $this->config); $xtpl->assign('NV_BASE_SITEURL', NV_BASE_SITEURL); $lastest_version = 'N/A'; if (!isset($onlineModules[$this->config['formodule']])) { $xtpl->parse('commodule.notcertified'); } else { $lastest_version = isset($onlineModules[$this->config['formodule']]['version']) ? (string) $onlineModules[$this->config['formodule']]['version'] : 'N/A'; if (nv_version_compare($lastest_version, $this->config['to_version']) > 0) { $xtpl->parse('commodule.checkversion'); } } $xtpl->assign('LASTEST_VERSION', $lastest_version); $xtpl->parse('commodule'); echo $xtpl->text('commodule'); exit; }
} elseif (file_exists(NV_ROOTDIR . "/modules/" . $site_mods[$mod]['module_file'] . "/language/admin_" . NV_LANG_DATA . ".php")) { include NV_ROOTDIR . "/modules/" . $site_mods[$mod]['module_file'] . "/language/admin_" . NV_LANG_DATA . ".php"; } elseif (file_exists(NV_ROOTDIR . "/modules/" . $site_mods[$mod]['module_file'] . "/language/admin_en.php")) { include NV_ROOTDIR . "/modules/" . $site_mods[$mod]['module_file'] . "/language/admin_en.php"; } } return $lang_module; } $info = array(); if (defined('NV_IS_GODADMIN')) { $field = array(); $field[] = array('key' => $lang_module['version_user'], 'value' => $global_config['version']); $new_version = get_version(28800); //kem tra lai sau 8 tieng if ($new_version != false) { if (nv_version_compare($global_config['version'], $new_version->version) < 0) { $field[] = array('key' => $lang_module['version_news'], 'value' => (string) $new_version->version); } } $caption = "<a href=\"" . NV_BASE_ADMINURL . "index.php?" . NV_NAME_VARIABLE . "=settings&" . NV_OP_VARIABLE . "=checkupdate\">" . $lang_module['checkversion'] . "</a>"; $info[] = array('caption' => $caption, 'field' => $field); } foreach ($site_mods as $mod => $value) { if (file_exists(NV_ROOTDIR . "/modules/" . $value['module_file'] . "/siteinfo.php")) { $siteinfo = array(); $mod_data = $value['module_data']; include NV_ROOTDIR . "/modules/" . $value['module_file'] . "/siteinfo.php"; if (!empty($siteinfo)) { $info[$mod]['caption'] = $value['custom_title']; $info[$mod]['field'] = $siteinfo; }
$userModules[$module_file]['u_version'] = $v; $userModules[$module_file]['u_pubtime'] = $p; } $newModules = array_diff_key($onlineModules, $userModules); clearstatcache(); $modUpdDate = filemtime(NV_ROOTDIR . '/' . NV_CACHEDIR . '/modules.version.' . NV_LANG_INTERFACE . '.xml'); if ($i != "modNewUpd" and $i != "modNewUpdRef") { $a = 1; foreach ($userModules as $modname => $values) { if (!isset($values['version'])) { $note = $lang_module['moduleNote1']; $cl = "Note1"; } elseif (empty($values['u_version'])) { $note = sprintf($lang_module['moduleNote3'], $values['link']); $cl = "Note3"; } elseif (nv_version_compare($values['u_version'], $values['version']) < 0) { $note = sprintf($lang_module['moduleNote4'], $values['link']); $cl = "Note4"; } else { $note = $lang_module['moduleNote5']; $cl = "Note5"; } $info = $lang_module['userVersion'] . ": "; $info .= !empty($values['u_version']) ? $values['u_version'] : "n/a"; $info .= "; " . $lang_module['onlineVersion'] . ": "; $info .= !empty($values['version']) ? $values['version'] : "n/a"; $tooltip = array(); $tooltip[] = array('title' => $lang_module['userVersion'], 'content' => (!empty($values['u_version']) ? $values['u_version'] : "n/a") . (!empty($values['u_pubtime']) ? " (" . nv_date("d-m-Y H:i", $values['u_pubtime']) . ")" : "")); $tooltip[] = array('title' => $lang_module['onlineVersion'], 'content' => (!empty($values['version']) ? $values['version'] : "n/a") . (!empty($values['pubtime']) ? " (" . nv_date("d-m-Y H:i", $values['pubtime']) . ")" : "")); if (isset($values['author']) and !empty($values['author'])) { $tooltip[] = array('title' => $lang_module['moduleAuthor'], 'content' => $values['author']);