} } return FALSE; } # Connect to MySQL $conn = mysql_connect(DBHOST, DBUSER, DBPASSWORD) or die(mysql_error()); mysql_select_db(DBDATABASE, $conn); # Start the PDF output $args = array('folds' => 1, 'borders' => 0); $pdf = new pmPDF($args); $pdf->SetFont('Helvetica'); $pdf->SetFontSize($_REQUEST["micro"] == "" ? 8 : 6); if ($_REQUEST["image"] == "") { $firstpage = 1; } else { $pdf->add_image("images/pp08logo.jpg", 1); $firstpage = 2; } # Fetch a list of all events, including the ones we won't print $sql = "SELECT * FROM calevent, caldaily WHERE calevent.id = caldaily.id AND eventdate >= '{$startdate}' AND eventdate <= '{$enddate}' AND eventstatus<>'E' AND eventstatus<>'S' AND eventstatus<>'C' ORDER BY eventdate, eventtime"; $result = mysql_query($sql, $conn) or die(mysql_error()); # for each event... $thisdate = ""; while ($record = mysql_fetch_array($result)) { # If we care about this event... if (ischecked($record["eventdate"], $record["id"])) { # If the date is different, then output the date if ($thisdate != $record["eventdate"]) { if ($thisdate == "") { $thisdate = $record["eventdate"]; $pdf->add_text(strtoupper(date("l F j", strtotime($thisdate))) . " -------------------------", $firstpage);
if ($list[$i] == $token) { return TRUE; } } return FALSE; } # Connect to MySQL # Start the PDF output $args = array('folds' => 1, 'borders' => 0); $pdf = new pmPDF($args); $pdf->SetFont('Helvetica'); $pdf->SetFontSize($_REQUEST["micro"] == "" ? 8 : 6); if ($_REQUEST["image"] == "") { $firstpage = 1; } else { $pdf->add_image(PPSMALL, 1); $firstpage = 2; } # Fetch a list of all events, including the ones we won't print $sql = "SELECT * FROM calevent, caldaily WHERE calevent.id = caldaily.id AND eventdate >= '" . PPSTART . "' AND eventdate <= '" . PPEND . "' AND eventstatus<>'E' AND eventstatus<>'S' AND eventstatus<>'C' ORDER BY eventdate, eventtime"; $result = mysql_query($sql, $conn) or die(mysql_error()); # for each event... $thisdate = ""; while ($record = mysql_fetch_array($result)) { # If we care about this event... if (ischecked($record["eventdate"], $record["id"])) { # If the date is different, then output the date if ($thisdate != $record["eventdate"]) { if ($thisdate == "") { $thisdate = $record["eventdate"]; $pdf->add_text(strtoupper(date("l F j", strtotime($thisdate))) . " -------------------------", $firstpage);