$key = 'last_name';
}
if( $key === 'd_yr_range' || $key === 'b_yr_range' ){
+
$value = substr($value, 0, 4);
+
}
if( $key === 'courier_date' ){
$key = 'newspaper_date';
}
- if( $key === 'obit_article' ){
- if ( !empty($value) ){
- $imageFullUrl = $img_src . $value;
-
-// $fp = fopen( GLM_MEMBERS_PLUGIN_IMAGES_PATH . '/' . $value, 'w+' );
-// $ch = curl_init( $imageFullUrl );
-// curl_setopt($ch, CURLOPT_TIMEOUT, 50);
-// curl_setopt($ch, CURLOPT_FILE, $fp);
-// curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
-// $fileData = curl_exec($ch);
-// $httpCode = curl_getinfo($ch);
-// curl_close($ch);
-// fclose($fp);
-// // Set correct file permissions
-// $oldUmask = umask(0);
-// chmod( GLM_MEMBERS_PLUGIN_IMAGES_PATH_PATH . '/' . $value, 0660 );
-// umask($oldUmask);
-// sleep(1);
- }
- }
-// $insert[$key] = $value;
+
+ $insert[$key] = $value;
}
// echo '<pre>', print_r($insert), '</pre>';
-// $wpdb->insert($table, $insert);
+ $wpdb->insert($table, $insert);
}
// echo '<pre>', print_r($insert), '</pre>';
{foreach from=$obits item=i}
<tr>
- <td>{$i.b_yr_range}</td>
- <td>{$i.d_yr_range}</td>
+ <td>
+ {if $i.b_yr_range == 0}
+
+ {else}
+ {$i.b_yr_range}
+ {/if}
+ </td>
+ <td>
+ {if $i.d_yr_range == 0}
+
+ {else}
+ {$i.d_yr_range}
+ {/if}
+ </td>
<td> <a class="detail-link" href="{$thisUrl}/obits-detail/?obit={$i.id}" >{$i.last_name}</a> </td>
<td>{$i.first_mid}</td>
- <td>{$i.b_year}</td>
- <td>{$i.d_year}</td>
+ <td>
+ {if $i.b_year == 0}
+
+ {else}
+ {$i.b_year}
+ {/if}
+ </td>
+ <td>
+ {if $i.d_year == 0}
+
+ {else}
+ {$i.d_year}
+ {/if}
+ </td>
<td>{$i.spouse_partner}</td>
<td>{$i.maiden_other}</td>
</tr>