define('EXPORT_DECIMAL_DURATION', true);
+// REPORT_FOOTER - defines whether to use a footer on reports.
+//
+define('REPORT_FOOTER', true);
+
+
// Authentication module (see WEB-INF/lib/auth/)
// Possible authentication methods:
// db - internal database, logins and password hashes are stored in time tracker database.
// prepareReportBody - prepares an email body for report.
static function prepareReportBody($bean, $comment)
{
- global $user;
- global $i18n;
+ global $user;
+ global $i18n;
$items = ttReportHelper::getItems($bean);
$group_by = $bean->getAttribute('group_by');
if ($group_by && 'no_grouping' != $group_by)
- $subtotals = ttReportHelper::getSubtotals($bean);
+ $subtotals = ttReportHelper::getSubtotals($bean);
$totals = ttReportHelper::getTotals($bean);
// Use custom fields plugin if it is enabled.
}
// Output footer.
- $body .= '<p style="text-align: center;">'.$i18n->getKey('form.mail.footer').'</p>';
+ if (!defined('REPORT_FOOTER') || !(REPORT_FOOTER == false))
+ $body .= '<p style="text-align: center;">'.$i18n->getKey('form.mail.footer').'</p>';
// Finish creating email body.
$body .= '</body></html>';
}
// Output footer.
- $body .= '<p style="text-align: center;">'.$i18n->getKey('form.mail.footer').'</p>';
+ if (!defined('REPORT_FOOTER') || !(REPORT_FOOTER == false))
+ $body .= '<p style="text-align: center;">'.$i18n->getKey('form.mail.footer').'</p>';
// Finish creating email body.
$body .= '</body></html>';
<br>
<table cellspacing="0" cellpadding="4" width="100%" border="0">
<tr>
- <td align="center"> Anuko Time Tracker 1.9.13.3402 | Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+ <td align="center"> Anuko Time Tracker 1.9.14.3403 | Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
<a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
<a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> |
<a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a>
}
// Output footer.
-$html .= '<p style="text-align: center;">'.$i18n->getKey('form.mail.footer').'</p>';
+if (!defined('REPORT_FOOTER') || !(REPORT_FOOTER == false)) // By default we print it unless explicitely defined as false.
+ $html .= '<p style="text-align: center;">'.$i18n->getKey('form.mail.footer').'</p>';
+
// By this time we have html ready.
// Determine title for report.
// Beginning of TCPDF code here.
// Extend TCPDF class so that we can use custom header and footer.
-class MyyPDF extends TCPDF {
+class ttPDF extends TCPDF {
public $image_file = 'images/tt_logo.png'; // Image file for the logo in header.
public $page_word = 'Page'; // Localized "Page" word in footer, ex: Page 1/2.
}
// Create new PDF document.
-$pdf = new MyyPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
+$pdf = new ttPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
// If custom logo file exists - set it.
if (file_exists('images/'.$user->team_id.'.png'))