1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
<?php $dir = "."; include_once($dir."/_common.php");
$bank_array = bank_list_get(); // 계좌정보 가져오기
if($mode=='empty'){ ?> <tr> <td class='tcenter2'> <input type='checkbox' name='acntnumber[]' value='' class='acc_idx'> <input type='hidden' name='nidx[]' value=''> </td> <td> <select name='bankcode[]'> <?php foreach($bank_array as $k=>$v){ if($val['bankcode']==$v['code']){ $std = "selected"; } else { $std = ""; } echo " <option value='{$v['code']}' {$std}>{$v['bankalias']}</option>"; } ?> </select> </td> <td><input type='text' name='acntnumber[]' value='' class='width_300'></td> <td><input type='text' name='accountholder[]' value='' class='width_150'></td> </tr> <?php } else {
$account_array = bankbook_list_get(); // 통장 정보를 가져옴
$idx = 0; foreach($account_array as $key=>$val){ $sql = "select sum(cnt) as sum from (select count(*) as cnt from receive a where a.bankbook_code = '{$val['nidx']}' union select count(*) as cnt from payment a where a.bankbook_code = '{$val['nidx']}') aa "; $use_cnt = sql_fetch($sql,$connect_j3); ?> <tr> <td class='tcenter2'> <input type='checkbox' name='acntnumber[]' value='<?php echo $idx;?>' class='acc_idx' <?php if($use_cnt['sum']>0){ echo "disabled"; }?>> <input type='hidden' name='nidx[]' value='<?php echo $val['nidx'];?>'> </td> <td> <select name='bankcode[]'> <?php foreach($bank_array as $k=>$v){ if($val['bankcode']==$v['code']){ $std = "selected"; } else { $std = ""; } echo " <option value='{$v['code']}' {$std}>{$v['bankalias']}</option>"; } ?> </select> </td> <td><input type='text' name='acntnumber[]' value='<?php echo $val['acntnumber'];?>' class='width_300'></td> <td><input type='text' name='accountholder[]' value='<?php echo $val['accountholder'];?>' class='width_150'></td> </tr> <?php $idx++; } } ?>
|