001.
<? session_start(); ?>
002.
<?php
003.
$id_post
=
$_SESSION
[
'id'
];
004.
$name_post
=
$_SESSION
[
'nickname'
];
005.
if
(!isset (
$_SESSION
[
'user'
])) {
006.
echo
"<meta http-equiv='refresh' content='1 ; url=main.html' />"
;
007.
exit
() ;
008.
}
009.
?>
012.
<head>
013.
<meta http-equiv=
"Content-Type"
content=
"text/html; charset=utf-8"
/>
014.
<title>KP Photo</title>
015.
<meta name=
"Keywords"
content=
"Christmas Night, free css, templates, flash slider, HTML"
/>
016.
<meta name=
"Description"
content=
"Christmas Night - free CSS template provided by templatemo.com"
/>
017.
<link href=
"templatemo_style.css"
rel=
"stylesheet"
type=
"text/css"
/>
018.
019.
<link rel=
"stylesheet"
type=
"text/css"
href=
"ddsmoothmenu.css"
/>
020.
021.
<script type=
"text/javascript"
src=
"js/jquery.min.js"
></script>
022.
<script type=
"text/javascript"
src=
"ddsmoothmenu.js"
>
023.
024.
025.
026.
027.
028.
029.
030.
</script>
031.
032.
<script type=
"text/javascript"
>
033.
034.
ddsmoothmenu.init({
035.
mainmenuid:
"templatemo_menu"
,
036.
orientation:
'h'
,
037.
classname:
'ddsmoothmenu'
,
038.
039.
contentsource:
"markup"
040.
})
041.
042.
</script>
043.
044.
<script type=
"text/javascript"
src=
"js/swfobject.js"
></script>
045.
<script type=
"text/javascript"
>
046.
var
flashvars = {};
047.
flashvars.xml_file =
"photo_list.xml"
;
048.
var
params = {};
049.
params.wmode =
"transparent"
;
050.
var
attributes = {};
051.
attributes.id =
"slider"
;
052.
swfobject.embedSWF(
"flash_slider.swf"
,
"flash_grid_slider"
,
"900"
,
"290"
,
"9.0.0"
, false, flashvars, params, attributes);
053.
</script>
054.
055.
<style type=
"text/css"
>
056.
a:link {
057.
color: #00F;
058.
}
059.
a:visited {
060.
color: #F00;
061.
}
062.
body,td,th {
063.
color: #FFF;
064.
}
065.
</style>
066.
</head>
067.
<body>
068.
<div id=
"templatemo_wrapper_outter"
>
069.
<div id=
"templatemo_wrapper_inner"
>
070.
<div id=
"templatemo_wrapper"
>
071.
072.
<div id=
"templatemo_menu"
class
=
"ddsmoothmenu"
>
073.
<ul>
074.
<li><a href=
"main.html"
class
=
"selected"
>หน้าหลัก</a></li>
075.
<li><a href=
"head.html"
target=
"topFrame"
>สมาชิก</a>
076.
<ul>
077.
<li><a href=
"member_upload.php"
>Upload Image</a></li>
078.
<li><a href=
"member_showimage.php"
>Image All</a></li>
079.
<li><a href=
"member_update.php"
>Edit Proflies</a></li>
080.
<li><a href=
"logout.php"
>Logout</a></li>
081.
</ul>
082.
</li>
083.
<li><a href=
"head2.html"
target=
"topFrame"
>ผู้ดูแลระบบ</a>
084.
<ul>
085.
<li><a href=
"subpage.html"
>Show Image</a></li>
086.
<li><a href=
"subpage.html"
>Show members</a></li>
087.
<li><a href=
"subpage.html"
>Page Three</a></li>
088.
<li><a href=
"subpage.html"
>Page Four</a></li>
089.
<li><a href=
"subpage.html"
>Page Five</a></li>
090.
</ul>
091.
</li>
092.
<li><a href=
"formregister.php"
>ลงทะเบียน</a></li>
093.
<li><a href=
"about.html"
>เกี่ยวกับ</a></li>
094.
<li><a href=
"contact.php"
>เว็บบอร์ด</a></li>
095.
</ul>
096.
<br style=
"clear: left"
/>
097.
</div><!--
end
of templatemo_menu -->
098.
099.
<div id=
"templatemo_header"
>
100.
<div id=
"site_title"
><h1><a href=
"main.html"
>Free CSS Templates</a></h1></div>
101.
</div> <!--
end
of header -->
102.
103.
<div id=
"templatemo_main_top"
>
104.
105.
<div id=
"templatemo_bottom"
>
106.
<?
107.
include
(
'config.inc.php'
);
108.
mysql_query(
"SET NAMES UTF8"
);
109.
$sql
=
"select * from quiz where id_quiz=$id_quiz"
;
110.
$dbquery
= mysql_db_query(
$dbname
,
$sql
);
111.
$result
= mysql_fetch_array(
$dbquery
);
112.
$id_quiz
=
$result
[id_quiz];
113.
$title
=
$result
[title];
114.
$name
=
$result
[name];
115.
$message
=
$result
[message];
116.
$email
=
$result
[email];
117.
$date_q
=
$result
[date_q];
118.
print
"<table width=532 border=1 align=center cellpadding=1 cell spacing=1>"
;
119.
print
"<tr>"
;
120.
print
" <td witdh=703>"
;
121.
print
"<table witdth=532 align=center>"
;
122.
print
"<tr>"
;
123.
print
"<td width=97><font color=ff6600><b>หัวข้อกระทู้</b></font></td>"
;
124.
print
"<td width=417><font color=ff6600><b>"
.
$title
.
"</b></font></td>"
;
125.
print
"</tr>"
;
126.
print
"<tr>"
;
127.
print
"<td width=97><b>รายละเอียด</b></td>"
;
128.
print
"<td width=417>"
.
$message
.
"</b></td>"
;
129.
print
"</tr>"
;
130.
print
"<tr>"
;
131.
print
"<td width=97><b>ผู้ตั้งกระทู้</b></td>"
;
132.
print
"<td width=417>"
.
$name
.
"</b></td>"
;
133.
print
"</tr>"
;
134.
print
"</table>"
;
135.
print
"</td>"
;
136.
print
"</tr>"
;
137.
print
"</table>"
;
138.
139.
140.
$sql
=
"select * from ans where id_quiz=$id_quiz order by id_ans"
;
141.
$dbquery
= mysql_db_query(
$dbname
,
$sql
);
142.
143.
144.
$num_rows
= mysql_num_rows(
$dbquery
);
145.
if
(
$num_rows
==
''
){
146.
echo
"<center>ยังไม่มีคนแสดงความคิดเห็น</center>"
;
147.
}
148.
$i
=0;
149.
while
(
$i
<
$num_rows
)
150.
{
151.
$result
= mysql_fetch_array(
$dbquery
);
152.
$id_ans
=
$result
[id_ans];
153.
$id_quiz
=
$result
[id_quiz];
154.
$name
=
$result
[name];
155.
$message
=
$result
[message];
156.
$email
=
$result
[email];
157.
$date_a
=
$result
[date_a];
158.
$n
++;
159.
print
"<br>"
;
160.
print
"<table width=532 border=1 align=center cellpadding=1 cellspacing=1>"
;
161.
print
"<tr"
;
162.
print
"<tr>"
;
163.
print
"<td width=703>"
;
164.
print
"<table width=532 align=center>"
;
165.
print
"<tr><div align=center><b>ความคิดเห็นที่$n</b></div></tr>"
;
166.
print
"<tr>"
;
167.
print
"<td width=97><b>รายละเอียด</b></td>"
;
168.
print
"<td width=417>"
.
$message
.
"</td>"
;
169.
print
"</tr>"
;
170.
print
"<tr >"
;
171.
print
"<td width=97><b>จากคุณ</b></td>"
;
172.
print
"<td width=417>"
.
$name
.
"</td>"
;
173.
print
"</tr>"
;
174.
print
"</table>"
;
175.
print
"</td>"
;
176.
print
"</tr>"
;
177.
print
"</table>"
;
178.
$i
++;
179.
}
180.
181.
mysql_close();
182.
?>
183.
<form action=
"reply.php"
method=
"post"
name=
"form1"
id=
"form1"
>
184.
<table width=
"532"
border=
"1"
align=
"center"
cellpadding=
"1"
cellspacing=
"1"
>
185.
<tr>
186.
<td width=
"703"
><table width=
"524"
border=
"0"
align=
"center"
cellspacing=
"1"
></td>
187.
</tr>
188.
<tr>
189.
<td colspan=
"2"
><div align=
"center"
><u>แสดงความคิดเห็น</u></div></td>
190.
</tr>
191.
<tr>
192.
<td width=
"97"
>ชื่อผู้ตอบ :</td>
193.
<td width=
"417"
><p><?
echo
$name_post
?></p></td>
194.
</tr>
195.
<tr>
196.
<td >รายละเอียด :</td>
197.
<td ><textarea name=
"message"
col=
"65"
rows=
"7"
wrap=
"virtual"
id=
"message"
></textarea></td>
198.
</tr>
199.
<tr>
200.
<td>รหัสสมาชิก : <?
echo
$id_post
?></td>
201.
<td > </td>
202.
</tr>
203.
<tr>
204.
<td></td>
205.
<td ><input type=
"submit"
name=
"submit"
value=
"แสดงความคิดเห็น"
/>
206.
<input type=
"reset"
name=
"submit2"
value=
"ยกเลิก"
/></td>
207.
<input type=
"hidden"
name=
"id_quiz"
value=
"<? echo $id_quiz;?>"
/>
208.
<p><a href=
"contact.php"
>กลับสู่ หน้าหลัก </a></p>
209.
</tr>
210.
</form>
211.
</div>
212.
213.
<div id=
"templatemo_footer"
>
214.
<div
class
=
"cleaner"
></div>
215.
</div>
216.
217.
</div>
218.
<div
class
=
"cleaner"
></div>
219.
</div>
220.
</div>
221.
222.
</body>
223.
</html>