<br>
<table cellspacing="0" cellpadding="4" width="100%" border="0">
<tr>
- <td align="center"> Anuko Time Tracker 1.17.71.4167 | Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+ <td align="center"> Anuko Time Tracker 1.17.72.4168 | 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>
header('Location: feature_disabled.php');
exit();
}
-
-$cl_id = $request->getParameter('id');
+$cl_id = (int)$request->getParameter('id');
+// Get the expense item we are deleting.
$expense_item = ttExpenseHelper::getItem($cl_id, $user->getActiveUser());
-
-// Prohibit deleting invoiced records.
-if ($expense_item['invoice_id']) die($i18n->get('error.sys'));
+if (!$expense_item || $expense_item['invoice_id']) {
+ // Prohibit deleting not ours or invoiced items.
+ header('Location: access_denied.php');
+ exit();
+}
if ($request->isPost()) {
if ($request->getParameter('delete_button')) { // Delete button pressed.
header('Location: feature_disabled.php');
exit();
}
-
-$cl_id = $request->getParameter('id');
-
+$cl_id = (int)$request->getParameter('id');
// Get the expense item we are editing.
$expense_item = ttExpenseHelper::getItem($cl_id, $user->getActiveUser());
-
-// Prohibit editing invoiced items.
-if ($expense_item['invoice_id']) die($i18n->get('error.sys'));
+if (!$expense_item || $expense_item['invoice_id']) {
+ // Prohibit editing not ours or invoiced items.
+ header('Location: access_denied.php');
+ exit();
+}
$item_date = new DateAndTime(DB_DATEFORMAT, $expense_item['date']);
header('Location: feature_disabled.php');
exit();
}
-
-$cl_id = $request->getParameter('id');
+$cl_id = (int)$request->getParameter('id');
+// Get the expense item we are deleting.
$expense_item = ttExpenseHelper::getItem($cl_id, $user->getActiveUser());
-
-// Prohibit deleting invoiced records.
-if ($expense_item['invoice_id']) die($i18n->get('error.sys'));
+if (!$expense_item || $expense_item['invoice_id']) {
+ // Prohibit deleting not ours or invoiced items.
+ header('Location: access_denied.php');
+ exit();
+}
if ($request->isPost()) {
if ($request->getParameter('delete_button')) { // Delete button pressed.
header('Location: feature_disabled.php');
exit();
}
-
-$cl_id = $request->getParameter('id');
-
+$cl_id = (int)$request->getParameter('id');
// Get the expense item we are editing.
$expense_item = ttExpenseHelper::getItem($cl_id, $user->getActiveUser());
-
-// Prohibit editing invoiced items.
-if ($expense_item['invoice_id']) die($i18n->get('error.sys'));
+if (!$expense_item || $expense_item['invoice_id']) {
+ // Prohibit editing not ours or invoiced items.
+ header('Location: access_denied.php');
+ exit();
+}
$item_date = new DateAndTime(DB_DATEFORMAT, $expense_item['date']);
import('ttTimeHelper');
import('DateAndTime');
-// Access check.
+// Access checks.
if (!ttAccessAllowed('track_own_time')) {
header('Location: access_denied.php');
exit();
}
-
-$cl_id = $request->getParameter('id');
+$cl_id = (int)$request->getParameter('id');
+// Get the time record we are deleting.
$time_rec = ttTimeHelper::getRecord($cl_id, $user->getActiveUser());
-
-// Prohibit deleting invoiced records.
-if ($time_rec['invoice_id']) die($i18n->get('error.sys'));
+if (!$time_rec || $time_rec['invoice_id']) {
+ // Prohibit deleting not ours or invoiced records.
+ header('Location: access_denied.php');
+ exit();
+}
// Escape comment for presentation.
$time_rec['comment'] = htmlspecialchars($time_rec['comment']);
header('Location: access_denied.php');
exit();
}
+$cl_id = (int)$request->getParameter('id');
+// Get the time record we are editing.
+$time_rec = ttTimeHelper::getRecord($cl_id, $user->getActiveUser());
+if (!$time_rec || $time_rec['invoice_id']) {
+ // Prohibit editing not ours or invoiced records.
+ header('Location: access_denied.php');
+ exit();
+}
// Use custom fields plugin if it is enabled.
if ($user->isPluginEnabled('cf')) {
$smarty->assign('custom_fields', $custom_fields);
}
-$cl_id = $request->getParameter('id');
-
-// Get the time record we are editing.
-$time_rec = ttTimeHelper::getRecord($cl_id, $user->getActiveUser());
-
-// Prohibit editing invoiced records.
-if ($time_rec['invoice_id']) die($i18n->get('error.sys'));
-
$item_date = new DateAndTime(DB_DATEFORMAT, $time_rec['date']);
// Initialize variables.
import('ttTimeHelper');
import('DateAndTime');
-// Access check.
+// Access checks.
if (!(ttAccessAllowed('track_own_time') || ttAccessAllowed('track_time'))) {
header('Location: access_denied.php');
exit();
}
-
-$cl_id = $request->getParameter('id');
+$cl_id = (int)$request->getParameter('id');
+// Get the time record we are deleting.
$time_rec = ttTimeHelper::getRecord($cl_id, $user->getActiveUser());
-
-// Prohibit deleting invoiced records.
-if ($time_rec['invoice_id']) die($i18n->get('error.sys'));
+if (!$time_rec || $time_rec['invoice_id']) {
+ // Prohibit deleting not ours or invoiced records.
+ header('Location: access_denied.php');
+ exit();
+}
// Escape comment for presentation.
$time_rec['comment'] = htmlspecialchars($time_rec['comment']);
import('ttTimeHelper');
import('DateAndTime');
-// Access check.
+// Access checks.
if (!(ttAccessAllowed('track_own_time') || ttAccessAllowed('track_time'))) {
header('Location: access_denied.php');
exit();
}
+$cl_id = (int)$request->getParameter('id');
+// Get the time record we are editing.
+$time_rec = ttTimeHelper::getRecord($cl_id, $user->getActiveUser());
+if (!$time_rec || $time_rec['invoice_id']) {
+ // Prohibit editing not ours or invoiced records.
+ header('Location: access_denied.php');
+ exit();
+}
// Use custom fields plugin if it is enabled.
if ($user->isPluginEnabled('cf')) {
$smarty->assign('custom_fields', $custom_fields);
}
-$cl_id = $request->getParameter('id');
-
-// Get the time record we are editing.
-$time_rec = ttTimeHelper::getRecord($cl_id, $user->getActiveUser());
-
-// Prohibit editing invoiced records.
-if ($time_rec['invoice_id']) die($i18n->get('error.sys'));
-
$item_date = new DateAndTime(DB_DATEFORMAT, $time_rec['date']);
// Initialize variables.