public function FrxControls::email_merge in Forena Reports 7
Same name and namespace in other branches
- 6 plugins/FrxControls.inc \FrxControls::email_merge()
File
- plugins/
FrxControls.inc, line 288 - contains various methods for extending report formating, layout, transformation and design.
Class
- FrxControls
- @file contains various methods for extending report formating, layout, transformation and design.
Code
public function email_merge($columns, $data_block, $clause) {
if ($clause) {
$clause = 'frx:clause ="' . $clause . '"';
}
$xml = '<div frx:block="' . $data_block . '" ' . $clause . ' frx:foreach="*">';
$xml .= '<div class="email-document">';
$xml .= '<div class="email-header">
<table>
<tbody>
<tr>
<th>From</th>
<td class="email-header-from">metzlerd@evergreen.edu</td>
</tr>
<tr>
<th>To</th>
<td class="email-header-to">{email}</td>
</tr>
<tr>
<th>Subject</th>
<td class="email-header-subject"></td>
</tr>
</tbody>
</table>
</div>';
$xml .= '<div class="email-body"><p>';
foreach ($columns as $column) {
$xml .= '{' . $column . '} ';
}
$xml .= '</p></div>';
$xml .= '</div>';
$xml .= '</div>';
return $xml;
}