root/trunk/licqweb/viewEvent.php

Revision 4526, 1.6 kB (checked in by erijo, 2 years ago)

Removed svn:keywords from all files that don't need it. May make your
checkout a tiny bit faster :)

  • Property svn:eol-style set to native
Line 
1<?
2/*
3 * licqweb. Copyright 2005, Philip Nelson
4 *
5 * This file is part of licqweb.
6 *
7 * licqweb is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * licqweb is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with licqweb; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
20 */
21require_once('config.php');
22require_once('rms.php');
23
24session_start();
25$uin = $_SESSION['uin'];
26$password = $_SESSION['password'];
27session_write_close();
28
29if (!rmsLogin("$uin\r\n", "$password\r\n")) {
30    header('Content-Type: text/xml');
31    echo "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>";
32    echo "<response><method>loginFailed</method><result>Couldn't log in to rms plugin!</result></response>";
33    exit;
34}
35
36$messages = "";
37while (is_array($message = rmsViewEvent($_GET['id'], $_GET['pp']))) {
38    $messages .= "<message>" . xmlentities($message['msg']) . "</message><time>" . $message['time'] . "</time>";
39}
40
41header('Content-Type: text/xml');
42echo "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>";
43echo "
44<response>
45  <method>viewEvent</method>
46  <result><id>" . $_GET['id'] . "</id><pp>" . $_GET['pp'] . "</pp><messages>$messages</messages></result>
47</response>
48";
49?>
Note: See TracBrowser for help on using the browser.