//Format the meeting date $dispmdt = date('l, F jS, Y \\a\\t g A', strtotime($meetdt)); //Format the due date $dd = date('l, F jS, Y \\a\\t g A', strtotime($duedate)); //All cases $case1 = $meetdt != 0 && $duedate < time() && $duedate != 0; //And the item is on a return basis $case2 = $meetdt != 0 && $meetdt < time() && $duedate == 0; //If the exchange is permanent $case3 = $meetdt != 0 && $meetdt < time() && $duedate != 0; //And the item is due for exchange //If the exchange is over (case1 or case2) if ($case1 || $case2) { //Print out the rating tool $newRating = new Rater($other_id); $newRating->output(); } else { if ($case3) { //Show the pickup countdown $newPickup = new Pickup($duedate); $newPickup->output(); } else { //If the meeting date has not been determined... if ($meetdt == 0) { //...show the calender $newCal = new Calender(trim($oid)); $newCal->output(); } else { //...print out the countdown to the meetup $newMeetup = new Meetup($meetdt); $newMeetup->output();