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.

494 lines
27 KiB

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 class="row">
  7. <div class="col-sm-3">
  8. <ul class="nav nav-cards">
  9. <li role="presentation"><a class="card selected"><?=empty($brd_key)?'게시판 신규 등록': "게시판 정보 수정";?></a></li>
  10. <?php if($brd_key) : ?>
  11. <li role="presentation"><a class="card" href="<?=base_url('admin/board/category/'.$brd_key)?>">카테고리 설정</a></li>
  12. <?php endif;?>
  13. </ul>
  14. </div>
  15. <div class="col-sm-9">
  16. <div class="panel panel-dark">
  17. <div class="panel-heading">
  18. <h4 class="panel-title">기본 설정</h4>
  19. </div>
  20. <div class="panel-body">
  21. <div class="form-group">
  22. <label class="control-label">게시판 고유 </label>
  23. <div class="controls">
  24. <input class="form-control form-control-inline" maxlength="20" name="brd_key" value="<?=element('brd_key', $view)?>" <?=$brd_key?'readonly':'required'?>>
  25. <?php if (empty($brd_key)) : ?>
  26. <button type="button" class="btn btn-default ML10" id="btn-check-brd-key"><i class="far fa-check"></i> 중복 확인</button>
  27. <?php endif;?>
  28. </div>
  29. </div>
  30. <div class="form-group">
  31. <label class="control-label">게시판 이름</label>
  32. <div class="controls">
  33. <input class="form-control" name="brd_title" value="<?=element('brd_title', $view)?>" required>
  34. </div>
  35. <label class="control-label">게시판 이름 (모바일)</label>
  36. <div class="controls">
  37. <input class="form-control" name="brd_title_m" value="<?=element('brd_title_m', $view)?>">
  38. </div>
  39. </div>
  40. <div class="form-group">
  41. <label class="control-label">게시판 키워드</label>
  42. <div class="controls">
  43. <input class="form-control" name="brd_keywords" value="<?=element('brd_keywords', $view)?>">
  44. </div>
  45. </div>
  46. <div class="form-group">
  47. <label class="control-label">요약 설명</label>
  48. <div class="controls">
  49. <textarea class="form-control" name="brd_description" rows="4"><?=element('brd_description', $view)?></textarea>
  50. </div>
  51. </div>
  52. <div class="form-group">
  53. <label class="control-label">게시판 스킨</label>
  54. <div class="controls">
  55. <select class="form-control" name="brd_skin">
  56. <?php foreach($skin_list as $skin) : ?>
  57. <option value="<?=$skin?>" <?=$skin==element('brd_skin',$view)?'selected':''?>><?=$skin?></option>
  58. <?php endforeach;?>
  59. </select>
  60. </div>
  61. <label class="control-label">게시판 스킨 (모바일)</label>
  62. <div class="controls">
  63. <select class="form-control" name="brd_skin_m">
  64. <?php foreach($skin_list as $skin) : ?>
  65. <option value="<?=$skin?>" <?=$skin==element('brd_skin_m',$view)?'selected':''?>><?=$skin?></option>
  66. <?php endforeach;?>
  67. </select>
  68. </div>
  69. </div>
  70. <div class="form-group">
  71. <label class="control-label">검색 설정</label>
  72. <div class="controls">
  73. <label class="w-check">
  74. <input type="checkbox" name="brd_search" value="Y" <?=element('brd_search', $view, 'Y')=='Y'?'checked':''?>><span>전체 검색시 게시판의 글 노출</span>
  75. </label>
  76. </div>
  77. <label class="control-label">노출 순서</label>
  78. <div class="controls">
  79. <input type="number" class="form-control" name="brd_sort" value="<?=element('brd_sort', $view, 0)?>">
  80. </div>
  81. </div>
  82. <div class="form-group">
  83. <label class="control-label">카테고리 기능 사용</label>
  84. <div class="controls">
  85. <label class="w-check">
  86. <input type="checkbox" name="brd_use_category" value="Y" <?=element('brd_use_category', $view)=='Y'?'checked':''?>><span>카테고리 기능 사용</span>
  87. </label>
  88. </div>
  89. </div>
  90. </div>
  91. </div>
  92. <div class="panel panel-dark">
  93. <div class="panel-heading">
  94. <h4 class="panel-title">게시판 권한 설정</h4>
  95. </div>
  96. <div class="panel-body">
  97. <p class="alert alert-info"><i class="far fa-info-circle"></i> 레벨0은 비회원을 의미합니다.</p>
  98. <div class="form-group">
  99. <label class="control-label">목록 보기</label>
  100. <div class="controls">
  101. <select class="form-control" name="brd_lv_list">
  102. <?php for($i=0; $i<=10; $i++):?>
  103. <option value="<?=$i?>" <?=$i==element('brd_lv_list', $view, 0)?'selected':''?>><?=$i?></option>
  104. <?php endfor;?>
  105. </select>
  106. </div>
  107. <label class="control-label"> 내용 보기</label>
  108. <div class="controls">
  109. <select class="form-control" name="brd_lv_read">
  110. <?php for($i=0; $i<=10; $i++):?>
  111. <option value="<?=$i?>" <?=$i==element('brd_lv_read', $view, 0)?'selected':''?>><?=$i?></option>
  112. <?php endfor;?>
  113. </select>
  114. </div>
  115. </div>
  116. <div class="form-group">
  117. <label class="control-label"> 작성하기</label>
  118. <div class="controls">
  119. <select class="form-control" name="brd_lv_write">
  120. <?php for($i=0; $i<=10; $i++):?>
  121. <option value="<?=$i?>" <?=$i==element('brd_lv_write', $view, 0)?'selected':''?>><?=$i?></option>
  122. <?php endfor;?>
  123. </select>
  124. </div>
  125. <label class="control-label">답변글 작성</label>
  126. <div class="controls">
  127. <select class="form-control" name="brd_lv_reply">
  128. <?php for($i=0; $i<=10; $i++):?>
  129. <option value="<?=$i?>" <?=$i==element('brd_lv_reply', $view, 0)?'selected':''?>><?=$i?></option>
  130. <?php endfor;?>
  131. </select>
  132. </div>
  133. </div>
  134. <div class="form-group">
  135. <label class="control-label">댓글 작성</label>
  136. <div class="controls">
  137. <select class="form-control" name="brd_lv_comment">
  138. <?php for($i=0; $i<=10; $i++):?>
  139. <option value="<?=$i?>" <?=$i==element('brd_lv_comment', $view, 0)?'selected':''?>><?=$i?></option>
  140. <?php endfor;?>
  141. </select>
  142. </div>
  143. <label class="control-label">첨부파일 다운로드</label>
  144. <div class="controls">
  145. <select class="form-control" name="brd_lv_download">
  146. <?php for($i=0; $i<=10; $i++):?>
  147. <option value="<?=$i?>" <?=$i==element('brd_lv_download', $view, 0)?'selected':''?>><?=$i?></option>
  148. <?php endfor;?>
  149. </select>
  150. </div>
  151. </div>
  152. <div class="form-group">
  153. <label class="control-label">첨부파일 업로드</label>
  154. <div class="controls">
  155. <select class="form-control" name="brd_lv_upload">
  156. <?php for($i=0; $i<=10; $i++):?>
  157. <option value="<?=$i?>" <?=$i==element('brd_lv_upload', $view, 0)?'selected':''?>><?=$i?></option>
  158. <?php endfor;?>
  159. </select>
  160. </div>
  161. <label class="control-label"></label>
  162. <div class="controls"></div>
  163. </div>
  164. </div>
  165. </div>
  166. <div class="panel panel-dark">
  167. <div class="panel-heading">
  168. <h4 class="panel-title"> 목록 설정</h4>
  169. </div>
  170. <div class="panel-body">
  171. <p class="alert alert-info"><i class="far fa-info-circle"></i> 갤러리 형식의 게시판에서는 '목록에서 썸내일 불러오기' / '목록에서 첨부파일 불러오기' 활성화 하세요.</p>
  172. <div class="form-group">
  173. <label class="control-label">썸네일 생성하기</label>
  174. <div class="controls">
  175. <select class="form-control" name="brd_use_list_thumbnail">
  176. <option value="Y" <?=element('brd_use_list_thumbnail',$view,'N')=='Y'?'selected':''?>>생성하기</option>
  177. <option value="N" <?=element('brd_use_list_thumbnail',$view,'N')=='N'?'selected':''?>>생성하지 않기</option>
  178. </select>
  179. </div>
  180. <label class="control-label">썸네일 너비</label>
  181. <div class="controls">
  182. <input type="number" class="form-control" name="brd_thumb_width" value="<?=element('brd_thumb_width',$view,300)?>" min="0">
  183. </div>
  184. <label class="control-label">썸네일 높이</label>
  185. <div class="controls">
  186. <input type="number" class="form-control" name="brd_thumb_height" value="<?=element('brd_thumb_height',$view,300)?>" min="0">
  187. </div>
  188. </div>
  189. <div class="form-group">
  190. <label class="control-label">첨부파일 목록 불러오기</label>
  191. <div class="controls">
  192. <select class="form-control form-control-inline" name="brd_use_list_file">
  193. <option value="Y" <?=element('brd_use_list_file',$view,'N')=='Y'?'selected':''?>>불러오기</option>
  194. <option value="N" <?=element('brd_use_list_file',$view,'N')=='N'?'selected':''?>>불러오지 않기</option>
  195. </select>
  196. </div>
  197. </div>
  198. <div class="form-group">
  199. <label class="control-label">NEW 표시 시간</label>
  200. <div class="controls">
  201. <input type="number" class="form-control form-control-inline" name="brd_time_new" value="<?=element('brd_time_new', $view, 24)?>" min="0">
  202. </div>
  203. </div>
  204. <div class="form-group">
  205. <label class="control-label">HIT 표시 조회수</label>
  206. <div class="controls">
  207. <input type="number" class="form-control form-control-inline" name="brd_hit_count" value="<?=element('brd_hit_count', $view, 500)?>" min="0">
  208. </div>
  209. </div>
  210. </div>
  211. </div>
  212. <div class="panel panel-dark">
  213. <div class="panel-heading">
  214. <h4 class="panel-title"> 내용보기 설정</h4>
  215. </div>
  216. <div class="panel-body">
  217. <div class="form-group">
  218. <label class="control-label">내용보기 에서 목록</label>
  219. <div class="controls">
  220. <select class="form-control form-control-inline" name="brd_use_view_list">
  221. <option value="Y" <?=element('brd_use_view_list',$view,'N')=='Y'?'selected':''?>>불러오기</option>
  222. <option value="N" <?=element('brd_use_view_list',$view,'N')=='N'?'selected':''?>>불러오지 않기</option>
  223. </select>
  224. </div>
  225. </div>
  226. </div>
  227. </div>
  228. <div class="panel panel-dark">
  229. <div class="panel-heading">
  230. <h4 class="panel-title">페이지네이션 기능</h4>
  231. </div>
  232. <div class="panel-body">
  233. <div class="form-group">
  234. <label class="control-label">기능 사용여부</label>
  235. <div class="controls">
  236. <select class="form-control form-control-inline" name="brd_page_limit">
  237. <option value="Y" <?=element('brd_page_limit',$view,'Y')=='Y'?'selected':''?>>사용</option>
  238. <option value="N" <?=element('brd_page_limit',$view,'Y')=='N'?'selected':''?>>미사용</option>
  239. </select>
  240. </div>
  241. </div>
  242. <div class="form-group">
  243. <label class="control-label">페이지 </label>
  244. <div class="controls">
  245. <input type="number" class="form-control form-control-inline" name="brd_page_rows" value="<?=element('brd_page_rows', $view, 15)?>">
  246. </div>
  247. <label class="control-label">페이지 (모바일)</label>
  248. <div class="controls">
  249. <input type="number" class="form-control form-control-inline" name="brd_page_rows_m" value="<?=element('brd_page_rows_m', $view, 10)?>">
  250. </div>
  251. </div>
  252. <div class="form-group">
  253. <label class="control-label">표시할 페이지 </label>
  254. <div class="controls">
  255. <input type="number" class="form-control form-control-inline" name="brd_fixed_num" value="<?=element('brd_fixed_num', $view, 10)?>">
  256. </div>
  257. <label class="control-label">표시할 페이지 (모바일)</label>
  258. <div class="controls">
  259. <input type="number" class="form-control form-control-inline" name="brd_fixed_num_m" value="<?=element('brd_fixed_num_m', $view, 5)?>">
  260. </div>
  261. </div>
  262. </div>
  263. </div>
  264. <div class="panel panel-dark">
  265. <div class="panel-heading">
  266. <h4 class="panel-title">게시판 기능 설정</h4>
  267. </div>
  268. <div class="panel-body">
  269. <div class="form-group">
  270. <label class="control-label">시간 표시 형식</label>
  271. <div class="controls">
  272. <select class="form-control form-control-inline" name="brd_display_time">
  273. <option value="sns" <?=element('brd_use_anonymous',$view)=='sns'?'selected':''?>>SNS형식</option>
  274. <option value="basic" <?=element('brd_use_anonymous',$view)=='basic'?'selected':''?>>기본형</option>
  275. <option value="full" <?=element('brd_use_anonymous',$view)=='full'?'selected':''?>>전체표시</option>
  276. </select>
  277. </div>
  278. </div>
  279. <div class="form-group">
  280. <label class="control-label">익명 기능 사용</label>
  281. <div class="controls">
  282. <select class="form-control form-control-inline" name="brd_use_anonymous">
  283. <option value="Y" <?=element('brd_use_anonymous',$view)=='Y'?'selected':''?>>사용</option>
  284. <option value="N" <?=element('brd_use_anonymous',$view)=='N'?'selected':''?>>미사용</option>
  285. <option value="A" <?=element('brd_use_anonymous',$view)=='A'?'selected':''?>>항상 사용</option>
  286. </select>
  287. </div>
  288. <label class="control-label">비밀글 기능 사용</label>
  289. <div class="controls">
  290. <select class="form-control form-control-inline" name="brd_use_secret">
  291. <option value="Y" <?=element('brd_use_secret',$view)=='Y'?'selected':''?>>사용</option>
  292. <option value="N" <?=element('brd_use_secret',$view)=='N'?'selected':''?>>미사용</option>
  293. <option value="A" <?=element('brd_use_secret',$view)=='A'?'selected':''?>>항상 사용</option>
  294. </select>
  295. </div>
  296. <label class="control-label">답글 기능 사용</label>
  297. <div class="controls">
  298. <select class="form-control form-control-inline" name="brd_use_reply">
  299. <option value="Y" <?=element('brd_use_reply',$view)=='Y'?'selected':''?>>사용</option>
  300. <option value="N" <?=element('brd_use_reply',$view)=='N'?'selected':''?>>미사용</option>
  301. </select>
  302. </div>
  303. </div>
  304. <div class="form-group">
  305. <label class="control-label">댓글 기능 사용</label>
  306. <div class="controls">
  307. <select class="form-control form-control-inline" name="brd_use_comment">
  308. <option value="Y" <?=element('brd_use_comment',$view)=='Y'?'selected':''?>>사용</option>
  309. <option value="N" <?=element('brd_use_comment',$view)=='N'?'selected':''?>>미사용</option>
  310. </select>
  311. </div>
  312. <label class="control-label">위지윅 에디터 사용</label>
  313. <div class="controls">
  314. <select class="form-control form-control-inline" name="brd_use_wysiwyg">
  315. <option value="Y" <?=element('brd_use_wysiwyg',$view)=='Y'?'selected':''?>>사용</option>
  316. <option value="N" <?=element('brd_use_wysiwyg',$view)=='N'?'selected':''?>>미사용</option>
  317. </select>
  318. </div>
  319. <label class="control-label">파일 첨부 사용</label>
  320. <div class="controls">
  321. <select class="form-control form-control-inline" name="brd_use_attach">
  322. <option value="Y" <?=element('brd_use_attach',$view)=='Y'?'selected':''?>>사용</option>
  323. <option value="N" <?=element('brd_use_attach',$view)=='N'?'selected':''?>>미사용</option>
  324. </select>
  325. </div>
  326. </div>
  327. <div class="form-group">
  328. <label class="control-label">관리자 승인 글만 표시</label>
  329. <div class="controls">
  330. <select class="form-control form-control-inline" name="brd_use_assign">
  331. <option value="Y" <?=element('brd_use_assign',$view,'N')=='Y'?'selected':''?>>사용</option>
  332. <option value="N" <?=element('brd_use_assign',$view,'N')=='N'?'selected':''?>>미사용</option>
  333. </select>
  334. <p class="help-block"><i class="fal fa-exclamation-circle"></i> 승인된 글만 표시하는 기능을 사용하여, 사이트에 불리한 내용을 숨기거나 하는경우 소비자보호센터의 제재를 받을 있습니다.</p>
  335. </div>
  336. </div>
  337. </div>
  338. </div>
  339. <div class="panel panel-dark">
  340. <div class="panel-heading">
  341. <h4 class="panel-title"><?=$this->site->config('point_name')?> 설정</h4>
  342. </div>
  343. <div class="panel-body">
  344. <?php if($this->site->config('point_use') == 'Y') :?>
  345. <p class="alert alert-info"><i class="far fa-info-circle"></i> <?=$this->site->config('point_name')?> 지급은 +값, <?=$this->site->config('point_name')?> 차감은 -값을 입력합니다.<br><i class="far fa-info-circle"></i> 포인트 차감이 설정된 경우 강제로 회원전용 기능으로 전환합니다.</p>
  346. <?php else :?>
  347. <p class="alert alert-info"><i class="far fa-info-circle"></i> <?=$this->site->config('point_name')?> 기능을 사용 하는경우만 아래 옵션이 활성화 됩니다.</p>
  348. <?php endif;?>
  349. <div class="form-group">
  350. <label class="control-label">글쓰기</label>
  351. <div class="controls">
  352. <input type="number" class="form-control" name="brd_point_write" value="<?=element('brd_point_write', $view, 0)?>" <?=$this->site->config('point_use') != 'Y'?'readonly':''?>>
  353. </div>
  354. <label class="control-label">답글쓰기</label>
  355. <div class="controls">
  356. <input type="number" class="form-control" name="brd_point_reply" value="<?=element('brd_point_reply', $view, 0)?>" <?=$this->site->config('point_use') != 'Y'?'readonly':''?>>
  357. </div>
  358. <label class="control-label">댓글쓰기</label>
  359. <div class="controls">
  360. <input type="number" class="form-control" name="brd_point_comment" value="<?=element('brd_point_comment', $view, 0)?>" <?=$this->site->config('point_use') != 'Y'?'readonly':''?>>
  361. </div>
  362. </div>
  363. <div class="form-group">
  364. <label class="control-label">내용 보기</label>
  365. <div class="controls">
  366. <input type="number" class="form-control" name="brd_point_read" value="<?=element('brd_point_read', $view, 0)?>" <?=$this->site->config('point_use') != 'Y'?'readonly':''?>>
  367. </div>
  368. <label class="control-label">첨부파일 다운</label>
  369. <div class="controls">
  370. <input type="number" class="form-control" name="brd_point_download" value="<?=element('brd_point_download', $view, 0)?>" <?=$this->site->config('point_use') != 'Y'?'readonly':''?>>
  371. </div>
  372. <label class="control-label"></label>
  373. <div class="controls"></div>
  374. </div>
  375. </div>
  376. </div>
  377. <div class="panel panel-dark">
  378. <div class="panel-heading">
  379. <h4 class="panel-title">검색엔진 최적화 설정</h4>
  380. </div>
  381. <div class="panel-body">
  382. <div class="form-group">
  383. <label class="control-label">통합 RSS</label>
  384. <div class="controls">
  385. <select class="form-control form-control-inline" name="brd_use_total_rss">
  386. <option value="Y" <?=element('brd_use_total_rss',$view)=='Y'?'selected':''?>>포함</option>
  387. <option value="N" <?=element('brd_use_total_rss',$view)=='N'?'selected':''?>>포함하지 않기</option>
  388. </select>
  389. </div>
  390. <label class="control-label">게시판 RSS</label>
  391. <div class="controls">
  392. <select class="form-control form-control-inline" name="brd_use_rss">
  393. <option value="Y" <?=element('brd_use_rss',$view)=='Y'?'selected':''?>>사용</option>
  394. <option value="N" <?=element('brd_use_rss',$view)=='N'?'selected':''?>>미사용</option>
  395. </select>
  396. </div>
  397. <label class="control-label">사이트맵 노출</label>
  398. <div class="controls">
  399. <select class="form-control form-control-inline" name="brd_use_sitemap">
  400. <option value="Y" <?=element('brd_use_sitemap',$view)=='Y'?'selected':''?>>노출</option>
  401. <option value="N" <?=element('brd_use_sitemap',$view)=='N'?'selected':''?>>감추기</option>
  402. </select>
  403. </div>
  404. </div>
  405. <div class="form-group">
  406. <label class="control-label">네이버 신디케이션 연동</label>
  407. <div class="controls">
  408. <select class="form-control form-control-inline" name="brd_use_naver_syndi">
  409. <option value="Y" <?=element('brd_use_naver_syndi', $view)=='Y'?'selected':''?>>사용</option>
  410. <option value="N" <?=element('brd_use_naver_syndi', $view)=='N'?'selected':''?>>사용</option>
  411. </select>
  412. </div>
  413. </div>
  414. </div>
  415. </div>
  416. <div class="H10"></div>
  417. <div class="text-center">
  418. <button class="btn btn-primary btn-lg">저장하기</button>
  419. </div>
  420. </div>
  421. </div>
  422. <?=form_close()?>
  423. <div class="H30"></div>
  424. <script>
  425. $(document).ready(function(){
  426. $("select[name='brd_page_limit']").change(function(){
  427. if( $(this).find('option:selected').val() == 'Y' )
  428. {
  429. $("input[name='brd_page_rows'], input[name='brd_page_rows_m'], input[name='brd_fixed_num'], input[name='brd_fixed_num_m']").removeAttr('readonly');
  430. }
  431. else {
  432. $("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');
  433. }
  434. }).change();
  435. $("select[name='brd_use_list_thumbnail']").change(function(){
  436. if( $(this).find('option:selected').val() == 'Y' )
  437. {
  438. $("input[name='brd_thumb_width'], input[name='brd_thumb_height']").removeAttr('readonly');
  439. }
  440. else {
  441. $("input[name='brd_thumb_width'], input[name='brd_thumb_height']").attr('readonly', 'readonly');
  442. }
  443. }).change();
  444. $("#btn-check-brd-key").click(brd_key_check);
  445. });
  446. var brd_key_check = function(){
  447. var $el = $("input[name='brd_key']");
  448. var value = $el.val().trim();
  449. var check = APP.BOARD.keyCheck(value);
  450. if( check === true )
  451. {
  452. alert('사용가능한 키 입니다.');
  453. }
  454. else {
  455. alert(check);
  456. $el.focus();
  457. }
  458. }
  459. </script>