}
// getGroupData obtains group attributes for export.
- function getGroupData() {
+ private function getGroupData() {
global $user;
$mdb2 = getConnection();
}
// The getUsers obtains all users in group for the purpose of export.
- function getUsers() {
+ private function getUsers() {
global $user;
$mdb2 = getConnection();
return false;
}
+ // getRecordsFromTable - obtains all fields from a given table for a group.
+ function getRecordsFromTable($table_name) {
+ global $user;
+ $mdb2 = getConnection();
+
+ $result = array();
+ $sql = "select * from $table_name where group_id = $this->group_id and org_id = $user->org_id";
+ $res = $mdb2->query($sql);
+ $result = array();
+ if (!is_a($res, 'PEAR_Error')) {
+ while ($val = $res->fetchRow()) {
+ $result[] = $val;
+ }
+ return $result;
+ }
+ return false;
+ }
+
// writeData writes group data into file.
function writeData() {
unset($notifications);
unset($notification_part);
+ // Write user config parameters.
+ $user_params = $this->getRecordsFromTable('tt_config');
+ fwrite($this->file, $this->indentation." <user_params>\n");
+ foreach ($user_params as $user_param) {
+ $user_param_part = $this->indentation.' '."<user_param user_id=\"".$this->userMap[$user_param['user_id']]."\"";
+ $user_param_part .= " param_name=\"".htmlspecialchars($user_param['param_name'])."\"";
+ $user_param_part .= " param_value=\"".htmlspecialchars($user_param['param_value'])."\"";
+ $user_param_part .= "></user_param>\n";
+ fwrite($this->file, $user_param_part);
+ }
+ fwrite($this->file, $this->indentation." </user_params>\n");
+ unset($user_params);
+ unset($user_param_part);
+
// We are mostly done with writing this group data, destroy all maps.
unset($this->roleMap);
unset($this->userMap);
<br>
<table cellspacing="0" cellpadding="4" width="100%" border="0">
<tr>
- <td align="center"> Anuko Time Tracker 1.18.22.4465 | Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+ <td align="center"> Anuko Time Tracker 1.18.22.4466 | 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>