AnonSec Shell
Server IP : 149.202.105.228  /  Your IP : 216.73.216.18
Web Server : Apache
System : Linux webm129.cluster030.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64
User : atfycaf ( 116275)
PHP Version : 7.4.33
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/atfycaf/www/admin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/atfycaf/www/admin/xmlSitemap.php
<?php

foreach($langURLArray as $langSite) {

	if ($langSite == "en") {
		$sitemap	= $SERVER_ROOT ."/sitemap.xml";
	} else {
		$sitemap	= $SERVER_ROOT ."/sitemap_". $langSite .".xml";
	}
	$sitemapURL		= $linksURLS[$langSite];

	$file = fopen("$sitemap", "w");
	$_xml ="<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\r\n";
	$_xml .="<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">\r\n";
	$_xml .="\t<url>\r\n"; 
	$_xml .="\t\t<loc>". $sitemapURL ."</loc>\r\n";
	$_xml .="\t\t<changefreq>daily</changefreq>\r\n";
	$_xml .="\t\t<priority>1.0</priority>\r\n";
	$_xml .="\t</url>\r\n";

	// PAGES
	$pagesQuery = mysqli_query($conn, "SELECT id, pageURL, noHTML FROM pages_". $langSite ." WHERE id > '1' AND (id != '6') AND (placeHolder = '0') ORDER BY id ASC") or die (mysqli_error($conn));
	while ($pQ = mysqli_fetch_array($pagesQuery)) {
		$pageID		= $pQ["id"];
		$pageURL	= $pQ["pageURL"];
		$noHTML		= $pQ["noHTML"];
		if ($noHTML == 0) {
			$pageURL	.= ".html";
		}
		
		$_xml .="\t<url>\r\n"; 
		$_xml .="\t\t<loc>". $sitemapURL . $pageURL ."</loc>\r\n";
		$_xml .="\t\t<changefreq>monthly</changefreq>\r\n";
		$_xml .="\t\t<priority>0.5</priority>\r\n";
		$_xml .="\t</url>\r\n";

		if ($pageID == 2) {
			$calendarQuery = mysqli_query($conn, "SELECT pageURL FROM calendars WHERE id > '1' ORDER BY calendarName ASC");
			while ($caQ = mysqli_fetch_array($calendarQuery)) {
				$subMenuURL		= $caQ["pageURL"];

				$_xml .="\t<url>\r\n"; 
				$_xml .="\t\t<loc>". $sitemapURL . $pageURL ."/". $subMenuURL .".html</loc>\r\n";
				$_xml .="\t\t<changefreq>monthly</changefreq>\r\n";
				$_xml .="\t\t<priority>0.5</priority>\r\n";
				$_xml .="\t</url>\r\n";

			}
		} elseif ($pageID == 4) {
			$knockoutSubQuery = mysqli_query($conn, "SELECT id, pageURL FROM knockoutGroups ORDER BY groupTitle ASC");
			while ($kSQ = mysqli_fetch_array($knockoutSubQuery)) {
				$groupID		= $kSQ["id"];
				$subMenuURL		= $kSQ["pageURL"];

				$_xml .="\t<url>\r\n"; 
				$_xml .="\t\t<loc>". $sitemapURL . $pageURL ."/". $subMenuURL ."</loc>\r\n";
				$_xml .="\t\t<changefreq>monthly</changefreq>\r\n";
				$_xml .="\t\t<priority>0.5</priority>\r\n";
				$_xml .="\t</url>\r\n";

				$knockoutTournamentsQuery = mysqli_query($conn, "SELECT pageURL FROM knockoutConfig WHERE tournType = '$groupID' ORDER BY tournStartDate DESC");
				while ($kTQ = mysqli_fetch_array($knockoutTournamentsQuery)) {
					$tournURL		= $kTQ["pageURL"];

					$_xml .="\t<url>\r\n"; 
					$_xml .="\t\t<loc>". $sitemapURL . $pageURL ."/". $subMenuURL ."/". $tournURL .".html</loc>\r\n";
					$_xml .="\t\t<changefreq>monthly</changefreq>\r\n";
					$_xml .="\t\t<priority>0.5</priority>\r\n";
					$_xml .="\t</url>\r\n";

				}
			}
		} elseif ($pageID == 5) {
			$leagueSubQuery = mysqli_query($conn, "SELECT id, pageURL FROM leagueGroups ORDER BY groupTitle ASC");
			while ($lSQ = mysqli_fetch_array($leagueSubQuery)) {
				$groupID		= $lSQ["id"];
				$subMenuURL		= $lSQ["pageURL"];

				$_xml .="\t<url>\r\n"; 
				$_xml .="\t\t<loc>". $sitemapURL . $pageURL ."/". $subMenuURL ."</loc>\r\n";
				$_xml .="\t\t<changefreq>monthly</changefreq>\r\n";
				$_xml .="\t\t<priority>0.5</priority>\r\n";
				$_xml .="\t</url>\r\n";

				$leaguesQuery = mysqli_query($conn, "SELECT pageURL FROM leagueConfig WHERE leagueType = '$groupID' ORDER BY startDate DESC");
				while ($lQ = mysqli_fetch_array($leaguesQuery)) {
					$leagueURL	= $lQ["pageURL"];

					$_xml .="\t<url>\r\n"; 
					$_xml .="\t\t<loc>". $sitemapURL . $pageURL ."/". $subMenuURL ."/". $leagueURL .".html</loc>\r\n";
					$_xml .="\t\t<changefreq>monthly</changefreq>\r\n";
					$_xml .="\t\t<priority>0.5</priority>\r\n";
					$_xml .="\t</url>\r\n";

				}

			}
		} elseif ($pageID == 7) {
			$photoGalleryQuery = mysqli_query($conn, "SELECT c.pageURL, (SELECT imageURL FROM photoGallery WHERE galleryID = c.id ORDER BY RAND() LIMIT 0,1) AS coverImage FROM photoGalleryCats AS c LEFT JOIN photoGallery AS g ON c.id = g.galleryID GROUP BY c.catTitle HAVING COUNT(g.id) > 0 ORDER BY c.id DESC");
			while ($pGQ = mysqli_fetch_array($photoGalleryQuery)) {
				$subMenuURL		= $pGQ["pageURL"];

				$_xml .="\t<url>\r\n"; 
				$_xml .="\t\t<loc>". $sitemapURL . $pageURL ."/". $subMenuURL ."</loc>\r\n";
				$_xml .="\t\t<changefreq>monthly</changefreq>\r\n";
				$_xml .="\t\t<priority>0.5</priority>\r\n";
				$_xml .="\t</url>\r\n";

			}
		}
	}

	$pagesQuery = mysqli_query($conn, "SELECT id, pageURL, noHTML FROM pages_". $langSite ." WHERE id = '6' ORDER BY id ASC") or die (mysqli_error($conn));
	while ($pQ = mysqli_fetch_array($pagesQuery)) {
		$pageID		= $pQ["id"];
		$pageURL	= $pQ["pageURL"];
		$noHTML		= $pQ["noHTML"];
		if ($noHTML == 0) {
			$pageURL	.= ".html";
		}
		
		$_xml .="\t<url>\r\n"; 
		$_xml .="\t\t<loc>". $sitemapURL . $pageURL ."</loc>\r\n";
		$_xml .="\t\t<changefreq>monthly</changefreq>\r\n";
		$_xml .="\t\t<priority>0.5</priority>\r\n";
		$_xml .="\t</url>\r\n";
		
	}
	
	$_xml .="</urlset>";
	fwrite($file, $_xml);
	fclose($file);
}
?>

Anon7 - 2022
AnonSec Team