| 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/mathsjournal/ |
Upload File : |
<?php
require_once('inc/config.php');
header("Content-Type: application/xml; charset=utf-8");
echo '<?xml version="1.0" encoding="UTF-8"?>';
?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap>
<loc><?php echo $baseurl; ?>sitemap_page.xml</loc>
</sitemap>
<?php
$stmt = $mysqli->prepare("SELECT year FROM archives WHERE specialissue != 'Y' GROUP BY year ORDER BY year ASC") or die('An error occurred. Please try after some time.');
$stmt->execute();
$stmt->store_result();
$stmt->bind_result($year);
while ($stmt->fetch()) {
$file = 'sitemap_archives_' . $year . '.php';
if (!file_exists($file)) {
$text = '<?php' . PHP_EOL;
$text .= 'require_once(\'inc/config.php\');' . PHP_EOL;
$text .= 'header("Content-Type: application/xml; charset=utf-8");' . PHP_EOL;
$text .= 'echo \'<?xml version="1.0" encoding="UTF-8"?>\' . PHP_EOL;' . PHP_EOL;
$text .= 'echo \'<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">\' . PHP_EOL;' . PHP_EOL . PHP_EOL;
$text .= '$stmt = $mysqli->prepare("SELECT archivesid, year, refnumber, volume, issue, part, file FROM archives WHERE (year = ' . $year . ' AND status = \'enabled\' AND specialissue != \'Y\')") or die("An error occurred. Please try after some time.");' . PHP_EOL;
$text .= '$stmt->execute();' . PHP_EOL;
$text .= '$stmt->store_result();' . PHP_EOL;
$text .= '$stmt->bind_result($archivesid, $year, $refnumber, $volume, $issue, $part, $file);' . PHP_EOL;
$text .= 'while ($stmt->fetch()) {' . PHP_EOL;
$text .= 'echo "<url>" . PHP_EOL;' . PHP_EOL;
$text .= 'echo "<loc>{$baseurl}archives/{$year}/vol{$volume}/issue{$issue}/Part{$part}</loc>" . PHP_EOL;' . PHP_EOL;
$text .= 'echo "<lastmod>" . date(\'Y-m-d\') . "</lastmod>" . PHP_EOL;' . PHP_EOL;
$text .= 'echo "<changefreq>daily</changefreq>" . PHP_EOL;' . PHP_EOL;
$text .= 'echo "<priority>0.8</priority>" . PHP_EOL;' . PHP_EOL;
$text .= 'echo "</url>" . PHP_EOL;' . PHP_EOL;
$text .= PHP_EOL;
$text .= 'echo "<url>" . PHP_EOL;' . PHP_EOL;
$text .= 'echo "<loc>{$baseurl}archives/{$year}/vol{$volume}/issue{$issue}/Part{$part}/{$refnumber}</loc>" . PHP_EOL;' . PHP_EOL;
$text .= 'echo "<lastmod>" . date(\'Y-m-d\') . "</lastmod>" . PHP_EOL;' . PHP_EOL;
$text .= 'echo "<changefreq>daily</changefreq>" . PHP_EOL;' . PHP_EOL;
$text .= 'echo "<priority>0.8</priority>" . PHP_EOL;' . PHP_EOL;
$text .= 'echo "</url>" . PHP_EOL;' . PHP_EOL;
$text .= PHP_EOL;
$text .= 'echo "<url>" . PHP_EOL;' . PHP_EOL;
$text .= 'echo "<loc>{$archivesdir}{$year}/vol{$volume}issue{$issue}/Part{$part}/{$file}</loc>" . PHP_EOL;' . PHP_EOL;
$text .= 'echo "<lastmod>" . date(\'Y-m-d\') . "</lastmod>" . PHP_EOL;' . PHP_EOL;
$text .= 'echo "<changefreq>daily</changefreq>" . PHP_EOL;' . PHP_EOL;
$text .= 'echo "<priority>0.8</priority>" . PHP_EOL;' . PHP_EOL;
$text .= 'echo "</url>" . PHP_EOL;' . PHP_EOL;
$text .= '}' . PHP_EOL;
$text .= '$stmt->close();' . PHP_EOL . PHP_EOL;
$text .= 'echo \'</urlset>\' . PHP_EOL;';
$myfile = fopen($file, 'w');
fwrite($myfile, $text);
fclose($myfile);
}
?>
<sitemap>
<loc><?php echo $baseurl; ?>sitemap_archives_<?php echo $year; ?>.xml</loc>
</sitemap>
<?php
}
$stmt->close();
$stmt = $mysqli->prepare("SELECT year FROM archives WHERE specialissue = 'Y' GROUP BY year ORDER BY year ASC") or die('An error occurred. Please try after some time.');
$stmt->execute();
$stmt->store_result();
$stmt->bind_result($year);
while ($stmt->fetch()) {
$file = 'sitemap_specialissue_' . $year . '.php';
if (!file_exists($file)) {
$text = '<?php' . PHP_EOL;
$text .= 'require_once(\'inc/config.php\');' . PHP_EOL;
$text .= 'header("Content-Type: application/xml; charset=utf-8");' . PHP_EOL;
$text .= 'echo \'<?xml version="1.0" encoding="UTF-8"?>\' . PHP_EOL;' . PHP_EOL;
$text .= 'echo \'<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">\' . PHP_EOL;' . PHP_EOL . PHP_EOL;
$text .= '$stmt = $mysqli->prepare("SELECT archivesid, year, refnumber, volume, issue, part, file FROM archives WHERE (year = ' . $year . ' AND status = \'enabled\' AND specialissue = \'Y\')") or die("An error occurred. Please try after some time.");' . PHP_EOL;
$text .= '$stmt->execute();' . PHP_EOL;
$text .= '$stmt->store_result();' . PHP_EOL;
$text .= '$stmt->bind_result($archivesid, $year, $refnumber, $volume, $issue, $part, $file);' . PHP_EOL;
$text .= 'while ($stmt->fetch()) {' . PHP_EOL;
$text .= 'echo "<url>" . PHP_EOL;' . PHP_EOL;
$text .= 'echo "<loc>{$baseurl}special-issue/{$year}/vol{$volume}/issue{$issue}</loc>" . PHP_EOL;' . PHP_EOL;
$text .= 'echo "<lastmod>" . date(\'Y-m-d\') . "</lastmod>" . PHP_EOL;' . PHP_EOL;
$text .= 'echo "<changefreq>daily</changefreq>" . PHP_EOL;' . PHP_EOL;
$text .= 'echo "<priority>0.8</priority>" . PHP_EOL;' . PHP_EOL;
$text .= 'echo "</url>" . PHP_EOL;' . PHP_EOL;
$text .= PHP_EOL;
$text .= 'echo "<url>" . PHP_EOL;' . PHP_EOL;
$text .= 'echo "<loc>{$baseurl}special-issue/{$year}/vol{$volume}/issue{$issue}/{$refnumber}</loc>" . PHP_EOL;' . PHP_EOL;
$text .= 'echo "<lastmod>" . date(\'Y-m-d\') . "</lastmod>" . PHP_EOL;' . PHP_EOL;
$text .= 'echo "<changefreq>daily</changefreq>" . PHP_EOL;' . PHP_EOL;
$text .= 'echo "<priority>0.8</priority>" . PHP_EOL;' . PHP_EOL;
$text .= 'echo "</url>" . PHP_EOL;' . PHP_EOL;
$text .= PHP_EOL;
$text .= 'echo "<url>" . PHP_EOL;' . PHP_EOL;
$text .= 'echo "<loc>{$archivesdir}{$year}/vol{$volume}issue{$issue}/Part{$part}/{$file}</loc>" . PHP_EOL;' . PHP_EOL;
$text .= 'echo "<lastmod>" . date(\'Y-m-d\') . "</lastmod>" . PHP_EOL;' . PHP_EOL;
$text .= 'echo "<changefreq>daily</changefreq>" . PHP_EOL;' . PHP_EOL;
$text .= 'echo "<priority>0.8</priority>" . PHP_EOL;' . PHP_EOL;
$text .= 'echo "</url>" . PHP_EOL;' . PHP_EOL;
$text .= '}' . PHP_EOL;
$text .= '$stmt->close();' . PHP_EOL . PHP_EOL;
$text .= 'echo \'</urlset>\' . PHP_EOL;';
$myfile = fopen($file, 'w');
fwrite($myfile, $text);
fclose($myfile);
}
?>
<sitemap>
<loc><?php echo $baseurl; ?>sitemap_specialissue_<?php echo $year; ?>.xml</loc>
</sitemap>
<?php
}
$stmt->close();
?>
</sitemapindex>