01.
<?php
02.
$de_id
=
$_REQUEST
[
"de_id"
];
03.
04.
?>
05.
<?php
06.
mysql_connect(
'localhost'
,
'root'
,
'sapharat'
)
or
die
(mysql_error());
07.
mysql_select_db(
'saphaphathai'
)
or
die
(mysql_error());
08.
$sql
=mysql_query(
"select * from design_detail where de_id = '$de_id' "
);
09.
10.
11.
12.
$xml
=
"<?xml version='1.0' encoding='utf-8'?>\n"
;
13.
$xml
.=
"<rss version='2.0'>\n"
;
14.
while
(
$res
=mysql_fetch_array(
$sql
)){
15.
16.
17.
$xml
.=
"<design_detail>\n"
;
18.
$xml
.=
"\t<de_id>"
.
$res
[
'de_id'
].
"</de_id>\n"
;
19.
$xml
.=
"\t<m_id>"
.
$res
[
'm_id'
].
"</m_id>\n"
;
20.
$xml
.=
"\t<m_username>"
.
$res
[
'm_username'
].
"</m_username>\n"
;
21.
$xml
.=
"\t<name1>"
.
$res
[
'name1'
].
"</name1>\n"
;
22.
$xml
.=
"\t<address1>"
.
$res
[
'address1'
].
"</address1>\n"
;
23.
$xml
.=
"\t<m_zipcode>"
.
$res
[
'm_zipcode'
].
"</m_zipcode>\n"
;
24.
$xml
.=
"\t<tel>"
.
$res
[
'tel'
].
"</tel>\n"
;
25.
$xml
.=
"\t<email>"
.
$res
[
'email'
].
"</email>\n"
;
26.
$xml
.=
"\t<s>"
.
$res
[
's'
].
"</s>\n"
;
27.
$xml
.=
"\t<m>"
.
$res
[
'm'
].
"</m>\n"
;
28.
$xml
.=
"\t<l>"
.
$res
[
'l'
].
"</l>\n"
;
29.
$xml
.=
"\t<xl>"
.
$res
[
'xl'
].
"</xl>\n"
;
30.
$xml
.=
"\t<text1>"
.
$res
[
'text1'
].
"</text1>\n"
;
31.
$xml
.=
"\t<tx1>"
.
$res
[
'tx1'
].
"</tx1>\n"
;
32.
$xml
.=
"\t<ty1>"
.
$res
[
'ty1'
].
"</ty1>\n"
;
33.
$xml
.=
"\t<tw1>"
.
$res
[
'tw1'
].
"</tw1>\n"
;
34.
$xml
.=
"\t<th1>"
.
$res
[
'th1'
].
"</th1>\n"
;
35.
$xml
.=
"\t<ct1>"
.
$res
[
'ct1'
].
"</ct1>\n"
;
36.
$xml
.=
"\t<tf1>"
.
$res
[
'tf1'
].
"</tf1>\n"
;
37.
$xml
.=
"\t<text2>"
.
$res
[
'text2'
].
"</text2>\n"
;
38.
$xml
.=
"\t<tx2>"
.
$res
[
'tx2'
].
"</tx2>\n"
;
39.
$xml
.=
"\t<ty2>"
.
$res
[
'ty2'
].
"</ty2>\n"
;
40.
$xml
.=
"\t<tw2>"
.
$res
[
'tw2'
].
"</tw2>\n"
;
41.
$xml
.=
"\t<th2>"
.
$res
[
'th2'
].
"</th2>\n"
;
42.
$xml
.=
"\t<ct2>"
.
$res
[
'ct2'
].
"</ct2>\n"
;
43.
$xml
.=
"\t<tf2>"
.
$res
[
'tf2'
].
"</tf2>\n"
;
44.
$xml
.=
"\t<d_logo>"
.
$res
[
'd_logo'
].
"</d_logo>\n"
;
45.
$xml
.=
"\t<cx1>"
.
$res
[
'cx1'
].
"</cx1>\n"
;
46.
$xml
.=
"\t<cy1>"
.
$res
[
'cy1'
].
"</cy1>\n"
;
47.
$xml
.=
"\t<cw1>"
.
$res
[
'cw1'
].
"</cw1>\n"
;
48.
$xml
.=
"\t<ch1>"
.
$res
[
'ch1'
].
"</ch1>\n"
;
49.
$xml
.=
"\t<logoval>"
.
$res
[
'logoval'
].
"</logoval>\n"
;
50.
$xml
.=
"\t<val>"
.
$res
[
'val'
].
"</val>\n"
;
51.
$xml
.=
"</design_detail>\n"
;
52.
}
53.
$xml
.=
"</rss>"
;
54.
$f
=
fopen
(
'editdesign.xml'
,
'w'
);
55.
fputs
(
$f
,
$xml
);
56.
fclose(
$f
);
57.
58.
?>