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
|
<?php include_once("./_common.php");
$bbsinfo = bbs_info($b_table); // 게시판 정보 가져오기 //$cust_info = customer_info_get($id_ccode); // 회원 정보 가져오기 $cust_info = $cinfo;
if($idx!=''){ $cinfo = board_info_get($bbsinfo,$idx); $b_file_array = $cinfo['file_array']; if($cinfo['w_ccode']!=$id_ccode && $cinfo['w_login_id']!=''){ alert('수정하실 권한이 없습니다.'); exit; } } else if($pcode!=''){ $pinfo = board_info_get($bbsinfo,$pcode);
$cinfo['w_name'] = $cust_info['comp_name']; $cinfo['w_email'] = $cust_info['email']; $cinfo['w_subject'] = "Re: {$pinfo['w_subject']}"; } else { $cinfo['w_name'] = $cust_info['comp_name']; $cinfo['w_email'] = $cust_info['email']; }
if($bbsinfo['b_uload_lv']<=$cust_info['mb_lv']){ for($i=0;$i<$bbsinfo['b_file_cnt'];$i++){ $파일필드[$i] = "<input type='file' name='add_file[]'>"; $file_info = $b_file_array[$i]; if($file_info['idx']!=''){ $파일필드[$i] .= " <a href='{$j3_adm_url}/board_download.php?b_table={$b_table}&idx={$idx}&b_no={$i}'>{$file_info['b_oriname']}</a>"; $파일필드[$i] .= " <input type='checkbox' name='add_file_del_{$i}' value='1'> 삭제"; } $파일필드[$i] .= "<br>"; } } else { $파일숨김클래스 = "screen_out"; }
if($bbsinfo['b_file_cnt']==0){ $파일숨김클래스 = "screen_out"; } if($bbsinfo['b_cate']==''){ $분류숨김클래스 = "screen_out"; } else{ $분류필드 = "<select name='w_cate'>"; $cate_array = explode("|",$bbsinfo['b_cate']); $분류필드 .= "<option value=''>--선택--</option>"; foreach($cate_array as $key=>$val){ if($cinfo['w_cate']==$val){ $std = "selected"; } else { $std = ""; } $분류필드 .= "<option value='{$val}' {$std}>{$val}</option>"; } $분류필드 .= "</select>"; }
if($idx==''){ if($id_ccode!=''){ $비번숨김클래스 = "screen_out"; } // 비회원일때만 비번보임 } else { if($cinfo['w_login_id']!=''){ $비번숨김클래스 = "screen_out"; } }
$히든필드 = "<input type='hidden' name='qstr' value=''> <input type='hidden' name='idx' value='{$idx}'> <input type='hidden' name='pcode' value='{$pcode}'> <input type='hidden' name='b_table' value='{$b_table}'> ";
if($idx==''){ $title = "작성"; } else { $title = "수정"; } ?> <form name='board_reg_form' id='board_reg_form' method='post' action='ajax.board_reg_process.php' enctype="multipart/form-data"> <?php echo $히든필드;?>
<div class="p10_20"> <h4 class="mt10 mb10 l_height30 txt17 align_l bold"><?php echo $bbsinfo['b_title'];?> 게시판 <?php echo $title; ?></h4> <table class="block width_full top_bold_line"> <colgroup> <col class="width140"><col class="width845"> </colgroup>
<tbody> <tr class='<?php echo $분류숨김클래스;?>'> <th class="pt10 pb10 pl20 txt14 gray2 gray_line_b2">분류</th> <td colspan="3" class="pt10 pb10 pl20 txt14 gray2 gray_line_b2"> <?php echo $분류필드;?> </td> </tr> <tr> <th class="pt10 pb10 pl20 txt14 gray2 gray_line_b2">작성자</th> <td colspan="3" class="pt10 pb10 pl20 txt14 gray2 gray_line_b2"> <input type='text' name='w_name' class="box100_30 gray_line" value='<?php echo $cinfo['w_name'];?>'> </td> </tr> <tr> <th class="pt10 pb10 pl20 txt14 gray2 gray_line_b2">이메일</th> <td colspan="3" class="pt10 pb10 pl20 txt14 gray2 gray_line_b2"> <input type='text' name='w_email' class="box170_30 gray_line" value='<?php echo $cinfo['w_email'];?>'> </td> </tr> <tr class='<?php echo $비번숨김클래스;?> password_tr_class'> <th class="pt10 pb10 pl20 txt14 gray2 gray_line_b2">비밀번호</th> <td colspan="3" class="pt10 pb10 pl20 txt14 gray2 gray_line_b2"> <input type='password' name='w_passwd' class="box100_30 gray_line" value=''> </td> </tr> <tr> <th class="pt10 pb10 pl20 txt14 gray2 gray_line_b2">제목</th> <td colspan="3" class="pt10 pb10 pl20 txt14 gray2 gray_line_b2"> <input type='text' name='w_subject' class="box340_30 gray_line" value='<?php echo $cinfo['w_subject'];?>'> </td> </tr> <tr> <th class="pt10 pb10 pl20 txt14 gray2 gray_line_b2">내용</th> <td colspan="3" class="pt10 pb10 pl20 txt14 gray2 gray_line_b2"> <textarea name='w_content' id='w_content' class="width_full height130 l_height20 gray_line"><?php echo $cinfo['w_content'];?></textarea> </td> </tr> <tr class='<?php echo $파일숨김클래스;?>'> <th class="pt10 pb10 pl20 txt14 gray2 gray_line_b2 ">첨부파일</th> <td colspan="3" class="pt10 pb10 pl20 txt14 gray2 gray_line_b2" style='line-height:27px;'> <?php foreach($파일필드 as $key=>$val){ echo $val; } ?> </td> </tr> <tr class='<?php echo $비번숨김클래스;?>'> <th class="pt10 pb10 pl20 txt14 gray2 gray_line_b2">스팸방지 코드</th> <td colspan="3" class="pt10 pb10 pl20 txt14 gray2 gray_line_b2"> <?php // 스팸방지 확인 적용 JS에서 human_check() 함수이용 true일경우 진행 POST된 값에서 $_REQUEST['g-recaptcha-response'] 값이 있으면 true include_once("{$j3_lib_path}/scaptcha/simple-php-captcha.php"); $captcha = simple_php_captcha(); $_SESSION['captcha'] = $captcha; $_SESSION['captcha_code'] = $captcha['code']; $c_code = captcha_str_ch($_SESSION['captcha']['code']); echo "{$c_code}"; echo " <input type='text' name='captcha_input' class='height26 gray_line'>"; ?> </td> </tr> </table> </div> </form> <script> <?php if($shop_du_size>$limit_mbyte){ ?> CKEDITOR.replace( 'w_content', { height: 230, filebrowserUploadUrl:"" } ); <?php } else { ?> CKEDITOR.replace( 'w_content', { height: 230 } ); <?php } ?> </script>
|