This repository has been archived by the owner on Sep 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9354537
commit e906992
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
|
||
/** | ||
* @Project VIDEO CLIPS AJAX 4.x | ||
* @Author PHAN TAN DUNG ([email protected]) | ||
* @Copyright (C) 2014 PHAN TAN DUNG. All rights reserved | ||
* @License GNU/GPL version 2 or any later version | ||
* @Createdate Dec 01, 2014, 04:33:14 AM | ||
*/ | ||
|
||
if (!defined('NV_IS_MOD_VIDEOCLIPS')) | ||
die('Stop!!!'); | ||
|
||
$url = array(); | ||
$cacheFile = NV_LANG_DATA . '_sitemap_' . NV_CACHE_PREFIX . '.cache'; | ||
$pa = NV_CURRENTTIME - 7200; | ||
|
||
if (($cache = $nv_Cache->getItem($module_name, $cacheFile)) != false and filemtime(NV_ROOTDIR . '/' . NV_CACHEDIR . '/' . $module_name . '/' . $cacheFile) >= $pa) { | ||
$url = unserialize($cache); | ||
} else { | ||
$sql = "SELECT alias,addtime FROM " . NV_PREFIXLANG . "_" . $module_data . "_clip WHERE status=1"; | ||
$result = $db->query($sql); | ||
while (list($alias, $publtime) = $result->fetch(3)) { | ||
$url[] = array('link' => NV_BASE_SITEURL . "index.php?" . NV_LANG_VARIABLE . "=" . NV_LANG_DATA . "&" . NV_NAME_VARIABLE . "=" . $module_name . "&" . NV_OP_VARIABLE . "=" . $alias . $global_config['rewrite_exturl'], 'publtime' => $publtime); | ||
} | ||
|
||
$cache = serialize($url); | ||
$nv_Cache->setItem($module_name, $cacheFile, $cache); | ||
} | ||
|
||
nv_xmlSitemap_generate($url); | ||
die(); |