Hi All,
I've got a customer whom I just picked up their website from the original developer who used extensive php and mysql, which are not my strong suits. They have an aquatics schedule that has never worked quite the way they want. The times on the schedule that are supposed to start at 12:00 pm all say Noon. They'd prefer it say 12:00 pm. I looked at the code and changed the lines that say:
if ($row[start_hour] == "12") $my_start= "Noon";
if ($row[finish_hour] == "12") $my_finish= "Noon";
where it says "Noon", I changed to "12:00 pm". That worked as far as when looking at the schedule all Noon start times now said 12:00 pm. However, when I made that change, the office admin was not able to go in using her interface and change times to anything other than 12:00 pm. (So she couldn't set a schedule to start at 12:15.) Also, in order for a noon time class to show up on the schedule in the correct line-up you need to set it to "AM", which apparently bugs her.
Here's the code for the schedule:
// here is the data
echo "<tr valign=\"top\">";
$ref_hour = 5; // sets beginning hour to 5 am
$ref_min = 0; // sets beginning minute to x:00
$ref_day = 1; // sets beginning day to Monday
$ref_ampm = 1; // set to am to begin with
$total_rows = 0;
for($ref_day=1; $ref_day<8; $ref_day++){
echo "<td width=\"111\" class=\"textWhite\">"; // begin data
$query = "SELECT * from aquatics_sked WHERE week_day_numeric = '$ref_day' ORDER BY start_ampm, start_hour, start_min";
$result = mysql_query($query);
while ($row = mysql_fetch_array($result)){
// is it noon
if ($row[start_hour] == "12") $my_start= "Noon";
else $my_start = $row[start_text];
if ($row[finish_hour] == "12") $my_finish= "Noon";
else $my_finish = $row[finish_text];
echo "<font color=\"#666666\">";
echo "<div>$my_start-$my_finish</div>";
// which event
$innerQuery = "SELECT * from aquatics_types WHERE id = '$row[class_type]'";
$innerResult = mysql_query($innerQuery);
while ($innerRow = mysql_fetch_array($innerResult)){
echo "<div><a href=\"javascript:popAquaticDescription($row[class_type]);\">$innerRow[name]</a></div>";
echo "</font>";
}
echo "<hr>";
}
echo "</td>"; // end data
}
// end schedule
If anyone can give me any help with this I'd appreciate it. Also, if you need more info other than what I'm providing here in this code, just let me know.
TIA,
Denise