<% $today = Date("m/d/Y"); include "../assets/database_connect.php"; include "../assets/common_scripts.php"; // The following reroutes the user to the new event calendar page header('Location: event_calendar_v2.php') ; $display = "future"; if (strlen($_GET['display']) > 0) { $display = $_GET['display']; } $whereclause = ""; switch($display) { case "all": $pagetitle = "All Events"; $whereclause = ""; $orderclause = "dtEventDate DESC, tmEventStartTime DESC"; break; case "future": $pagetitle = "Coming Events"; $whereclause = "AND (dtEventDate >= CURDATE() OR dtEventEndDate >= CURDATE())"; $orderclause = "dtEventDate, tmEventStartTime"; break; case "past": $pagetitle = "Past Event Photos"; $whereclause = "AND dtEventDate <= CURDATE() AND tiPhotoGallery = 1"; $orderclause = "dtEventDate DESC, tmEventStartTime DESC"; break; case "photos": $pagetitle = "Event Photo Galleries"; $whereclause = "AND tiPhotoGallery = 1"; $orderclause = "dtEventDate DESC, tmEventStartTime DESC"; break; default: break; } $eventquery = "SELECT * FROM Event WHERE tiRecordStatus = 1 $whereclause ORDER BY $orderclause"; $eventresult = mysql_query($eventquery); %> Mustang Owners Club of Southeastern Michigan <%include ('../assets/header.php');%>
<%include ('../assets/leftnavigation.php');%>

 

<%= $pagetitle%>

 

View as Calendar

Print

Past Event Photos

Suggest an Event

* Indicates club events.

 

<% $currentmonthyear = ""; $nextmonthyear = ""; for ($count=0; $count < mysql_numrows($eventresult); $count++) { $eventid = mysql_result($eventresult, $count, "iEventID"); $eventdate = mysql_result($eventresult, $count, "dtEventDate"); $multiday = mysql_result($eventresult, $count, "tiMultiDay"); $eventtitle = mysql_result($eventresult, $count, "vchEventTitle"); $eventtypeid = mysql_result($eventresult, $count, "iEventTypeID"); $eventstarttime = mysql_result($eventresult, $count, "tmEventStartTime"); $eventendtime = mysql_result($eventresult, $count, "tmEventEndTime"); $eventlocation = mysql_result($eventresult, $count, "vchEventLocation"); $maphyperlink = mysql_result($eventresult, $count, "vchMapHyperlink"); $photogallery = mysql_result($eventresult, $count, "tiPhotoGallery"); $eventsignup = mysql_result($eventresult, $count, "vchEventSignup"); $eventdate = date("l, F j, Y", strtotime($eventdate)); $eventstarttime = date("g:i A", strtotime($eventstarttime)); $eventendtime = date("g:i A", strtotime($eventendtime)); if (strlen($maphyperlink) > 0) { $maphyperlink = "Get a Map to this Event"; } else { $maphyperlink = ""; } if (strlen($eventsignup) > 0) { $eventsignup = "Sign Up for this Event"; } else { $eventsignup = ""; } $nextmonthyear = Date("F",strtotime($eventdate)) . " " . Date("Y",strtotime($eventdate)); $clubeventflag = " *"; if ($eventtypeid <> 1 and $eventtypeid <> 3 and $eventtypeid <> 2) { $clubeventflag = ""; } %> <% if ($nextmonthyear <> $currentmonthyear) { $currentmonthyear = $nextmonthyear; %>

 

<%= $currentmonthyear%>

 

<% } %>
<% if (valid_user("Admin")) { %> Edit this Event  <% } %> <%= $eventtitle%><%= $clubeventflag%>
<% if ($multiday == 1) { $multidayeventquery = "SELECT * FROM EventMultiDay WHERE tiRecordStatus = 1 AND iEventID = $eventid ORDER BY dtEventDate"; $multidayeventresult = mysql_query($multidayeventquery); for ($multidaycount=0; $multidaycount < mysql_numrows($multidayeventresult); $multidaycount++) { $multidayeventdate = mysql_result($multidayeventresult, $multidaycount, "dtEventDate"); $multidayeventstarttime = mysql_result($multidayeventresult, $multidaycount, "tmStartTime"); $multidayeventendtime = mysql_result($multidayeventresult, $multidaycount, "tmEndTime"); $multidayeventlocation = mysql_result($multidayeventresult, $multidaycount, "vchEventDayLocation"); $multidayeventdate = date("l, F j, Y", strtotime($multidayeventdate)); $multidayeventstarttime = date("g:i A", strtotime($multidayeventstarttime)); $multidayeventendtime = date("g:i A", strtotime($multidayeventendtime)); %>

<%= $multidayeventdate%> <%= $multidayeventstarttime%> to <%= $multidayeventendtime%> <%= $multidayeventlocation%>

<% } // End Loop } else { %>

<%= $eventdate%> <%= $eventstarttime%> to <%= $eventendtime%> <%= $eventlocation%>

<% } %>
  <% if (strtotime($eventdate) >= strtotime($today)) { %> <% if (strlen($eventsignup) > 0) { %> <%= $eventsignup%> <% } %> <% if (strlen($maphyperlink) > 0) { %>   <%= $maphyperlink%> <% } %> <% } %> <% if ($photogallery == 1) { %>   View Photos from this Event <% } %>

 

<% } //End Loop %>
<%include ('../assets/footer.php');%> <% mysql_close(); %>