"10" And $thisday < "17" )
{$thisday_display = "10";}
elseif ($thisday > "17" And $thisday < "25" )
{$thisday_display = 17;}
elseif ($thisday > "25" And $thisday < "31" )
{$thisday_display = 25;}
else {$thisday_display = 28;}
$thishour=date ("H");
$thismin=date ("i");
$thissec=date ("i");
$display_date = "$thisyear-$thismonth-$thisday_display";
$XML_URL = "http://$SERVER_NAME/" .$file_name. ".html";
echo "
$XML_URL
$display_date
weekly
0.5
";
$x1++;
} // end while
}
//End Main Site Pages
//Begin Cateogory Pages
$sql2 = "SELECT * FROM `categories` ORDER BY `CATEGORIES` ASC $Use_Limit ";
$result2 = MYSQL_QUERY($sql2);
$numberall2 = mysql_Numrows($result2);
if ($numberall2==0) {
}
else if ($numberall2>0) {
$x2=0;
while ($x2<$numberall2)
{
// Retreiving data and putting it in local variables for each row
$thisCat_id=mysql_result($result2,$x2,"cat_id");
$thisCATEGORIES=mysql_result($result2,$x2,"CATEGORIES");
$thisCat_description=mysql_result($result2,$x2,"cat_description");
$thisCat_popularity=mysql_result($result2,$x2,"cat_popularity");
$sql2a = "SELECT * FROM `listings` Where `category1` = '$thisCATEGORIES' ORDER BY `company_name` ASC";
$result2a = mysql_query($sql2a);
//we add this line because we need to know the number of rows
$num_rows2a = mysql_num_rows($result2a);
//Check to see if any reviews exist in the cateory
if ($num_rows2a==0) {
}
else if ($num_rows2a>0) {
$x2a=0;
include_once("$DOCUMENT_ROOT/myadmin/inc/forceFilename.php");
while ($x2a<$num_rows2a)
{
$first_name=mysql_result($result2a,$x2a,"first_name");
$last_name=mysql_result($result2a,$x2a,"last_name");
$listing_id=mysql_result($result2a,$x2a,"listing_id");
$file_name = "$first_name $last_name";
$file_name = forceFilename($file_name);
//}
$thisyear=date ("Y");
$thismonth=date ("m");
$thisday=date ("d");
if ($thisday < "05")
{$thisday_display = "01";}
elseif ($thisday > "05" And $thisday < "14" )
{$thisday_display = "05";}
elseif ($thisday > "14" And $thisday < "20" )
{$thisday_display = 14;}
elseif ($thisday > "20" And $thisday < "25" )
{$thisday_display = 20;}
else {$thisday_display = 25;}
$thishour=date ("H");
$thismin=date ("i");
$thissec=date ("i");
$display_date = "$thisyear-$thismonth-$thisday_display";
$XML_URL = "http://$HTTP_HOST/Our_Expert_Witness/$file_name/Listing$listing_id.html";
echo "
$XML_URL
$display_date
weekly
0.5
";
$x2a++;
} // end while for category pages
}//end if num_rows2a > 0
$x2++;
} // end while for each category
} // end if numberall2 > 0
//End Site Reviews
?>