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.

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