} $setting = new PluginSetting(); if ($setting->open()) { do { $writer->write('<plugin>' . '<name>' . $setting->name . '</name>' . '<setting>' . htmlspecialchars($setting->setting) . '</setting>' . '</plugin>'); $writer->write(CRLF); } while ($setting->shift()); $setting->close(); } $setting = new UserSetting(); if ($setting->open()) { do { $writer->write('<userSetting>' . '<name>' . $setting->name . '</name>' . '<value>' . htmlspecialchars($setting->value) . '</value>' . '</userSetting>'); $writer->write(CRLF); } while ($setting->shift()); $setting->close(); } $comment = new GuestComment(); if ($comment->open('parent IS NULL')) { $writer->write('<guestbook>'); do { if ($comment->isfiltered == 0) { $writer->write('<comment>' . '<commenter' . ' id="' . $comment->commenter . '">' . '<name>' . htmlspecialchars(Utils_Unicode::correct($comment->name)) . '</name>' . '<homepage>' . htmlspecialchars(Utils_Unicode::correct($comment->homepage)) . '</homepage>' . '<ip>' . $comment->ip . '</ip>' . '<openid>' . $comment->openid . '</openid>' . '</commenter>' . '<content>' . htmlspecialchars(Utils_Unicode::correct($comment->content)) . '</content>' . '<password>' . htmlspecialchars($comment->password) . '</password>' . '<secret>' . htmlspecialchars($comment->secret) . '</secret>' . '<written>' . $comment->written . '</written>'); $writer->write(CRLF); if ($childComment = $comment->getChildren()) { do { if ($childComment->isfiltered == 0) { $writer->write('<comment>' . '<commenter' . ' id="' . $childComment->commenter . '">' . '<name>' . htmlspecialchars(Utils_Unicode::correct($childComment->name)) . '</name>' . '<homepage>' . htmlspecialchars(Utils_Unicode::correct($childComment->homepage)) . '</homepage>' . '<ip>' . $childComment->ip . '</ip>' . '<openid>' . $comment->openid . '</openid>' . '</commenter>' . '<content>' . htmlspecialchars(Utils_Unicode::correct($childComment->content)) . '</content>' . '<password>' . htmlspecialchars($childComment->password) . '</password>' . '<secret>' . htmlspecialchars($childComment->secret) . '</secret>' . '<written>' . $childComment->written . '</written>' . '</comment>'); $writer->write(CRLF); } } while ($childComment->shift());