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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
|
<?php $dir = "."; include_once($dir."/_common.php"); if($code!=''){ $sql = "select a.*, b.name from shop_prod_use a left join product_m b on a.pcode = b.code where idx = '{$code}' "; $cinfo = sql_fetch($sql,$connect_j3); } else { $cinfo['iq_time'] = date("Y-m-d H:i:s",time()); $cinfo['iq_as_time'] = date("Y-m-d H:i:s",time()); } if($cinfo['ct_idx']=='0' || $cinfo['ct_idx'] == ''){ $cinfo['ct_idx'] = time(); } ?> <style> .cust_modal1, .cust_modal2 { border:0px solid #e1e1e1; width:1000px; padding:10px; font-size:13px } .cust_modal1 h4, .cust_modal2 h4 { position:relative; top:-5px; font-size:14px; font-weight:bold; } .cust_modal2 { margin-top:0px; } .table-top-border tbody { border-top:1px solid #e1e1e1;} .cust_modal1 table tbody td, .cust_modal2 table tbody td { text-align:left; padding-left:5px; } .cust_modal1 table tbody td input, .cust_modal2 table tbody td input{ border:1px solid #e9e9e9; } .input_readonly {background:#E9E9E9; } .width_500 { width:500px !important; } .width_80 { width:80px !important; } .width_120 { width:120px !important; } </style> <form name='prod_use_reg_form' id='stock_reg_form' method='post' action='ajax.product_use_process.php' enctype="multipart/form-data"> <input type='hidden' name='qstr' value='<?php echo $qstr;?>'> <input type='hidden' name='code' value='<?php echo $cinfo['idx'];?>'> <input type='hidden' name='ccode' value='<?php echo $cinfo['ccode'];?>'> <input type='hidden' name='ct_idx' value='<?php echo $cinfo['ct_idx'];?>'>
<div class='cust_modal1'> <h4>기본정보</h4> <table class="order-sheet table-top-border"> <caption class="screen_out">기본정보</caption> <colgroup> <col style="width:150px;"><col style="width:850px;"> </colgroup>
<tbody> <tr> <th>상품</th> <td colspan=3> <input type='hidden' name='pcode' class='' value='<?php echo $cinfo['pcode'];?>'> <input type='text' name='pname' class='width_200 input_readonly' value='<?php echo $cinfo['name'];?>'> <?php if($code==''){?> <span class='prod_open'>[상품검색]</span><?php }?> </td> </tr> <tr> <th>별점</th> <td colspan=3> <input type='radio' name='iu_score' class=' ' value='1' <?php if($cinfo['iu_score']=='1'){?>checked<?php }?>> ★ <input type='radio' name='iu_score' class=' ' value='2' <?php if($cinfo['iu_score']=='2'){?>checked<?php }?>> ★★ <input type='radio' name='iu_score' class=' ' value='3' <?php if($cinfo['iu_score']=='3'){?>checked<?php }?>> ★★★ <input type='radio' name='iu_score' class=' ' value='4' <?php if($cinfo['iu_score']=='4'){?>checked<?php }?>> ★★★★ <input type='radio' name='iu_score' class=' ' value='5' <?php if($cinfo['iu_score']=='5' || $cinfo['iu_score']==''){?>checked<?php }?>> ★★★★★
</td> </tr> <tr> <th>작성자</th> <td colspan=3> <input type='text' name='iu_name' class='width_100 ' value='<?php echo $cinfo['iu_name'];?>'> </td> </tr> <tr> <th>후기 제목</th> <td colspan=3> <input type='text' name='iu_subject' class='width_500' value='<?php echo $cinfo['iu_subject'];?>'> </td> </tr> <tr> <th>후기 내용</th> <td colspan=3> <textarea name='iu_content' id='iu_content'><?php echo $cinfo['iu_content'];?></textarea> </td> </tr> <tr> <th>후기 이미지</th> <td colspan=3> <input type='file' name='iu_file'> <?php if(file_exists($j3_data_path."/item_use/iu_".$cinfo['ct_idx'])){ echo "<img src='".$j3_data_url."/item_use/iu_".$cinfo['ct_idx']."' style='max-width:300px;'>"; echo " <input type='checkbox' name='iu_img_del' value='Y'> 삭제"; } ?> </td> </tr> <tr> <th>작성 일자</th> <td colspan=3> <input type='text' name='iu_time' class='width_200 ' value='<?php echo $cinfo['iu_time'];?>'> </td> </tr> <tr> <th>승인 여부</th> <td colspan=3> <input type='radio' name='iu_view' class=' ' value='0' <?php if($cinfo['iu_view']=='0'){?>checked<?php }?>> 비승인 <input type='radio' name='iu_view' class=' ' value='1' <?php if($cinfo['iu_view']=='1' || $cinfo['iu_view']==''){?>checked<?php }?>> 승인 </td> </tr> </table> </div> </form> <script> $(function(){ $(".prod_open").css("cursor","pointer").click(function(){ $.get("product_list.inc.php?mode=stock",function(rtn){ $("#modal_member_box2").html(rtn).dialog({ resizable: true, height:740, width:1200, modal: true, title:"거래처 [검색]", buttons: { 닫기: function() { $( this ).dialog( "close" ); } } }); $("#modal_member_box").css("left","0px;"); }); });
CKEDITOR.replace( 'iu_content', { height: 250 } ); });
function form_save(){ $form_obj = $("#stock_reg_form"); if($form_obj.find("input[name='pcode']").val()==''){ alert('상품을 선택하시기 바랍니다.'); return; } if($form_obj.find("input[name='iu_name']").val()==''){ alert('작성자를 입력하시기 바랍니다.'); return; } if($form_obj.find("input[name='iu_subject']").val()==''){ alert('후기 제목을 입력하시기 바랍니다.'); return; } v1 = CKEDITOR.instances.iu_content.getData(); $("#iu_content").val(v1); if($form_obj.find("textarea[name='iu_content']").val()==''){ alert('후기 내용을 입력하시기 바랍니다.'); return; }
form_data = $form_obj.submit(); /*$.ajax({type:"post", url:"ajax.product_use_process.php", data:form_data, async:false, dataType : "xml", success:function(xml){ var v_mode = $(xml).find("mode").text(); var v_mode_ok = $(xml).find("mode_ok").text(); var v_msg = $(xml).find("msg").text(); if(v_mode_ok!='Y'){ alert(v_msg); } else { document.location.reload(); } }, error:function(rtn,status,error){ alert(error); } });*/ } </script>
|