fwrite($file, "<pack>\n");
// Write team info.
- fwrite($file, "<team currency=\"".$user->currency."\" lock_spec=\"".$user->lock_spec."\" lock_interval=\"".$user->lock_interval."\" lang=\"".$user->lang."\" decimal_mark=\"".$user->decimal_mark."\" date_format=\"".$user->date_format."\" time_format=\"".$user->time_format."\" week_start=\"".$user->week_start.
+ fwrite($file, "<team currency=\"".$user->currency."\" lock_spec=\"".$user->lock_spec."\" lang=\"".$user->lang."\" decimal_mark=\"".$user->decimal_mark."\" date_format=\"".$user->date_format."\" time_format=\"".$user->time_format."\" week_start=\"".$user->week_start.
"\" plugins=\"".$user->plugins."\" tracking_mode=\"".$user->tracking_mode."\" record_type=\"".$user->record_type."\">\n");
fwrite($file, " <name><![CDATA[".$user->team."]]></name>\n");
fwrite($file, " <address><![CDATA[".$user->address."]]></address>\n");
'address' => $this->teamData['ADDRESS'],
'currency' => $this->teamData['CURRENCY'],
'lock_spec' => $this->teamData['LOCK_SPEC'],
- 'lock_interval' => $this->teamData['LOCK_INTERVAL'],
'lang' => $this->teamData['LANG'],
'decimal_mark' => $this->teamData['DECIMAL_MARK'],
'date_format' => $this->teamData['DATE_FORMAT'],
$lockspec_v = '';
}
- if ($fields['lock_interval'] !== null) {
- $locktime_f = ', locktime';
- $locktime_v = ", " . (int)$fields['lock_interval'];
- } else {
- $locktime_f = '';
- $locktime_v = '';
- }
-
$lang = $fields['lang'];
if (!$lang) {
global $i18n;
$record_type_v = '';
}
- $sql = "insert into tt_teams (name, address, currency $lockspec_f $locktime_f, lang $decimal_mark_f $date_format_f $time_format_f $week_start_f $plugins_f $tracking_mode_f $record_type_f)
+ $sql = "insert into tt_teams (name, address, currency $lockspec_f, lang $decimal_mark_f $date_format_f $time_format_f $week_start_f $plugins_f $tracking_mode_f $record_type_f)
values(".$mdb2->quote(trim($fields['name'])).
", ".$mdb2->quote(trim($fields['address'])).
- ", ".$mdb2->quote(trim($fields['currency']))." $lockspec_v $locktime_v, ".$mdb2->quote($lang).
+ ", ".$mdb2->quote(trim($fields['currency']))." $lockspec_v, ".$mdb2->quote($lang).
"$decimal_mark_v $date_format_v $time_format_v $week_start_v $plugins_v $tracking_mode_v $record_type_v)";
$affected = $mdb2->exec($sql);
$name_part = 'name = '.$mdb2->quote($fields['name']);
$currency_part = '';
$addr_part = '';
- $locktime_part = '';
$lang_part = '';
$decimal_mark_part = '';
$date_format_part = '';
if (isset($fields['address'])) $addr_part = ', address = '.$mdb2->quote($fields['address']);
if (isset($fields['currency'])) $currency_part = ', currency = '.$mdb2->quote($fields['currency']);
- if (isset($fields['locktime'])) $locktime_part = ', locktime = '.intval($fields['locktime']);
if (isset($fields['lang'])) $lang_part = ', lang = '.$mdb2->quote($fields['lang']);
if (isset($fields['decimal_mark'])) $decimal_mark_part = ', decimal_mark = '.$mdb2->quote($fields['decimal_mark']);
if (isset($fields['date_format'])) $date_format_part = ', date_format = '.$mdb2->quote($fields['date_format']);
if (isset($fields['plugins'])) $plugins_part = ', plugins = '.$mdb2->quote($fields['plugins']);
if (isset($fields['lock_spec'])) $lock_spec_part = ', lock_spec = '.$mdb2->quote($fields['lock_spec']);
- $sql = "update tt_teams set $name_part $addr_part $currency_part $locktime_part $lang_part $decimal_mark_part
+ $sql = "update tt_teams set $name_part $addr_part $currency_part $lang_part $decimal_mark_part
$date_format_part $time_format_part $week_start_part $tracking_mode_part $record_type_part
$plugins_part $lock_spec_part where id = $team_id";
$affected = $mdb2->exec($sql);
var $team = null; // Team name.
var $custom_logo = 0; // Whether to use a custom logo for team.
var $address = null; // Address for invoices.
- var $lock_interval = 0; // Lock interval in days for time records.
var $lock_spec = null; // Cron specification for record locking.
var $rights = 0; // A mask of user rights.
$mdb2 = getConnection();
$sql = "SELECT u.id, u.login, u.name, u.team_id, u.role, u.client_id, u.email, t.name as team_name,
- t.address, t.currency, t.locktime, t.lang, t.decimal_mark, t.date_format, t.time_format, t.week_start,
+ t.address, t.currency, t.lang, t.decimal_mark, t.date_format, t.time_format, t.week_start,
t.tracking_mode, t.record_type, t.plugins, t.lock_spec, t.custom_logo
FROM tt_users u LEFT JOIN tt_teams t ON (u.team_id = t.id) WHERE ";
if ($id)
$this->plugins = $val['plugins'];
$this->lock_spec = $val['lock_spec'];
$this->custom_logo = $val['custom_logo'];
- $this->lock_interval = $val['locktime'];
// Set "on behalf" id and name.
if (isset($_SESSION['behalf_id'])) {
function isDateLocked($date)
{
if ($this->isPluginEnabled('lk') && $this->lock_spec) {
- // This is legacy code...
- /*
- // Determine lock date. Entries earlier than lock date cannot be created or modified.
- $lockdate = 0;
- if ($this->lock_interval > 0) {
- $lockdate = new DateAndTime();
- $lockdate->decDay($this->lock_interval);
- }
- if($lockdate && $date->before($lockdate))
- return true;
- */
-
- // New code with cron specification.
-
// Override for managers.
if ($this->canManageTeam()) return false;
'label.language' => 'Sprache',
// TODO: translate the following string.
// 'label.decimal_mark' => 'Decimal mark',
-'label.lock_interval' => 'Blockierter Zeitraum in Tagen',
'label.date_format' => 'Datumsformat',
'label.time_format' => 'Zeitformat',
'label.week_start' => 'Erster Wochentag',
'label.id' => 'ID',
'label.language' => 'Language',
'label.decimal_mark' => 'Decimal mark',
-'label.lock_interval' => 'Lock interval in days',
'label.date_format' => 'Date format',
'label.time_format' => 'Time format',
'label.week_start' => 'First day of week',
// TODO: translate the following strings.
// 'label.language' => 'Language',
// 'label.decimal_mark' => 'Decimal mark',
-'label.lock_interval' => 'Intervalo de cierre en días',
-// TODO: translate the following strings.
// 'label.date_format' => 'Date format',
// 'label.time_format' => 'Time format',
// 'label.week_start' => 'First day of week',
'label.language' => 'زبان',
// TODO: translate the following string.
// 'label.decimal_mark' => 'Decimal mark',
-'label.lock_interval' => 'قفل کردن فرصت بازه زمانی',
'label.date_format' => 'قالب تاریخ',
'label.time_format' => 'قالب زمان',
'label.week_start' => 'روز اول هفته',
'label.id' => 'ID',
'label.language' => 'Kieli',
'label.decimal_mark' => 'Desimaalierotin',
-'label.lock_interval' => 'Lukitusväli päivinä',
'label.date_format' => 'Päiväyksen muoto',
'label.time_format' => 'Kellonajan muoto',
'label.week_start' => 'Viikon 1. päivä',
'label.language' => 'Langage',
// TODO: translate the following string.
// 'label.decimal_mark' => 'Decimal mark',
-'label.lock_interval' => 'Intervalle de verrouillage en jours',
'label.date_format' => 'Format date',
'label.time_format' => 'Format heure',
'label.week_start' => '1er jour de la semaine',
'label.language' => 'שפה',
// TODO: translate the following string.
// 'label.decimal_mark' => 'Decimal mark',
-'label.lock_interval' => 'טווח זמן לנעילה',
'label.date_format' => 'תבנית של תאריך',
'label.time_format' => 'תבנית של שעה',
'label.week_start' => 'היום הראשון בשבוע',
'label.id' => 'ID',
'label.language' => 'Taal',
'label.decimal_mark' => 'Decimaal teken',
-'label.lock_interval' => 'Uitsluit interval in dagen',
'label.date_format' => 'Datum formaat',
'label.time_format' => 'Tijdsaanduiding',
'label.week_start' => 'Eerste dag van de week',
'label.id' => 'ID',
'label.language' => 'Język',
'label.decimal_mark' => 'Znak dziesiętny',
-'label.lock_interval' => 'Blokada edycji po okresie (dni)',
'label.date_format' => 'Format daty',
'label.time_format' => 'Format godziny',
'label.week_start' => 'Początek tygodnia',
'label.id' => 'ID',
'label.language' => 'Язык',
'label.decimal_mark' => 'Десятичный знак',
-'label.lock_interval' => 'Интервал блокировки в днях',
'label.date_format' => 'Формат даты',
'label.time_format' => 'Формат времени',
'label.week_start' => 'День начала недели',
'label.language' => 'Jazyk',
// TODO: translate the following string.
// 'label.decimal_mark' => 'Decimal mark',
-'label.lock_interval' => 'Interval uzamknutia záznamov v dňoch',
'label.date_format' => 'Formát dátumu',
'label.time_format' => 'Formát času',
'label.week_start' => 'Prvý deň v týždni',
'label.id' => 'ID',
'label.language' => 'Jezik',
'label.decimal_mark' => 'Decimala',
-'label.lock_interval' => 'Blokiraj intervale u danima',
'label.date_format' => 'Format datuma',
'label.time_format' => 'Format vremena',
'label.week_start' => 'Prvi dan u nedelji',
<br>
<table cellspacing="0" cellpadding="4" width="100%" border="0">
<tr>
- <td align="center"> Anuko Time Tracker 1.9.22.3477 | Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+ <td align="center"> Anuko Time Tracker 1.9.22.3478 | 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>
`address` varchar(255) default NULL, # team address, used in invoices
`currency` varchar(7) default NULL, # team currency symbol
`decimal_mark` char(1) NOT NULL default '.', # separator in decimals
- `locktime` int(4) default '0', # lock interval in days
`lang` varchar(10) NOT NULL default 'en', # language
`date_format` varchar(20) NOT NULL default '%Y-%m-%d', # date format
`time_format` varchar(20) NOT NULL default '%H:%M', # time format
if (!ttValidString($cl_team, true)) $err->add($i18n->getKey('error.field'), $i18n->getKey('label.team_name'));
if (!ttValidString($cl_address, true)) $err->add($i18n->getKey('error.field'), $i18n->getKey('label.address'));
if (!ttValidString($cl_currency, true)) $err->add($i18n->getKey('error.field'), $i18n->getKey('label.currency'));
- if (!ttValidInteger($cl_lock_interval, true)) $err->add($i18n->getKey('error.field'), $i18n->getKey('label.lock_interval'));
}
// Finished validating user input.
if ($err->no()) {
- if ($cl_lock_interval == null || trim($cl_lock_interval) == '')
- $cl_lock_interval = 0;
-
$update_result = true;
if ($user->canManageTeam()) {