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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
|
<?php include("./_common.php"); include($j3_adm_path."/shop_header.php");
//$qstr = $_SERVER['QUERY_STRING'];
$bbsinfo = bbs_info($b_table);
if($code!=''){ $sql = "select * from {$table_name} a where 1=1 and a.idx = '{$code}' "; $res = mysql_query($sql,$connect_j3); $cinfo = mysql_fetch_array($res);
$sql = "select * from shop_bbs_file where b_table = '{$b_table}' and b_idx = '{$code}' "; $res = mysql_query($sql,$connect_j3); while($info = mysql_fetch_array($res)){ $b_file_array[$info['b_no']] = $info; } } else { $cinfo['w_name'] = $id_name; $cinfo['w_email'] = $id_email; $cinfo['e_ecode'] = $id_code; $cinfo['w_login_id'] = $id; }
if($cinfo['w_login_id']!='' && 1==1){ $비밀번호숨김클래스 = "screen_out"; } if($cinfo['w_notice']=='1'){ $공지사항필드 = "공지사항"; } else { $공지사항필드 = ""; }
$작성자필드 = "{$cinfo['w_name']}"; $이메일필드 = "{$cinfo['w_subject']}"; $비밀번호필드 = ""; $제목필드 = "{$cinfo['w_subject']}"; $내용필드 = "{$cinfo['w_content']}"; for($i=0;$i<$bbsinfo['b_file_cnt'];$i++){ $파일필드[$i] = ""; $file_info = $b_file_array[$i]; if($file_info['idx']!=''){ $파일필드[$i] .= " <a href='board_download.php?b_table={$b_table}&idx={$code}&b_no={$i}'><b>{$file_info['b_oriname']}</b> (".filesize_unit_rtn($file_info['b_filesize']).")</a>"; //$파일필드[$i] .= " <input type='checkbox' name='add_file_del[]' value='1'> 삭제"; } $파일필드[$i] .= "<br>"; }
if($bbsinfo['b_file_cnt']==0){ $파일숨김클래스 = "screen_out"; } if($bbsinfo['b_cate']==''){ $분류숨김클래스 = "screen_out"; } else{ $분류필드 = "{$cinfo['w_cate']}"; }
$히든필드 = "<input type='hidden' name='qstr' value=''> <input type='hidden' name='code' value='{$code}'> <input type='hidden' name='b_table' value='{$b_table}'> <input type='hidden' name='w_ecode' value='{$cinfo['e_ecode']}'> <input type='hidden' name='w_ccode' value='{$cinfo['w_ccode']}'> <input type='hidden' name='w_login_id' value='{$cinfo['w_login_id']}'>"; ?> <link href="<?php echo $j3_lib_url."/ckeditor/contents2.css";?>" rel="stylesheet" /> <div id="wrap" class='container_wrap'> <div id="sub-title"> <h2><?php echo $bbsinfo['b_title'];?> 게시판 보기</h2> <div class="sub-location"> <a href="./index.php" class="home"><span class="screen_out">홈</span></a> <span class="location-gt"></span> <a>게시판관리</a> <span class="location-gt"></span> <a><?php echo $bbsinfo['b_title'];?> 게시판</a> </div> </div>
<form name='board_reg_form' method='post' action='ajax.board_reg_process.php' enctype="multipart/form-data"> <?php echo $히든필드;?>
<div class='cust_modal1'> <h4>기본 정보</h4> <table class="order-sheet table-top-border"> <caption class="screen_out">기본정보</caption> <colgroup> <col style="width:200px;"><col style="width:800px;"> </colgroup>
<tbody> <tr> <th>공지사항</th> <td> <?php echo $공지사항필드;?> </td> </tr> <tr class='<?php echo $분류숨김클래스;?>'> <th>분류</th> <td> <?php echo $분류필드;?> </td> </tr> <tr> <th>작성자</th> <td> <?php echo $작성자필드;?> </td> </tr> <tr> <th>이메일</th> <td> <?php echo $이메일필드;?> </td> </tr> <tr class='<?php echo $비밀번호숨김클래스;?>'> <th>비밀번호</th> <td> <?php echo $비밀번호필드;?> </td> </tr> <tr> <th>제목</th> <td> <?php echo $제목필드;?> </td> </tr> <tr> <th>내용</th> <td class='content_class'> <?php echo $내용필드;?> </td> </tr> <tr class='<?php echo $파일숨김클래스;?>'> <th>첨부파일</th> <td> <?php foreach($파일필드 as $key=>$val){ echo $val; } ?> </td> </tr> </table> </div>
</form> <div id="sub-contents-area" style='padding-left:500px;padding-top:20px;'> <div class="sub-btn-area"> <div class="sub-btn"> <a class="blue-btn" id='btn_board_edit'>수정</a> <a class="lignt-blue-btn" id='btn_board_reply'>답변</a> <a class="gray-btn" id='btn_cancel_save'>목록</a> </div> </div> </div> <div> <?php include("./board_comm.inc.php")?> </div> </div> <!-- wrap end--> <script>
$(function(){ $("#btn_board_edit").click(function(){ // 수정 document.location.href="board_reg.php?b_table=<?php echo $b_table;?>&code=<?php echo $code;?>"; }); $("#btn_board_reply").click(function(){ // 답변 document.location.href="board_reg.php?b_table=<?php echo $b_table;?>&pcode=<?php echo $code;?>"; }); $("#btn_cancel_save").click(function(){ // 취소 document.location.href="board.php?<?php echo $_COOKIE['qstr'];?>"; });
$b_cont_img_size = '<?php echo $bbsinfo['b_cont_img_size'];?>'; if($b_cont_img_size>'0'){ $(".content_class img").each(function(){ i_width = $(this).width(); i_height = $(this).height(); if(i_width>$b_cont_img_size){ n_height = $b_cont_img_size/i_width*i_height; $(this).css("width",$b_cont_img_size+"px").css("height",n_height+"px"); } }); } }) </script> <?php include($j3_adm_path."/shop_footer.php"); ?>
|