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.

172 lines
7.5 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
  1. <?=form_open_multipart(NULL ,array('class'=>'form-flex','autocomplete'=>'off'))?>
  2. <input type="hidden" name="bng_key" value="<?=$bng_key?>">
  3. <input type="hidden" name="ban_idx" value="<?=element('ban_idx', $view)?>">
  4. <div data-ax-tbl>
  5. <div data-ax-tr>
  6. <div data-ax-td class="width-100">
  7. <div data-ax-td-label>배너 이름</div>
  8. <div data-ax-td-wrap>
  9. <input class="form-control" name="ban_name" value="<?=element('ban_name', $view)?>" required maxlength="50">
  10. </div>
  11. </div>
  12. </div>
  13. <div data-ax-tr>
  14. <div data-ax-td class="width-100">
  15. <div data-ax-td-label>배너 표시/숨김</div>
  16. <div data-ax-td-wrap>
  17. <label class="w-radio"><input type="radio" name="ban_status" value="Y" <?=element('ban_status',$view,'Y')=='Y'?'checked':''?>><span>표시</span></label>
  18. <label class="w-radio"><input type="radio" name="ban_status" value="H" <?=element('ban_status',$view,'Y')=='H'?'checked':''?>><span>숨김</span></label>
  19. </div>
  20. </div>
  21. </div>
  22. <div data-ax-tr>
  23. <div data-ax-td class="width-100">
  24. <div data-ax-td-label>배너 파일</div>
  25. <div data-ax-td-wrap>
  26. <?=thumb_img(element('ban_filepath', $view),'img-responsive MB5')?>
  27. <input type="file" class="form-control" name="userfile">
  28. <?php if($banner_group['bng_width'] > 0) :?>
  29. <p class="help-block">권장 너비 : <?=$banner_group['bng_width']?>px</p>
  30. <?php endif;?>
  31. <?php if($banner_group['bng_height'] > 0) :?>
  32. <p class="help-block">권장 높이 : <?=$banner_group['bng_height']?>px</p>
  33. <?php endif;?>
  34. </div>
  35. </div>
  36. </div>
  37. </div>
  38. <?php if($banner_group['bng_ext1_use'] == 'Y' OR $banner_group['bng_ext2_use'] == 'Y' OR $banner_group['bng_ext3_use'] == 'Y' OR $banner_group['bng_ext4_use'] == 'Y' OR $banner_group['bng_ext5_use'] == 'Y') :?>
  39. <div class="H10"></div>
  40. <div data-ax-tbl>
  41. <?php endif;?>
  42. <?php for($i=1; $i<=5; $i++):
  43. if( $banner_group["bng_ext{$i}_use"] === 'Y' ) :
  44. ?>
  45. <div data-ax-tr>
  46. <div data-ax-td class="width-100">
  47. <div data-ax-td-label><?=$banner_group["bng_ext{$i}"]?></div>
  48. <div data-ax-td-wrap>
  49. <input class="form-control form-control-inline" name="ban_ext<?=$i?>" value="<?=element('ban_ext'.$i, $view)?>">
  50. </div>
  51. </div>
  52. </div>
  53. <?php
  54. endif;
  55. endfor;
  56. ?>
  57. <?php if($banner_group['bng_ext1_use'] == 'Y' OR $banner_group['bng_ext2_use'] == 'Y' OR $banner_group['bng_ext3_use'] == 'Y' OR $banner_group['bng_ext4_use'] == 'Y' OR $banner_group['bng_ext5_use'] == 'Y') :?>
  58. </div>
  59. <?php endif;?>
  60. <div class="H10"></div>
  61. <div data-ax-tbl>
  62. <div data-ax-tr>
  63. <div data-ax-td class="width-100">
  64. <div data-ax-td-label>클릭시 이동</div>
  65. <div data-ax-td-wrap>
  66. <label class="w-radio"><input type="radio" name="ban_link_use" value="Y" <?=element('ban_link_use',$view,'N')=='Y'?'checked':''?>><span>사용</span></label>
  67. <label class="w-radio"><input type="radio" name="ban_link_use" value="N" <?=element('ban_link_use',$view,'N')=='N'?'checked':''?>><span>미사용</span></label>
  68. </div>
  69. </div>
  70. </div>
  71. <div data-ax-tr>
  72. <div data-ax-td class="width-100">
  73. <div data-ax-td-label>이동 URL</div>
  74. <div data-ax-td-wrap>
  75. <input class="form-control" name="ban_link_url" value="<?=element('ban_link_url', $view)?>">
  76. </div>
  77. </div>
  78. </div>
  79. <div data-ax-tr>
  80. <div data-ax-td class="width-100">
  81. <div data-ax-td-label>이동 방식</div>
  82. <div data-ax-td-wrap>
  83. <label class="w-radio"><input type="radio" name="ban_link_type" value="Y" <?=element('ban_link_type',$view,'N')=='Y'?'checked':''?>><span>새 탭으로</span></label>
  84. <label class="w-radio"><input type="radio" name="ban_link_type" value="N" <?=element('ban_link_type',$view,'N')=='N'?'checked':''?>><span>현재창에서</span></label>
  85. </div>
  86. </div>
  87. </div>
  88. </div>
  89. <div class="H10"></div>
  90. <div data-ax-tbl>
  91. <div data-ax-tr>
  92. <div data-ax-td class="width-100">
  93. <div data-ax-td-label>표시 기간</div>
  94. <div data-ax-td-wrap>
  95. <select class="form-control form-control-inline" name="ban_timer_use">
  96. <option value="Y" <?=element('ban_timer_use', $view,'N')=='Y'?'selected':''?>>시간지정</option>
  97. <option value="N" <?=element('ban_timer_use', $view,'N')=='N'?'selected':''?>>항상표시</option>
  98. </select>
  99. </div>
  100. </div>
  101. </div>
  102. <div data-ax-tr>
  103. <div data-ax-td class="width-100">
  104. <div data-ax-td-label>표시 시작시간</div>
  105. <div data-ax-td-wrap>
  106. <div data-toggle="datetime-picker" data-type="datetime" data-name="ban_timer_start" data-value="<?=element('ban_timer_start', $view, set_value('pop_start'))?>"></div>
  107. </div>
  108. </div>
  109. </div>
  110. <div data-ax-tr>
  111. <div data-ax-td class="width-100">
  112. <div data-ax-td-label>표시 종료시간</div>
  113. <div data-ax-td-wrap>
  114. <div data-toggle="datetime-picker" data-type="datetime" data-name="ban_timer_end" data-value="<?=element('ban_timer_end', $view, set_value('pop_end'))?>"></div>
  115. </div>
  116. </div>
  117. </div>
  118. </div>
  119. <div class="text-center MT10">
  120. <button class="btn btn-primary">저장하기</button>
  121. </div>
  122. <?=form_close()?>
  123. <script>
  124. $(function(){
  125. $('input[name="ban_link_use"]').change(function(){
  126. if( $('input[name="ban_link_use"]:checked').val() == 'Y' ) {
  127. $('input[name="ban_link_url"]').removeAttr('disabled');
  128. $('input[name="ban_link_type"]').removeAttr('disabled');
  129. }
  130. else {
  131. $('input[name="ban_link_url"]').attr('disabled','disabled');
  132. $('input[name="ban_link_type"]').attr('disabled','disabled');
  133. }
  134. }).change();
  135. $('[data-toggle="datetime-picker"]').each(function() {
  136. var name = $(this).data('name'),
  137. value = $(this).data('value') && $(this).data('value') != '0000-00-00 00:00:00' ? new Date($(this).data('value')) : (new Date()).dateFormat('yyyy-MM-dd 00:00'),
  138. type = $(this).data('type');
  139. $(this).dxDateBox({
  140. type: type,
  141. value: value,
  142. displayFormat: type == 'datetime' ? "yyyy-MM-dd HH:mm" : 'yyyy-MM-dd',
  143. applyButtonText:'적용',
  144. cancelButtonText:'취소'
  145. });
  146. $(this).find('input').attr('name', name);
  147. });
  148. $('select[name="ban_timer_use"]').change(function(){
  149. if( $(this).find('option:selected').val() == 'Y' )
  150. {
  151. $('[data-toggle="datetime-picker"]').dxDateBox('option', 'disabled', false);
  152. //$('[name="ban_timer_start"],[name="ban_timer_end"]').removeAttr('disabled');
  153. }
  154. else {
  155. $('[data-toggle="datetime-picker"]').dxDateBox('option', 'disabled', true);
  156. //$('[name="ban_timer_start"],[name="ban_timer_end"]').val('').attr('disabled','disabled');
  157. }
  158. }).change();
  159. });
  160. </script>