HEX
Server: Apache/2.4.59 (Debian)
System: Linux skycube.cz 4.19.0-25-amd64 #1 SMP Debian 4.19.289-2 (2023-08-08) x86_64
User: ilya (534)
PHP: 7.3.31-1~deb10u7
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
Upload Files
File: /var/www/ilya/data/www/afisha38.ru/modules/services/sitemap_xml.inc
<?php

$temp_html = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><?xml-stylesheet type=\"text/xsl\" href=\"".$url."skin/sitemap.xsl\"?><!-- generator=\"termit/1.9\" --><!-- sitemap-generator-url=\"http://www.rudomilov.ru\" sitemap-generator-version=\"1.9\" --><!-- generated-on=\"".date("F d, Y h:s a",time())."\" --><urlset xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd\" xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">\r";

$result = query("SELECT `actions`.*, `firms_types`.`human_id`, `firms_types`.`human_subid` FROM `actions` LEFT JOIN `firms_types` ON `actions`.`type`=`firms_types`.`id` ORDER BY `id`;");

while($data = mysql_fetch_array($result)) {
	$temp_html .= "	<url>\r		<loc>".$url.$data['human_id']."/".$data['human_subid']."/".$data['id']."/</loc>\r		<lastmod>".date("Y-m-d",time())."T".date("G:m:s")."+12:00</lastmod>\r		<changefreq>weekly</changefreq>\r		<priority>0.4</priority>\r	</url>\r";
}

$result = query("SELECT `firms`.*, `firms_types`.`human_id`, `firms_types`.`human_subid` FROM `firms` LEFT JOIN `firms_types` ON `firms`.`type`=`firms_types`.`id` ORDER BY `id`;");

while($data = mysql_fetch_array($result)) {
	$temp_html .= "	<url>\r		<loc>".$url.$data['human_id']."/".$data['id']."/</loc>\r		<lastmod>".date("Y-m-d",time())."T".date("G:m:s")."+12:00</lastmod>\r		<changefreq>weekly</changefreq>\r		<priority>0.6</priority>\r	</url>\r	<url>\r		<loc>".$url.$data['human_id']."/".$data['id']."/opinions/</loc>\r		<lastmod>".date("Y-m-d",time())."T".date("G:m:s")."+12:00</lastmod>\r		<changefreq>weekly</changefreq>\r		<priority>0.3</priority>\r	</url>\r";
	//$temp_html .= "&bull;&nbsp;<a href=\"/".$data['human_id']."/".$data['id']."/\">".$data['title']."</a> (<a href=\"/".$data['human_id']."/".$data['id']."/opinions/\">отзывы</a>)<br>\r";
}

$first = query("SELECT * FROM `shedule` WHERE `datetime`!='0000-00-00 00:00:00' ORDER BY `datetime` LIMIT 1;");

if(mysql_num_rows($first)==1) {		
	$first = mysql_fetch_array($first);
	if($first['datetime']!="0000-00-00 00:00:00")	{
	

	list($first_date,$first_time)=explode(" ",$first['datetime']);
	list($year,$mon,$day)=explode("-",$first_date);
	list($hour,$min,$sec)=explode(":",$first_time);
	
	$start_date = mktime($hour-1,$min,$sec,$mon,$day,$year);
	
	//////////////////////////////////
	$cur_mon = "";
        for ($i=$start_date;$i<=time();$i+=86400)
             {
             if($cur_mon!=date("m",$i)) {
             	$cur_mon = date("m",$i);
             	
             switch($cur_mon)
                    {
                    case "01": $mon_title = "Январь"; break;
                    case "02": $mon_title = "Февраль"; break;
                    case "03": $mon_title = "Март"; break;
                    case "04": $mon_title = "Апрель"; break;
                    case "05": $mon_title = "Май"; break;
                    case "06": $mon_title = "Июнь"; break;
                    case "07": $mon_title = "Июль"; break;
                    case "08": $mon_title = "Август"; break;
                    case "09": $mon_title = "Сентябрь"; break;
                    case "10": $mon_title = "Октябрь"; break;
                    case "11": $mon_title = "Ноябрь"; break;
                    case "12": $mon_title = "Декабрь"; break;
                    }             	
             	
                //$temp_html = substr($temp_html,0,strrpos($temp_html,", "));
             	//$temp_html .= "<br>\r&bull;&nbsp;".$mon_title."&nbsp;".date("Y",$i).": ";             	
             }
             $day = date("j",$i);
             
                     $result = mysql_fetch_array(query("SELECT COUNT(`id`) FROM `shedule` WHERE `datetime`>'".date("Y-m-d H:i:s",$i)."' AND `datetime`<'".date("Y-m-d H:i:s",$i+86400)."';"));


                 if ($result[0]>0)
                     {
			$temp_html .= "	<url>\r		<loc>".$url.date("d-m-Y",$i)."/</loc>\r		<lastmod>".date("Y-m-d",time())."T".date("G:m:s")."+12:00</lastmod>\r		<changefreq>weekly</changefreq>\r		<priority>0.2</priority>\r	</url>\r";                    
                     //$temp_html .= "<a href=\"".$url.date("d-m-Y",$i)."/"."\">".$day."</a>, ";
                     }
             }
    /////////////////////////////////////	
	
	
}
}

$skin_span = skin_span(140,$global_vars['page'],$total,$url."services/sitemap/");

$temp_html .= "</urlset>";

print $temp_html;

?>