Update hard_copy.php
[clinton/MarylandElectronicPetitionSignature.git] / hard_copy.php
index 0f1bd46..70b6c4e 100644 (file)
@@ -17,6 +17,10 @@ $black = imagecolorallocate($jpg_image, 0, 0, 0);
 $font_path = 'files/coolvetica rg.ttf';
 $font_path_sig = 'files/Claston Script.ttf';
 
+
+$DOB = $_COOKIE['pDOB'];
+$SIGNED = date('Y-m-d');
+
 if ( $_COOKIE['pCOUNTY'] == 'Baltimore City'){
   // City Checkbox
   imagettftext($jpg_image, 50, 0, 115, 365, $black, $font_path, 'X');
@@ -25,18 +29,30 @@ if ( $_COOKIE['pCOUNTY'] == 'Baltimore City'){
   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, $_COOKIE['pNAME']);
-// signed
-imagettftext($jpg_image, 80, 0, 400, 1190, $black, $font_path_sig, $_COOKIE['pNAME']);
+
 // address
 imagettftext($jpg_image, 50, 0, 400, 1300, $black, $font_path,  $_COOKIE['pADDRESS']);
 // date of birth 
-imagettftext($jpg_image, 50, 0, 1800, 1070, $black, $font_path, $_COOKIE['pDOB']);
+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, date('M D Y'));
+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