"order by ae.event_date DESC, ae.user_id ASC, ai.date_created DESC", "update" => "order by date_created DESC", "user" => "order by au.user_name, ae.event_date DESC", "event" => "order by ae.event_title"); $updatedHdrStr = ""; if(!empty($_GET["s"]) && !empty($sort_array[$_GET["s"]])) { $sort_index = $_GET["s"]; } else { $sort_index = "date"; } $pg_link = "frame.php?id="; $i = 0; $tblRows = ""; $spCell = "\t \n"; $spRow = "\t\n\t\n\t\n"; connectToDb(); $event_links_query = "select distinct ae.id, ae.event_title, DATE_FORMAT(ae.event_date, '%m/%d/%y') event_date, au.user_name, MAX(UNIX_TIMESTAMP(ai.date_created)) date_created, count(ai.id) image_count from album.album_user au, album.album_event ae LEFT JOIN album.album_image ai ON ai.event_id = ae.id where ae.user_id = au.id group by ae.id, au.id, ai.event_id " . $sort_array[$sort_index]; $rs = mysql_query($event_links_query) or die ("invalid event links query"); $c = 0; $other_event_links = ''; while ($row = mysql_fetch_array($rs)) { $user_name = $row["user_name"]; $event_title = $row["event_title"]; $eid = $row["id"]; $img_count = $row["image_count"]; if ($row["event_date"] == "00/00/00") { $evDate = " "; } else { $evDate = $row["event_date"]; } if (empty($row["date_created"])) { $updateDate = " "; } else { $updateDate = $row["date_created"]; $last_week = time() - 7*24*60*60; if($updateDate > $last_week) { $updateDate = "" . date("m-d-y", $updateDate) . ""; $updatedHdrStr .= " $event_title |"; } else { $updateDate = date("m-d-y", $updateDate); } } //$other_event_links = $other_event_links . " " . $evDate . " " . $row["event_title"] . " (" . $row["user_name"] . ")
"; // 04/01/02 Kat - eid 73 = small world brunch event // 04/30/03 kat - eid 86 = dorey alley 2002 if($eid != 73 && $eid != 86) { $other_event_links .= "  $evDate  $event_title  $img_count  $user_name  $updateDate "; } } if($updatedHdrStr != "") { $updatedHdrStr = "Recently updated events: " . substr($updatedHdrStr, 0, -1) . "

"; } $pgeTitle = "Album Index"; $pgeKeywords = "Photo Album Kathy Ahn"; $pgeDesc = "Kathy's photo album"; $pgeJavascript = ""; $pgeContent = "
The Album
Welcome to the Album. Click on any event title below to view the pictures for that event. You can sort by any of the headers (except for \"Images\" which simply displays the number of images per event). Event albums updated within the last week will be highlighted in the \"Updated\" column in bold text. Each event index will display thumbnails you can click on to view a bigger image (which you can also click on to see the full sized image). Have fun and email me if you have complaints or suggestions.

$updatedHdrStr $other_event_links
Photo Album Index
 Date  Event  Images  User  Updated


"; include ("../include/template.inc");?>