+ // Write notifications.
+ $notifications = $this->getRecordsFromTable('tt_cron');
+ fwrite($this->file, $this->indentation." <notifications>\n");
+ foreach ($notifications as $notification) {
+ $notification_part = $this->indentation.' '."<notification cron_spec=\"".$notification['cron_spec']."\"";
+ $notification_part .= " last=\"".$notification['last']."\"";
+ $notification_part .= " next=\"".$notification['next']."\"";
+ $notification_part .= " report_id=\"".$this->favReportMap[$notification['report_id']]."\"";
+ $notification_part .= " email=\"".htmlspecialchars($notification['email'])."\"";
+ $notification_part .= " cc=\"".htmlspecialchars($notification['cc'])."\"";
+ $notification_part .= " subject=\"".htmlspecialchars($notification['subject'])."\"";
+ $notification_part .= " report_condition=\"".htmlspecialchars($notification['report_condition'])."\"";
+ $notification_part .= " status=\"".$notification['status']."\"";
+ $notification_part .= "></notification>\n";
+ fwrite($this->file, $notification_part);
+ }
+ fwrite($this->file, $this->indentation." </notifications>\n");
+ 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);
+