No regular expressions were active.
1 |
|
function
EcecuteAj
a
x(sAct
i
o
n
,
sC
o
m
m
and
s
,
sErrorStri
ng)
{
|
|
1 |
|
function
v
a
l
i
dateL
o
gi
n
F
o
r
m
(
eFor
m
,
s
SiteUrl
,
sErrorStri
ng
)
{
|
2 |
|
if (sA
ction == '
check_logi
n') {
|
|
2 |
|
if( !e
Form )
|
3 |
|
sUsername
=
docume
n
t
.getEle
me
ntById('
ID
'
).val
ue
;
|
|
3 |
|
re
turn false
;
|
4 |
|
sPass
=
docume
n
t
.getEle
me
ntById('
Password
'
).val
ue
;
|
|
4 |
|
|
5 |
|
$.po
s
t
("
xml/get_li
st.php?dat
aType=logi
n&u=
"
+
sUsername
+
"
&p=
"
+
sPass
,
|
|
5 |
|
var
sUsername
=
$('i
n
pu
t
[na
me
=
ID
]
'
,
eForm
).val
()
;
|
|
|
6 |
|
var
sPass
=
$('i
n
pu
t
[na
me
=
Password
]
'
,
eForm
).val
()
;
|
|
|
7 |
|
|
|
|
8 |
|
var
sUrl
=
s
Si
t
eUrl
+
'
xml/get_li
st.php?dat
aType=logi
n&u=
'
+
encodeURIC
omponent(
sUsername
)
+
'
&p=
'
+
encodeURIC
omponent(
sPass
);
|
|
|
9 |
|
|
|
|
10 |
|
$.post
( sUrl,
|
6 |
|
function(s
Response)
{
|
|
11 |
|
fu
nction(sRe
sponse) {
|
7 |
|
if
(sResponse
=='success
')
{
|
|
12 |
|
if
(sResponse
==
'success')
|
8 |
|
docum
e
nt.f
orm
s.ajax_log
in
.submit();
|
|
13 |
|
e
F
orm
.submit();
|
9 |
|
}
else
{
|
|
14 |
|
else
|
10 |
|
aler
t(sErrorSt
ring);
|
|
15 |
|
aler
t(sErrorSt
ring);
|
11 |
|
}
|
|
16 |
|
}
|
12 |
|
}
|
|
|
13 |
|
);
|
|
17 |
|
);
|
14 |
|
|
|
|
15 |
|
}
|
|
|
16 |
|
}
|
|
18 |
|
}
|