<?PHPinclude ("vsadmin/db_conn_open.php");mysql_select_db($db_name, $dbh);/**	 * Google Sitemap XML Generator * Version 1.0.0 * Designed and written by PC4PEOPLE.com * This code is copyright (c) PC4PEOPLE, LLC, all rights reserved. * The contents of this file are protect under law as the intellectual property of PC4PEOPLE, LLC. * Any use, reproduction, disclosure or copying * of any kind without the express and written permission of PC4PEOPLE, LLC is forbidden.**//** CHANGE THESE VALUES AS YOU SEE FIT * * ***/$frequencypID = "weekly"; //The frequency with which the product detail URL is likely to change. This is considered a hint and not a command. The value must be one of "always", "hourly", "daily", "weekly", "monthly", "yearly", or "never".$tcatfrequencypID = "daily";//The frequency with which the Top Category pages URL is likely to change. This is considered a hint and not a command. The value must be one of "always", "hourly", "daily", "weekly", "monthly", "yearly", or "never".$catfrequencypID = "weekly";//The frequency with which the Category pages URL is likely to change. This is considered a hint and not a command. The value must be one of "always", "hourly", "daily", "weekly", "monthly", "yearly", or "never".$staticfrequencypID = "weekly";//The frequency with which the static pages URL is likely to change. This is considered a hint and not a command. The value must be one of "always", "hourly", "daily", "weekly", "monthly", "yearly", or "never".$priorityID = "1.0";//The priority of product detail pages relative to other pages on the same site. The value is a number between 0.0 and 1.0, where 0.0 is the lowest priority and 1.0 is the highest priority. The priority can affect the order that search engines select URLs to explore on your site. Since the priority is relative, it is only used to select between URLs within your own site; the priority of your pages will not be compared to the priority of pages on other sites. $tcatpriorityID = "0.8";//The priority of Top Category pages relative to other pages on the same site. The value is a number between 0.0 and 1.0, where 0.0 is the lowest priority and 1.0 is the highest priority. The priority can affect the order that search engines select URLs to explore on your site. Since the priority is relative, it is only used to select between URLs within your own site; the priority of your pages will not be compared to the priority of pages on other sites. $catpriorityID = "0.7";//The priority of Category pages relative to other pages on the same site. The value is a number between 0.0 and 1.0, where 0.0 is the lowest priority and 1.0 is the highest priority. The priority can affect the order that search engines select URLs to explore on your site. Since the priority is relative, it is only used to select between URLs within your own site; the priority of your pages will not be compared to the priority of pages on other sites. $staticpriorityID = "0.6";//The priority of static pages relative to other pages on the same site. The value is a number between 0.0 and 1.0, where 0.0 is the lowest priority and 1.0 is the highest priority. The priority can affect the order that search engines select URLs to explore on your site. Since the priority is relative, it is only used to select between URLs within your own site; the priority of your pages will not be compared to the priority of pages on other sites. /** * * ***///No need to change anything HERE//////get date of current$datecurrent = date('Y-m-d'); //The current time the URL for last modified in ISO 8601 format//Select store URL from Admin$rootname = mysql_query("SELECT adminStoreURL FROM admin");while ($root = mysql_fetch_array($rootname)) {$rootnamefinal = $root['adminStoreURL'];}$isoLastModifiedSite = "";$newLine = "\n";$indent = " ";if (!$rootUrl) $rootUrl = $rootnamefinal;$xmlHeader = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>$newLine";$urlsetOpen = "<urlset xmlns=\"http://www.google.com/schemas/sitemap/0.84\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://www.google.com/schemas/sitemap/0.84 http://www.google.com/schemas/sitemap/0.84/sitemap.xsd\">$newLine";$urlsetValue = "";$urlsetClose = "</urlset>$newLine";function makeUrlString ($urlString) {    return htmlentities($urlString, ENT_QUOTES, 'UTF-8'); }function makeIso8601TimeStamp ($dateTime) {    if (!$dateTime) {        $dateTime = date('Y-m-d H:i:s');    }    if (is_numeric(substr($dateTime, 11, 1))) {        $isoTS = substr($dateTime, 0, 10) ."T"                  .substr($dateTime, 11, 8) ."+00:00";    }    else {        $isoTS = substr($dateTime, 0, 10);    }    return $isoTS;}function makeUrlTag ($url, $modifiedDateTime, $changeFrequency, $priority) {    GLOBAL $newLine;    GLOBAL $indent;    GLOBAL $isoLastModifiedSite;    $urlOpen = "$indent<url>$newLine";    $urlValue = "";    $urlClose = "$indent</url>$newLine";    $locOpen = "$indent$indent<loc>";    $locValue = "";    $locClose = "</loc>$newLine";    $lastmodOpen = "$indent$indent<lastmod>";    $lastmodValue = "";    $lastmodClose = "</lastmod>$newLine";    $changefreqOpen = "$indent$indent<changefreq>";    $changefreqValue = "";    $changefreqClose = "</changefreq>$newLine";    $priorityOpen = "$indent$indent<priority>";    $priorityValue = "";    $priorityClose = "</priority>$newLine";    $urlTag = $urlOpen;    $urlValue     = $locOpen .makeUrlString("$url") .$locClose;    if ($modifiedDateTime) {     $urlValue .= $lastmodOpen .makeIso8601TimeStamp($modifiedDateTime) .$lastmodClose;      if (!$isoLastModifiedSite) { // last modification of web site         $isoLastModifiedSite = makeIso8601TimeStamp($modifiedDateTime);      }     }    if ($changeFrequency) {     $urlValue .= $changefreqOpen .$changeFrequency .$changefreqClose;     }    if ($priority) {     $urlValue .= $priorityOpen .$priority .$priorityClose;     }    $urlTag .= $urlValue;    $urlTag .= $urlClose;    return $urlTag;}if (!$isoLastModifiedSite) { // last modification of web site    $isoLastModifiedSite = makeIso8601TimeStamp(date('Y-m-d H:i:s'));	/** * *Here you can add URLS in the format shown:  *Just copy and paste the line below and replace the index.php with the page needed. ***/$urlsetValue .= makeUrlTag ("$rootUrl"."/index.php", $isoLastModifiedSite, "$staticfrequencypID", "$staticpriorityID");$urlsetValue .= makeUrlTag ("$rootUrl"."/about.php", $isoLastModifiedSite, "$staticfrequencypID", "$staticpriorityID");$urlsetValue .= makeUrlTag ("$rootUrl"."/contact.php", $isoLastModifiedSite, "$staticfrequencypID", "$staticpriorityID");$urlsetValue .= makeUrlTag ("$rootUrl"."/artistshowings.php", $isoLastModifiedSite, "$staticfrequencypID", "$staticpriorityID");//$urlsetValue .= makeUrlTag ("$rootUrl"."/faq.php", $isoLastModifiedSite, "$staticfrequencypID", "$staticpriorityID");/** * * ***///NO need to change anything here - These are the dynamic Product, Category, and Top Category Pages.//Get Top Categories Pages$topcats=mysql_query("SELECT sectionID FROM sections WHERE rootSection = 0 ORDER BY sectionID") or print(mysql_error());while ($tcats = mysql_fetch_array($topcats)) {$topcatsid = $tcats['sectionID'];//Print Top Categories on the screen and setup XML output$output2 = $rootnamefinal . "/categories.php?cat=$topcatsid";$urlsetValue .= makeUrlTag ($output2, $isoLastModifiedSite, "$tcatfrequencypID", "$tcatpriorityID");}//Select Categories $cats2=mysql_query("SELECT sectionID FROM sections WHERE rootSection > 0 ORDER BY sectionID");while ($catssecond = mysql_fetch_array($cats2)) {$catsproducts = $catssecond['sectionID'];//Print categories on screen and setup textfile output$output3 = $rootnamefinal . "/products.php?cat=$catsproducts";$urlsetValue .= makeUrlTag ($output3, $isoLastModifiedSite, "$catfrequencypID", "$catpriorityID");}//Get Product Details Pages$products = mysql_query("SELECT pID FROM products");while ($prod2 = mysql_fetch_array($products)) {$productdetail = $prod2['pID'];//Print products on the screen and setup XML output$output = $rootnamefinal . "/proddetail.php?prod=$productdetail";$urlsetValue .= makeUrlTag ($output, $isoLastModifiedSite, "$frequencypID", "$priorityID");}print "$xmlHeader$urlsetOpen$urlsetValue$urlsetClose";}//make sure this is the last line ?>