1 | <?php |
||
2 | function combotgl($awal, $akhir, $var, $default) |
||
3 | { |
||
4 | echo "<select name=$var>"; |
||
5 | echo "<option value=0 selected>$default</option>"; |
||
6 | for ($i = $awal; $i <= $akhir; $i++) { |
||
7 | echo "<option value=$i>$i</option>"; |
||
8 | } |
||
9 | echo '</select> '; |
||
10 | } |
||
11 | |||
12 | function combobln($awal, $akhir, $var, $default) |
||
13 | { |
||
14 | include '../config/library.php'; |
||
15 | echo "<select name=$var>"; |
||
16 | echo "<option value=0 selected>$default</option>"; |
||
17 | for ($bln = $awal; $bln <= $akhir; $bln++) { |
||
18 | echo "<option value=$bln>$nama_bln[$bln]</option>"; |
||
0 ignored issues
–
show
Comprehensibility
Best Practice
introduced
by
![]() |
|||
19 | } |
||
20 | echo '</select> '; |
||
21 | } |
||
22 | |||
23 | function combotgl2($awal, $akhir, $var, $terpilih) |
||
24 | { |
||
25 | echo "<select name=$var class='tselect_tgl'>"; |
||
26 | for ($i = $awal; $i <= $akhir; $i++) { |
||
27 | if ($i == $terpilih) { |
||
28 | echo "<option value=$i selected>$i</option>"; |
||
29 | } else { |
||
30 | echo "<option value=$i>$i</option>"; |
||
31 | } |
||
32 | } |
||
33 | echo '</select> '; |
||
34 | } |
||
35 | |||
36 | function combobln2($awal, $akhir, $var, $terpilih) |
||
37 | { |
||
38 | include '../config/library.php'; |
||
39 | echo "<select name=$var class='tselect_bln'>"; |
||
40 | for ($bln = $awal; $bln <= $akhir; $bln++) { |
||
41 | if ($bln == $terpilih) { |
||
42 | echo "<option value=$bln selected>$nama_bln[$bln]</option>"; |
||
0 ignored issues
–
show
Comprehensibility
Best Practice
introduced
by
|
|||
43 | } else { |
||
44 | echo "<option value=$bln>$nama_bln[$bln]</option>"; |
||
45 | } |
||
46 | } |
||
47 | echo '</select> '; |
||
48 | } |
||
49 | |||
50 | function combothn($awal, $akhir, $var, $terpilih) |
||
51 | { |
||
52 | echo "<select name=$var class='tselect_thn'>"; |
||
53 | for ($i = $awal; $i <= $akhir; $i++) { |
||
54 | if ($i == $terpilih) { |
||
55 | echo "<option value=$i selected>$i</option>"; |
||
56 | } else { |
||
57 | echo "<option value=$i>$i</option>"; |
||
58 | } |
||
59 | } |
||
60 | echo '</select> '; |
||
61 | } |
||
62 | |||
63 | ?> |
||
0 ignored issues
–
show
It is not recommended to use PHP's closing tag
?> in files other than templates.
Using a closing tag in PHP files that only contain PHP code is not recommended as you might accidentally add whitespace after the closing tag which would then be output by PHP. This can cause severe problems, for example headers cannot be sent anymore. A simple precaution is to leave off the closing tag as it is not required, and it also has no negative effects whatsoever. ![]() |
|||
64 |