1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
|
<?vsp
--
-- $Id$
--
-- This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
-- project.
--
-- Copyright (C) 1998-2018 OpenLink Software
--
-- This project is free software; you can redistribute it and/or modify it
-- under the terms of the GNU General Public License as published by the
-- Free Software Foundation; only version 2 of the License, dated June 1991.
--
-- This program is distributed in the hope that it will be useful, but
-- WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- General Public License for more details.
--
-- You should have received a copy of the GNU General Public License along
-- with this program; if not, write to the Free Software Foundation, Inc.,
-- 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
declare _user_id, _domain_id integer;
declare _sid, _realm, _output varchar;
declare _params any;
set http_charset = 'UTF-8';
_realm := 'wa';
_sid := '';
_output := get_keyword('output', params, '');
_domain_id := 1;
if (_output = 'about') {
declare sql, state, msg, meta, result any;
_user_id := get_keyword('uid', params, '0');
_params := vector();
_params := vector_concat(_params, vector('q_max', 15));
sql := OMAIL.WA.omail_msg_search(_domain_id, _user_id, _params, 0);
state := '00000';
exec(sql[0], state, msg, sql[1], 0, meta, result);
if (state <> '00000')
goto _error;
http_rewrite ();
http_header ('Content-Type: text/xml; charset=UTF-8\r\n');
http ('<rss version="2.0">\n');
http ('<channel>\n');
for (select U_FULL_NAME, U_E_MAIL from DB.DBA.SYS_USERS where U_ID = _user_id) do {
http ('<title>');
http_value (OMAIL.WA.utf2wide(OMAIL.WA.domain_name(_domain_id)));
http ('</title>\n');
http ('<description>');
http_value (OMAIL.WA.utf2wide(OMAIL.WA.domain_description(_domain_id)));
http ('</description>\n');
http ('<managingEditor>');
http_value (U_E_MAIL);
http ('</managingEditor>\n');
http ('<pubDate>');
http_value (OMAIL.WA.dt_rfc1123(now()));
http ('</pubDate>\n');
http ('<generator>');
http_value ('Virtuoso Universal Server ' || sys_stat('st_dbms_ver'));
http ('</generator>\n');
http ('<webMaster>');
http_value (U_E_MAIL);
http ('</webMaster>\n');
http ('<link>');
http_value (OMAIL.WA.omail_url(_domain_id));
http ('</link>\n');
}
foreach (any row in result) do {
http ('<item>\n');
http ('<title>');
http_value (OMAIL.WA.utf2wide(row[0]));
http ('</title>\n');
http ('<link>');
http_value (OMAIL.WA.omail_open_url(_sid, _realm, _domain_id, _user_id, row[4]));
http ('</link>\n');
http ('<pubDate>');
http_value (OMAIL.WA.dt_rfc1123 (row[7]));
http ('</pubDate>\n');
http ('<ods:modified xmlns:ods:="http://www.openlinksw.com/ods/">');
http_value (OMAIL.WA.dt_iso8601 (row[7]));
http ('</ods:modified>\n');
http ('</item>\n');
}
http ('</channel>\n');
http ('</rss>');
http_xslt (OMAIL.WA.omail_xslt_full ('export/rss2rdf.xsl'));
goto _end;
}
_error:
http('<?xml version="1.0" ?><empty />');
_end:
http_flush();
?>
|