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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
<?php session_start(); include_once("./_common.php"); include("../commonST.php"); $sql = "set names utf8"; mysql_query($sql);
//print_r($_GET);
$sql = "select * from constrt where constname like '%{$cn}%'"; $res = mysql_query($sql); while($info=mysql_fetch_array($res)){ $info_array[] = $info; }
if(count($info_array)==1){ ?> <script> $(function(){ $("input[name='c_nursery_name[]']").eq('<?php echo $idx;?>').val('<?php echo $info_array[0]['constname']?>'); $("input[name='c_nursery_code[]']").eq('<?php echo $idx;?>').val('<?php echo $info_array[0]['code']?>'); $("input[name='c_bigo[]']").eq('<?php echo $idx;?>').val('<?php echo $info_array[0]['constname']."/".$info_array[0]['bigo'];?>'); $("#modal_member_box").dialog("close"); }); </script> <?php } else { ?> <style> .table1 { width:100%; } .table1 th { border:1px solid #c0c0c0; background:#f0f0f0; padding:3px 5px;} .table1 td { border:1px solid #c0c0c0; padding:3px 5px;} </style> <form id="constr_search_form" method="get" onsubmit="return false"> <input type='text' name='skey' value='<?php echo $skey;?>'> <input type='button' value='검색' style='width:60px;padding-left:0px;' onclick="search_constr();"> <input type='hidden' name='s_idx' value='<?php echo $idx;?>'> <table class='table1'> <tr> <th>어린이집명</th> <th>완료일</th> <th>비고</th> </tr> <?php foreach($info_array as $key=>$info){ ?> <tr> <td onclick="select_constr(this)"> <input type='hidden' name='constname[]' value='<?php echo $info['constname'];?>'> <input type='hidden' name='code[]' value='<?php echo $info['code'];?>'> <input type='hidden' name='bigo[]' value='<?php echo $info['bigo'];?>'> <?php echo $info['constname'];?> </td> <td><?php echo $info['overdate'];?></td> <td><?php echo $info['bigo'];?></td> </tr> <?php } ?> </table> </form> <script> function select_constr($this){ $cn = $($this).find("input[name='constname[]']").val(); $code = $($this).find("input[name='code[]']").val(); $bigo = $($this).find("input[name='bigo[]']").val();
$("input[name='c_nursery_name[]']").eq('<?php echo $idx;?>').val($cn); $("input[name='c_nursery_code[]']").eq('<?php echo $idx;?>').val($code); $("input[name='c_bigo[]']").eq('<?php echo $idx;?>').val($cn); //$("input[name='c_bigo[]']").eq('<?php echo $idx;?>').val($cn+"/"+$bigo); $("#modal_member_box").dialog("close"); } </script> <?php } ?>
|