Initial import from local backup (Documents-Playground/pakerpale)
This commit is contained in:
82
views/admin/basic/page/banner/group.php
Normal file
82
views/admin/basic/page/banner/group.php
Normal file
@@ -0,0 +1,82 @@
|
||||
<div class="box">
|
||||
<div class="box-table">
|
||||
<?php
|
||||
echo validation_errors('<div class="alert alert-warning" role="alert">', '</div>');
|
||||
echo show_alert_message(element('alert_message', $view), '<div class="alert alert-auto-close alert-dismissible alert-info"><button type="button" class="close alertclose" >×</button>', '</div>');
|
||||
echo show_alert_message($this->session->flashdata('message'), '<div class="alert alert-auto-close alert-dismissible alert-info"><button type="button" class="close alertclose" >×</button>', '</div>');
|
||||
$attributes = array('class' => 'form-inline', 'name' => 'flist', 'id' => 'flist');
|
||||
echo form_open(current_full_url(), $attributes);
|
||||
?>
|
||||
<div class="box-table-header">
|
||||
<ul class="nav nav-pills">
|
||||
<li role="presentation"><a href="<?php echo admin_url($this->pagedir); ?>">배너관리</a></li>
|
||||
<li role="presentation" class="active"><a href="<?php echo admin_url($this->pagedir . '/group'); ?>">배너 위치 관리</a></li>
|
||||
</ul>
|
||||
<div class="btn-group pull-right" role="group" aria-label="...">
|
||||
<button type="button" class="btn btn-outline btn-default btn-sm btn-list-delete btn-list-selected disabled" data-list-delete-url = "<?php echo element('list_delete_url', $view); ?>" >선택삭제</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>배너 위치명</th>
|
||||
<th>이 위치에 속한 배너수</th>
|
||||
<th><input type="checkbox" name="chkall" id="chkall" /></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
if (element('list', element('data', $view))) {
|
||||
foreach (element('list', element('data', $view)) as $result) {
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo html_escape(element('bng_name', $result)); ?></td>
|
||||
<td><?php echo number_format((int) element('banner_count', $result)); ?></td>
|
||||
<td><?php if ( ! element('banner_count', $result)) { ?><input type="checkbox" name="chk[]" class="list-chkbox" value="<?php echo element(element('primary_key', $view), $result); ?>" /><?php } ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
if ( ! element('list', element('data', $view))) {
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="3" class="nopost">자료가 없습니다</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php echo form_close(); ?>
|
||||
</div>
|
||||
<div>
|
||||
<div class="box-table">
|
||||
<?php
|
||||
$attributes = array('class' => 'form-horizontal', 'name' => 'fadminwrite', 'id' => 'fadminwrite');
|
||||
echo form_open(current_full_url(), $attributes);
|
||||
?>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">배너 위치명</label>
|
||||
<div class="col-sm-8 form-inline">
|
||||
<input type="text" class="form-control" name="bng_name" />
|
||||
<button type="submit" class="btn btn-success btn-sm">추가하기</button>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo form_close(); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
$(function() {
|
||||
$('#fadminwrite').validate({
|
||||
rules: {
|
||||
bng_name: { required:true, alpha_dash:true }
|
||||
}
|
||||
});
|
||||
});
|
||||
//]]>
|
||||
</script>
|
||||
111
views/admin/basic/page/banner/index.php
Normal file
111
views/admin/basic/page/banner/index.php
Normal file
@@ -0,0 +1,111 @@
|
||||
<div class="box">
|
||||
<div class="box-table">
|
||||
<?php
|
||||
echo show_alert_message($this->session->flashdata('message'), '<div class="alert alert-auto-close alert-dismissible alert-info"><button type="button" class="close alertclose" >×</button>', '</div>');
|
||||
$attributes = array('class' => 'form-inline', 'name' => 'flist', 'id' => 'flist');
|
||||
echo form_open(current_full_url(), $attributes);
|
||||
?>
|
||||
<div class="box-table-header">
|
||||
<ul class="nav nav-pills">
|
||||
<li role="presentation" class="active"><a href="<?php echo admin_url($this->pagedir); ?>">배너관리</a></li>
|
||||
<li role="presentation"><a href="<?php echo admin_url($this->pagedir . '/group'); ?>">배너 위치 관리</a></li>
|
||||
</ul>
|
||||
<?php
|
||||
ob_start();
|
||||
?>
|
||||
<div class="btn-group pull-right" role="group" aria-label="...">
|
||||
<a href="<?php echo element('listall_url', $view); ?>" class="btn btn-outline btn-default btn-sm">전체목록</a>
|
||||
<button type="button" class="btn btn-outline btn-default btn-sm btn-list-delete btn-list-selected disabled" data-list-delete-url = "<?php echo element('list_delete_url', $view); ?>" >선택삭제</button>
|
||||
<a href="<?php echo element('write_url', $view); ?>" class="btn btn-outline btn-danger btn-sm">배너추가</a>
|
||||
</div>
|
||||
<?php
|
||||
$buttons = ob_get_contents();
|
||||
ob_end_flush();
|
||||
?>
|
||||
<div class="btn-group btn-group-sm pull-right" role="group">
|
||||
<a href="?" class="btn btn-sm <?php echo ($this->input->get('ban_activated') !== 'Y' && $this->input->get('ban_activated') !== 'N') ? 'btn-success' : 'btn-default'; ?>">전체배너</a>
|
||||
<a href="?ban_activated=Y" class="btn btn-sm <?php echo ($this->input->get('ban_activated') === 'Y') ? 'btn-success' : 'btn-default'; ?>">활성</a>
|
||||
<a href="?ban_activated=N" class="btn btn-sm <?php echo ($this->input->get('ban_activated') === 'N') ? 'btn-success' : 'btn-default'; ?>">비활성</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">전체 : <?php echo element('total_rows', element('data', $view), 0); ?>건</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><a href="<?php echo element('ban_id', element('sort', $view)); ?>">번호</a></th>
|
||||
<th>이미지</th>
|
||||
<th><a href="<?php echo element('ban_title', element('sort', $view)); ?>">이미지설명</a></th>
|
||||
<th><a href="<?php echo element('bng_name', element('sort', $view)); ?>">배너 위치</a></th>
|
||||
<th>표시기기</th>
|
||||
<th><a href="<?php echo element('ban_url', element('sort', $view)); ?>">URL</a></th>
|
||||
<th>가로/세로</a></th>
|
||||
<th><a href="<?php echo element('ban_start_date', element('sort', $view)); ?>">시작일시</a></th>
|
||||
<th><a href="<?php echo element('ban_end_date', element('sort', $view)); ?>">종료일시</a></th>
|
||||
<th><a href="<?php echo element('ban_hit', element('sort', $view)); ?>">클릭수</a></th>
|
||||
<th><a href="<?php echo element('ban_order', element('sort', $view)); ?>">정렬순서</a></th>
|
||||
<th><a href="<?php echo element('ban_activated', element('sort', $view)); ?>">활성여부</a></th>
|
||||
<th>수정</th>
|
||||
<th><input type="checkbox" name="chkall" id="chkall" /></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
if (element('list', element('data', $view))) {
|
||||
foreach (element('list', element('data', $view)) as $result) {
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo number_format(element('num', $result)); ?></td>
|
||||
<td><?php if (element('thumb_url', $result)) {?><img src="<?php echo element('thumb_url', $result); ?>" alt="<?php echo html_escape(element('ban_title', $result)); ?>" title="<?php echo html_escape(element('ban_title', $result)); ?>" class="thumbnail mg0" style="width:80px;" /><?php } ?></td>
|
||||
<td><?php echo html_escape(element('ban_title', $result)); ?></td>
|
||||
<td><?php echo html_escape(element('bng_name', $result)); ?></td>
|
||||
<td class="text-center"><?php echo element('ban_device', $result); ?></td>
|
||||
<td><?php if (element('ban_url', $result)) { ?><a href="<?php echo goto_url(element('ban_url', $result)); ?>" target="_blank"><?php echo html_escape(element('ban_url', $result)); ?></a> <?php } ?></td>
|
||||
<td class="text-center"><?php echo html_escape(element('ban_width', $result)); ?> / <?php echo html_escape(element('ban_height', $result)); ?></td>
|
||||
<td><?php echo element('ban_start_date', $result); ?></td>
|
||||
<td><?php echo element('ban_end_date', $result); ?></td>
|
||||
<td class="text-center"><?php echo number_format((int) element('ban_hit', $result)); ?></td>
|
||||
<td class="text-center"><?php echo number_format((int) element('ban_order', $result)); ?></td>
|
||||
<td><?php echo element('ban_activated', $result) ? '<button type="button" class="btn btn-xs btn-primary">활성</button>' : '<button type="button" class="btn btn-xs btn-danger">비활성</button>'; ?></td>
|
||||
<td><a href="<?php echo admin_url($this->pagedir); ?>/write/<?php echo element(element('primary_key', $view), $result); ?>?<?php echo $this->input->server('QUERY_STRING', null, ''); ?>" class="btn btn-outline btn-default btn-xs">수정</a></td>
|
||||
<td><input type="checkbox" name="chk[]" class="list-chkbox" value="<?php echo element(element('primary_key', $view), $result); ?>" /></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
if ( ! element('list', element('data', $view))) {
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="14" class="nopost">자료가 없습니다</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="box-info">
|
||||
<?php echo element('paging', $view); ?>
|
||||
<div class="pull-left ml20"><?php echo admin_listnum_selectbox();?></div>
|
||||
<?php echo $buttons; ?>
|
||||
</div>
|
||||
<?php echo form_close(); ?>
|
||||
</div>
|
||||
<form name="fsearch" id="fsearch" action="<?php echo current_full_url(); ?>" method="get">
|
||||
<div class="box-search">
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-md-offset-3">
|
||||
<select class="form-control" name="sfield" >
|
||||
<?php echo element('search_option', $view); ?>
|
||||
</select>
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" name="skeyword" value="<?php echo html_escape(element('skeyword', $view)); ?>" placeholder="Search for..." />
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default btn-sm" name="search_submit" type="submit">검색!</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
140
views/admin/basic/page/banner/write.php
Normal file
140
views/admin/basic/page/banner/write.php
Normal file
@@ -0,0 +1,140 @@
|
||||
<div class="box">
|
||||
<div class="box-table">
|
||||
<?php
|
||||
echo validation_errors('<div class="alert alert-warning" role="alert">', '</div>');
|
||||
$attributes = array('class' => 'form-horizontal', 'name' => 'fadminwrite', 'id' => 'fadminwrite');
|
||||
echo form_open_multipart(current_full_url(), $attributes);
|
||||
?>
|
||||
<input type="hidden" name="<?php echo element('primary_key', $view); ?>" value="<?php echo element(element('primary_key', $view), element('data', $view)); ?>" />
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">이미지 업로드</label>
|
||||
<div class="col-sm-10">
|
||||
<?php
|
||||
if (element('ban_image', element('data', $view))) {
|
||||
?>
|
||||
<img src="<?php echo banner_image_url(element('ban_image', element('data', $view)), '', 150); ?>" alt="배너 이미지" title="배너 이미지" />
|
||||
<label for="ban_image_del">
|
||||
<input type="checkbox" name="ban_image_del" id="ban_image_del" value="1" <?php echo set_checkbox('ban_image_del', '1'); ?> /> 삭제
|
||||
</label>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<input type="file" name="ban_image" id="ban_image" />
|
||||
<p class="help-block">gif, jpg, png 파일 업로드가 가능합니다</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">이미지 설명</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" name="ban_title" value="<?php echo set_value('ban_title', element('ban_title', element('data', $view))); ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">시작일</label>
|
||||
<div class="col-sm-10 form-inline">
|
||||
<input type="text" class="form-control datepicker" name="ban_start_date" value="<?php echo set_value('ban_start_date', element('ban_start_date', element('data', $view))); ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">종료일</label>
|
||||
<div class="col-sm-10 form-inline">
|
||||
<input type="text" class="form-control datepicker" name="ban_end_date" value="<?php echo set_value('ban_end_date', element('ban_end_date', element('data', $view))); ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">배너 위치</label>
|
||||
<div class="col-sm-10 form-inline">
|
||||
<select class="form-control" name="bng_name">
|
||||
<option value="">=배너 위치 선택=</option>
|
||||
<?php
|
||||
if (element('group', $view)) {
|
||||
foreach (element('group', $view) as $gval) {
|
||||
?>
|
||||
<option value="<?php echo html_escape(element('bng_name', $gval)); ?>" <?php echo set_select('bng_name', element('bng_name', $gval), (element('bng_name', element('data', $view)) === element('bng_name', $gval) ? true : false)); ?>><?php echo html_escape(element('bng_name', $gval)); ?></option>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">배너 URL</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" name="ban_url" value="<?php echo set_value('ban_url', element('ban_url', element('data', $view))); ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">배너 사이즈</label>
|
||||
<div class="col-sm-10 form-inline">
|
||||
가로 :
|
||||
<input type="number" class="form-control" name="ban_width" value="<?php echo set_value('ban_width', (int) element('ban_width', element('data', $view))); ?>" />px
|
||||
,
|
||||
세로 :
|
||||
<input type="number" class="form-control" name="ban_height" value="<?php echo set_value('ban_height', (int) element('ban_height', element('data', $view))); ?>" />px
|
||||
<div class="help-inline">가로값과 세로값을 입력하시면 입력하신 사이즈로 배너가 출력이 되며, 입력하지 않으면 업로드한 원본 크기대로 출력됩니다</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">배너 링크 새창여부</label>
|
||||
<div class="col-sm-10 form-inline">
|
||||
<select name="ban_target" class="form-control">
|
||||
<option value="" <?php echo set_select('ban_target', '', ( ! element('ban_target', element('data', $view)) ? true : false)); ?> >현재창</option>
|
||||
<option value="_blank" <?php echo set_select('ban_target', '_blank', (element('ban_target', element('data', $view)) === '_blank' ? true : false)); ?> >새창</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">배너 정렬순서</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="number" class="form-control" name="ban_order" value="<?php echo set_value('ban_order', (int) element('ban_order', element('data', $view))); ?>" />
|
||||
<div class="help-inline">정렬 순서가 큰 값이 먼저 출력됩니다</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">배너표시기기</label>
|
||||
<div class="col-sm-10 form-inline">
|
||||
<select class="form-control" name="ban_device">
|
||||
<option value="all" <?php echo set_select('ban_device', 'all', (element('ban_device', element('data', $view)) === 'all' ? true : false)); ?>>모든기기</option>
|
||||
<option value="pc" <?php echo set_select('ban_device', 'pc', (element('ban_device', element('data', $view)) === 'pc' ? true : false)); ?>>PC만</option>
|
||||
<option value="mobile" <?php echo set_select('ban_device', 'mobile', (element('ban_device', element('data', $view)) === 'mobile' ? true : false)); ?>>모바일만</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">배너활성화</label>
|
||||
<div class="col-sm-10">
|
||||
<label class="radio-inline" for="ban_activated_1">
|
||||
<input type="radio" name="ban_activated" id="ban_activated_1" value="1" <?php echo set_radio('ban_activated', '1', (element('ban_activated', element('data', $view)) === '1' ? true : false)); ?> /> 활성
|
||||
</label>
|
||||
<label class="radio-inline" for="ban_activated_0">
|
||||
<input type="radio" name="ban_activated" id="ban_activated_0" value="0" <?php echo set_radio('ban_activated', '0', (element('ban_activated', element('data', $view)) !== '1' ? true : false)); ?> /> 비활성
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btn-group pull-right" role="group" aria-label="...">
|
||||
<button type="button" class="btn btn-default btn-sm btn-history-back" >취소하기</button>
|
||||
<button type="submit" class="btn btn-success btn-sm">저장하기</button>
|
||||
</div>
|
||||
<?php echo form_close(); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
$(function() {
|
||||
$('#fadminwrite').validate({
|
||||
rules: {
|
||||
ban_title: 'required',
|
||||
ban_start_date: { alpha_dash:true, minlength:10, maxlength:10 },
|
||||
ban_end_date: { alpha_dash:true, minlength:10, maxlength:10 },
|
||||
bng_name: 'required',
|
||||
ban_width: { number:true },
|
||||
ban_height: { number:true },
|
||||
ban_order: { number:true },
|
||||
ban_activated: 'required'
|
||||
}
|
||||
});
|
||||
});
|
||||
//]]>
|
||||
</script>
|
||||
Reference in New Issue
Block a user