function executeReportStatements($dbConn, $sql, $description) { //Create SQL Prepared Statement (Preventing SQL Injection) $statement = $dbConn->prepare($sql); //Execute SQL Statement $statement->execute(); //Retrieve all records in on array $records = $statement->fetchAll(); //Create Table createOutput($records, $sql, $description); }
function executeReportStatements($dbConn, $sql, $description) { $dbConn = connectToDatabase($host, $dbname, $username, $password); //Create SQL Prepared Statement (Preventing SQL Injection) $statement = $dbConn->prepare($sql); //Execute SQL Statement $statement->execute(); //Retrieve all records in on array $records = $statement->fetchAll(); //Create Table createOutput($records, $sql, $description); }
if ($_POST['update']['soa_template_chosen']) { global $fm_dns_records; /** Save the soa_template_chosen in domains table and end */ include_once ABSPATH . 'fm-modules/fmDNS/classes/class_records.php'; $fm_dns_records->assignSOA($_POST['update']['soa_template_chosen'], $domain_id); header('Location: zone-records.php?map=' . $_POST['map'] . '&domain_id=' . $domain_id . '&record_type=SOA'); } $_POST['update'] = buildUpdateArray($domain_id, $record_type, $_POST['update']); } $table_info = array('class' => 'display_results no-left-pad'); $header_array = $fm_dns_records->getHeader(strtoupper($record_type)); $header = displayTableHeader($table_info, $header_array); $body = null; foreach ($_POST as $name => $array) { if (in_array($name, array('create', 'update'))) { $body .= createOutput($domain_info, $record_type, $array, $name, $header_array); } } printHeader(); @printMenu(); printf('<div id="body_container"> <h2>%s</h2> <form method="POST" action="zone-records-write.php"> <input type="hidden" name="domain_id" value="%d"> <input type="hidden" name="record_type" value="%s"> <input type="hidden" name="map" value="%s"> %s %s </tbody> </table> <p>
$this->Image('http://makerfaire.com/wp-content/themes/makerfaire/images/maker_sign.png', 0, 0, $this->w, $this->h); // Arial bold 15 $this->SetFont('Benton Sans', 'B', 15); } } // Instanciation of inherited class $pdf = new PDF(); $pdf->AddFont('Benton Sans', 'B', 'bentonsans-bold-webfont.php'); $pdf->AddFont('Benton Sans', '', 'bentonsans-regular-webfont.php'); $pdf->AddPage('P', array(279.4, 431.8)); $pdf->SetFont('Benton Sans', '', 12); $pdf->SetFillColor(255, 255, 255); //get the entry-id, if one isn't set return an error if (isset($_GET['eid']) && $_GET['eid'] != '') { $entryid = $_GET['eid']; createOutput($entryid, $pdf); if (isset($_GET['type']) && $_GET['type'] == 'download') { ob_clean(); $pdf->Output($entryid . '.pdf', 'D'); } elseif (isset($_GET['type']) && $_GET['type'] == 'save') { $filename = TEMPLATEPATH . '/signs/NY15/' . $entryid . '.pdf'; $dirname = dirname($filename); if (!is_dir($dirname)) { mkdir($dirname, 0755, true); } $pdf->Output($filename, 'F'); echo $entryid; } else { ob_clean(); $pdf->Output($entryid . '.pdf', 'I'); }