function printevent($record, $prettydate) { print "\n" . strtoupper($record["title"]) . "\n"; $again = repeatfirstinstance($record, $prettydate); if ($again) { print "See {$again[date]} for details\n"; } else { print hmmpm($record["eventtime"]) . "\n"; if ($record["locname"]) { print "{$record[locname]}, {$record[address]}\n"; } else { print "{$record[address]}\n"; } print wordwrap($record["printdescr"], 68) . "\n"; if (!$record["hideemail"]) { $email = preg_replace("/@/", " at ", $record["email"]); $email = preg_replace("/\\./", " dot ", $email); if ($record["weburl"] != "") { print "{$email}, {$record[weburl]}\n"; } else { print "{$email}\n"; } } else { if ($record["weburl"] != "") { print "{$record[weburl]}\n"; } } } }
if ($match > $dollars) { $dollars = $match + 0; } } } if ($dollars == -1) { $dollars = ""; } else { if ($dollars == 0) { $dollars = "\$"; } else { $dollars = "\${$dollars}"; } } # Generate a row $firstinstance = repeatfirstinstance($record, $prettydate); if ($firstinstance == NULL) { # Initialize a javascript array element describing this event. print " <" . "script type=text/javascript>\n"; print " review[{$id}] = \"{$review}\";\n"; print " <" . "/script>\n"; # Output a row for editing this event print " <tr id=\"tr_{$id}\" class=\"{$review}\">\n"; print " <input type=hidden id=\"edit_{$id}\" value=\"" . obscure($id) . "\">\n"; print " <td class=\"buttons\" onMouseOver=\"bigtipdelayed({$id}, '" . $record["eventdate"] . "');\" onMouseOut=\"bigtipclear();\">\n"; print " <a name=\"a_{$id}\"></a>\n"; print " <select id=\"review_{$id}\" name=\"review_{$id}\" onChange=\"changereview({$id}, this.value);\">\n"; print " <option value=Inspect " . ($review == "Inspect" ? "selected" : "") . ">Inspect</option>\n"; print " <option value=Approved " . ($review == "Approved" ? "selected" : "") . ">Approved</option>\n"; print " <option value=Exclude " . ($review == "Exclude" ? "selected" : "") . ">Exclude</option>\n"; if ($review == "SentEmail") {
print "\t<button onclick=\"window.location.replace('view3week.php')\">Current Calendar</button>\n"; print "\t<button onclick=\"window.location.replace('viewsearch.php')\">Search</button>\n"; print "\t<br><button onclick=\"window.location.replace('mobilepp.php')\">Mobile Version</button>\n"; print "\t<button onclick=\"window.location.replace('viewmypp.php')\">Custom Pocket Reference</button>\n"; if ($_COOKIE["havemore"] == "bikefun") { print " <br><button onclick=\"window.location.replace('admin.php')\">Administration Menu</button>\n"; } print " </td>\n"; print " </tr>\n"; print " <tr>\n"; print " <td colspan=2>\n"; # Get event counts $result = mysql_query("SELECT calevent.id FROM calevent, caldaily WHERE calevent.id = caldaily.id AND eventdate>=\"" . PPSTART . "\" AND eventdate<=\"" . PPEND . "\" AND eventstatus<>\"E\" AND eventstatus<>\"C\" AND eventstatus<>\"S\" AND review<>\"E\"", $conn) or die(mysql_error()); $repeatcount = mysql_num_rows($result); for ($uniquecount = 0; $record = mysql_fetch_array($result);) { if (repeatfirstinstance($record) == NULL) { $uniquecount++; } } # Embed Zed's video #print "<div style=\"float:right;clear:none;\"><iframe width=\"426\" height=\"240\" src=\"http://www.youtube.com/embed/a13kfdb7K2g\" frameborder=\"0\" allowfullscreen></iframe></div>\n"; #print "<div style=\"float:right;clear:none;\"><iframe width=\"560\" height=\"315\" src=\"http://www.youtube.com/embed/a13kfdb7K2g\" frameborder=\"0\" allowfullscreen></iframe></div>\n"; if (TRUE) { print "<strong>Pedalpalooza</strong> is 3+ weeks of bikey fun.\n"; print "With <strong title=\"{$repeatcount} if you include repeats, as previous Pedalpalooza calendars did.\">{$uniquecount}</strong> different events,\n"; print "most organized by individuals, bikers of all persuasions\n"; print "are likely to find many events of interest.\n"; print "Nearly all events are free.\n"; print "<p>"; print "Visiting from out of town?\n"; print "We've started a <a href=\"http://www.shift2bikes.org/allbike.php#Visitor Info\">Visitor Info</a> page on our Wiki.\n";