You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

484 lines
22 KiB

7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
  1. <div class="page-header">
  2. <h1 class="page-title"><?=empty($brd_key)?'게시판 신규 등록': "[{$view['brd_title']}] 게시판 정보 수정";?></h1>
  3. </div>
  4. <?=validation_errors('<p class="alert alert-danger">')?>
  5. <?=form_open(NULL, array("autocomplete"=>"off","data-form"=>"board-form",'class'=>'form-flex'))?>
  6. <div data-ax-tbl>
  7. <div class="caption">게시판 기본 설정</div>
  8. <div data-ax-tr>
  9. <div data-ax-td>
  10. <div data-ax-td-label>게시판 고유 </div>
  11. <div data-ax-td-wrap>
  12. <input class="form-control form-control-inline" maxlength="20" name="brd_key" value="<?=element('brd_key', $view)?>" <?=$brd_key?'readonly':'required'?>>
  13. <p class="help-block">4-20자의 영어소문자</p>
  14. </div>
  15. </div>
  16. <div data-ax-td>
  17. <div data-ax-td-wrap>
  18. <?php if (empty($brd_key)) : ?>
  19. <button type="button" class="btn btn-default btn-sm ML10" id="btn-check-brd-key"><i class="fal fa-check"></i> 중복 확인</button>
  20. <?php endif;?>
  21. </div>
  22. </div>
  23. </div>
  24. <div data-ax-tr>
  25. <div data-ax-td>
  26. <div data-ax-td-label>게시판 이름</div>
  27. <div data-ax-td-wrap>
  28. <input class="form-control" name="brd_title" maxlength="30" value="<?=element('brd_title', $view)?>" required>
  29. </div>
  30. </div>
  31. <div data-ax-td>
  32. <div data-ax-td-label>게시판 형태</div>
  33. <div data-ax-td-wrap>
  34. <select class="form-control" name="brd_type">
  35. <option value="list" <?=element('brd_type', $view)=='list'?'selected':''?>>목록형</option>
  36. <option value="gallery" <?=element('brd_type', $view)=='gallery'?'selected':''?>>앨범형</option>
  37. <option value="webzine" <?=element('brd_type', $view)=='webzine'?'selected':''?>>웹진형</option>
  38. </select>
  39. </div>
  40. </div>
  41. </div>
  42. <div data-ax-tr>
  43. <div data-ax-td class="width-100">
  44. <div data-ax-td-label>게시판 키워드</div>
  45. <div data-ax-td-wrap>
  46. <input class="form-control" name="brd_keywords" value="<?=element('brd_keywords', $view)?>">
  47. </div>
  48. </div>
  49. </div>
  50. <div data-ax-tr>
  51. <div data-ax-td class="width-100">
  52. <div data-ax-td-label>게시판 요약설명</div>
  53. <div data-ax-td-wrap>
  54. <textarea class="form-control" name="brd_description" data-autosize><?=element('brd_description', $view)?></textarea>
  55. </div>
  56. </div>
  57. </div>
  58. <div data-ax-tr>
  59. <div data-ax-td class="width-100">
  60. <div data-ax-td-label>카테고리</div>
  61. <div data-ax-td-wrap>
  62. <label class="w-check">
  63. <input type="checkbox" name="brd_use_category" value="Y" <?=element('brd_use_category', $view)=='Y'?'checked':''?>><span>기능 사용</span>
  64. </label>
  65. </div>
  66. </div>
  67. </div>
  68. <div data-ax-tr>
  69. <div data-ax-td class="width-100">
  70. <div data-ax-td-label>카테고리 목록</div>
  71. <div data-ax-td-wrap>
  72. <input class="form-control" name="brd_category" value="<?=element('brd_category', $view)?>" maxlength="255">
  73. <p class="help-block">카테고리를 세미콜론(;)으로 여러개를 입력해주세요. ex) 자유;정보;잡담</p>
  74. </div>
  75. </div>
  76. </div>
  77. <div data-ax-tr>
  78. <div data-ax-td class="width-100">
  79. <div data-ax-td-label>시간 표시형식</div>
  80. <div data-ax-td-wrap>
  81. <select class="form-control form-control-inline" name="brd_display_time">
  82. <option value="sns" <?=element('brd_use_anonymous',$view)=='sns'?'selected':''?>>SNS형식</option>
  83. <option value="basic" <?=element('brd_use_anonymous',$view)=='basic'?'selected':''?>>기본형</option>
  84. <option value="full" <?=element('brd_use_anonymous',$view)=='full'?'selected':''?>>전체표시</option>
  85. </select>
  86. </div>
  87. </div>
  88. </div>
  89. </div>
  90. <div class="H10"></div>
  91. <div data-ax-tbl>
  92. <div class="caption">페이지 기능</div>
  93. <div data-ax-tr>
  94. <div data-ax-td>
  95. <div data-ax-td-label>페이지 기능</div>
  96. <div data-ax-td-wrap>
  97. <select class="form-control form-control-inline" name="brd_page_limit">
  98. <option value="Y" <?=element('brd_page_limit',$view,'Y')=='Y'?'selected':''?>>사용</option>
  99. <option value="N" <?=element('brd_page_limit',$view,'Y')=='N'?'selected':''?>>미사용</option>
  100. </select>
  101. </div>
  102. </div>
  103. </div>
  104. <div data-ax-tr>
  105. <div data-ax-td>
  106. <div data-ax-td-label>한페이지 글수</div>
  107. <div data-ax-td-wrap>
  108. <input type="number" min="0" class="form-control form-control-inline" name="brd_page_rows" value="<?=element('brd_page_rows', $view, 15)?>" required>
  109. </div>
  110. </div>
  111. <div data-ax-td>
  112. <div data-ax-td-label>모바일</div>
  113. <div data-ax-td-wrap>
  114. <input type="number" min="0" class="form-control form-control-inline" name="brd_page_rows_m" value="<?=element('brd_page_rows_m', $view, 10)?>" required>
  115. </div>
  116. </div>
  117. </div>
  118. <div data-ax-tr>
  119. <div data-ax-td>
  120. <div data-ax-td-label>한번에 표시 페이지</div>
  121. <div data-ax-td-wrap>
  122. <input type="number" min="0" class="form-control" name="brd_fixed_num" value="<?=element('brd_fixed_num', $view, 10)?>" required>
  123. </div>
  124. </div>
  125. <div data-ax-td>
  126. <div data-ax-td-label>모바일</div>
  127. <div data-ax-td-wrap>
  128. <input type="number" min="0" class="form-control" name="brd_fixed_num_m" value="<?=element('brd_fixed_num_m', $view, 10)?>" required>
  129. </div>
  130. </div>
  131. </div>
  132. </div>
  133. <div class="H10"></div>
  134. <div data-ax-tbl>
  135. <div class="caption">게시판 스킨 설정</div>
  136. <div data-ax-tr>
  137. <div data-ax-td>
  138. <div data-ax-td-label>목록 스킨</div>
  139. <div data-ax-td-wrap>
  140. <select class="form-control" name="brd_skin_l">
  141. <?php foreach($skin_list_l as $skin) : ?>
  142. <option value="<?=$skin?>" <?=$skin==element('brd_skin_l',$view)?'selected':''?>><?=$skin?></option>
  143. <?php endforeach;?>
  144. </select>
  145. </div>
  146. </div>
  147. <div data-ax-td>
  148. <div data-ax-td-label>모바일</div>
  149. <div data-ax-td-wrap>
  150. <select class="form-control" name="brd_skin_l_m">
  151. <?php foreach($skin_list_l as $skin) : ?>
  152. <option value="<?=$skin?>" <?=$skin==element('brd_skin_l_m',$view)?'selected':''?>><?=$skin?></option>
  153. <?php endforeach;?>
  154. </select>
  155. </div>
  156. </div>
  157. </div>
  158. <div data-ax-tr>
  159. <div data-ax-td>
  160. <div data-ax-td-label>글쓰기 스킨</div>
  161. <div data-ax-td-wrap>
  162. <select class="form-control" name="brd_skin_w">
  163. <?php foreach($skin_list_w as $skin) : ?>
  164. <option value="<?=$skin?>" <?=$skin==element('brd_skin_w',$view)?'selected':''?>><?=$skin?></option>
  165. <?php endforeach;?>
  166. </select>
  167. </div>
  168. </div>
  169. <div data-ax-td>
  170. <div data-ax-td-label>모바일</div>
  171. <div data-ax-td-wrap>
  172. <select class="form-control" name="brd_skin_w_m">
  173. <?php foreach($skin_list_w as $skin) : ?>
  174. <option value="<?=$skin?>" <?=$skin==element('brd_skin_w_m',$view)?'selected':''?>><?=$skin?></option>
  175. <?php endforeach;?>
  176. </select>
  177. </div>
  178. </div>
  179. </div>
  180. <div data-ax-tr>
  181. <div data-ax-td>
  182. <div data-ax-td-label>글내용 보기 스킨</div>
  183. <div data-ax-td-wrap>
  184. <select class="form-control" name="brd_skin_v">
  185. <?php foreach($skin_list_v as $skin) : ?>
  186. <option value="<?=$skin?>" <?=$skin==element('brd_skin_v',$view)?'selected':''?>><?=$skin?></option>
  187. <?php endforeach;?>
  188. </select>
  189. </div>
  190. </div>
  191. <div data-ax-td>
  192. <div data-ax-td-label>모바일</div>
  193. <div data-ax-td-wrap>
  194. <select class="form-control" name="brd_skin_v_m">
  195. <?php foreach($skin_list_v as $skin) : ?>
  196. <option value="<?=$skin?>" <?=$skin==element('brd_skin_v_m',$view)?'selected':''?>><?=$skin?></option>
  197. <?php endforeach;?>
  198. </select>
  199. </div>
  200. </div>
  201. </div>
  202. <div data-ax-tr>
  203. <div data-ax-td>
  204. <div data-ax-td-label>댓글 스킨</div>
  205. <div data-ax-td-wrap>
  206. <select class="form-control" name="brd_skin_c">
  207. <?php foreach($skin_list_c as $skin) : ?>
  208. <option value="<?=$skin?>" <?=$skin==element('brd_skin_c',$view)?'selected':''?>><?=$skin?></option>
  209. <?php endforeach;?>
  210. </select>
  211. </div>
  212. </div>
  213. <div data-ax-td>
  214. <div data-ax-td-label>모바일</div>
  215. <div data-ax-td-wrap>
  216. <select class="form-control" name="brd_skin_c_m">
  217. <?php foreach($skin_list_c as $skin) : ?>
  218. <option value="<?=$skin?>" <?=$skin==element('brd_skin_c_m',$view)?'selected':''?>><?=$skin?></option>
  219. <?php endforeach;?>
  220. </select>
  221. </div>
  222. </div>
  223. </div>
  224. </div>
  225. <div class="H10"></div>
  226. <div data-ax-tbl>
  227. <div class="caption">게시판 권한 설정</div>
  228. <div data-ax-tr>
  229. <div data-ax-td>
  230. <div data-ax-td-label>목록 보기</div>
  231. <div data-ax-td-wrap>
  232. <select class="form-control" name="brd_lv_list">
  233. <?php for($i=0; $i<=10; $i++):?>
  234. <option value="<?=$i?>" <?=$i==element('brd_lv_list', $view, 0)?'selected':''?>><?=$i?><?=$i==0?' (비회원)':''?></option>
  235. <?php endfor;?>
  236. </select>
  237. </div>
  238. </div>
  239. <div data-ax-td>
  240. <div data-ax-td-label> 작성</div>
  241. <div data-ax-td-wrap>
  242. <select class="form-control" name="brd_lv_write">
  243. <?php for($i=0; $i<=10; $i++):?>
  244. <option value="<?=$i?>" <?=$i==element('brd_lv_write', $view, 0)?'selected':''?>><?=$i?><?=$i==0?' (비회원)':''?></option>
  245. <?php endfor;?>
  246. </select>
  247. </div>
  248. </div>
  249. <div data-ax-td>
  250. <div data-ax-td-label> 내용 보기</div>
  251. <div data-ax-td-wrap>
  252. <select class="form-control" name="brd_lv_read">
  253. <?php for($i=0; $i<=10; $i++):?>
  254. <option value="<?=$i?>" <?=$i==element('brd_lv_read', $view, 0)?'selected':''?>><?=$i?><?=$i==0?' (비회원)':''?></option>
  255. <?php endfor;?>
  256. </select>
  257. </div>
  258. </div>
  259. </div>
  260. <div data-ax-tr>
  261. <div data-ax-td>
  262. <div data-ax-td-label>답글 작성</div>
  263. <div data-ax-td-wrap>
  264. <select class="form-control" name="brd_lv_reply">
  265. <?php for($i=0; $i<=10; $i++):?>
  266. <option value="<?=$i?>" <?=$i==element('brd_lv_reply', $view, 0)?'selected':''?>><?=$i?><?=$i==0?' (비회원)':''?></option>
  267. <?php endfor;?>
  268. </select>
  269. </div>
  270. </div>
  271. <div data-ax-td>
  272. <div data-ax-td-label>댓글 작성</div>
  273. <div data-ax-td-wrap>
  274. <select class="form-control" name="brd_lv_comment">
  275. <?php for($i=0; $i<=10; $i++):?>
  276. <option value="<?=$i?>" <?=$i==element('brd_lv_comment', $view, 0)?'selected':''?>><?=$i?><?=$i==0?' (비회원)':''?></option>
  277. <?php endfor;?>
  278. </select>
  279. </div>
  280. </div>
  281. <div data-ax-td>
  282. <div data-ax-td-label>첨부파일 다운</div>
  283. <div data-ax-td-wrap>
  284. <select class="form-control" name="brd_lv_download">
  285. <?php for($i=0; $i<=10; $i++):?>
  286. <option value="<?=$i?>" <?=$i==element('brd_lv_download', $view, 0)?'selected':''?>><?=$i?><?=$i==0?' (비회원)':''?></option>
  287. <?php endfor;?>
  288. </select>
  289. </div>
  290. </div>
  291. </div>
  292. </div>
  293. <div class="H10"></div>
  294. <div data-ax-tbl>
  295. <div data-ax-tr>
  296. <div data-ax-td>
  297. <div data-ax-td-label>답글 기능</div>
  298. <div data-ax-td-wrap>
  299. <select class="form-control form-control-inline" name="brd_use_reply">
  300. <option value="Y" <?=element('brd_use_reply',$view)=='Y'?'selected':''?>>사용</option>
  301. <option value="N" <?=element('brd_use_reply',$view)=='N'?'selected':''?>>미사용</option>
  302. </select>
  303. </div>
  304. </div>
  305. <div data-ax-td>
  306. <div data-ax-td-label>댓글 기능</div>
  307. <div data-ax-td-wrap>
  308. <select class="form-control form-control-inline" name="brd_use_comment">
  309. <option value="Y" <?=element('brd_use_comment',$view)=='Y'?'selected':''?>>사용</option>
  310. <option value="N" <?=element('brd_use_comment',$view)=='N'?'selected':''?>>미사용</option>
  311. </select>
  312. </div>
  313. </div>
  314. <div data-ax-td></div>
  315. </div>
  316. <div data-ax-tr>
  317. <div data-ax-td>
  318. <div data-ax-td-label>익명 기능</div>
  319. <div data-ax-td-wrap>
  320. <select class="form-control form-control-inline" name="brd_use_anonymous">
  321. <option value="Y" <?=element('brd_use_anonymous',$view)=='Y'?'selected':''?>>사용</option>
  322. <option value="N" <?=element('brd_use_anonymous',$view)=='N'?'selected':''?>>미사용</option>
  323. <option value="A" <?=element('brd_use_anonymous',$view)=='A'?'selected':''?>>항상 사용</option>
  324. </select>
  325. </div>
  326. </div>
  327. <div data-ax-td>
  328. <div data-ax-td-label>비밀글 기능</div>
  329. <div data-ax-td-wrap>
  330. <select class="form-control form-control-inline" name="brd_use_secret">
  331. <option value="Y" <?=element('brd_use_secret',$view)=='Y'?'selected':''?>>사용</option>
  332. <option value="N" <?=element('brd_use_secret',$view)=='N'?'selected':''?>>미사용</option>
  333. <option value="A" <?=element('brd_use_secret',$view)=='A'?'selected':''?>>항상 사용</option>
  334. </select>
  335. </div>
  336. </div>
  337. <div data-ax-td>
  338. <div data-ax-td-label>이름 * 처리</div>
  339. <div data-ax-td-wrap>
  340. <select class="form-control form-control-inline" name="brd_blind_nickname">
  341. <option value="Y" <?=element('brd_blind_nickname',$view, 'N')=='Y'?'selected':''?>>사용</option>
  342. <option value="N" <?=element('brd_blind_nickname',$view, 'N')=='N'?'selected':''?>>미사용</option>
  343. </select>
  344. <p class="help-block">관리자 <i class="fal fa-caret-right"></i> *</p>
  345. </div>
  346. </div>
  347. </div>
  348. </div>
  349. <div class="H10"></div>
  350. <?php if($this->site->config('point_use') != 'Y') :?>
  351. <p class="alert alert-info"><i class="fal fa-info-circle"></i> <?=$this->site->config('point_name')?> 기능을 사용 하는경우만 아래 옵션이 활성화 됩니다.</p>
  352. <div class="H10"></div>
  353. <?php endif;?>
  354. <div data-ax-tbl>
  355. <div class="caption"><?=$this->site->config('point_name')?> 설정</div>
  356. <div data-ax-tr>
  357. <div data-ax-td>
  358. <div data-ax-td-label>글쓰기 <?=$this->site->config('point_name')?></div>
  359. <div data-ax-td-wrap>
  360. <input type="number" class="form-control text-right" name="brd_point_write" value="<?=element('brd_point_write', $view, 0)?>" <?=$this->site->config('point_use') != 'Y'?'readonly':''?>>
  361. </div>
  362. <div data-ax-td-wrap>
  363. <select class="form-control" name="brd_point_write_flag">
  364. <option value="1" <?=element('brd_point_write_flag', $view, 1)=='1'?'selected':''?>>증가</option>
  365. <option value="-1" <?=element('brd_point_write_flag', $view, 1)=='-1'?'selected':''?>>차감</option>
  366. </select>
  367. </div>
  368. </div>
  369. <div data-ax-td>
  370. <div data-ax-td-label>답글쓰기 <?=$this->site->config('point_name')?></div>
  371. <div data-ax-td-wrap>
  372. <input type="number" class="form-control text-right" name="brd_point_reply" value="<?=element('brd_point_reply', $view, 0)?>" <?=$this->site->config('point_use') != 'Y'?'readonly':''?>>
  373. </div>
  374. <div data-ax-td-wrap>
  375. <select class="form-control" name="brd_point_reply_flag">
  376. <option value="1" <?=element('brd_point_reply_flag', $view, 1)=='1'?'selected':''?>>증가</option>
  377. <option value="-1" <?=element('brd_point_reply_flag', $view, 1)=='-1'?'selected':''?>>차감</option>
  378. </select>
  379. </div>
  380. </div>
  381. <div data-ax-td>
  382. <div data-ax-td-label>댓글쓰기 <?=$this->site->config('point_name')?></div>
  383. <div data-ax-td-wrap>
  384. <input type="number" class="form-control text-right" name="brd_point_comment" value="<?=element('brd_point_comment', $view, 0)?>" <?=$this->site->config('point_use') != 'Y'?'readonly':''?>>
  385. </div>
  386. <div data-ax-td-wrap>
  387. <select class="form-control" name="brd_point_comment_flag">
  388. <option value="1" <?=element('brd_point_comment_flag', $view, 1)=='1'?'selected':''?>>증가</option>
  389. <option value="-1" <?=element('brd_point_comment_flag', $view, 1)=='-1'?'selected':''?>>차감</option>
  390. </select>
  391. </div>
  392. </div>
  393. </div>
  394. <div data-ax-tr>
  395. <div data-ax-td>
  396. <div data-ax-td-label> 내용 보기</div>
  397. <div data-ax-td-wrap>
  398. <input type="number" class="form-control text-right" name="brd_point_read" value="<?=element('brd_point_read', $view, 0)?>" <?=$this->site->config('point_use') != 'Y'?'readonly':''?>>
  399. </div>
  400. <div data-ax-td-wrap>
  401. <select class="form-control" name="brd_point_read_flag">
  402. <option value="1" <?=element('brd_point_read_flag', $view, 1)=='1'?'selected':''?>>증가</option>
  403. <option value="-1" <?=element('brd_point_read_flag', $view, 1)=='-1'?'selected':''?>>차감</option>
  404. </select>
  405. </div>
  406. </div>
  407. <div data-ax-td>
  408. <div data-ax-td-label>첨부파일 다운</div>
  409. <div data-ax-td-wrap>
  410. <input type="number" class="form-control text-right" name="brd_point_download" value="<?=element('brd_point_download', $view, 0)?>" <?=$this->site->config('point_use') != 'Y'?'readonly':''?>>
  411. </div>
  412. <div data-ax-td-wrap>
  413. <select class="form-control" name="brd_point_download_flag">
  414. <option value="1" <?=element('brd_point_download_flag', $view, 1)=='1'?'selected':''?>>증가</option>
  415. <option value="-1" <?=element('brd_point_download_flag', $view, 1)=='-1'?'selected':''?>>차감</option>
  416. </select>
  417. </div>
  418. </div>
  419. <div data-ax-td></div>
  420. </div>
  421. </div>
  422. <div class="text-center MT15">
  423. <button class="btn btn-primary"><i class="fal fa-save"></i> 저장하기</button>
  424. </div>
  425. <?=form_close()?>
  426. <div class="H30"></div>
  427. <script>
  428. $(document).ready(function(){
  429. $('[name="brd_use_category"]').change(function() {
  430. var checked = $(this).prop('checked');
  431. if( checked ) $('[name="brd_category"]').removeAttr('disabled');
  432. else $('[name="brd_category"]').attr('disabled','disabled');
  433. }).change();
  434. $("select[name='brd_page_limit']").change(function(){
  435. if( $(this).find('option:selected').val() == 'Y' )
  436. {
  437. $("input[name='brd_page_rows'], input[name='brd_page_rows_m'], input[name='brd_fixed_num'], input[name='brd_fixed_num_m']").removeAttr('readonly');
  438. }
  439. else {
  440. $("input[name='brd_page_rows'], input[name='brd_page_rows_m'], input[name='brd_fixed_num'], input[name='brd_fixed_num_m']").attr('readonly', 'readonly');
  441. }
  442. }).change();
  443. $("select[name='brd_use_list_thumbnail']").change(function(){
  444. if( $(this).find('option:selected').val() == 'Y' )
  445. {
  446. $("input[name='brd_thumb_width'], input[name='brd_thumb_height']").removeAttr('readonly');
  447. }
  448. else {
  449. $("input[name='brd_thumb_width'], input[name='brd_thumb_height']").attr('readonly', 'readonly');
  450. }
  451. }).change();
  452. $("#btn-check-brd-key").click(brd_key_check);
  453. });
  454. var brd_key_check = function(){
  455. var $el = $("input[name='brd_key']");
  456. var value = $el.val().trim();
  457. var check = APP.BOARD.keyCheck(value);
  458. if( check === true )
  459. {
  460. alert('사용가능한 키 입니다.');
  461. }
  462. else {
  463. alert(check);
  464. $el.focus();
  465. }
  466. }
  467. </script>