<br>
<table cellspacing="0" cellpadding="4" width="100%" border="0">
<tr>
- <td align="center"> Anuko Time Tracker 1.9.16.3418 | Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+ <td align="center"> Anuko Time Tracker 1.9.16.3419 | 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>
if ($request->getMethod() == 'POST') {
if ($request->getParameter('btn_add')) {
- // The Add button clicked. Redirect to cf_custom_field_add.php page.
- header('Location: cf_custom_field_add.php');
- exit();
+ // The Add button clicked. Redirect to cf_custom_field_add.php page.
+ header('Location: cf_custom_field_add.php');
+ exit();
}
} else {
$form->addInput(array('type'=>'submit','name'=>'btn_add','value'=>$i18n->getKey('button.add')));
if (!ttValidString($cl_option_name)) $errors->add($i18n->getKey('error.field'), $i18n->getKey('label.thing_name'));
if ($errors->isEmpty()) {
- $res = CustomFields::insertOption($cl_field_id, $cl_option_name);
+ $res = CustomFields::insertOption($cl_field_id, $cl_option_name);
if ($res) {
header("Location: cf_dropdown_options.php?field_id=$cl_field_id");
exit();
- } else {
+ } else
$errors->add($i18n->getKey('error.db'));
- }
}
}
// Determine field id for redirect.
$field_id = CustomFields::getFieldIdForOption($cl_id);
if ($request->getParameter('btn_delete')) {
- // Delete button pressed.
- $res = CustomFields::deleteOption($cl_id);
+ // Delete button pressed.
+ $res = CustomFields::deleteOption($cl_id);
if ($res) {
header("Location: cf_dropdown_options.php?field_id=$field_id");
exit();
- } else {
+ } else
$errors->add($i18n->getKey('error.db'));
- }
}
if ($request->getParameter('btn_cancel')) {
- // Cancel button pressed.
- header("Location: cf_dropdown_options.php?field_id=$field_id");
- exit();
+ // Cancel button pressed.
+ header("Location: cf_dropdown_options.php?field_id=$field_id");
+ exit();
}
} else {
$option = CustomFields::getOptionName($cl_id);
$field_id = CustomFields::getFieldIdForOption($cl_id);
header("Location: cf_dropdown_options.php?field_id=$field_id");
exit();
- } else {
+ } else
$errors->add($i18n->getKey('error.db'));
- }
}
}
// If chart interval changed - save it.
$cl_interval = $request->getParameter('interval');
if ($cl_interval) {
- // Save in the session
+ // Save in the session
$_SESSION['chart_interval'] = $cl_interval;
// and permanently.
- $sc = new ttSysConfig($user->id);
+ $sc = new ttSysConfig($user->id);
$sc->setValue(SYSC_CHART_INTERVAL, $cl_interval);
}
// If chart type changed - save it.
} else {
// Do not assign all projects to a new client by default. This should help to reduce clutter.
// foreach ($projects as $project_item)
- // $cl_projects[] = $project_item['id'];
+ // $cl_projects[] = $project_item['id'];
}
$form = new Form('clientForm');
$form = new Form('clientDeleteForm');
$form->addInput(array('type'=>'hidden','name'=>'id','value'=>$id));
-$form->addInput(array('type'=>'combobox',
- 'name'=>'delete_client_entries',
- 'data'=>array('0'=>$i18n->getKey('dropdown.do_not_delete'),'1'=>$i18n->getKey('dropdown.delete')),
-));
+$form->addInput(array('type'=>'combobox','name'=>'delete_client_entries',
+ 'data'=>array('0'=>$i18n->getKey('dropdown.do_not_delete'),'1'=>$i18n->getKey('dropdown.delete'))));
$form->addInput(array('type'=>'submit','name'=>'btn_delete','value'=>$i18n->getKey('label.delete')));
$form->addInput(array('type'=>'submit','name'=>'btn_cancel','value'=>$i18n->getKey('button.cancel')));
$errors->add($i18n->getKey('error.db'));
if ($request->getParameter('btn_cancel')) {
- header('Location: clients.php');
- exit();
+ header('Location: clients.php');
+ exit();
}
} // post
if (!ttValidFloat($cl_tax, true)) $errors->add($i18n->getKey('error.field'), $i18n->getKey('label.tax'));
if ($errors->isEmpty()) {
- if ($request->getParameter('btn_save')) {
+ if ($request->getParameter('btn_save')) {
$client = ttClientHelper::getClientByName($cl_name);
if (($client && ($cl_id == $client['id'])) || !$client) {
if (ttClientHelper::update(array(
$errors->add($i18n->getKey('error.db'));
} else
$errors->add($i18n->getKey('error.client_exists'));
- }
+ }
if ($request->getParameter('btn_copy')) {
if (!ttClientHelper::getClientByName($cl_name)) {
$now = mktime();
$sql = "select * from tt_cron where $now >= next
- and status = 1 and report_id is not null and email is not null";
+ and status = 1 and report_id is not null and email is not null";
$res = $mdb2->query($sql);
if (is_a($res, 'PEAR_Error'))
- exit;
+ exit();
while ($val = $res->fetchRow()) {
// We have jobs to execute in user language.