<?php

$table_name67="Aprocess2";
$table_name100="signin2";
$table_name101="sig_map";
$table_name102="sig_map_text";
include("../../../admin/GoTool/cat.inc");
$connection = @mysqli_connect($host,$user,$password) or die(mysqli_error($connection));
$db = @mysqli_select_db($connection,$db_name) or die(mysqli_error($connection));


$author1="GalliumGroup";
$title1 ="Sample PDF Document";
$subj1="Public Document";
$key1="Keywords, PDF, User Docs";
$today = date("Y-m-d h:i:s");
$Rtoday=$today;

$map_id=$_GET['map_id'];
if ($map_id==$blink){
$map_id=$_POST['map_id'];
}



 $a312="$map_id";
 //     $email=stripslashes($_POST['email']);
 // $c_email=stripslashes($_POST['c_email']);
  $fname=stripslashes($_POST['fname']);
   $lname=stripslashes($_POST['lname']);
//   $company=stripslashes($_POST['company']);
   $phoneW=stripslashes($_POST['phoneW']);
   $phoneC=stripslashes($_POST['phoneC']);
   $phoneH=stripslashes($_POST['phoneH']);
   $phoneF=stripslashes($_POST['phoneF']);
   $web=stripslashes($_POST['web']);
   $stateH=stripslashes($_POST['stateH']);
   $countryH=stripslashes($_POST['countryH']);
   $addressH=stripslashes($_POST['addressH']);
    $cityH=stripslashes($_POST['cityH']);
    $stateH=stripslashes($_POST['stateH']);
    $zipH=stripslashes($_POST['zipH']);



     $montho=strtotime("Next Month");
       $montho=date("F j, Y", $montho);

     //  $trip="../checkoutA/admin/GoTool/report/";



     //    include(''.$trip.'Numbers/Words.php');






                 $sql3333 ="SELECT * FROM $table_name102 WHERE (map_id= '$map_id')";
                $result112aa = @mysqli_query($connection,$sql3333) or die(mysqli_error($connection));
while ($row1d = mysqli_fetch_array($result112aa)) {
  //include("../../../guest_forms/variables_db.php");

    $sql3334 ="SELECT * FROM $table_name100 WHERE (map_id ='$map_id' )";
         $result112ab = @mysqli_query($connection,$sql3334) or die(mysqli_error($connection));
        $num334 = mysqli_num_rows($result112ab);

               if ($num334 != 0){

                $result112ab = @mysqli_query($connection,$sql3334) or die(mysqli_error($connection));
while ($row112aa = mysqli_fetch_array($result112ab)) {
    $pic_id=  $row112aa['image_2'];
  $form_loc_id=  $row112aa['form_loc_id'];
  $pic[$form_loc_id]= $pic_id;

  $pigA="A";
   $pigB="B";
    $pigC="C";
     $pigD="D";


     if ( $pic[$form_loc_id]==$blink){
  $pic[$form_loc_id]="nosig.png";
           }  }



    }
     //   include("Numbers/Words.php");

     //$nw = new Numbers_Words();
   //  $price_words = $nw->toWords($van[1]);
//$price_words = strtoupper($price_words);
//$price_words="$price_words DOLLARS";

          include("master/doc1.php");
   }






//============================================================+
//
//
//
//string   	$name   	The name of the file when saved. Note that special characters are removed and blanks characters are replaced with the underscore character.
//string   	$dest   	Destination where to send the document. It can take one of the following values:

//    I: send the file inline to the browser (default). The plug-in is used if available. The name given by name is used when one selects the "Save as" option on the link generating the PDF.
//    D: send to the browser and force a file download with the name given by name.
//    F: save to a local server file with the name given by name.
//    S: return the document as a string. name is ignored.
//    FI: equivalent to F + I option
//    FD: equivalent to F + D option
//============================================================+



require_once('../config/lang/eng.php');
require_once('../tcpdf.php');

// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);

// set document information
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor("$author1");
$pdf->SetTitle("$title1");
$pdf->SetSubject("$subj1");
$pdf->SetKeywords("$keys1");

// set default header data
//$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 001', PDF_HEADER_STRING);
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, "Document - $a312", PDF_HEADER_STRING);

// set header and footer fonts
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));

// set default monospaced font
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);

//set margins
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);

//set auto page breaks
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);

//set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);

//set some language-dependent strings
$pdf->setLanguageArray($l);

// ---------------------------------------------------------

// set default font subsetting mode
$pdf->setFontSubsetting(true);

// Set font
// dejavusans is a UTF-8 Unicode font, if you only need to
// print standard ASCII chars, you can use core fonts like
// helvetica or times to reduce file size.
$pdf->SetFont('dejavusans', '', 14, '', true);

// Add a page
// This method has several options, check the source code documentation for more information.
$pdf->AddPage();
 //<h1>Welcome to <a href="http://www.tcpdf.org" style="text-decoration:none;color:black;"><span style="background-color:#CC0000;"> TC<span style="color:white;">PDF</span> </span></a>!</h1>

// Set some content to print
$html = <<<EOD
<p>$good1</p>
EOD;

// Print text using writeHTMLCell()
$pdf->writeHTMLCell($w=0, $h=0, $x='', $y='', $html, $border=0, $ln=1, $fill=0, $reseth=true, $align='', $autopadding=true);

// ---------------------------------------------------------

// Close and output PDF document
// This method has several options, check the source code documentation for more information.
$pdf->Output("$a312.pdf", 'FD');

//header('Location:https://411webhost.com/guest_forms/download.html');
//============================================================+
// END OF FILE
//============================================================+
?>
