header("Location: " . JURI::base() . '?concr=1'); } else { header("Location: " . JURI::base() . '?concr=0'); } } else { header("Location: " . JURI::base() . '?concr=0'); } } else { if (intval($_REQUEST['pgmm']) > 0 && $userstate) { include dirname(__FILE__) . '/profilef.php'; $searchid = profilef::profilesavesearch(); header("Location: " . JURI::base() . '?sr=' . intval($searchid)); } else { if ($_REQUEST['pto'] == 'pdf' && intval($_REQUEST['sr']) > 0 && $userstate) { include dirname(__FILE__) . '/profilef.php'; $ht = profilef::profilegetresults($_REQUEST['sr'], true); require_once dirname(__FILE__) . '/tcpdf/tcpdf_import.php'; $pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false); $pdf->SetCreator(PDF_CREATOR); $pdf->SetAuthor(PDF_AUTHOR); $pdf->SetTitle('PropertEASE PDF Report'); $pdf->setPrintHeader(false); $pdf->setPrintFooter(false); $pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); $pdf->SetMargins(PDF_MARGIN_LEFT, 15, PDF_MARGIN_RIGHT); $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); $pdf->SetFont('helvetica', '', 10); $pdf->setFontSubsetting(false); $pdf->AddPage(); $pdf->writeHTML($ht, true, false, true, false, '');
public function profilegetoutput() { if (intval($_REQUEST['concr'])) { return '<p><strong>Your request has been sent.</strong></p>'; } else { if (intval($_REQUEST['sr']) > 0) { return profilef::profilegetresults($_REQUEST['sr']) . profilef::profilegetpdfbutton($_REQUEST['sr']); } else { if (profilef::profilecansearch()) { if (profilef::profileconcierge()) { $ret = ''; $ret .= '<form action="" method="post" class="ptsearch">'; $ret .= '<h2>Concierge Search</h2>'; $conccont = true; if (isset($_REQUEST['concr'])) { if (intval($_REQUEST['concr'])) { $ret .= '<p><strong>Your request has been sent.</strong></p>'; $conccont = false; } else { $ret .= '<p><strong>You need to enter an address.</strong></p>'; } } else { $ret .= '<p>What is the address of the property that you would like a report for?</p>'; } if ($conccont) { $ret .= '<p id="refw"><label><strong>Address:</strong></label><input name="conciergeaddy" type="text"></p>'; $ret .= '<p id="submitw"><input type="submit" value="Submit"></p>'; } $ret .= '</form>'; return $ret; } return profilef::profilegetformhtml() . '<script type="text/javascript">' . profilef::profilegetformjs() . '</script><noscript><p>You need javascript enabled to use this form.</p></noscript>'; } else { return '<p>Your subscription is either pending or expired. <a href="index.php/subscribe">Click here to renew or upgrade your subscription.</a></p>'; } } } }