No regular expressions were active.
1 |
|
/**
|
|
1 |
|
/**
|
2 |
|
*
O
rca Intera
ctive Foru
m Script
|
|
2 |
|
*
O
rca Intera
ctive Foru
m Script
|
3 |
|
*
---------
------
|
|
3 |
|
*
---------
------
|
4 |
|
* Star
ted
: Mo
n Mar 23 2
006
|
|
4 |
|
* Star
ted
: Mo
n Mar 23 2
006
|
5 |
|
* Copy
right
: (C
) 2007 Boo
nEx Group
|
|
5 |
|
* Copy
right
: (C
) 2007 Boo
nEx Group
|
6 |
|
* Webs
ite
: ht
tp://www.b
oonex.com
|
|
6 |
|
* Webs
ite
: ht
tp://www.b
oonex.com
|
7 |
|
* This fil
e is part
of Orca -
Interactiv
e Forum Sc
ript
|
|
7 |
|
* This fil
e is part
of Orca -
Interactiv
e Forum Sc
ript
|
8 |
|
* GPL
|
|
8 |
|
* Creative
Commons A
ttribution
3.0 Licen
se
|
9 |
|
**/
|
|
9 |
|
**/
|
10 |
|
|
|
10 |
|
|
11 |
|
|
|
11 |
|
|
12 |
|
/**
|
|
12 |
|
/**
|
13 |
|
* load xm
l data obj
ect
|
|
13 |
|
* load xm
l data obj
ect
|
14 |
|
*/
|
|
14 |
|
*/
|
15 |
|
|
|
15 |
|
|
16 |
|
|
|
16 |
|
|
17 |
|
/**
|
|
17 |
|
/**
|
18 |
|
* constru
ctor
|
|
18 |
|
* constru
ctor
|
19 |
|
* ur
l - url wi
th xml dat
a to open
|
|
19 |
|
* ur
l - url wi
th xml dat
a to open
|
20 |
|
* h
- handle
r function
|
|
20 |
|
* h
- handle
r function
|
21 |
|
*/
|
|
21 |
|
*/
|
22 |
|
function B
xXmlReques
t(url, h,
async)
|
|
22 |
|
function B
xXmlReques
t(url, h,
async)
|
23 |
|
{
|
|
23 |
|
{
|
24 |
|
if (!u
rl.length)
return;
|
|
24 |
|
if (!u
rl.length)
return;
|
25 |
|
|
|
25 |
|
|
26 |
|
/**
|
|
26 |
|
/**
|
27 |
|
* loc
al handler
function
|
|
27 |
|
* loc
al handler
function
|
28 |
|
*/
|
|
28 |
|
*/
|
29 |
|
var f
= function
(r, url,
h)
|
|
29 |
|
var f
= function
(r, url,
h)
|
30 |
|
{
|
|
30 |
|
{
|
31 |
|
if
(r.readyS
tate == 4)
// only i
f req show
s "loaded"
|
|
31 |
|
if
(r.readyS
tate == 4)
// only i
f req show
s "loaded"
|
32 |
|
{
|
|
32 |
|
{
|
33 |
|
if (r.st
atus == 20
0 || r.sta
tus == 304
) // only
if "OK"
|
|
33 |
|
if (r.st
atus == 20
0 || r.sta
tus == 304
) // only
if "OK"
|
34 |
|
{
|
|
34 |
|
{
|
35 |
|
h (r
);
|
|
35 |
|
h (r
);
|
36 |
|
}
|
|
36 |
|
}
|
37 |
|
else
|
|
37 |
|
else
|
38 |
|
{
|
|
38 |
|
{
|
39 |
|
var
s = '';
|
|
39 |
|
var
s = '';
|
40 |
|
for
(var i in
r) s += i
+ " "
;
|
|
40 |
|
for
(var i in
r) s += i
+ " "
;
|
41 |
|
BxError("
XML
read
failed:
"
+
r.status,
"
There
was
a
problem
retrieving
the
XML
data:
\n"
+
url);
|
|
41 |
|
BxError("
[L[
XML
read
failed:
]]
"
+
r.status,
"
[L[
There
was
a
problem
retrieving
the
XML
data:
]]
\n"
+
url);
|
42 |
|
}
|
|
42 |
|
}
|
43 |
|
}
|
|
43 |
|
}
|
44 |
|
}
|
|
44 |
|
}
|
45 |
|
|
|
45 |
|
|
46 |
|
var r;
|
|
46 |
|
var r;
|
47 |
|
|
|
47 |
|
|
48 |
|
|
|
48 |
|
|
49 |
|
// IE
|
|
49 |
|
// IE
|
50 |
|
if(win
dow.Active
XObject)
|
|
50 |
|
if(win
dow.Active
XObject)
|
51 |
|
{
|
|
51 |
|
{
|
52 |
|
|
|
52 |
|
|
53 |
|
tr
y
|
|
53 |
|
tr
y
|
54 |
|
{
|
|
54 |
|
{
|
55 |
|
r = new
ActiveXObj
ect("Micro
soft.XMLHT
TP")
|
|
55 |
|
r = new
ActiveXObj
ect("Micro
soft.XMLHT
TP")
|
56 |
|
|
|
56 |
|
|
57 |
|
// regis
ter handle
r function
|
|
57 |
|
// regis
ter handle
r function
|
58 |
|
r.onread
ystatechan
ge = funct
ion( )
|
|
58 |
|
r.onread
ystatechan
ge = funct
ion( )
|
59 |
|
{
|
|
59 |
|
{
|
60 |
|
f (r
, url, h);
|
|
60 |
|
f (r
, url, h);
|
61 |
|
}
|
|
61 |
|
}
|
62 |
|
|
|
62 |
|
|
63 |
|
r.open("
GET", url,
async);
|
|
63 |
|
r.open("
GET", url,
async);
|
64 |
|
r.send()
;
|
|
64 |
|
r.send()
;
|
65 |
|
}
|
|
65 |
|
}
|
66 |
|
ca
tch(a)
|
|
66 |
|
ca
tch(a)
|
67 |
|
{
|
|
67 |
|
{
|
68 |
|
}
|
|
68 |
|
}
|
69 |
|
}
|
|
69 |
|
}
|
70 |
|
else
if (window
.XMLHttpRe
quest)
|
|
70 |
|
else
if (window
.XMLHttpRe
quest)
|
71 |
|
{
|
|
71 |
|
{
|
72 |
|
r
= new XMLH
ttpRequest
();
|
|
72 |
|
r
= new XMLH
ttpRequest
();
|
73 |
|
|
|
73 |
|
|
74 |
|
//
register
handler fu
nction
|
|
74 |
|
//
register
handler fu
nction
|
75 |
|
r.
onload = f
unction ()
|
|
75 |
|
r.
onload = f
unction ()
|
76 |
|
{
|
|
76 |
|
{
|
77 |
|
f (r, ur
l, h);
|
|
77 |
|
f (r, ur
l, h);
|
78 |
|
}
|
|
78 |
|
}
|
79 |
|
|
|
79 |
|
|
80 |
|
r.
open("GET"
, url, asy
nc);
|
|
80 |
|
r.
open("GET"
, url, asy
nc);
|
81 |
|
r.
send(null)
;
|
|
81 |
|
r.
send(null)
;
|
82 |
|
}
|
|
82 |
|
}
|
83 |
|
|
|
83 |
|
|
84 |
|
if (!r
)
|
|
84 |
|
if (!r
)
|
85 |
|
{
|
|
85 |
|
{
|
86 |
|
var
e
=
new
BxError("
httpxml
object
creation
failed
",
"
please
upgrade
your
browser
");
|
|
86 |
|
var
e
=
new
BxError("
[L[
httpxml
object
creation
failed
]]
",
"
[L[
please
upgrade
your
browser
]]
");
|
87 |
|
}
|
|
87 |
|
}
|
88 |
|
else
|
|
88 |
|
else
|
89 |
|
{
|
|
89 |
|
{
|
90 |
|
th
is.request
= r;
|
|
90 |
|
th
is.request
= r;
|
91 |
|
}
|
|
91 |
|
}
|
92 |
|
|
|
92 |
|
|
93 |
|
}
|
|
93 |
|
}
|
94 |
|
|
|
94 |
|
|
95 |
|
|
|
95 |
|
|
96 |
|
|
|
96 |
|
|
97 |
|
|
|
97 |
|
|
98 |
|
|
|
98 |
|
|
99 |
|
BxXmlReque
st.prototy
pe.getRetN
odeValue =
function
(r_xml, ta
gname)
|
|
99 |
|
BxXmlReque
st.prototy
pe.getRetN
odeValue =
function
(r_xml, ta
gname)
|
100 |
|
{
|
|
100 |
|
{
|
101 |
|
var re
t = '';
|
|
101 |
|
var re
t = '';
|
102 |
|
|
|
102 |
|
|
103 |
|
if (r_
xml.respon
seXML)
|
|
103 |
|
if (r_
xml.respon
seXML)
|
104 |
|
{
|
|
104 |
|
{
|
105 |
|
if (wi
ndow.Activ
eXObject)
|
|
105 |
|
if
(window.A
ctiveXObje
ct)
|
106 |
|
{
|
|
106 |
|
{
|
107 |
|
va
r e = r_xm
l.response
XML.getEle
mentsByTag
Name(tagna
me)[0];
|
|
107 |
|
var e =
r_xml.resp
onseXML.ge
tElementsB
yTagName(t
agname)[0]
;
|
108 |
|
if (e !=
undefined
&& e != n
ull && e.f
irstChild)
|
|
108 |
|
if (e !=
undefined
&& e != n
ull && e.f
irstChild)
|
109 |
|
ret = e.
firstChild
.nodeValue
;
|
|
109 |
|
ret
= e.firstC
hild.nodeV
alue;
|
110 |
|
}
|
|
110 |
|
}
|
111 |
|
else
|
|
111 |
|
el
se
|
112 |
|
{
|
|
112 |
|
{
|
113 |
|
va
r e = r_xm
l.response
XML.getEle
mentsByTag
Name(tagna
me)[0];
|
|
113 |
|
var e =
r_xml.resp
onseXML.ge
tElementsB
yTagName(t
agname)[0]
;
|
114 |
|
re
t = e.text
Content;
|
|
114 |
|
ret = e.
textConten
t;
|
115 |
|
}
|
|
115 |
|
}
|
116 |
|
}
|
|
116 |
|
}
|
117 |
|
|
|
117 |
|
|
118 |
|
if (re
t == null
|| ret ==
undefined
|| !ret.le
ngth)
|
|
118 |
|
if (re
t == null
|| ret ==
undefined
|| !ret.le
ngth)
|
119 |
|
{
|
|
119 |
|
{
|
120 |
|
va
r r = new
RegExp ('<
'+tagname+
'>([\\x00-
\\xff]*)<\
/'+tagname
+'>');
|
|
120 |
|
va
r r = new
RegExp ('<
'+tagname+
'>([\\x00-
\\xff]*)<\
/'+tagname
+'>');
|
121 |
|
va
r a = r_xm
l.response
Text.match
(r);
|
|
121 |
|
va
r a = r_xm
l.response
Text.match
(r);
|
122 |
|
if
(a && a.l
ength > 1)
|
|
122 |
|
if
(a && a.l
ength > 1)
|
123 |
|
ret = a[
1];
|
|
123 |
|
ret = a[
1];
|
124 |
|
}
|
|
124 |
|
}
|
125 |
|
|
|
125 |
|
|
126 |
|
return
ret;
|
|
126 |
|
return
ret;
|
127 |
|
}
|
|
127 |
|
}
|