// createDataFile creates a file with all data for a given team.
function createDataFile($compress = false) {
- global $user;
+ global $user;
// Create a temporary file.
- $dirName = dirname(TEMPLATE_DIR . '_c/.');
+ $dirName = dirname(TEMPLATE_DIR . '_c/.');
$tmp_file = tempnam($dirName, 'tt');
// Open the file for writing.
fwrite($file, "<pack>\n");
// Write team info.
- fwrite($file, "<team currency=\"".$user->currency."\" 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."\" 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.
"\" 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");
'name' => $this->teamData['NAME'],
'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'],
$mdb2 = getConnection();
+ $lock_spec = $fields['lock_spec'];
+ if ($lock_spec !== null) {
+ $lockspec_f = ', lock_spec';
+ $lockspec_v = ', ' . $mdb2->quote($lock_spec);
+ } else {
+ $lockspec_f = '';
+ $lockspec_v = '';
+ }
+
if ($fields['lock_interval'] !== null) {
$locktime_f = ', locktime';
$locktime_v = ", " . (int)$fields['lock_interval'];
global $i18n;
$lang = $i18n->lang;
}
-
+
$decimal_mark = $fields['decimal_mark'];
if ($decimal_mark !== null) {
$decimal_mark_f = ', decimal_mark';
- $decimal_mark_v = ', ' . $mdb2->quote($decimal_mark);
+ $decimal_mark_v = ', ' . $mdb2->quote($decimal_mark);
} else {
$decimal_mark_f = '';
$decimal_mark_v = '';
$record_type_v = '';
}
- $sql = "insert into tt_teams (name, address, currency $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 $locktime_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']))." $locktime_v, ".$mdb2->quote($lang).
+ ", ".$mdb2->quote(trim($fields['currency']))." $lockspec_v $locktime_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);
<br>
<table cellspacing="0" cellpadding="4" width="100%" border="0">
<tr>
- <td align="center"> Anuko Time Tracker 1.9.22.3469 | Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+ <td align="center"> Anuko Time Tracker 1.9.22.3470 | 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>