Return to Service Display"; header("Location:service_display.php?year=$url_year&month=$url_month&day=$url_day"); } if (isset($_POST['appointment_date'])) { # takes the input from the appointment_date field in the form and assigns it to the $link_url variable $link_url = $_POST['appointment_date']; # converts the inputted day into a unix timestamp $newlink_url = strtotime($link_url); # I want to extract the year from the date input $url_year = date('Y', $newlink_url); # I want to extract the month from the new unix timestamp and make it lowercase so it fits in my link $url_month = strtolower(date('M', $newlink_url)); # I want to do the same for the day so that it fits into my link as well $url_day = date('j', $newlink_url); if (isset($submit)) { if (empty($customer_name)) { die("The Customer Name field is empty, please correct."); } elseif (empty($vehicle_type)) { die("The Vehicle Type field is empty, please correct."); } elseif (empty($appointment_date)) { die("The Appointment Date field is empty, please correct."); } elseif (empty($tech_hours)) { die("The Tech Hours field is empty, please correct."); } elseif (empty($job_type)) { die("The Job Type field is empty, please correct."); } elseif (empty($service_writer)) { die("The Service Writer field is empty, please correct."); } elseif (empty($inspection_service)) { die ("The Inspection/Service field is empty, please correct."); } else { mysql_query($add_unit) or die("Cannot query the databse.
" . mysql_error()); header("Location: service_display.php?year=$url_year&month=$url_month&day=$url_day"); } } } else { ?> PCP Motorsports - Service Appointment Display $y) { $Day_Names .= ''; } // Spacers for the offset of the first day of the month $Cal_Weeks_Days = ""; $i = $First_Day_Of_Month + 1; if ($First_Day_Of_Month != "0") { $Cal_Weeks_Days .= ''; } // Cal Days - The first day is 1, default with PHP is 0, so lets set it to 1 $Day_i = "1"; $ii = $i; for ($i; $i <= ($Days_In_Month + $First_Day_Of_Month) ;$i++) { // If the current day is sunday, make sure a new row gets set if ($ii == 8) { $Cal_Weeks_Days .= ""; $ii = 1; } // Show the days. $Cal_Weeks_Days .= ""; // Increment the day number and the week day number (ii) $Day_i++; $ii++; } // Add end month spacers if ((8 - $ii) >= "1") { $Cal_Weeks_Days .= ''; } ?> '.$Day_Names.' '.$Cal_Weeks_Days.'
Customer NamePhone NumberVehicle TypeAppt DateAppt TimeTechnicianJob TypeTech HoursService WriterInspection / ServiceDelete / EditAdd Unit
' . $y . '
" . $Day_i . " $value"; } ?> $value"; } ?> $value"; } ?>
«»
'; ?>