2023-01-02 21:33:36 +05:00
|
|
|
|
<?php
|
2023-08-28 22:47:07 +05:00
|
|
|
|
//echo $_GET['id'];
|
2023-01-07 18:55:55 +05:00
|
|
|
|
//604800 - неделя
|
2023-08-28 22:47:07 +05:00
|
|
|
|
ini_set('memory_limit', '512M');
|
2023-01-02 21:33:36 +05:00
|
|
|
|
header( 'Content-Type: text/xml' );
|
2023-01-07 18:55:55 +05:00
|
|
|
|
header("Cache-Control: public");
|
|
|
|
|
header("Expires: " . date("r", time() + 604800));
|
2023-01-02 21:33:36 +05:00
|
|
|
|
ini_set( 'display_errors', 0 );
|
|
|
|
|
$smarty -> caching = true;
|
2023-01-07 18:55:55 +05:00
|
|
|
|
$smarty -> cache_lifetime = 604800;
|
2023-01-02 21:33:36 +05:00
|
|
|
|
$data=date( "Y-m-d" );
|
|
|
|
|
$smarty -> assign( 'data', $data );
|
2023-01-07 18:55:55 +05:00
|
|
|
|
#читаем карту сайта
|
2023-08-28 22:47:07 +05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$page = ( $_GET['id'] ) ? $_GET['id'] : 1; // текущая страница
|
|
|
|
|
|
|
|
|
|
$kol = 50000; //количество записей для вывода
|
|
|
|
|
$art=($page>0)? ($page * $kol) - $kol : 0;// определяем, с какой записи нам выводить
|
|
|
|
|
$total = \DB::getValue ( "SELECT COUNT(*) FROM `sitemap` WHERE `status`=1" );
|
|
|
|
|
$link=\DB::getAll("SELECT * FROM `sitemap` WHERE `status`=1 LIMIT $art, $kol");
|
|
|
|
|
//print_r($all);
|
|
|
|
|
//$link= \DB::getAll( 'SELECT `link` FROM `sitemap` WHERE `status`=1' );
|
2023-01-07 18:55:55 +05:00
|
|
|
|
$smarty -> assign( 'link', $link );
|
2023-01-02 21:33:36 +05:00
|
|
|
|
?>
|