return;
}
+ if ($name == 'TEMPLATE') {
+ if (!$this->insertTemplate(array(
+ 'group_id' => $this->current_group_id,
+ 'org_id' => $this->org_id,
+ 'name' => $attrs['NAME'],
+ 'description' => $attrs['DESCRIPTION'],
+ 'content' => $attrs['CONTENT'],
+ 'status' => $attrs['STATUS']))) {
+ $this->errors->add($i18n->get('error.db'));
+ }
+ return;
+ }
+
if ($name == 'MONTHLY_QUOTA') {
if (!$this->insertMonthlyQuota(array(
'group_id' => $this->current_group_id,
return (!is_a($affected, 'PEAR_Error'));
}
+ // insertTemplate - a helper function to insert a template.
+ private function insertTemplate($fields) {
+ $mdb2 = getConnection();
+
+ $group_id = (int) $fields['group_id'];
+ $org_id = (int) $fields['org_id'];
+ $name = $mdb2->quote($fields['name']);
+ $description = $mdb2->quote($fields['description']);
+ $content = $mdb2->quote($fields['content']);
+ $status = $mdb2->quote($fields['status']);
+
+ $sql = "INSERT INTO tt_templates (group_id, org_id, name, description, content, status)".
+ " values ($group_id, $org_id, $name, $description, $content, $status)";
+ $affected = $mdb2->exec($sql);
+ return (!is_a($affected, 'PEAR_Error'));
+ }
+
// insertExpense - a helper function to insert an expense item.
private function insertExpense($fields) {
global $user;
<br>
<table cellspacing="0" cellpadding="4" width="100%" border="0">
<tr>
- <td align="center"> Anuko Time Tracker 1.18.56.4854 | Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+ <td align="center"> Anuko Time Tracker 1.18.56.4855 | 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>