01.
<div
class
=
"contentheader"
>
02.
<i
class
=
"icon-bar-chart"
></i> ข้อมูลการเงิน
03.
</div>
04.
<table
class
=
"table table-bordered"
id=
"resultTable"
data-responsive=
"table"
style=
"text-align: left;"
>
05.
<form action=
""
method=
"post"
>
06.
<?php
07.
$monthselect
=
"-1"
;
08.
if
(isset(
$_POST
[
"month"
])) {
09.
$monthselect
=
$_POST
[
"month"
];
10.
}
11.
?>
12.
ดูข้อมูลการเงินย้อนหลัง :
13.
<select name=
"month"
id=
"month"
onchange=
"this.form.submit();"
>
14.
<option value=
" "
>---- เลือกเดือน ----</option>
15.
16.
<?php
$month
=
array
(
"มกราคม "
,
"กุมภาพันธ์ "
,
"มีนาคม "
,
"เมษายน "
,
"พฤษภาคม "
,
"มิถุนายน "
,
"กรกฎาคม "
,
"สิงหาคม "
,
"กันยายน "
,
"ตุลาคม "
,
"พฤศจิกายน "
,
"ธันวาคม "
);?>
17.
<?php
for
(
$i
=0;
$i
<sizeof(
$month
);
$i
++) {?>
18.
<?php
if
(
$monthselect
==
$i
+1) { ?>
19.
<option value=
"<?php echo $i+1?>"
selected>
20.
<?php
echo
$month
[
$i
]?></option>
21.
<?php }
else
{ ?>
22.
<option value=
"<?php echo $i+1?>"
>
23.
<?php
echo
$month
[
$i
]?></option>
24.
<?php }
25.
}?>
26.
</select>
27.
</form>