return $result;
}
+
+ // canAdd determines if we can add a record in case there is a limit.
+ static function canAdd() {
+ $mdb2 = getConnection();
+ $sql = "select param_value from tt_site_config where param_name = 'exp_date'";
+ $res = $mdb2->query($sql);
+ $val = $res->fetchRow();
+ if (!$val) return true; // No expiration date.
+
+ if (strtotime($val['param_value']) > time())
+ return true; // Expiration date exists but not reached.
+
+ return false;
+ }
}
// 'error.cannot_import' => 'Cannot import: %s.',
// 'error.format' => 'Invalid file format.',
// 'error.user_count' => 'Limit on user count.',
+// 'error.expired' => 'Expiration date reached.',
// Warning messages.
// TODO: translate the following.
// 'error.cannot_import' => 'Cannot import: %s.',
// 'error.format' => 'Invalid file format.',
// 'error.user_count' => 'Limit on user count.',
+// 'error.expired' => 'Expiration date reached.',
// Warning messages.
// TODO: translate the following.
// 'error.cannot_import' => 'Cannot import: %s.',
// 'error.format' => 'Invalid file format.',
// 'error.user_count' => 'Limit on user count.',
+// 'error.expired' => 'Expiration date reached.',
// Warning messages.
// TODO: translate the following.
// 'error.cannot_import' => 'Cannot import: %s.',
// 'error.format' => 'Invalid file format.',
// 'error.user_count' => 'Limit on user count.',
+// 'error.expired' => 'Expiration date reached.',
// Warning messages.
// TODO: translate the following.
'error.cannot_import' => 'Cannot import: %s.',
'error.format' => 'Invalid file format.',
'error.user_count' => 'Limit on user count.',
+'error.expired' => 'Expiration date reached.',
// Warning messages.
'warn.sure' => 'Are you sure?',
// 'error.cannot_import' => 'Cannot import: %s.',
// 'error.format' => 'Invalid file format.',
// 'error.user_count' => 'Limit on user count.',
+// 'error.expired' => 'Expiration date reached.',
// Warning messages.
// TODO: translate the following.
// 'error.cannot_import' => 'Cannot import: %s.',
// 'error.format' => 'Invalid file format.',
// 'error.user_count' => 'Limit on user count.',
+// 'error.expired' => 'Expiration date reached.',
// Warning messages.
// TODO: translate the following.
// 'error.cannot_import' => 'Cannot import: %s.',
// 'error.format' => 'Invalid file format.',
// 'error.user_count' => 'Limit on user count.',
+// 'error.expired' => 'Expiration date reached.',
// Warning messages.
// TODO: translate the following.
// 'error.cannot_import' => 'Cannot import: %s.',
// 'error.format' => 'Invalid file format.',
// 'error.user_count' => 'Limit on user count.',
+// 'error.expired' => 'Expiration date reached.',
// Warning messages.
// TODO: translate the following.
// 'error.cannot_import' => 'Cannot import: %s.',
// 'error.format' => 'Invalid file format.',
// 'error.user_count' => 'Limit on user count.',
+// 'error.expired' => 'Expiration date reached.',
// Warning messages.
// TODO: translate the following.
// 'error.cannot_import' => 'Cannot import: %s.',
// 'error.format' => 'Invalid file format.',
// 'error.user_count' => 'Limit on user count.',
+// 'error.expired' => 'Expiration date reached.',
// Warning messages.
// TODO: translate the following.
// 'error.cannot_import' => 'Cannot import: %s.',
// 'error.format' => 'Invalid file format.',
// 'error.user_count' => 'Limit on user count.',
+// 'error.expired' => 'Expiration date reached.',
// Warning messages.
// TODO: translate the following.
// 'error.cannot_import' => 'Cannot import: %s.',
// 'error.format' => 'Invalid file format.',
// 'error.user_count' => 'Limit on user count.',
+// 'error.expired' => 'Expiration date reached.',
// Warning messages.
// TODO: translate the following.
// 'error.cannot_import' => 'Cannot import: %s.',
// 'error.format' => 'Invalid file format.',
// 'error.user_count' => 'Limit on user count.',
+// 'error.expired' => 'Expiration date reached.',
// Warning messages.
// TODO: translate the following.
// 'error.cannot_import' => 'Cannot import: %s.',
// 'error.format' => 'Invalid file format.',
// 'error.user_count' => 'Limit on user count.',
+// 'error.expired' => 'Expiration date reached.',
// Warning messages.
// TODO: translate the following.
// 'error.cannot_import' => 'Cannot import: %s.',
// 'error.format' => 'Invalid file format.',
// 'error.user_count' => 'Limit on user count.',
+// 'error.expired' => 'Expiration date reached.',
// Warning messages.
// TODO: translate the following.
'error.format' => 'Bestandsformaat niet valide.',
// TODO: translate the following.
// 'error.user_count' => 'Limit on user count.',
+// 'error.expired' => 'Expiration date reached.',
// Warning messages.
// TODO: translate the following.
// 'error.cannot_import' => 'Cannot import: %s.',
// 'error.format' => 'Invalid file format.',
// 'error.user_count' => 'Limit on user count.',
+// 'error.expired' => 'Expiration date reached.',
// Warning messages.
// TODO: translate the following.
// 'error.cannot_import' => 'Cannot import: %s.',
// 'error.format' => 'Invalid file format.',
// 'error.user_count' => 'Limit on user count.',
+// 'error.expired' => 'Expiration date reached.',
// Warning messages.
// TODO: translate the following.
// 'error.cannot_import' => 'Cannot import: %s.',
// 'error.format' => 'Invalid file format.',
// 'error.user_count' => 'Limit on user count.',
+// 'error.expired' => 'Expiration date reached.',
// Warning messages.
// TODO: translate the following.
// 'error.cannot_import' => 'Cannot import: %s.',
// 'error.format' => 'Invalid file format.',
// 'error.user_count' => 'Limit on user count.',
+// 'error.expired' => 'Expiration date reached.',
// Warning messages.
// TODO: translate the following.
// 'error.cannot_import' => 'Cannot import: %s.',
// 'error.format' => 'Invalid file format.',
// 'error.user_count' => 'Limit on user count.',
+// 'error.expired' => 'Expiration date reached.',
// Warning messages.
// TODO: translate the following.
'error.cannot_import' => 'Невозможно импортировать: %s.',
'error.format' => 'Неверный формат файла.',
'error.user_count' => 'Ограничение на количество пользователей.',
+'error.expired' => 'Достигнута дата экспирации.',
// Warning messages.
'warn.sure' => 'Вы уверены?',
// 'error.cannot_import' => 'Cannot import: %s.',
// 'error.format' => 'Invalid file format.',
// 'error.user_count' => 'Limit on user count.',
+// 'error.expired' => 'Expiration date reached.',
// Warning messages.
// TODO: translate the following.
// 'error.cannot_import' => 'Cannot import: %s.',
// 'error.format' => 'Invalid file format.',
// 'error.user_count' => 'Limit on user count.',
+// 'error.expired' => 'Expiration date reached.',
// Warning messages.
// TODO: translate the following.
// 'error.cannot_import' => 'Cannot import: %s.',
// 'error.format' => 'Invalid file format.',
// 'error.user_count' => 'Limit on user count.',
+// 'error.expired' => 'Expiration date reached.',
// Warning messages.
// TODO: translate the following.
// 'error.cannot_import' => 'Cannot import: %s.',
// 'error.format' => 'Invalid file format.',
// 'error.user_count' => 'Limit on user count.',
+// 'error.expired' => 'Expiration date reached.',
// Warning messages.
// TODO: translate the following.
// 'error.cannot_import' => 'Cannot import: %s.',
// 'error.format' => 'Invalid file format.',
// 'error.user_count' => 'Limit on user count.',
+// 'error.expired' => 'Expiration date reached.',
// Warning messages.
// TODO: translate the following.
// 'error.cannot_import' => 'Cannot import: %s.',
// 'error.format' => 'Invalid file format.',
// 'error.user_count' => 'Limit on user count.',
+// 'error.expired' => 'Expiration date reached.',
// Warning messages.
// TODO: translate the following.
// 'error.cannot_import' => 'Cannot import: %s.',
// 'error.format' => 'Invalid file format.',
// 'error.user_count' => 'Limit on user count.',
+// 'error.expired' => 'Expiration date reached.',
// Warning messages.
// TODO: translate the following.
<br>
<table cellspacing="0" cellpadding="4" width="100%" border="0">
<tr>
- <td align="center"> Anuko Time Tracker 1.18.36.4701 | Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+ <td align="center"> Anuko Time Tracker 1.18.36.4702 | 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>
import('form.Form');
import('ttGroupHelper');
import('DateAndTime');
+import('ttTimeHelper');
import('ttExpenseHelper');
// Access checks.
if ($new_date->after($browser_today))
$err->add($i18n->get('error.future_date'));
}
+ if (!ttTimeHelper::canAdd()) $err->add($i18n->get('error.expired'));
+ // Finished validating user input.
// Save record.
if ($request->getParameter('btn_save')) {
import('ttUserHelper');
import('ttGroupHelper');
import('DateAndTime');
+import('ttTimeHelper');
import('ttExpenseHelper');
// Access checks.
if ($selected_date->after($browser_today))
$err->add($i18n->get('error.future_date'));
}
+ if (!ttTimeHelper::canAdd()) $err->add($i18n->get('error.expired'));
// Finished validating input data.
// Prohibit creating entries in locked range.
import('form.Form');
import('ttGroupHelper');
import('DateAndTime');
+import('ttTimeHelper');
import('ttExpenseHelper');
// Access checks.
if ($new_date->after($browser_today))
$err->add($i18n->get('error.future_date'));
}
+ if (!ttTimeHelper::canAdd()) $err->add($i18n->get('error.expired'));
+ // Finished validating input data.
// Save record.
if ($request->getParameter('btn_save')) {
import('ttUserHelper');
import('ttGroupHelper');
import('DateAndTime');
+import('ttTimeHelper');
import('ttExpenseHelper');
// Access checks.
if ($selected_date->after($browser_today))
$err->add($i18n->get('error.future_date'));
}
+ if (!ttTimeHelper::canAdd()) $err->add($i18n->get('error.expired'));
// Finished validating input data.
// Prohibit creating entries in locked range.
$err->add($i18n->get('error.field'), $i18n->get('label.duration'));
}
if (!ttValidString($cl_note, true)) $err->add($i18n->get('error.field'), $i18n->get('label.note'));
+ if (!ttTimeHelper::canAdd()) $err->add($i18n->get('error.expired'));
// Finished validating user input.
// Prohibit creating entries in future.
}
if (!ttValidDate($cl_date)) $err->add($i18n->get('error.field'), $i18n->get('label.date'));
if (!ttValidString($cl_note, true)) $err->add($i18n->get('error.field'), $i18n->get('label.note'));
+ if (!ttTimeHelper::canAdd()) $err->add($i18n->get('error.expired'));
// Finished validating user input.
// This is a new date for the time record.
$err->add($i18n->get('error.field'), $i18n->get('label.duration'));
}
if (!ttValidString($cl_note, true)) $err->add($i18n->get('error.field'), $i18n->get('label.note'));
+ if (!ttTimeHelper::canAdd()) $err->add($i18n->get('error.expired'));
// Finished validating user input.
// Prohibit creating entries in future.
}
if (!ttValidDate($cl_date)) $err->add($i18n->get('error.field'), $i18n->get('label.date'));
if (!ttValidString($cl_note, true)) $err->add($i18n->get('error.field'), $i18n->get('label.note'));
+ if (!ttTimeHelper::canAdd()) $err->add($i18n->get('error.expired'));
// Finished validating user input.
// This is a new date for the time record.