Update hard_copy.php
[clinton/MarylandElectronicPetitionSignature.git] / hard_copy.php
index 8957ad1..70b6c4e 100644 (file)
@@ -18,25 +18,41 @@ $font_path = 'files/coolvetica rg.ttf';
 $font_path_sig = 'files/Claston Script.ttf';
 
 
+$DOB = $_COOKIE['pDOB'];
+$SIGNED = date('Y-m-d');
 
-// County on Petition
-imagettftext($jpg_image, 50, 0, 220, 260, $black, $font_path, 'Baltimore');
-// OR
-// City Checkbox
-imagettftext($jpg_image, 50, 0, 115, 365, $black, $font_path, 'X');
+if ( $_COOKIE['pCOUNTY'] == 'Baltimore City'){
+  // City Checkbox
+  imagettftext($jpg_image, 50, 0, 115, 365, $black, $font_path, 'X');
+}else{
+  // County on Petition
+  imagettftext($jpg_image, 50, 0, 220, 260, $black, $font_path, str_replace('County','',$_COOKIE['pCOUNTY']) );
+}
 
-// Slot 1 on Petition
 // name
-imagettftext($jpg_image, 50, 0, 350, 1070, $black, $font_path, 'Patrick Michael McGuire');
-// signed
-imagettftext($jpg_image, 50, 0, 400, 1100, $black, $font_path_sig, 'Patrick Michael McGuire');
+imagettftext($jpg_image, 50, 0, 350, 1070, $black, $font_path, $_COOKIE['pNAME']);
+
 // address
-imagettftext($jpg_image, 50, 0, 400, 1300, $black, $font_path, '501 Spring Ave Lutherville 21093');
-// date of birth
-imagettftext($jpg_image, 50, 0, 1800, 1070, $black, $font_path, '02 09 1980');
+imagettftext($jpg_image, 50, 0, 400, 1300, $black, $font_path,  $_COOKIE['pADDRESS']);
+// date of birth 
+if($DOB != ''){
+ imagettftext($jpg_image, 50, 0, 1900, 1070, $black, $font_path, date('m     d     Y',strtotime($DOB)));
+}
 // date signed
-imagettftext($jpg_image, 50, 0, 1800, 1200, $black, $font_path, '05 07 2020');
+imagettftext($jpg_image, 50, 0, 1900, 1200, $black, $font_path, date('m     d     Y',strtotime($SIGNED)));
+
+
+// name
+imagettftext($jpg_image, 40, 0, 100, 2880, $black, $font_path, $_COOKIE['pNAME']);
+// address
+imagettftext($jpg_image, 40, 0, 100, 2975, $black, $font_path, $_COOKIE['pADDRESS1']);
+// city state zip
+imagettftext($jpg_image, 40, 0, 100, 3065, $black, $font_path, $_COOKIE['pADDRESS2']);
+// phone
+imagettftext($jpg_image, 40, 0, 100, 3160, $black, $font_path, $_COOKIE['pPHONE']);
 
+// date signed
+imagettftext($jpg_image, 40, 0, 2150, 3150, $black, $font_path, date('m / d / y',strtotime($SIGNED)));
 
 
 // Send Image to Browser