No regular expressions were active.
1 |
|
<?php
|
|
1 |
|
<?php
|
2 |
|
|
|
2 |
|
|
3 |
|
/*********
**********
**********
**********
**********
**********
**********
******
|
|
3 |
|
/*********
**********
**********
**********
**********
**********
**********
******
|
4 |
|
*
Dolphin We
b Communit
y Software
|
|
4 |
|
*
Dolphin We
b Communit
y Software
|
5 |
|
*
--------
----------
-
|
|
5 |
|
*
--------
----------
-
|
6 |
|
* beg
in
:
Mon Mar 23
2006
|
|
6 |
|
* beg
in
:
Mon Mar 23
2006
|
7 |
|
* cop
yright
:
(C) 2006 B
oonEx Grou
p
|
|
7 |
|
* cop
yright
:
(C) 2006 B
oonEx Grou
p
|
8 |
|
* web
site
:
http://www
.boonex.co
m
|
|
8 |
|
* web
site
:
http://www
.boonex.co
m
|
9 |
|
*
|
|
9 |
|
*
|
10 |
|
*
|
|
10 |
|
*
|
11 |
|
*
|
|
11 |
|
*
|
12 |
|
*********
**********
**********
**********
**********
**********
**********
*******/
|
|
12 |
|
*********
**********
**********
**********
**********
**********
**********
*******/
|
13 |
|
|
|
13 |
|
|
14 |
|
/*********
**********
**********
**********
**********
**********
**********
******
|
|
14 |
|
/*********
**********
**********
**********
**********
**********
**********
******
|
15 |
|
*
|
|
15 |
|
*
|
16 |
|
* This
is a free
software;
you can mo
dify it un
der the te
rms of Boo
nEx
|
|
16 |
|
* This
is a free
software;
you can mo
dify it un
der the te
rms of Boo
nEx
|
17 |
|
* Produ
ct License
Agreement
published
on BoonEx
site at h
ttp://www.
boonex.com
/downloads
/license.p
df
|
|
17 |
|
* Produ
ct License
Agreement
published
on BoonEx
site at h
ttp://www.
boonex.com
/downloads
/license.p
df
|
18 |
|
* You m
ay not how
ever distr
ibute it f
or free or
/and a fee
.
|
|
18 |
|
* You m
ay not how
ever distr
ibute it f
or free or
/and a fee
.
|
19 |
|
* This
notice may
not be re
moved from
the sourc
e code. Yo
u may not
also remov
e any othe
r visible
|
|
19 |
|
* This
notice may
not be re
moved from
the sourc
e code. Yo
u may not
also remov
e any othe
r visible
|
20 |
|
* refer
ence and l
inks to Bo
onEx Group
as provid
ed in sour
ce code.
|
|
20 |
|
* refer
ence and l
inks to Bo
onEx Group
as provid
ed in sour
ce code.
|
21 |
|
*
|
|
21 |
|
*
|
22 |
|
*********
**********
**********
**********
**********
**********
**********
******/
|
|
22 |
|
*********
**********
**********
**********
**********
**********
**********
******/
|
23 |
|
|
|
23 |
|
|
24 |
|
require_on
ce( "../in
c/header.i
nc.php" );
|
|
24 |
|
require_on
ce( "../in
c/header.i
nc.php" );
|
25 |
|
require_on
ce(
"
{$dir['inc
']}
design.inc
.php"
);
|
|
25 |
|
require_on
ce(
BX_DIRECTO
RY_PATH_IN
C
.
"
design.inc
.php"
);
|
26 |
|
require_on
ce(
"
{$dir['inc
']}
db.inc.php
"
);
|
|
26 |
|
require_on
ce(
BX_DIRECTO
RY_PATH_IN
C
.
"
db.inc.php
"
);
|
27 |
|
require_on
ce(
"
{$dir['inc
']}
xml.inc.ph
p"
);
|
|
27 |
|
require_on
ce(
BX_DIRECTO
RY_PATH_IN
C
.
"
xml.inc.ph
p"
);
|
28 |
|
|
|
28 |
|
|
29 |
|
$query="";
|
|
29 |
|
$query="";
|
30 |
|
$AddItems=
array();
|
|
30 |
|
$AddItems=
array();
|
31 |
|
$dataType=
$_GET["dat
aType"];
|
|
31 |
|
$dataType=
$_GET["dat
aType"];
|
32 |
|
|
|
32 |
|
|
33 |
|
switch ($d
ataType) {
|
|
33 |
|
switch ($d
ataType) {
|
34 |
|
case "
ReloadClas
sifieds":
|
|
34 |
|
case "
ReloadClas
sifieds":
|
35 |
|
$i
IDClassifi
ed = proce
ss_db_inpu
t($_GET["I
DClassifie
d"]);
|
|
35 |
|
$i
IDClassifi
ed = proce
ss_db_inpu
t($_GET["I
DClassifie
d"]);
|
36 |
|
|
|
36 |
|
|
37 |
|
if
(!empty($
iIDClassif
ied)) {
|
|
37 |
|
if
(!empty($
iIDClassif
ied)) {
|
38 |
|
$query="
SELECT `ID
`, `NameSu
b` AS `Nam
e` FROM `C
lassifieds
Subs` WHER
E `IDClass
ified`='{$
iIDClassif
ied}'";
|
|
38 |
|
$query="
SELECT `ID
`, `NameSu
b` AS `Nam
e` FROM `C
lassifieds
Subs` WHER
E `IDClass
ified`='{$
iIDClassif
ied}'";
|
39 |
|
}
|
|
39 |
|
}
|
40 |
|
el
se {
|
|
40 |
|
el
se {
|
41 |
|
$AddItem
s["na"]="N
ot Applica
ble";
|
|
41 |
|
$AddItem
s["na"]="N
ot Applica
ble";
|
42 |
|
}
|
|
42 |
|
}
|
43 |
|
break;
|
|
43 |
|
break;
|
44 |
|
case "
ReloadSubT
ree":
|
|
44 |
|
case "
ReloadSubT
ree":
|
45 |
|
$i
IDClassifi
ed = proce
ss_db_inpu
t($_GET["I
DClassifie
d"]);
|
|
45 |
|
$i
IDClassifi
ed = proce
ss_db_inpu
t($_GET["I
DClassifie
d"]);
|
46 |
|
if
(!empty($
iIDClassif
ied)) {
|
|
46 |
|
if
(!empty($
iIDClassif
ied)) {
|
47 |
|
$query="
SELECT `Cl
assifiedsS
ubs`.`ID`,
`Classifi
edsSubs`.`
NameSub` A
S `Name`,
|
|
47 |
|
$query="
SELECT `Cl
assifiedsS
ubs`.`ID`,
`Classifi
edsSubs`.`
NameSub` A
S `Name`,
|
48 |
|
COUNT(`C
lassifieds
Advertisem
ents`.`ID`
) AS 'Coun
t'
|
|
48 |
|
COUNT(`C
lassifieds
Advertisem
ents`.`ID`
) AS 'Coun
t'
|
49 |
|
FROM `Cl
assifiedsS
ubs`
|
|
49 |
|
FROM `Cl
assifiedsS
ubs`
|
50 |
|
LEFT JOI
N `Classif
iedsAdvert
isements`
|
|
50 |
|
LEFT JOI
N `Classif
iedsAdvert
isements`
|
51 |
|
ON (`Cla
ssifiedsAd
vertisemen
ts`.`IDCla
ssifiedsSu
bs` = `Cla
ssifiedsSu
bs`.`ID`)
|
|
51 |
|
ON (`Cla
ssifiedsAd
vertisemen
ts`.`IDCla
ssifiedsSu
bs` = `Cla
ssifiedsSu
bs`.`ID`)
|
52 |
|
WHERE `C
lassifieds
Subs`.`IDC
lassified`
='{$iIDCla
ssified}'
|
|
52 |
|
WHERE `C
lassifieds
Subs`.`IDC
lassified`
='{$iIDCla
ssified}'
|
53 |
|
GROUP BY
`Name`";
|
|
53 |
|
GROUP BY
`Name`";
|
54 |
|
}
|
|
54 |
|
}
|
55 |
|
el
se {
|
|
55 |
|
el
se {
|
56 |
|
$AddItem
s["na"]="N
ot Applica
ble";
|
|
56 |
|
$AddItem
s["na"]="N
ot Applica
ble";
|
57 |
|
}
|
|
57 |
|
}
|
58 |
|
break;
|
|
58 |
|
break;
|
59 |
|
case "
ReloadClas
sifiedsAnd
CustomsFie
lds":
|
|
59 |
|
case "
ReloadClas
sifiedsAnd
CustomsFie
lds":
|
60 |
|
$i
IDClassifi
ed = proce
ss_db_inpu
t($_GET["I
DClassifie
d"]);
|
|
60 |
|
$i
IDClassifi
ed = proce
ss_db_inpu
t($_GET["I
DClassifie
d"]);
|
61 |
|
|
|
61 |
|
|
62 |
|
if
(!empty($
iIDClassif
ied)) {
|
|
62 |
|
if
(!empty($
iIDClassif
ied)) {
|
63 |
|
$query="
|
|
63 |
|
$query="
|
64 |
|
SELE
CT `Classi
fiedsSubs`
.`ID` , `C
lassifieds
Subs`.`Nam
eSub` AS `
Name`, `Cu
stomFieldN
ame1`, `Cu
stomFieldN
ame2`, `Cu
stomAction
1`, `Custo
mAction2`,
`Unit`
|
|
64 |
|
SELE
CT `Classi
fiedsSubs`
.`ID` , `C
lassifieds
Subs`.`Nam
eSub` AS `
Name`, `Cu
stomFieldN
ame1`, `Cu
stomFieldN
ame2`, `Cu
stomAction
1`, `Custo
mAction2`,
`Unit`
|
65 |
|
FROM
`Classifi
edsSubs`
|
|
65 |
|
FROM
`Classifi
edsSubs`
|
66 |
|
INNE
R JOIN `Cl
assifieds`
|
|
66 |
|
INNE
R JOIN `Cl
assifieds`
|
67 |
|
ON (
`Classifie
ds`.`ID`=`
Classified
sSubs`.`ID
Classified
`)
|
|
67 |
|
ON (
`Classifie
ds`.`ID`=`
Classified
sSubs`.`ID
Classified
`)
|
68 |
|
WHER
E `Classif
iedsSubs`.
`IDClassif
ied` = '{$
iIDClassif
ied}'
|
|
68 |
|
WHER
E `Classif
iedsSubs`.
`IDClassif
ied` = '{$
iIDClassif
ied}'
|
69 |
|
ORDE
R BY `Name
` ASC
|
|
69 |
|
ORDE
R BY `Name
` ASC
|
70 |
|
";
|
|
70 |
|
";
|
71 |
|
}
|
|
71 |
|
}
|
72 |
|
el
se {
|
|
72 |
|
el
se {
|
73 |
|
$AddItem
s["na"]="N
ot Applica
ble";
|
|
73 |
|
$AddItem
s["na"]="N
ot Applica
ble";
|
74 |
|
}
|
|
74 |
|
}
|
75 |
|
break;
|
|
75 |
|
break;
|
76 |
|
case "
ReloadOnly
CustomsFie
lds":
|
|
76 |
|
case "
ReloadOnly
CustomsFie
lds":
|
77 |
|
$i
IDClassifi
ed = proce
ss_db_inpu
t($_GET["I
DClassifie
d"]);
|
|
77 |
|
$i
IDClassifi
ed = proce
ss_db_inpu
t($_GET["I
DClassifie
d"]);
|
78 |
|
|
|
78 |
|
|
79 |
|
if
(!empty($
iIDClassif
ied)) {
|
|
79 |
|
if
(!empty($
iIDClassif
ied)) {
|
80 |
|
$query="
|
|
80 |
|
$query="
|
81 |
|
SELE
CT `Custom
FieldName1
` , `Custo
mFieldName
2`, `Custo
mAction1`,
`CustomAc
tion2`, `U
nit`
|
|
81 |
|
SELE
CT `Custom
FieldName1
` , `Custo
mFieldName
2`, `Custo
mAction1`,
`CustomAc
tion2`, `U
nit`
|
82 |
|
FROM
`Classifi
eds`
|
|
82 |
|
FROM
`Classifi
eds`
|
83 |
|
WHER
E `ID` ='{
$iIDClassi
fied}'
|
|
83 |
|
WHER
E `ID` ='{
$iIDClassi
fied}'
|
84 |
|
";
|
|
84 |
|
";
|
85 |
|
}
|
|
85 |
|
}
|
86 |
|
el
se {
|
|
86 |
|
el
se {
|
87 |
|
$AddItem
s["na"]="N
ot Applica
ble";
|
|
87 |
|
$AddItem
s["na"]="N
ot Applica
ble";
|
88 |
|
}
|
|
88 |
|
}
|
89 |
|
break;
|
|
89 |
|
break;
|
90 |
|
case "
ApplyChang
es":
|
|
90 |
|
case "
ApplyChang
es":
|
91 |
|
$i
Numb = pro
cess_db_in
put($_GET[
"iNumb"]);
|
|
91 |
|
$i
Numb = pro
cess_db_in
put($_GET[
"iNumb"]);
|
92 |
|
$s
Action = p
rocess_db_
input($_GE
T["sAction
"]);
|
|
92 |
|
$s
Action = p
rocess_db_
input($_GE
T["sAction
"]);
|
93 |
|
$s
Name = pro
cess_db_in
put($_GET[
"sName"]);
|
|
93 |
|
$s
Name = pro
cess_db_in
put($_GET[
"sName"]);
|
94 |
|
$i
IDcat = pr
ocess_db_i
nput($_GET
["iIDcat"]
);
|
|
94 |
|
$i
IDcat = pr
ocess_db_i
nput($_GET
["iIDcat"]
);
|
95 |
|
|
|
95 |
|
|
96 |
|
if
(!empty($
iIDcat)) {
|
|
96 |
|
if
(!empty($
iIDcat)) {
|
97 |
|
$query="
|
|
97 |
|
$query="
|
98 |
|
UPDA
TE `Classi
fieds` SET
`CustomFi
eldName{$i
Numb}` = '
{$sName}',
`CustomAc
tion{$iNum
b}` = '{$s
Action}' W
HERE `Clas
sifieds`.`
ID` = {$iI
Dcat} LIMI
T 1 ;
|
|
98 |
|
UPDA
TE `Classi
fieds` SET
`CustomFi
eldName{$i
Numb}` = '
{$sName}',
`CustomAc
tion{$iNum
b}` = '{$s
Action}' W
HERE `Clas
sifieds`.`
ID` = {$iI
Dcat} LIMI
T 1 ;
|
99 |
|
";
|
|
99 |
|
";
|
100 |
|
|
|
100 |
|
|
101 |
|
// globa
l $dir;
|
|
101 |
|
//
$filename
=
BX_DIRECTO
RY_PATH_RO
OT
.
'temp/test
.txt';
|
102 |
|
//
$filename
=
$dir['root
']
.
'temp/test
.txt';
|
|
|
103 |
|
// if ($
handle = f
open($file
name, 'w')
) {
|
|
102 |
|
// if ($
handle = f
open($file
name, 'w')
) {
|
104 |
|
// f
write($han
dle, $quer
y);
|
|
103 |
|
// f
write($han
dle, $quer
y);
|
105 |
|
// f
close($han
dle);
|
|
104 |
|
// f
close($han
dle);
|
106 |
|
// }
|
|
105 |
|
// }
|
107 |
|
|
|
106 |
|
|
108 |
|
if (!emp
ty($query)
) {
|
|
107 |
|
if (!emp
ty($query)
) {
|
109 |
|
$res
Data=db_re
s($query);
|
|
108 |
|
$res
Data=db_re
s($query);
|
110 |
|
}
|
|
109 |
|
}
|
111 |
|
exit;
|
|
110 |
|
exit;
|
112 |
|
}
|
|
111 |
|
}
|
113 |
|
break;
|
|
112 |
|
break;
|
114 |
|
case "
DeleteCust
om":
|
|
113 |
|
case "
DeleteCust
om":
|
115 |
|
$i
Numb = pro
cess_db_in
put($_GET[
"iNumb"]);
|
|
114 |
|
$i
Numb = pro
cess_db_in
put($_GET[
"iNumb"]);
|
116 |
|
$i
IDcat = pr
ocess_db_i
nput($_GET
["iIDcat"]
);
|
|
115 |
|
$i
IDcat = pr
ocess_db_i
nput($_GET
["iIDcat"]
);
|
117 |
|
|
|
116 |
|
|
118 |
|
if
(!empty($
iIDcat)) {
|
|
117 |
|
if
(!empty($
iIDcat)) {
|
119 |
|
$query="
|
|
118 |
|
$query="
|
120 |
|
UPDA
TE `Classi
fieds` SET
`CustomFi
eldName{$i
Numb}` = N
ULL, `Cust
omAction{$
iNumb}` =
NULL WHERE
`Classifi
eds`.`ID`
= {$iIDcat
} LIMIT 1
;
|
|
119 |
|
UPDA
TE `Classi
fieds` SET
`CustomFi
eldName{$i
Numb}` = N
ULL, `Cust
omAction{$
iNumb}` =
NULL WHERE
`Classifi
eds`.`ID`
= {$iIDcat
} LIMIT 1
;
|
121 |
|
";
|
|
120 |
|
";
|
122 |
|
if (!emp
ty($query)
) {
|
|
121 |
|
if (!emp
ty($query)
) {
|
123 |
|
$res
Data=db_re
s($query);
|
|
122 |
|
$res
Data=db_re
s($query);
|
124 |
|
}
|
|
123 |
|
}
|
125 |
|
exit;
|
|
124 |
|
exit;
|
126 |
|
}
|
|
125 |
|
}
|
127 |
|
break;
|
|
126 |
|
break;
|
128 |
|
case "Appl
yUnitChang
es":
|
|
127 |
|
case "Appl
yUnitChang
es":
|
129 |
|
$s
Unit = pro
cess_db_in
put($_GET[
"sUnit"]);
|
|
128 |
|
$s
Unit = pro
cess_db_in
put($_GET[
"sUnit"]);
|
130 |
|
$i
IDcat = pr
ocess_db_i
nput($_GET
["iIDcat"]
);
|
|
129 |
|
$i
IDcat = pr
ocess_db_i
nput($_GET
["iIDcat"]
);
|
131 |
|
|
|
130 |
|
|
132 |
|
if
(!empty($
iIDcat)) {
|
|
131 |
|
if
(!empty($
iIDcat)) {
|
133 |
|
$query="
|
|
132 |
|
$query="
|
134 |
|
UPDA
TE `Classi
fieds` SET
`Unit` =
'{$sUnit}'
WHERE `Cl
assifieds`
.`ID` = {$
iIDcat} LI
MIT 1 ;
|
|
133 |
|
UPDA
TE `Classi
fieds` SET
`Unit` =
'{$sUnit}'
WHERE `Cl
assifieds`
.`ID` = {$
iIDcat} LI
MIT 1 ;
|
135 |
|
";
|
|
134 |
|
";
|
136 |
|
|
|
135 |
|
|
137 |
|
if (!emp
ty($query)
) {
|
|
136 |
|
if (!emp
ty($query)
) {
|
138 |
|
$res
Data=db_re
s($query);
|
|
137 |
|
$res
Data=db_re
s($query);
|
139 |
|
}
|
|
138 |
|
}
|
140 |
|
exit;
|
|
139 |
|
exit;
|
141 |
|
}
|
|
140 |
|
}
|
142 |
|
break;
|
|
141 |
|
break;
|
143 |
|
case "
DeleteUnit
":
|
|
142 |
|
case "
DeleteUnit
":
|
144 |
|
$s
Unit = pro
cess_db_in
put($_GET[
"sUnit"]);
|
|
143 |
|
$s
Unit = pro
cess_db_in
put($_GET[
"sUnit"]);
|
145 |
|
$i
IDcat = pr
ocess_db_i
nput($_GET
["iIDcat"]
);
|
|
144 |
|
$i
IDcat = pr
ocess_db_i
nput($_GET
["iIDcat"]
);
|
146 |
|
|
|
145 |
|
|
147 |
|
if
(!empty($
iIDcat)) {
|
|
146 |
|
if
(!empty($
iIDcat)) {
|
148 |
|
$query="
|
|
147 |
|
$query="
|
149 |
|
UPDA
TE `Classi
fieds` SET
`Unit` =
'$' WHERE
`Classifie
ds`.`ID` =
{$iIDcat}
LIMIT 1 ;
|
|
148 |
|
UPDA
TE `Classi
fieds` SET
`Unit` =
'$' WHERE
`Classifie
ds`.`ID` =
{$iIDcat}
LIMIT 1 ;
|
150 |
|
";
|
|
149 |
|
";
|
151 |
|
if (!emp
ty($query)
) {
|
|
150 |
|
if (!emp
ty($query)
) {
|
152 |
|
$res
Data=db_re
s($query);
|
|
151 |
|
$res
Data=db_re
s($query);
|
153 |
|
}
|
|
152 |
|
}
|
154 |
|
exit;
|
|
153 |
|
exit;
|
155 |
|
}
|
|
154 |
|
}
|
156 |
|
break;
|
|
155 |
|
break;
|
157 |
|
case "
login":
|
|
156 |
|
case "
login":
|
158 |
|
$s
Username =
process_d
b_input($_
GET["u"]);
|
|
157 |
|
$s
Username =
process_d
b_input($_
GET["u"]);
|
159 |
|
$s
Pass = pro
cess_db_in
put($_GET[
"p"]);
|
|
158 |
|
$s
Pass = pro
cess_db_in
put($_GET[
"p"]);
|
160 |
|
|
|
159 |
|
|
161 |
|
if
(!empty($
sUsername)
) {
|
|
160 |
|
if
(!empty($
sUsername)
) {
|
162 |
|
$query="
|
|
161 |
|
$query="
|
163 |
|
SELE
CT `ID` FR
OM `Profil
es` WHERE
`NickName`
='{$sUsern
ame}' AND
`Password`
=MD5('{$sP
ass}') LIM
IT 1 ;
|
|
162 |
|
SELE
CT `ID` FR
OM `Profil
es` WHERE
`NickName`
='{$sUsern
ame}' AND
`Password`
=MD5('{$sP
ass}') LIM
IT 1 ;
|
164 |
|
";
|
|
163 |
|
";
|
165 |
|
db_value
($query);
|
|
164 |
|
db_value
($query);
|
166 |
|
if (mysq
l_affected
_rows()==0
) {
|
|
165 |
|
if (mysq
l_affected
_rows()==0
) {
|
167 |
|
prin
t 'failed'
;
|
|
166 |
|
prin
t 'failed'
;
|
168 |
|
} else {
|
|
167 |
|
} else {
|
169 |
|
prin
t 'success
';
|
|
168 |
|
prin
t 'success
';
|
170 |
|
}
|
|
169 |
|
}
|
171 |
|
exit;
|
|
170 |
|
exit;
|
172 |
|
}
|
|
171 |
|
}
|
173 |
|
break;
|
|
172 |
|
break;
|
174 |
|
}
|
|
173 |
|
}
|
175 |
|
|
|
174 |
|
|
176 |
|
$resultNod
e = new Xm
lNode();
|
|
175 |
|
$resultNod
e = new Xm
lNode();
|
177 |
|
$resultNod
e->name =
'data';
|
|
176 |
|
$resultNod
e->name =
'data';
|
178 |
|
|
|
177 |
|
|
179 |
|
if ( !empt
y($AddItem
s) and $_G
ET["noadd"
] != 1 )
|
|
178 |
|
if ( !empt
y($AddItem
s) and $_G
ET["noadd"
] != 1 )
|
180 |
|
foreac
h ($AddIte
ms as $key
=> $val)
{
|
|
179 |
|
foreac
h ($AddIte
ms as $key
=> $val)
{
|
181 |
|
$A
ddNode = n
ew XmlNode
();
|
|
180 |
|
$A
ddNode = n
ew XmlNode
();
|
182 |
|
$A
ddNode->na
me = $data
Type;
|
|
181 |
|
$A
ddNode->na
me = $data
Type;
|
183 |
|
|
|
182 |
|
|
184 |
|
$A
ddNodeID =
new XmlNo
de();
|
|
183 |
|
$A
ddNodeID =
new XmlNo
de();
|
185 |
|
$A
ddNodeID->
name = "ID
";
|
|
184 |
|
$A
ddNodeID->
name = "ID
";
|
186 |
|
$A
ddNodeID->
value = $k
ey;
|
|
185 |
|
$A
ddNodeID->
value = $k
ey;
|
187 |
|
$A
ddNode->ad
dChild($Ad
dNodeID);
|
|
186 |
|
$A
ddNode->ad
dChild($Ad
dNodeID);
|
188 |
|
|
|
187 |
|
|
189 |
|
$A
ddNodeName
= new Xml
Node();
|
|
188 |
|
$A
ddNodeName
= new Xml
Node();
|
190 |
|
$A
ddNodeName
->name = "
Name";
|
|
189 |
|
$A
ddNodeName
->name = "
Name";
|
191 |
|
$A
ddNodeName
->value =
$val;
|
|
190 |
|
$A
ddNodeName
->value =
$val;
|
192 |
|
|
|
191 |
|
|
193 |
|
$A
ddNode->ad
dChild($Ad
dNodeName)
;
|
|
192 |
|
$A
ddNode->ad
dChild($Ad
dNodeName)
;
|
194 |
|
|
|
193 |
|
|
195 |
|
$r
esultNode-
>addChild(
$AddNode);
|
|
194 |
|
$r
esultNode-
>addChild(
$AddNode);
|
196 |
|
}
|
|
195 |
|
}
|
197 |
|
|
|
196 |
|
|
198 |
|
if (!empty
($query))
{
|
|
197 |
|
if (!empty
($query))
{
|
199 |
|
$resDa
ta=db_res(
$query);
|
|
198 |
|
$resDa
ta=db_res(
$query);
|
200 |
|
if (my
sql_affect
ed_rows()=
=0 AND $da
taType=="R
eloadClass
ifiedsAndC
ustomsFiel
ds") {
|
|
199 |
|
if (my
sql_affect
ed_rows()=
=0 AND $da
taType=="R
eloadClass
ifiedsAndC
ustomsFiel
ds") {
|
201 |
|
$i
IDClassifi
ed = proce
ss_db_inpu
t($_GET["I
DClassifie
d"]);
|
|
200 |
|
$i
IDClassifi
ed = proce
ss_db_inpu
t($_GET["I
DClassifie
d"]);
|
202 |
|
$q
uery="
|
|
201 |
|
$q
uery="
|
203 |
|
SELECT `Cu
stomFieldN
ame1` , `C
ustomField
Name2` , `
CustomActi
on1` , `Cu
stomAction
2`, `Unit`
|
|
202 |
|
SELECT `Cu
stomFieldN
ame1` , `C
ustomField
Name2` , `
CustomActi
on1` , `Cu
stomAction
2`, `Unit`
|
204 |
|
FROM `Clas
sifieds`
|
|
203 |
|
FROM `Clas
sifieds`
|
205 |
|
WHERE `ID`
= '{$iIDC
lassified}
'
|
|
204 |
|
WHERE `ID`
= '{$iIDC
lassified}
'
|
206 |
|
";
|
|
205 |
|
";
|
207 |
|
$r
esData=db_
res($query
);
|
|
206 |
|
$r
esData=db_
res($query
);
|
208 |
|
}
|
|
207 |
|
}
|
209 |
|
fillXm
lNodeWithD
BData($res
ultNode, $
resData, $
dataType);
|
|
208 |
|
fillXm
lNodeWithD
BData($res
ultNode, $
resData, $
dataType);
|
210 |
|
}
|
|
209 |
|
}
|
211 |
|
sendData($
resultNode
);
|
|
210 |
|
sendData($
resultNode
);
|
212 |
|
|
|
211 |
|
|
213 |
|
/**
|
|
212 |
|
/**
|
214 |
|
* Output
XML data
|
|
213 |
|
* Output
XML data
|
215 |
|
*
|
|
214 |
|
*
|
216 |
|
* @param
XmlNode $x
mlNode
|
|
215 |
|
* @param
XmlNode $x
mlNode
|
217 |
|
*/
|
|
216 |
|
*/
|
218 |
|
function s
endData($x
mlNode) {
|
|
217 |
|
function s
endData($x
mlNode) {
|
219 |
|
header
("Content-
type: appl
ication/xm
l");
|
|
218 |
|
header
("Content-
type: appl
ication/xm
l");
|
220 |
|
send_h
eaders_pag
e_changed(
);
|
|
219 |
|
send_h
eaders_pag
e_changed(
);
|
221 |
|
echo '
<?xml vers
ion="1.0"
encoding="
UTF-8"?>'.
"\r\n";
|
|
220 |
|
echo '
<?xml vers
ion="1.0"
encoding="
UTF-8"?>'.
"\r\n";
|
222 |
|
echo $
xmlNode->g
etXMLText(
);
|
|
221 |
|
echo $
xmlNode->g
etXMLText(
);
|
223 |
|
}
|
|
222 |
|
}
|
224 |
|
|
|
223 |
|
|
225 |
|
function f
illXmlNode
WithDBData
(&$xmlNode
, $dbResou
rce, $obje
ctName) {
|
|
224 |
|
function f
illXmlNode
WithDBData
(&$xmlNode
, $dbResou
rce, $obje
ctName) {
|
226 |
|
if (!
$dbResourc
e) {
|
|
225 |
|
if (!
$dbResourc
e) {
|
227 |
|
re
turn;
|
|
226 |
|
re
turn;
|
228 |
|
}
|
|
227 |
|
}
|
229 |
|
|
|
228 |
|
|
230 |
|
while
($arrObjec
t = mysql_
fetch_asso
c($dbResou
rce)) {
|
|
229 |
|
while
($arrObjec
t = mysql_
fetch_asso
c($dbResou
rce)) {
|
231 |
|
$o
bjectNode
= new XmlN
ode();
|
|
230 |
|
$o
bjectNode
= new XmlN
ode();
|
232 |
|
|
|
231 |
|
|
233 |
|
$o
bjectNode-
>name = $o
bjectName;
|
|
232 |
|
$o
bjectNode-
>name = $o
bjectName;
|
234 |
|
fo
reach ($ar
rObject as
$dataName
=> $dataV
alue) {
|
|
233 |
|
fo
reach ($ar
rObject as
$dataName
=> $dataV
alue) {
|
235 |
|
if ( $_G
ET['applyl
ang'] and
$dataName
== 'Name'
)
|
|
234 |
|
if ( $_G
ET['applyl
ang'] and
$dataName
== 'Name'
)
|
236 |
|
$dat
aValue = _
t( $_GET['
applylang'
] . $dataV
alue );
|
|
235 |
|
$dat
aValue = _
t( $_GET['
applylang'
] . $dataV
alue );
|
237 |
|
|
|
236 |
|
|
238 |
|
$dataNam
e = htmlsp
ecialchars
_adv($data
Name);
|
|
237 |
|
$dataNam
e = htmlsp
ecialchars
_adv($data
Name);
|
239 |
|
$dataVal
ue = htmls
pecialchar
s(htmlspec
ialchars($
dataValue)
);
|
|
238 |
|
$dataVal
ue = htmls
pecialchar
s(htmlspec
ialchars($
dataValue)
);
|
240 |
|
|
|
239 |
|
|
241 |
|
$objectD
ataNode =
new XmlNod
e();
|
|
240 |
|
$objectD
ataNode =
new XmlNod
e();
|
242 |
|
$objectD
ataNode->n
ame = $dat
aName;
|
|
241 |
|
$objectD
ataNode->n
ame = $dat
aName;
|
243 |
|
$objectD
ataNode->v
alue = $da
taValue;
|
|
242 |
|
$objectD
ataNode->v
alue = $da
taValue;
|
244 |
|
|
|
243 |
|
|
245 |
|
$objectN
ode->addCh
ild($objec
tDataNode)
;
|
|
244 |
|
$objectN
ode->addCh
ild($objec
tDataNode)
;
|
246 |
|
}
|
|
245 |
|
}
|
247 |
|
$x
mlNode->ad
dChild($ob
jectNode);
|
|
246 |
|
$x
mlNode->ad
dChild($ob
jectNode);
|
248 |
|
}
|
|
247 |
|
}
|
249 |
|
}
|
|
248 |
|
}
|
250 |
|
|
|
249 |
|
|
251 |
|
?>
|
|
250 |
|
?>
|