Correcting more parts of the registration.
authorSteve Sutton <steve@gaslightmedia.com>
Thu, 7 Sep 2017 20:12:49 +0000 (16:12 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Thu, 7 Sep 2017 20:12:49 +0000 (16:12 -0400)
In the mail notice update one of the replacement names.
Check the array first from the mf_data query before trying to use it in
foreach loop.

registrations/Views/Default/registrations_confirmation.html
registrations/registrations.php

index 45e9bb5..4448347 100644 (file)
@@ -7,12 +7,12 @@
       <tr>
         <td align="center">
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
-                   <tr> 
+                   <tr>
               <td><font class="headertitle">{reg_term_cap}: {checkout_type}</font></td>
                        </tr>
-                 </table>      
+                 </table>
             <table border="0" width="100%" cellspacing="0" cellpadding="5">
-              <tr><td colspan="2" align="center"><h3>{reg_termp_act_cap} for: <font color="blue">{reg_name}</font></h3></td></tr>
+              <tr><td colspan="2" align="center"><h3>{reg_term_act_cap} for: <font color="blue">{reg_name}</font></h3></td></tr>
               <TR><TD COLSPAN="2" ALIGN="center">{reg_term_cap} Tracking #:&nbsp;&nbsp;{request_numb}</TD></TR>
               <tr>
                 <td colspan="2" align="center">
@@ -62,7 +62,7 @@
                 <!--{if:pay_code}-->
 <!--
                     <TR><TH ALIGN="right">Payment Comp Code:&nbsp;</TH><TD>{pay_code} </TD></TR>
--->                    
+-->
                     <TR><TD ALIGN="center" COLSPAN="2"><FONT COLOR="blue">Comp Code accepted - No payment required. </TD></TR>
                 <!--{else:pay_code}
                     <TR><TH ALIGN="right">Credit Card:&nbsp;</TH><TD>{cctype} {ccnum} exp: {ccmonth}/{ccyear}</TD></TR>
                 </td>
               </tr>
              <TR><TD COLSPAN="3">&nbsp;</TD></TR>
-             <TR> 
-               <TD COLSPAN="3"> 
+             <TR>
+               <TD COLSPAN="3">
                  <table width="95%" border="1" cellspacing="1" cellpadding="6" class="tblblck" align="center">
-                   <tr class="termstd"> 
+                   <tr class="termstd">
                      <td> <a name="terms"></a><span class="termshead"><CENTER><B>{reg_term_cap} Terms and Conditions</B></CENTER></span><br>
-                       <span class="termsingress"> 
+                       <span class="termsingress">
                        <P>{regterms}
                        </span>
                      </td>
index 0348795..2eee834 100644 (file)
@@ -1313,13 +1313,15 @@ case "Step4":
     $fd = db_auto_get_data( "SELECT * FROM mf_data WHERE fiid = $registrant ORDER BY field_id;", SI_CONN_STR, FALSE, 50, 0 );
     $i = 0;
     $fv = array();
-    foreach( $fd as $f )
-    {
-        array_push( $fv, array(
-            'field_title' => $f['title'],
-            'field_value' => ($f['type']==7&&$f['value']!=''?'<a href="'.SI_BASE_URL.'/files/'.$f['value'].'">'.$f['value'].'</a>':(!empty($f['txt_val'])?$f['txt_val']:$f['value'])),
-            'field_charge' => $f['numb_val']
-        ) );
+    if ( isset( $fd ) && is_array( $fd ) ) {
+        foreach( $fd as $f )
+        {
+            array_push( $fv, array(
+                'field_title' => $f['title'],
+                'field_value' => ($f['type']==7&&$f['value']!=''?'<a href="'.SI_BASE_URL.'/files/'.$f['value'].'">'.$f['value'].'</a>':(!empty($f['txt_val'])?$f['txt_val']:$f['value'])),
+                'field_charge' => $f['numb_val']
+            ) );
+        }
     }
     $view_tags['field_values'] = $fv;