001.
<? session_start();
002.
include
(
"connect.inc"
);
003.
include
(
"css_font.txt"
);
004.
include
(
"java_delete.txt"
);
005.
?>
006.
<style type=
"text/css"
>
007.
008.
.ui-datepicker{
009.
width:170px;
010.
background-color:white;
011.
color:red;
012.
font-family:tahoma;
013.
font-size:10px;
014.
text-align:center;
015.
}
016.
</style>
017.
<head>
018.
<meta http-equiv=
"Content-Type"
content=
"text/html; charset=windows-874"
>
019.
<?
020.
$j
=1;
021.
$q
=1;
022.
{
023.
?>
024.
<script src=
"jquery.js"
type=
"text/javascript"
></script>
025.
<?
026.
for
(
$java
=0;
$java
<=100;
$java
++)
027.
{ ?>
028.
<script type=
'text/javascript'
>
029.
$(document).ready(
function
(){
030.
031.
$(
".slidingDiv<?=$j;?>"
).hide();
032.
$(
".show_hide<?=$q;?>"
).show();
033.
034.
$(
'.show_hide<?=$q;?>'
).click(
function
(){
035.
$(
".slidingDiv<?=$j;?>"
).slideToggle();
036.
});
037.
});
038.
</script>
039.
<?
040.
$j
=
$j
+1;
041.
$q
=
$q
+1;
042.
} }?>
043.
</head>
044.
<body> <center>
045.
</p>
046.
<form action=
"<?=$_SERVER['SCRIPT_NAME'];?>"
method=
"get"
name=
"frmSearch"
id=
"frmSearch"
>
047.
<center>
048.
<table width=
"450"
border=
"0"
class
=
"style3 "
>
049.
<tr><th align=
"right"
width=
"100"
>
050.
<?
051.
echo
(in_array(
$mem_type
,
array
(1,2,3)))?
'<a href="animal_insert.php">เพิ่ม</a>'
:
' '
;?> ผู้บันทึก : </th>
052.
<td width=
"350"
><select name=
"txtKeyword2"
id=
"txtKeyword2"
style=
"width:325"
>
053.
<option value=
""
>--- เลือก ---</option>
054.
<?
055.
$strSQL
=
"SELECT * FROM member order by mem_fname"
;
056.
$objQuery
= mssql_query(
$strSQL
)
or
die
(
"Error Query ["
.
$strSQL
.
"]"
);
057.
while
(
$objResult
= mssql_fetch_array(
$objQuery
))
058.
{
059.
?>
060.
<option value=
"<?=$objResult["
mem_fname
"];?>"
><?=
$objResult
[
"mem_fname"
];?> <?=
$objResult
[
"mem_lname"
];?></option>
061.
<?}?>
062.
</select></td></tr>
063.
<tr>
064.
<th align=
"right"
>ผู้ปรับปรุง : </th>
065.
<td><select name=
"txtKeyword3"
style=
"width:325"
>
066.
<option value=
""
>--- เลือก ---</option>
067.
<?
068.
$strSQL
=
"SELECT * FROM member order by mem_fname"
;
069.
$objQuery
= mssql_query(
$strSQL
)
or
die
(
"Error Query ["
.
$strSQL
.
"]"
);
070.
while
(
$objResult
= mssql_fetch_array(
$objQuery
))
071.
{
072.
?>
073.
<option value=
"<?=$objResult["
mem_fname
"];?>"
><?=
$objResult
[
"mem_fname"
];?> <?=
$objResult
[
"mem_lname"
];?></option>
074.
<?}?>
075.
</select></td></tr>
076.
<tr>
077.
<th align=
"right"
>ชื่อธุรกิจ : </th>
078.
<td><input name=
"txtKeyword"
type=
"text"
id=
"txtKeyword"
size=
"50 "
value=
"<?=$_GET["
txtKeyword
"];?>"
/></td>
079.
</tr>
080.
<tr>
081.
<th align=
"right"
>วันที่บันทึก : </th>
082.
<td><input type=
"text"
name=
"dateInput"
id=
"dateInput"
size=
"17 "
/><?
include
(
"date.txt"
); ?> ถึง <input type=
"text"
name=
"dateInput2"
id=
"dateInput2"
size=
"17"
/><?
include
(
"date2.txt"
); ?></td>
083.
</tr>
084.
<tr>
085.
<th align=
"right"
>การเผยแพร่ : </th>
086.
<td><input type=
"radio"
name=
"IsActive"
id=
"txtKeyword4"
value=
"1"
checked>ยังไม่เผยแพร่
087.
<input type=
"radio"
name=
"IsActive"
id=
"txtKeyword4"
value=
"2"
>เผยแพร่</td>
088.
</tr>
089.
<tr><th colspan=
"2"
>
090.
<center><input type=
"submit"
value=
"Search"
/> <input type=
"reset"
name=
"reset"
value=
"Cancel"
>
091.
</th>
092.
</tr>
093.
</table>
094.
<label>
095.
</label>
096.
</center><?
echo
$_GET
[
"txtKeyword"
]; ?><?
echo
$_GET
[
"txtKeyword2"
]; ?><?
echo
$_GET
[
"txtKeyword3"
]; ?><?
echo
$_GET
[
"IsActive"
]; ?>
097.
</form>
098.
099.
<?
100.
if
(
$_GET
[
"txtKeyword"
]!=
""
)
101.
{
102.
$iparr
=split(
" "
,
$_GET
[
"txtKeyword"
]);
103.
$star
=
explode
(
" "
,
$_GET
[
"txtKeyword"
]);
104.
for
(
$h
= 0;
$h
<
count
(
$star
);
$h
++){
105.
}
106.
$strSQL
=
"SELECT * FROM animal WHERE Enable='T' and (ThaiName LIKE '%"
.
$star
[0].
"%' or EngName LIKE '%"
.
$star
[0]."%')
107.
or
108.
(ThaiName LIKE
'%".$star[1]."%'
or
EngName LIKE
'%".$star[1]."%'
)
109.
or
110.
(ThaiName LIKE
'%".$star[2]."%'
or
EngName LIKE
'%".$star[2]."%'
)
111.
or
112.
(ThaiName LIKE
'%".$star[3]."%'
or
EngName LIKE
'%".$star[3]."%'
) ";
113.
}
114.
if
(
$_GET
[
"IsActive"
]!=
""
)
115.
{
116.
$iparr
=split(
" "
,
$_GET
[
"IsActive"
]);
117.
$star
=
explode
(
" "
,
$_GET
[
"IsActive"
]);
118.
for
(
$h
= 0;
$h
<
count
(
$star
);
$h
++){
119.
}
120.
$strSQL
=
"SELECT * FROM animal WHERE Enable='T' and (IsActive LIKE '%"
.
$star
[0].
"%') "
;
121.
}
122.
if
(
$_GET
[
"txtKeyword2"
]!=
""
)
123.
{
124.
$iparr
=split(
" "
,
$_GET
[
"txtKeyword2"
]);
125.
$star
=
explode
(
" "
,
$_GET
[
"txtKeyword2"
]);
126.
for
(
$h
= 0;
$h
<
count
(
$star
);
$h
++){
127.
}
128.
$strSQL
=
"SELECT * FROM animal WHERE Enable='T' and (Created LIKE '%"
.
$star
[0].
"%') "
;
129.
$objQuery
= mssql_query(
$strSQL
)
or
die
(
"Error Query ["
.
$strSQL
.
"]"
) ;
130.
}
131.
if
(
$_GET
[
"txtKeyword3"
]!=
""
)
132.
{
133.
$iparr
=split(
" "
,
$_GET
[
"txtKeyword3"
]);
134.
$star
=
explode
(
" "
,
$_GET
[
"txtKeyword3"
]);
135.
for
(
$h
= 0;
$h
<
count
(
$star
);
$h
++){
136.
}
137.
$strSQL
=
"SELECT * FROM animal WHERE Enable='T' and (Updated LIKE '%"
.
$star
[0].
"%') "
;
138.
$objQuery
= mssql_query(
$strSQL
)
or
die
(
"Error Query ["
.
$strSQL
.
"]"
) ;
139.
$Num_Rows
= mssql_num_rows(
$objQuery
);
140.
$Per_Page
= 15;
141.
$Page
=
$_GET
[
"Page"
];
142.
143.
if
(!
$_GET
[
"Page"
])
144.
{
145.
$Page
=1;
146.
}
147.
$Prev_Page
=
$Page
-1;
148.
$Next_Page
=
$Page
+1;
149.
$Page_Start
= ((
$Per_Page
*
$Page
)-
$Per_Page
);
150.
if
(
$Num_Rows
<=
$Per_Page
)
151.
{
152.
$Num_Pages
=1;
153.
}
154.
else
if
((
$Num_Rows
%
$Per_Page
)==0)
155.
{
156.
$Num_Pages
=(
$Num_Rows
/
$Per_Page
) ;
157.
}
158.
else
159.
{
160.
$Num_Pages
=(
$Num_Rows
/
$Per_Page
)+1;
161.
$Num_Pages
= (int)
$Num_Pages
;
162.
}
163.
$Page_End
=
$Per_Page
*
$Page
;
164.
IF (
$Page_End
>
$Num_Rows
)
165.
{
166.
$Page_End
=
$Num_Rows
;
167.
}
168.
?>
169.
<center><form name=
"frmMain"
action=
"animal_delete.php"
method=
"POST"
onSubmit=
"return onDelete();"
>
170.
<input type=
"hidden"
name=
"hdnCount"
value=
"<?=$s;?>"
>
171.
<table width=
"100%"
border=
"0"
class
=
"style1"
cellspacing=
"0"
>
172.
<tr bgcolor=
"#0099FF"
border=
"0"
>
173.
<th align=
"center"
bgcolor=
"blue"
><input type=
"image"
src=
"delete.png"
name=
"btnDelete"
value=
"Delete"
alt=
"ลบ"
width=
"20"
height=
"20"
></th>
174.
<th align=
"center"
bgcolor=
"blue"
>ลำดับ</th>
175.
<th align=
"center"
bgcolor=
"blue"
>ชื่อธุรกิจ</th>
176.
<th align=
"center"
bgcolor=
"blue"
>โทรศัพท์</th>
177.
<th align=
"center"
bgcolor=
"blue"
>รายละเอียดธุรกิจ</th>
178.
<th align=
"center"
bgcolor=
"blue"
>ที่อยู่</th>
179.
<th align=
"center"
bgcolor=
"blue"
>สถานที่ใกล้เคียง</th>
180.
<th align=
"center"
bgcolor=
"blue"
>เว็บ</th>
181.
<th align=
"center"
bgcolor=
"blue"
>ความนิยม</th>
182.
<th align=
"center"
bgcolor=
"blue"
colspan=
"5"
> </th>
183.
</tr>
184.
<?
185.
$a
=1;
186.
$j
=1;
187.
$q
=1;
188.
for
(
$i
=
$Page_Start
;
$i
<
$Page_End
;
$i
++)
189.
{
190.
?>
191.
<?
if
(
$bg
==
"white"
)
192.
{
193.
$bg
=
"#CCCCCC"
;
194.
}
else
{
195.
$bg
=
"white"
;
196.
}
197.
?>
198.
<tr bgcolor=
"<?=$bg?>"
class
=
"style3"
>
199.
200.
201.
<th align=
"center"
><input type=
"checkbox"
name=
"chkDel[]"
id=
"chkDel<?=$s;?>"
value=
"<?=mssql_result($objQuery,$i,"
an_id
");?>"
> </th>
202.
<td><div align=
"center"
class
=
"style3"
>
203.
<?=
$a
;?>
204.
</div></td>
205.
<td><?=mssql_result(
$objQuery
,
$i
,
"ThaiName"
);?> <?=mssql_result(
$objQuery
,
$i
,
"EngName"
);?></td>
206.
<td><div align=
"center"
>
207.
<?=mssql_result(
$objQuery
,
$i
,
"an_tel1"
);?>
208.
-
209.
<?=mssql_result(
$objQuery
,
$i
,
"an_tel2"
);?>
210.
</div></td>
211.
<td><?=mssql_result(
$objQuery
,
$i
,
"an_detail"
);?></td>
212.
<td>
213.
<?=mssql_result(
$objQuery
,
$i
,
"an_district"
);?>
214.
<?
215.
$strSQL
=
"select AMPHUR_NAME from amphur where AMPHUR_ID='"
.mssql_result(
$objQuery
,
$i
,
"an_amphur"
).
"'"
;
216.
$objQuery
= mssql_query(
$strSQL
)
or
die
(
"Error Query ["
.
$strSQL
.
"]"
);
217.
$objResult
= mssql_fetch_array(
$objQuery
);
218.
echo
$objResult
[
"AMPHUR_NAME"
];
219.
?>
220.
221.
<?
222.
$strSQL
=
"SELECT * FROM animal WHERE Enable='T' "
;
223.
$objQuery
= mssql_query(
$strSQL
)
or
die
(
"Error Query ["
.
$strSQL
.
"]"
) ;
224.
{
225.
?>
226.
<?
227.
$strSQL
=
"select PROVINCE_NAME from province where PROVINCE_ID='"
.mssql_result(
$objQuery
,
$i
,
"an_province"
).
"'"
;
228.
$objQuery
= mssql_query(
$strSQL
)
or
die
(
"Error Query ["
.
$strSQL
.
"]"
);
229.
$objResult
= mssql_fetch_array(
$objQuery
);
230.
echo
$objResult
[
"PROVINCE_NAME"
];
231.
?> </td>
232.
233.
<?
234.
$strSQL
=
"SELECT * FROM animal WHERE Enable='T' "
;
235.
$objQuery
= mssql_query(
$strSQL
)
or
die
(
"Error Query ["
.
$strSQL
.
"]"
) ;
236.
{
237.
?>
238.
239.
<td><?=mssql_result(
$objQuery
,
$i
,
"an_town1"
);?><?=mssql_result(
$objQuery
,
$i
,
"an_town2"
);?><?=mssql_result(
$objQuery
,
$i
,
"an_town3"
);?><?=mssql_result(
$objQuery
,
$i
,
"an_town4"
);?></td>
240.
<td><center><?=mssql_result(
$objQuery
,
$i
,
"an_web"
);?></center></td>
241.
<td><center>
242.
<?=mssql_result(
$objQuery
,
$i
,
"an_rate"
);?>
243.
</center></td>
244.
<td align=
"center"
>
245.
<img src=
"slide.png"
name=
"slide"
width=
"20"
height=
"20"
alt=
"เปิด/ปิด"
class
=
"show_hide<?=$q;?>"
></td>
246.
<td>
247.
<td align=
"center"
>
248.
<a href=
"animal_active.php?an_1=<?=mssql_result($objQuery,$i,"
an_id
");?>"
>เผยแพร่</a></td>
249.
</td>
250.
<td align=
"center"
>
251.
<a href=
"animal_edit.php?an_1=<?=mssql_result($objQuery,$i,"
an_id
");?>"
>แก้ไข</a></td>
252.
</tr>
253.
<tr><td colspan=
"13"
>
254.
<div
class
=
"slidingDiv<?=$j;?>"
>
255.
<table width=
"100%"
border=
"1"
cellpadding=
"0"
cellspacing=
"0"
>
256.
<tr>
257.
<td colspan=
"12"
class
=
"style4"
><b>ข้อมูลทั่วไป</b>
258.
<font color=
"red"
><b><?
if
(mssql_result(
$objQuery
,
$i
,
"IsActive"
)==1)
259.
{
echo
"ยังไม่เผยแพร่"
; }
260.
elseif
(mssql_result(
$objQuery
,
$i
,
"IsActive"
)==2)
261.
{
echo
"เผยแพร่"
; }
262.
?></b></font>
263.
</td>
264.
<tr>
265.
<td
class
=
"style3"
><b>ชื่อธุรกิจ</b> <?=mssql_result(
$objQuery
,
$i
,
"ThaiName"
);?> <?=mssql_result(
$objQuery
,
$i
,
"EngName"
);?>
266.
<b>ชื่อเรียกอื่นๆ</b> <?=mssql_result(
$objQuery
,
$i
,
"an_word"
);?>
267.
<br>
268.
<b>หมายเลขโทรศัพท์</b> <?=mssql_result(
$objQuery
,
$i
,
"an_tel1"
);?>
269.
<b>ต่อ</b> <?=mssql_result(
$objQuery
,
$i
,
"an_tel2"
);?>
270.
<b>สายด่วน</b> <?=mssql_result(
$objQuery
,
$i
,
"an_hotline"
);?>
271.
<b>Fax</b> <?=mssql_result(
$objQuery
,
$i
,
"an_fax1"
);?> <b>ต่อ</b> <?=mssql_result(
$objQuery
,
$i
,
"an_fax2"
);?>
272.
<br>
273.
<b>ประเภทของธุรกิจที่ดำเนินการ</b> <?=mssql_result(
$objQuery
,
$i
,
"an_type"
);?> <?=mssql_result(
$objQuery
,
$i
,
"an_type"
);?>
274.
<br>
275.
<b>ที่อยู่</b> <?=mssql_result(
$objQuery
,
$i
,
"Address"
);?> <b>ตำบล</b> <?=mssql_result(
$objQuery
,
$i
,
"an_district"
);?> <b>อำเภอ</b>
276.
<?
277.
$strSQL
=
"select AMPHUR_NAME from amphur where AMPHUR_ID='"
.mssql_result(
$objQuery
,
$i
,
"an_amphur"
).
"'"
;
278.
$objQuery
= mssql_query(
$strSQL
)
or
die
(
"Error Query ["
.
$strSQL
.
"]"
);
279.
$objResult
= mssql_fetch_array(
$objQuery
);
280.
echo
$objResult
[
"AMPHUR_NAME"
];
281.
?>
282.
283.
<?
284.
$strSQL
=
"SELECT * FROM animal WHERE Enable='T' "
;
285.
$objQuery
= mssql_query(
$strSQL
)
or
die
(
"Error Query ["
.
$strSQL
.
"]"
) ;
286.
{
287.
?>
288.
<b>จังหวัด</b>
289.
<?
290.
$strSQL
=
"select PROVINCE_NAME from province where PROVINCE_ID='"
.mssql_result(
$objQuery
,
$i
,
"an_province"
).
"'"
;
291.
$objQuery
= mssql_query(
$strSQL
)
or
die
(
"Error Query ["
.
$strSQL
.
"]"
);
292.
$objResult
= mssql_fetch_array(
$objQuery
);
293.
echo
$objResult
[
"PROVINCE_NAME"
];
294.
?> </td>
295.
296.
<?
297.
$strSQL
=
"SELECT * FROM animal WHERE Enable='T' "
;
298.
$objQuery
= mssql_query(
$strSQL
)
or
die
(
"Error Query ["
.
$strSQL
.
"]"
) ;
299.
{
300.
?> <?=mssql_result(
$objQuery
,
$i
,
"an_zip"
);?>
301.
<br>
302.
<b>web</b> <?=mssql_result(
$objQuery
,
$i
,
"an_web"
);?>
303.
304.
<b>E-mail</b> <?=mssql_result(
$objQuery
,
$i
,
"an_mail"
);?></font></td></tr>
305.
<tr><td colspan=
"11"
class
=
"style4"
><b>ข้อมูลธุรกิจ</b></td></tr>
306.
<tr><td
class
=
"style3"
>
307.
<b>หมวดธุรกิจ</b>
308.
<?
309.
$strSQL
=
"select busi_name from business where busi_no='"
.mssql_result(
$objQuery
,
$i
,
"an_busi"
).
"'"
;
310.
$objQuery
= mssql_query(
$strSQL
)
or
die
(
"Error Query ["
.
$strSQL
.
"]"
);
311.
$objResult
= mssql_fetch_array(
$objQuery
);
312.
echo
$objResult
[
"busi_name"
];
313.
?>
314.
315.
<?
316.
$strSQL
=
"SELECT * FROM animal WHERE Enable='T' "
;
317.
$objQuery
= mssql_query(
$strSQL
)
or
die
(
"Error Query ["
.
$strSQL
.
"]"
) ;
318.
{
319.
?>
320.
<br>
321.
<b>กลุ่มธุรกิจ</b>
322.
<?
323.
$strSQL
=
"select bg_name from businessgroup where bg_no='"
.mssql_result(
$objQuery
,
$i
,
"an_bg"
).
"'"
;
324.
$objQuery
= mssql_query(
$strSQL
)
or
die
(
"Error Query ["
.
$strSQL
.
"]"
);
325.
$objResult
= mssql_fetch_array(
$objQuery
);
326.
echo
$objResult
[
"bg_name"
];
327.
?>
328.
329.
<?
330.
$strSQL
=
"SELECT * FROM animal WHERE Enable='T' "
;
331.
$objQuery
= mssql_query(
$strSQL
)
or
die
(
"Error Query ["
.
$strSQL
.
"]"
) ;
332.
{
333.
?>
334.
<br>
335.
<b>บริการ</b>
336.
<?
337.
$strSQL
=
"select ser_name from service where ser_no='"
.mssql_result(
$objQuery
,
$i
,
"an_service"
).
"'"
;
338.
$objQuery
= mssql_query(
$strSQL
)
or
die
(
"Error Query ["
.
$strSQL
.
"]"
);
339.
$objResult
= mssql_fetch_array(
$objQuery
);
340.
echo
$objResult
[
"ser_name"
];
341.
?>
342.
343.
<?
344.
$strSQL
=
"SELECT * FROM animal WHERE Enable='T' "
;
345.
$objQuery
= mssql_query(
$strSQL
)
or
die
(
"Error Query ["
.
$strSQL
.
"]"
) ;
346.
{
347.
?>
348.
<br>
349.
<b>บริการพิเศษประเภทของสัตว์</b> <?=mssql_result(
$objQuery
,
$i
,
"an_animal_service"
);?></font>
350.
</td></tr>
351.
<tr><td
class
=
"style4"
colspan=
"11"
><b>รายละเอียดธุรกิจ </b></td></tr>
352.
<tr><td
class
=
"style3"
>
353.
<b>รายละเอียด</b> <?=mssql_result(
$objQuery
,
$i
,
"an_detail"
);?>
354.
<br>
355.
<b>ราคา</b> <?=mssql_result(
$objQuery
,
$i
,
"an_price"
);?>
356.
<br>
357.
<b>สาขา</b> <?=mssql_result(
$objQuery
,
$i
,
"an_branch"
);?>
358.
<br>
359.
<b>วันเวลาทำการวันธรรมดา</b> <?=mssql_result(
$objQuery
,
$i
,
"an_commonday"
);?>
360.
361.
<b>วันเวลาทำการวันหยุด</b> <?=mssql_result(
$objQuery
,
$i
,
"an_holiday"
);?>
362.
<br>
363.
<b>หมายเหตุ</b> <?=mssql_result(
$objQuery
,
$i
,
"an_note"
);?>
364.
<br>
365.
<b>สถานที่ใกล้เคียง</b> <?=mssql_result(
$objQuery
,
$i
,
"an_town1"
);?>,<?=mssql_result(
$objQuery
,
$i
,
"an_town2"
);?>,<?=mssql_result(
$objQuery
,
$i
,
"an_town3"
);?>,<?=mssql_result(
$objQuery
,
$i
,
"an_town4"
);?>
366.
<br>
367.
<b>ความนิยม</b> <?=mssql_result(
$objQuery
,
$i
,
"an_rate"
);?></font>
368.
</td></tr>
369.
<tr><td
class
=
"style4"
><b>ข้อมูลติดต่อเจ้าของธุรกิจ</b></td></tr>
370.
<tr><td
class
=
"style3"
>
371.
<b>ชื่อที่ใช้ติดต่อ</b> <?=mssql_result(
$objQuery
,
$i
,
"an_con_name"
);?>
372.
<br>
373.
<b>ชื่อ</b> <?=mssql_result(
$objQuery
,
$i
,
"an_c_name"
);?> <?=mssql_result(
$objQuery
,
$i
,
"an_c_lastname"
);?>
374.
<br>
375.
<b>หมายเลขเพิ่มเติม</b> <?=mssql_result(
$objQuery
,
$i
,
"an_c_tel1"
);?> <b>ต่อ</b> <?=mssql_result(
$objQuery
,
$i
,
"an_c_tel2"
);?>
376.
<br>
377.
<b>ที่อยู่</b> <?=mssql_result(
$objQuery
,
$i
,
"an_c_add"
);?> <b>ตำบล</b> <?=mssql_result(
$objQuery
,
$i
,
"an_c_district"
);?> <b>อำเภอ</b>
378.
<?
379.
$strSQL
=
"select AMPHUR_NAME from amphur where AMPHUR_ID='"
.mssql_result(
$objQuery
,
$i
,
"an_c_amphur"
).
"'"
;
380.
$objQuery
= mssql_query(
$strSQL
)
or
die
(
"Error Query ["
.
$strSQL
.
"]"
);
381.
$objResult
= mssql_fetch_array(
$objQuery
);
382.
echo
$objResult
[
"AMPHUR_NAME"
];
383.
?>
384.
385.
<?
386.
$strSQL
=
"SELECT * FROM animal WHERE Enable='T' "
;
387.
$objQuery
= mssql_query(
$strSQL
)
or
die
(
"Error Query ["
.
$strSQL
.
"]"
) ;
388.
{
389.
?>
390.
<b>จังหวัด</b>
391.
<?
392.
$strSQL
=
"select PROVINCE_NAME from province where PROVINCE_ID='"
.mssql_result(
$objQuery
,
$i
,
"an_c_province"
).
"'"
;
393.
$objQuery
= mssql_query(
$strSQL
)
or
die
(
"Error Query ["
.
$strSQL
.
"]"
);
394.
$objResult
= mssql_fetch_array(
$objQuery
);
395.
echo
$objResult
[
"PROVINCE_NAME"
];
396.
?> </td>
397.
398.
<?
399.
$strSQL
=
"SELECT * FROM animal WHERE Enable='T' "
;
400.
$objQuery
= mssql_query(
$strSQL
)
or
die
(
"Error Query ["
.
$strSQL
.
"]"
) ;
401.
{
402.
?>
403.
<?=mssql_result(
$objQuery
,
$i
,
"an_c_zip"
);?></font>
404.
</td></td>
405.
<tr><td
class
=
"style4"
><b>ข้อมูลการบันทึก</b></td></tr>
406.
<tr><td
class
=
"style3"
>
407.
<b>ผู้บันทึก</b> <?=mssql_result(
$objQuery
,
$i
,
"Created"
);?>
408.
409.
<b>วันที่บันทึก</b> <?=mssql_result(
$objQuery
,
$i
,
"CreatedBy"
);?>
410.
<br>
411.
<b>ผู้ปรับปรุง</b> <?=mssql_result(
$objQuery
,
$i
,
"Updated"
);?>
412.
413.
<b>วันที่ปรับปรุง</b> <?=mssql_result(
$objQuery
,
$i
,
"UpdatedBy"
);?>
414.
</td>
415.
</td></tr>
416.
</table></tr></div>
417.
<?
418.
$a
=
$a
+1;
419.
$j
=
$j
+1;
420.
$q
=
$q
+1;
421.
}
422.
?>
423.
</table>
424.
</center>
425.
<br />
426.
มีทั้งหมด
427.
<b><?=
$Num_Rows
;?></b>
428.
เรคคอร์ด:
429.
<b><?=
$Num_Pages
;?></b>
430.
หน้า : อยู่หน้าที่
431.
<?
432.
if
(
$Prev_Page
)
433.
{
434.
echo
" <a href='$_SERVER[SCRIPT_NAME]?Page=$Prev_Page&txtKeyword=$_GET[txtKeyword]'><< Back</a> "
;
435.
}
436.
for
(
$i
=1;
$i
<=
$Num_Pages
;
$i
++){
437.
if
(
$i
!=
$Page
)
438.
{
439.
echo
"[ <a href='$_SERVER[SCRIPT_NAME]?Page=$i&txtKeyword=$_GET[txtKeyword]'>$i</a> ]"
;
440.
}
441.
else
442.
{
443.
echo
"<b> $i </b>"
;
444.
}
445.
}
446.
if
(
$Page
!=
$Num_Pages
)
447.
{
448.
echo
" <a href ='$_SERVER[SCRIPT_NAME]?Page=$Next_Page&txtKeyword=$_GET[txtKeyword]'>Next>></a> "
;
449.
}
450.
}
451.
?></form>
452.
<?
453.
}}}}}}}}}
454.
mssql_close(
$objConnect
);
455.
?>
456.
</center></body>