SetCreator(PDF_CREATOR); $pdf->SetAuthor(“3R Website”); $pdf->SetTitle(“3R Guest Pass”); $pdf->SetSubject(“3R Guest Pass”); $pdf->SetKeywords(“”); // remove default header/footer $pdf->setPrintHeader(false); $pdf->setPrintFooter(false); // set default monospaced font $pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); // set margins $pdf->SetMargins($left=0.5, $top=0.5, $right=0.5); // set auto page breaks $pdf->SetAutoPageBreak(TRUE, $bottom=0.5); // set image scale factor $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); // ——————————————————— // set font $pdf->SetFont(“helvetica”, “”, 8); // add a page $pdf->AddPage(); // Image($file, $x=”, $y=”, $w=0, $h=0, $type=”, $link=”, $align=”, $resize=false, $dpi=300, $palign=”, $ismask=false, $imgmask=false, $border=0, $fitbox=false, $hidden=false, $fitonpage=false) $pdf->Image(“images/3r_pass_logo.jpg”, 7.2, 0.85, “”, “”, “”, “”, “”, false, 300, “”, false, false, 0, false, false, false); $pdf->Image(‘images/3r_pass_logo_bg.jpg’, 0.5, 1.15, “”, “”, “”, “”, “”, false, 300, “”, false, false, 0, false, false, false); // Set some content to print $html = << EOD; // Print text using writeHTML() // writeHTML($html, $ln=true, $fill=false, $reseth=false, $cell=false, $align=”) $pdf->writeHTML($html, true, false, false, false, “”); // ——————————————————— //Close and output PDF document ob_end_clean(); $attachment = $pdf->Output(“3r_guest_pass.pdf”, “S”); //ob_end_flush(); /* ################# */ /* ##### EMAIL ##### */ /* ################# */ require(“phpmailer/class.phpmailer.php”); $message = “
$start_date – $end_date
TRLA GUEST PASS
Landowner:
$po_fname $po_lname
Guest:
$g_fname $g_lname
License:
$g_license $g_license_state
Fold Here — Place on Dashboard
User of the Guest Pass will be subject to all Three Rivers Landowners Association, Inc. Covenants, Conditions & Restrictions (CCR’s), Bylaws, Rules and Regulations. Upon approval, the Property Owner providing this information and receiving the Guest Pass and Gate Code will be solely responsible for their guests. The Property Owner assumes all liability for any damage caused by their guests.
The Following is a partial list of the rules that govern the Three Rivers Landowners Association (TRLA). A complete list of the Rules and Regulations can be found on the TRLA website or a copy can be obtained at the TRLA Gate Office.
Attached is your guest pass. The gate code is located on the bottom left side of the pass. Remember to press the Pound Sign (#) at the end of the code.
“; $message .= “
You may either print the attached guest pass and give to your guest or forward this email with the attached pass to your guest so they can print themselves.
“; $message .= “
Please fold the pass where indicated and place on the vehicle dashboard with the guest name facing up.
“; $message .= “
As a reminder – User of the guest pass will be subject to all Three Rivers Landowners Association (TRLA) Rules and Regulations. All TRLA members are solely responsible for their guests and assumes all liability for any damage caused by their guests.
“; $message .= ““; $mail = new PHPMailer(); $mail->IsSMTP(); $mail->SMTPDebug = 1; $mail->SMTPAuth = “true”; $mail->Host = “mail.3rrec.com”; $mail->Port = “25”; $mail->Username = “info@3rrec.com”; $mail->Password = “0khFVSSfhxF5”; $mail->IsHTML(true); $mail->SetFrom(“info@3rrec.com”,”3RLOA Website”); $mail->AddAddress($po_email); $mail->AddBCC(“info@3rrec.com”); //$mail->AddBCC(“webmaster@3rrec.com”); //$mail->AddAddress(“webmaster@3rrec.com”); //$mail->AddAddress(“randy.panek@gmail.com”); //$mail->AddAddress(“treasurer@3rrec.com”); //$mail->AddAddress(“secretary@3rrec.com”); $mail->Subject = “3R Guest Pass – ” . $po_lname; $mail->Body = $message; if ($attachment) { $mail->AddStringAttachment($attachment, “3R_guest_pass.pdf”); } if(!$mail->Send()) { echo ‘Message 1 was not sent.’; echo ‘Mailer error: ‘ . $mail->ErrorInfo; } MYSQL_QUERY (“UPDATE guest_pass SET code = ‘$code’ WHERE passID = ‘$passID'”); echo ““; } // actionSubmit echo “
“; } else { //returns echo “
This Gate Code has already been issued.
“; } //returns ?>