Initial import from local backup (Documents-Playground/pakerpale)

This commit is contained in:
jeonghwa
2026-07-03 05:27:41 +09:00
commit 5b1bfe3390
2223 changed files with 561621 additions and 0 deletions

View 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" >&times;</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" >&times;</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>

View 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" >&times;</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>

View 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>

View File

@@ -0,0 +1,64 @@
<div class="box">
<div class="box-table">
<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"><a href="<?php echo admin_url($this->pagedir . '/graph'); ?>">기간별 그래프</a></li>
<li role="presentation" class="active"><a href="<?php echo admin_url($this->pagedir . '/cleanlog'); ?>">오래된 로그삭제</a></li>
</ul>
</div>
<?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" >&times;</button>', '</div>');
?>
<div class="table-responsive">
<table class="table table-bordered table-hover table-striped">
<tbody>
<tr>
<td>
<?php
$attributes = array('class' => 'form-horizontal', 'name' => 'fadminwrite', 'id' => 'fadminwrite');
echo form_open(current_full_url(), $attributes);
?>
<input type="number" class="form-control" name="day" value="<?php echo set_value('day', 180); ?>" /> 일 이상된 배너클릭 로그를 모두 검색합니다.
<button type="submit" class="btn btn-warning btn-sm">검색</button>
<?php echo form_close(); ?>
</td>
</tr>
</tbody>
</table>
</div>
<div class="box-info">
<?php
if (element('msg', $view)) {
$attributes = array('class' => 'form-horizontal', 'name' => 'fadminwrite2', 'id' => 'fadminwrite2', 'onSubmit' => 'return deletecheck()');
echo form_open(current_full_url(), $attributes);
?>
<input type="hidden" name="day" value="<?php echo element('day', $view); ?>" />
<input type="hidden" name="criterion" value="<?php echo element('criterion', $view); ?>" />
<input type="hidden" name="log_count" value="<?php echo element('log_count', $view); ?>" />
<?php echo element('msg', $view); ?>
<div class="box-button btn-group">
<button type="submit" class="btn btn-success btn-sm">삭제하기</button>
</div>
<?php
echo form_close();
}
?>
</div>
</div>
</div>
<script type="text/javascript">
//<![CDATA[
$(function() {
$('#fadminwrite').validate({
rules: {
day: {required:true, number:true, min:0}
}
});
});
//]]>
</script>

View File

@@ -0,0 +1,171 @@
<div class="box">
<div class="box-table">
<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 . '/graph'); ?>">기간별 그래프</a></li>
<li role="presentation"><a href="<?php echo admin_url($this->pagedir . '/cleanlog'); ?>">오래된 로그삭제</a></li>
</ul>
<form class="form-inline" name="flist" action="<?php echo current_url(); ?>" method="get" >
<input type="hidden" name="datetype" value="<?php echo html_escape($this->input->get('datetype')); ?>" />
<div class="box-table-button">
<span class="mr10">
기간 : <input type="text" class="form-control input-small datepicker " name="start_date" value="<?php echo element('start_date', $view); ?>" readonly="readonly" /> - <input type="text" class="form-control input-small datepicker" name="end_date" value="<?php echo element('end_date', $view); ?>" readonly="readonly" />
</span>
<div class="btn-group" role="group" aria-label="...">
<button type="button" class="btn <?php echo ($this->input->get('datetype') !== 'y' && $this->input->get('datetype') !== 'm') ? 'btn-success' : 'btn-default'; ?> btn-sm" onclick="fdate_submit('d');">일별보기</button>
<button type="button" class="btn <?php echo ($this->input->get('datetype') === 'm') ? 'btn-success' : 'btn-default'; ?> btn-sm" onclick="fdate_submit('m');">월별보기</button>
<button type="button" class="btn <?php echo ($this->input->get('datetype') === 'y') ? 'btn-success' : 'btn-default'; ?> btn-sm" onclick="fdate_submit('y');">년별보기</button>
</div>
</div>
</form>
<script type="text/javascript">
//<![CDATA[
function fdate_submit(datetype)
{
var f = document.flist;
f.datetype.value = datetype;
f.submit();
}
//]]>
</script>
</div>
<div id="chart_div"></div>
<div class="table-responsive">
<div class="pull-right form-group">
<label for="withoutzero" class="checkbox-inline">
<input type="checkbox" name="withoutzero" id="withoutzero" value="1" /> 클릭수가 0 인 데이터 제외
</label>
<label for="orderdesc" class="checkbox-inline">
<input type="checkbox" name="orderdesc" id="orderdesc" value="1"/> 역순으로보기
</label>
</div>
<table class="table table-hover table-striped table-bordered">
<colgroup>
<col class="col-md-2">
<col class="col-md-2">
<col class="col-md-2">
<col class="col-md-6">
</colgroup>
<thead>
<tr>
<th>날짜</th>
<th>배너클릭수</th>
<th>비율</th>
<th>그래프</th>
</tr>
</thead>
<tbody class="graphlist">
<?php
if (element('list', $view)) {
foreach (element('list', $view) as $key => $result) {
?>
<tr class="<?php echo ( ! element('count', $result)) ? 'zerodata' : ''; ?>">
<td><?php echo $key; ?></td>
<td><?php echo element('count', $result, 0); ?></td>
<td><?php echo element('s_rate', $result, 0); ?>%</td>
<td>
<div class="progress">
<div class="progress-bar progress-bar-warning progress-bar-striped" role="progressbar" aria-valuenow="<?php echo element('s_rate', $result, 0); ?>" aria-valuemin="0" aria-valuemax="<?php echo element('max_value', $view, 0); ?>" style="width: <?php echo element('bar', $result, 0); ?>%">
<span class="sr-only"><?php echo element('s_rate', $result, 0); ?>%</span>
</div>
</div>
</td>
</tr>
<?php
}
}
?>
</tbody>
<?php
if (element('list', $view)) {
?>
<tfoot>
<tr class="warning">
<td>전체</td>
<td><?php echo element('sum_count', $view, 0); ?></td>
<td></td>
<td></td>
</tr>
</tfoot>
<?php
}
?>
</table>
</div>
<div class="box-info">
<div class="btn-group pull-right" role="group" aria-label="...">
<button type="button" class="btn btn-outline btn-success btn-sm" id="export_to_excel"><i class="fa fa-file-excel-o"></i> 엑셀 다운로드</button>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script type="text/javascript">
// Load the Visualization API and the corechart package.
google.charts.load('current', {'packages':['corechart']});
// Set a callback to run when the Google Visualization API is loaded.
google.charts.setOnLoadCallback(drawChart);
// Callback that creates and populates a data table,
// instantiates the pie chart, passes in the data and
// draws it.
function drawChart() {
var data = new google.visualization.DataTable();
data.addColumn('string', '기간');
data.addColumn('number', '클릭 수');
data.addRows([
<?php
if (element('list', $view)) {
foreach (element('list', $view) as $key => $result) {
?>
['<?php echo $key; ?>',<?php echo element('count', $result, 0); ?>],
<?php
}
}
?>
]);
var chart = new google.visualization.AreaChart(document.getElementById('chart_div'));
chart.draw(data, {
width: '100%', height: '400',
legendTextStyle: {fontName: 'gulim', fontSize: '12'},
tooltipTextStyle: {color: '#006679', fontName: 'dotum', fontSize: '12'},
hAxis: {textStyle: {color: '#959595', fontName: 'dotum', fontSize: '12'}},
vAxis: {textStyle: {color: '#959595', fontName: 'dotum', fontSize: '12'}, gridlineColor: '#e1e1e1', baselineColor: '#e1e1e1', textPosition: 'out'},
lineWidth: 3,
pointSize: 5
});
}
$(document).on('change', '#withoutzero', function(){
if (this.checked) {
$('.zerodata').hide();
} else {
$('.zerodata').show();
}
})
$(document).on('change', '#orderdesc', function(){
var $body = $('tbody.graphlist');
var list = $body.children('tr');
$body.html(list.get().reverse());
})
$(document).on('click', '#export_to_excel', function(){
exporturl = '<?php echo admin_url($this->pagedir . '/graph/excel' . '?' . $this->input->server('QUERY_STRING', null, '')); ?>';
if ($('#withoutzero:checked').length)
{
exporturl += '&withoutzero=1';
}
if ($('#orderdesc:checked').length)
{
exporturl += '&orderby=desc';
}
document.location.href = exporturl;
})
</script>

View File

@@ -0,0 +1,35 @@
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo config_item('charset');?>" />
<style type="text/css">
th {font-weight:bold;padding:5px; min-width:120px; width:120px; _width:120px; text-align:center; line-height:18px; font-size:12px; color:#959595; font-family:dotum,돋움; border-right:1px solid #e4e4e4;}
td {text-align:center; line-height:40px; font-size:12px; color:#474747; font-family:gulim,굴림; border-right:1px solid #e4e4e4;}
</style>
<table width="100%" border="1" bordercolor="#E4E4E4" cellspacing="0" cellpadding="0">
<tr>
<th height="40">날짜</th>
<th>배너클릭수</th>
<th>비율</th>
</tr>
<?php
if (element('list', $view)) {
foreach (element('list', $view) as $key => $result) {
if ($this->input->get('withoutzero') && ! element('count', $result)) {
continue;
}
?>
<tr>
<td height="40"><?php echo $key; ?></td>
<td><?php echo element('count', $result, 0); ?></td>
<td><?php echo element('s_rate', $result, 0); ?>%</td>
</tr>
<?php
}
?>
<tr>
<td height="40" bgcolor="#DEDEDE">전체</td>
<td bgcolor="#DEDEDE"><?php echo element('sum_count', $view, 0); ?></td>
<td bgcolor="#DEDEDE"></td>
</tr>
<?php
}
?>
</table>

View File

@@ -0,0 +1,100 @@
<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" >&times;</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 . '/graph'); ?>">기간별 그래프</a></li>
<li role="presentation"><a href="<?php echo admin_url($this->pagedir . '/cleanlog'); ?>">오래된 로그삭제</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>
</div>
<?php
$buttons = ob_get_contents();
ob_end_flush();
?>
</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('plc_id', element('sort', $view)); ?>">번호</a></th>
<th>배너</th>
<th>배너설명</th>
<th>배너가노출된주소</th>
<th>링크주소</th>
<th>링크클릭일시</th>
<th>링크클릭 IP</th>
<th>링크클릭 회원</th>
<th>OS</th>
<th>Browser</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><a href="<?php echo goto_url(html_escape(element('bcl_referer', $result))); ?>" target="_blank"><?php echo html_escape(element('bcl_referer', $result)); ?></a></td>
<td><a href="<?php echo goto_url(html_escape(element('bcl_url', $result))); ?>" target="_blank"><?php echo html_escape(element('bcl_url', $result)); ?></a></td>
<td><?php echo display_datetime(element('bcl_datetime', $result), 'full'); ?></td>
<td><a href="?sfield=bcl_ip&amp;skeyword=<?php echo display_admin_ip(element('bcl_ip', $result)); ?>"><?php echo display_admin_ip(element('bcl_ip', $result)); ?></a></td>
<td><?php echo element('display_name', $result); ?> <?php if (element('mem_userid', element('member', $result))) { ?> ( <a href="?sfield=banner_click_log.mem_id&amp;skeyword=<?php echo element('mem_id', $result); ?>"><?php echo html_escape(element('mem_userid', element('member', $result))); ?></a> ) <?php } ?></td>
<td><?php echo element('os', $result); ?></td>
<td><?php echo element('browsername', $result); ?> <?php echo element('browserversion', $result); ?> <?php echo element('engine', $result); ?></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="11" 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>

View File

@@ -0,0 +1,98 @@
<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" >&times;</button>', '</div>');
$attributes = array('class' => 'form-inline', 'name' => 'flist', 'id' => 'flist');
echo form_open(current_full_url(), $attributes);
?>
<div class="box-table-header">
<?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>
<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('doc_id', element('sort', $view)); ?>">번호</a></th>
<th><a href="<?php echo element('doc_key', element('sort', $view)); ?>">주소</a></th>
<th><a href="<?php echo element('doc_title', element('sort', $view)); ?>">제목</a></th>
<th><a href="<?php echo element('doc_layout', element('sort', $view)); ?>">일반레이아웃</a></th>
<th><a href="<?php echo element('doc_mobile_layout', element('sort', $view)); ?>">모바일레이아웃</a></th>
<th><a href="<?php echo element('doc_skin', element('sort', $view)); ?>">일반스킨</a></th>
<th><a href="<?php echo element('doc_mobile_skin', element('sort', $view)); ?>">모바일스킨</a></th>
<th>최종수정자</th>
<th><a href="<?php echo element('doc_updated_datetime', element('sort', $view)); ?>">최종수정일</a></th>
<th><a href="<?php echo element('doc_hit', 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><a href="<?php echo goto_url(document_url(html_escape(element('doc_key', $result)))); ?>" target="_blank"><?php echo document_url(html_escape(element('doc_key', $result))); ?></a></td>
<td><?php echo html_escape(element('doc_title', $result)); ?></td>
<td><?php echo element('doc_layout', $result) ? html_escape(element('doc_layout', $result)) : '기본설정따름'; ?></td>
<td><?php echo element('doc_mobile_layout', $result) ? html_escape(element('doc_mobile_layout', $result)) : '기본설정따름'; ?></td>
<td><?php echo element('doc_skin', $result) ? html_escape(element('doc_skin', $result)) : '기본설정따름'; ?></td>
<td><?php echo element('doc_mobile_skin', $result) ? html_escape(element('doc_mobile_skin', $result)) : '기본설정따름'; ?></td>
<td><?php echo element('display_name', $result); ?> <?php if (element('mem_userid', $result)) { ?> ( <a href="?sfield=document.mem_id&amp;skeyword=<?php echo element('mem_id', $result); ?>"><?php echo html_escape(element('mem_userid', $result)); ?></a> ) <?php } ?></td>
<td><?php echo display_datetime(element('doc_updated_datetime', $result), 'full'); ?></td>
<td class="text-right"><?php echo number_format(element('doc_hit', $result)); ?></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="12" 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>

View File

@@ -0,0 +1,93 @@
<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(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 form-inline">
<?php echo document_url(); ?> <input type="text" class="form-control" name="doc_key" value="<?php echo set_value('doc_key', element('doc_key', element('data', $view))); ?>" /> 페이지주소를 입력해주세요
</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="doc_title" value="<?php echo set_value('doc_title', element('doc_title', element('data', $view))); ?>" />
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">PC 레이아웃/스킨</label>
<div class="col-sm-10 form-inline">
레이아웃 -
<select name="doc_layout" id="doc_layout" class="form-control" >
<?php echo element('doc_layout_option', element('data', $view)); ?>
</select>
사이드바 -
<select class="form-control" name="doc_sidebar" id="doc_sidebar">
<option value="">기본설정따름</option>
<option value="1" <?php echo set_select('doc_sidebar', '1', (element('doc_sidebar', element('data', $view)) === '1' ? true : false)); ?> >사용</option>
<option value="2" <?php echo set_select('doc_sidebar', '2', (element('doc_sidebar', element('data', $view)) === '2' ? true : false)); ?> >사용하지않음</option>
</select>
스킨 -
<select name="doc_skin" id="doc_skin" class="form-control" >
<?php echo element('doc_skin_option', element('data', $view)); ?>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">모바일 레이아웃/스킨</label>
<div class="col-sm-10 form-inline">
레이아웃 -
<select name="doc_mobile_layout" id="doc_mobile_layout" class="form-control" >
<?php echo element('doc_mobile_layout_option', element('data', $view)); ?>
</select>
사이드바 -
<select class="form-control" name="doc_mobile_sidebar" id="doc_mobile_sidebar">
<option value="">기본설정따름</option>
<option value="1" <?php echo set_select('doc_mobile_sidebar', '1', (element('doc_mobile_sidebar', element('data', $view)) === '1' ? true : false)); ?> >사용</option>
<option value="2" <?php echo set_select('doc_mobile_sidebar', '2', (element('doc_mobile_sidebar', element('data', $view)) === '2' ? true : false)); ?> >사용하지않음</option>
</select>
스킨 -
<select name="doc_mobile_skin" id="doc_mobile_skin" class="form-control" >
<?php echo element('doc_mobile_skin_option', element('data', $view)); ?>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">내용</label>
<div class="col-sm-10">
<?php echo display_dhtml_editor('doc_content', set_value('doc_content', element('doc_content', element('data', $view))), $classname = 'form-control dhtmleditor', $is_dhtml_editor = $this->cbconfig->item('use_document_dhtml'), $editor_type = $this->cbconfig->item('document_editor_type')); ?>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">모바일내용</label>
<div class="col-sm-10">
<?php echo display_dhtml_editor('doc_mobile_content', set_value('doc_mobile_content', element('doc_mobile_content', element('data', $view))), $classname = 'form-control dhtmleditor', $is_dhtml_editor = $this->cbconfig->item('use_document_dhtml'), $editor_type = $this->cbconfig->item('document_editor_type')); ?>
모바일 내용이 일반웹페이지 내용과 다를 경우에 입력합니다. 같은 경우는 입력하지 않으셔도 됩니다
</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: {
doc_key: {required:true, minlength:3, maxlength:50, alpha_dash : true},
doc_title: 'required',
doc_content : {<?php echo ($this->cbconfig->item('use_document_dhtml')) ? 'required_' . $this->cbconfig->item('document_editor_type') : 'required'; ?> : true },
doc_mobile_content : {<?php echo ($this->cbconfig->item('use_document_dhtml')) ? 'valid_' . $this->cbconfig->item('document_editor_type') : ''; ?> : true }
}
});
});
//]]>
</script>

View File

@@ -0,0 +1,89 @@
<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" >&times;</button>', '</div>');
$attributes = array('class' => 'form-inline', 'name' => 'flist', 'id' => 'flist');
echo form_open(current_full_url(), $attributes);
?>
<div class="box-table-header">
<?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">FAQ 전체목록</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">FAQ 내용 추가</a>
</div>
<?php
$buttons = ob_get_contents();
ob_end_flush();
?>
</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('faq_title', element('sort', $view)); ?>">제목</a></th>
<th>내용</th>
<th><a href="<?php echo element('faq_order', element('sort', $view)); ?>">정렬순서</a></th>
<th><a href="<?php echo element('faq_datetime', element('sort', $view)); ?>">등록일</a></th>
<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 cut_str(html_escape(strip_tags(element('faq_title', $result))),100); ?></td>
<td><?php echo cut_str(html_escape(strip_tags(element('faq_content', $result))),100); ?></td>
<td><?php echo number_format(element('faq_order', $result)); ?></td>
<td><?php echo display_datetime(element('faq_datetime', $result), 'full'); ?></td>
<td><?php echo element('display_name', $result); ?> <?php if (element('mem_userid', $result)) { ?> ( <a href="?fgr_id=<?php echo $this->input->get('fgr_id'); ?>&amp;sfield=faq.mem_id&amp;skeyword=<?php echo element('mem_id', $result); ?>"><?php echo html_escape(element('mem_userid', $result)); ?></a> ) <?php } ?></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="7" 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">
<input type="hidden" name="fgr_id" value="<?php echo $this->input->get('fgr_id'); ?>" />
<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>

View File

@@ -0,0 +1,63 @@
<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(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)); ?>" />
<input type="hidden" name="fgr_id" value="<?php echo element('fgr_id', element('faqgroup', element('data', $view))); ?>" />
<div class="form-group">
<label class="col-sm-2 control-label">그룹</label>
<div class="col-sm-10">
<?php echo html_escape(element('fgr_title', element('faqgroup', element('data', $view)))); ?>
</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="faq_order" value="<?php echo set_value('faq_order', element('faq_order', element('data', $view))); ?>" />
<div class="help-inline">정렬순서가 낮은 FAQ가 먼저 출력됩니다</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">질문</label>
<div class="col-sm-10">
<?php echo display_dhtml_editor('faq_title', set_value('faq_title', element('faq_title', element('data', $view))), $classname = 'form-control dhtmleditor', $is_dhtml_editor = $this->cbconfig->item('use_faq_dhtml'), $editor_type = $this->cbconfig->item('faq_editor_type')); ?>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">답변</label>
<div class="col-sm-10">
<?php echo display_dhtml_editor('faq_content', set_value('faq_content', element('faq_content', element('data', $view))), $classname = 'form-control dhtmleditor', $is_dhtml_editor = $this->cbconfig->item('use_faq_dhtml'), $editor_type = $this->cbconfig->item('faq_editor_type')); ?>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">답변(모바일용)</label>
<div class="col-sm-10">
<?php echo display_dhtml_editor('faq_mobile_content', set_value('faq_mobile_content', element('faq_mobile_content', element('data', $view))), $classname = 'form-control dhtmleditor', $is_dhtml_editor = $this->cbconfig->item('use_faq_dhtml'), $editor_type = $this->cbconfig->item('faq_editor_type')); ?>
모바일 내용이 일반웹페이지 내용과 다를 경우에 입력합니다. 같은 경우는 입력하지 않으셔도 됩니다
</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: {
faq_order: { required:true, number:true, min:0 },
faq_title : {<?php echo ($this->cbconfig->item('use_faq_dhtml')) ? 'required_' . $this->cbconfig->item('faq_editor_type') : 'required'; ?> : true },
faq_content : {<?php echo ($this->cbconfig->item('use_faq_dhtml')) ? 'required_' . $this->cbconfig->item('faq_editor_type') : 'required'; ?> : true },
faq_mobile_content : {<?php echo ($this->cbconfig->item('use_faq_dhtml')) ? 'valid_' . $this->cbconfig->item('faq_editor_type') : ''; ?> : true }
}
});
});
//]]>
</script>

View File

@@ -0,0 +1,100 @@
<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" >&times;</button>', '</div>');
$attributes = array('class' => 'form-inline', 'name' => 'flist', 'id' => 'flist');
echo form_open(current_full_url(), $attributes);
?>
<div class="box-table-header">
<?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">FAQ추가</a>
</div>
<?php
$buttons = ob_get_contents();
ob_end_flush();
?>
</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('fgr_id', element('sort', $view)); ?>">번호</a></th>
<th><a href="<?php echo element('fgr_title', element('sort', $view)); ?>">제목</a></th>
<th><a href="<?php echo element('fgr_key', element('sort', $view)); ?>">주소</a></th>
<th><a href="<?php echo element('fgr_layout', element('sort', $view)); ?>">레이아웃</a></th>
<th><a href="<?php echo element('fgr_mobile_layout', element('sort', $view)); ?>">모바일레이아웃</a></th>
<th><a href="<?php echo element('fgr_skin', element('sort', $view)); ?>">스킨</a></th>
<th><a href="<?php echo element('fgr_mobile_skin', element('sort', $view)); ?>">모바일스킨</a></th>
<th><a href="<?php echo element('fgr_datetime', element('sort', $view)); ?>">작성일</a></th>
<th>작성자</th>
<th>FAQ 수</th>
<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 number_format(element('num', $result)); ?></td>
<td><a href="<?php echo admin_url('page/faq'); ?>/?fgr_id=<?php echo element(element('primary_key', $view), $result); ?>" ><?php echo html_escape(element('fgr_title', $result)); ?></a></td>
<td><a href="<?php echo goto_url(faq_url(html_escape(element('fgr_key', $result)))); ?>" target="_blank"><?php echo faq_url(html_escape(element('fgr_key', $result))); ?></a></td>
<td><?php echo element('fgr_layout', $result) ? html_escape(element('fgr_layout', $result)) : '일반설정따름'; ?></td>
<td><?php echo element('fgr_mobile_layout', $result) ? html_escape(element('fgr_mobile_layout', $result)) : '일반설정따름'; ?></td>
<td><?php echo element('fgr_skin', $result) ? html_escape(element('fgr_skin', $result)) : '일반설정따름'; ?></td>
<td><?php echo element('fgr_mobile_skin', $result) ? html_escape(element('fgr_mobile_skin', $result)) : '일반설정따름'; ?></td>
<td><?php echo display_datetime(element('fgr_datetime', $result), 'full'); ?></td>
<td><?php echo element('display_name', $result); ?> <?php if (element('mem_userid', $result)) { ?> ( <a href="?sfield=faq_group.mem_id&amp;skeyword=<?php echo element('mem_id', $result); ?>"><?php echo html_escape(element('mem_userid', $result)); ?></a> ) <?php } ?></td>
<td><a href="<?php echo admin_url('page/faq'); ?>/?fgr_id=<?php echo element(element('primary_key', $view), $result); ?>" ><?php echo (int) element('faqcount', $result); ?></a></td>
<td><a href="<?php echo admin_url('page/faq'); ?>/write/?fgr_id=<?php echo element(element('primary_key', $view), $result); ?>" class="btn btn-outline btn-primary btn-xs">내용추가</a></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="13" 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>

View File

@@ -0,0 +1,78 @@
<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(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">
<input type="text" class="form-control" name="fgr_title" value="<?php echo set_value('fgr_title', element('fgr_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">
<?php echo faq_url(); ?>/ <input type="text" class="form-control" name="fgr_key" value="<?php echo set_value('fgr_key', element('fgr_key', element('data', $view))); ?>" /> 페이지주소를 입력해주세요
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">PC 레이아웃/스킨</label>
<div class="col-sm-10 form-inline">
레이아웃 -
<select name="fgr_layout" id="fgr_layout" class="form-control" >
<?php echo element('fgr_layout_option', element('data', $view)); ?>
</select>
사이드바 -
<select class="form-control" name="fgr_sidebar" id="fgr_sidebar">
<option value="">기본설정따름</option>
<option value="1" <?php echo set_select('fgr_sidebar', '1', (element('fgr_sidebar', element('data', $view)) === '1' ? true : false)); ?> >사용</option>
<option value="2" <?php echo set_select('fgr_sidebar', '2', (element('fgr_sidebar', element('data', $view)) === '2' ? true : false)); ?> >사용하지않음</option>
</select>
스킨 -
<select name="fgr_skin" id="fgr_skin" class="form-control" >
<?php echo element('fgr_skin_option', element('data', $view)); ?>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">모바일 레이아웃/스킨</label>
<div class="col-sm-10 form-inline">
레이아웃 -
<select name="fgr_mobile_layout" id="fgr_mobile_layout" class="form-control" >
<?php echo element('fgr_mobile_layout_option', element('data', $view)); ?>
</select>
사이드바 -
<select class="form-control" name="fgr_mobile_idebar" id="fgr_mobile_idebar">
<option value="">기본설정따름</option>
<option value="1" <?php echo set_select('fgr_mobile_idebar', '1', (element('fgr_mobile_idebar', element('data', $view)) === '1' ? true : false)); ?> >사용</option>
<option value="2" <?php echo set_select('fgr_mobile_idebar', '2', (element('fgr_mobile_idebar', element('data', $view)) === '2' ? true : false)); ?> >사용하지않음</option>
</select>
스킨 -
<select name="fgr_mobile_skin" id="fgr_mobile_skin" class="form-control" >
<?php echo element('fgr_mobile_skin_option', element('data', $view)); ?>
</select>
</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: {
fgr_title: 'required',
fgr_key: { required:true, alpha_dash:true, minlength:3, maxlength:50 }
}
});
});
//]]>
</script>

View File

@@ -0,0 +1,281 @@
<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" >&times;</button>', '</div>');
$attributes = array('class' => 'form-horizontal', 'name' => 'flist', 'id' => 'flist');
echo form_open(current_full_url(), $attributes);
?>
<div class="box-table-header">
<?php
ob_start();
?>
<div class="btn-group pull-right" role="group" aria-label="...">
<button type="button" class="btn btn-outline btn-default btn-sm btn-list-update btn-list-selected disabled" data-list-update-url = "<?php echo element('list_update_url', $view); ?>" >선택수정</button>
<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>
<?php
$buttons = ob_get_contents();
ob_end_flush();
?>
<div class="row">전체 : <?php echo element('total_rows', element('data', $view), 0); ?>건</div>
</div>
<div class="table-responsive">
<table class="table table-hover table-striped">
<thead>
<tr>
<th>메뉴명</th>
<th>새창여부</th>
<th>커스텀(a 태그안)</th>
<th>순서</th>
<th>PC 사용</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 class="success">
<td>
<div class="form-group form-group-sm">
<input type="text" name="men_name[<?php echo element(element('primary_key', $view), $result); ?>]" class="form-control input-sm" value="<?php echo html_escape(element('men_name', $result)); ?>" />
</div>
</td>
<td>
<div class="form-group form-group-sm">
<select name="men_target[<?php echo element(element('primary_key', $view), $result); ?>]" class="form-control input-sm">
<option value="" <?php echo ( ! element('men_target', $result)) ? 'selected="selected"' : ''; ?>>현재창</option>
<option value="_blank" <?php echo (element('men_target', $result) === '_blank') ? 'selected="selected"' : ''; ?>>새창</option>
</select>
</div>
</td>
<td>
<div class="form-group form-group-sm">
<input type="text" name="men_custom[<?php echo element(element('primary_key', $view), $result); ?>]" class="form-control input-sm" value="<?php echo html_escape(element('men_custom', $result)); ?>" />
</div>
</td>
<td>
<div class="form-group form-group-sm">
<input type="number" name="men_order[<?php echo element(element('primary_key', $view), $result); ?>]" class="form-control input-sm" value="<?php echo html_escape(element('men_order', $result)); ?>" />
</div>
</td>
<td>
<div class="form-group form-group-sm">
<select name="men_desktop[<?php echo element(element('primary_key', $view), $result); ?>]" class="form-control input-sm">
<option value="1" <?php echo (element('men_desktop', $result) === '1') ? 'selected="selected"' : ''; ?>>사용함</option>
<option value="0" <?php echo (element('men_desktop', $result) !== '1') ? 'selected="selected"' : ''; ?>>사용안함</option>
</select>
</div>
</td>
<td>
<div class="form-group form-group-sm">
<select name="men_mobile[<?php echo element(element('primary_key', $view), $result); ?>]" class="form-control input-sm">
<option value="1" <?php echo (element('men_mobile', $result) === '1') ? 'selected="selected"' : ''; ?>>사용함</option>
<option value="0" <?php echo (element('men_mobile', $result) !== '1') ? 'selected="selected"' : ''; ?>>사용안함</option>
</select>
</div>
</td>
<td>
<div class="form-group form-group-sm">
<input type="checkbox" name="chk[]" class="list-chkbox" value="<?php echo element(element('primary_key', $view), $result); ?>" />
</div>
</td>
</tr>
<tr class="success">
<th><div class="pull-right">링크주소</div></th>
<td colspan="6">
<div class="form-group form-group-sm">
<input type="text" name="men_link[<?php echo element(element('primary_key', $view), $result); ?>]" class="form-control input-sm" value="<?php echo html_escape(element('men_link', $result)); ?>" />
</div>
</td>
</tr>
<?php
if (element('list', element('subresult', $result))) {
foreach (element('list', element('subresult', $result)) as $subresult) {
?>
<tr class="warning">
<td>
<div class="form-group form-group-sm form-inline pull-right">
<span class="fa fa-arrow-right"></span>
<input type="text" name="men_name[<?php echo element(element('primary_key', $view), $subresult); ?>]" class="form-control input-sm" value="<?php echo html_escape(element('men_name', $subresult)); ?>" />
</div>
</td>
<td>
<div class="form-group form-group-sm">
<select name="men_target[<?php echo element(element('primary_key', $view), $subresult); ?>]" class="form-control input-sm">
<option value="" <?php echo ( ! element('men_target', $subresult)) ? 'selected="selected"' : ''; ?>>현재창</option>
<option value="_blank" <?php echo (element('men_target', $subresult) === '_blank') ? 'selected="selected"' : ''; ?>>새창</option>
</select>
</div>
</td>
<td>
<div class="form-group form-group-sm">
<input type="text" name="men_custom[<?php echo element(element('primary_key', $view), $subresult); ?>]" class="form-control input-sm" value="<?php echo html_escape(element('men_custom', $subresult)); ?>" />
</div>
</td>
<td>
<div class="form-group form-group-sm">
<input type="number" name="men_order[<?php echo element(element('primary_key', $view), $subresult); ?>]" class="form-control input-sm" value="<?php echo html_escape(element('men_order', $subresult)); ?>" />
</div>
</td>
<td>
<div class="form-group form-group-sm">
<select name="men_desktop[<?php echo element(element('primary_key', $view), $subresult); ?>]" class="form-control input-sm">
<option value="1" <?php echo (element('men_desktop', $subresult) === '1') ? 'selected="selected"' : ''; ?>>사용함</option>
<option value="0" <?php echo (element('men_desktop', $subresult) !== '1') ? 'selected="selected"' : ''; ?>>사용안함</option>
</select>
</div>
</td>
<td>
<div class="form-group form-group-sm">
<select name="men_mobile[<?php echo element(element('primary_key', $view), $subresult); ?>]" class="form-control input-sm">
<option value="1" <?php echo (element('men_mobile', $subresult) === '1') ? 'selected="selected"' : ''; ?>>사용함</option>
<option value="0" <?php echo (element('men_mobile', $subresult) !== '1') ? 'selected="selected"' : ''; ?>>사용안함</option>
</select>
</div>
</td>
<td>
<div class="form-group form-group-sm">
<input type="checkbox" name="chk[]" class="list-chkbox" value="<?php echo element(element('primary_key', $view), $subresult); ?>" />
</div>
</td>
</tr>
<tr class="warning">
<th><div class="pull-right">링크주소</div></th>
<td colspan="6">
<div class="form-group form-group-sm">
<input type="text" name="men_link[<?php echo element(element('primary_key', $view), $subresult); ?>]" class="form-control input-sm" value="<?php echo html_escape(element('men_link', $subresult)); ?>" />
</div>
</td>
</tr>
<?php
}
}
}
}
if ( ! element('list', element('data', $view))) {
?>
<tr>
<td colspan="7" class="nopost">자료가 없습니다</td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
<?php echo form_close(); ?>
</div>
<div class="box-table">
<div class="box-table-header">
<h5>메뉴 추가</h5>
</div>
<?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" >&times;</button>', '</div>');
$attributes = array('class' => 'form-horizontal', 'name' => 'fadminwrite', 'id' => 'fadminwrite');
echo form_open(current_full_url(), $attributes);
?>
<div class="table-responsive">
<table class="table table-hover table-striped">
<thead>
<tr>
<th>메뉴명</th>
<th>메뉴위치</th>
<th>새창여부</th>
<th>커스텀(a 태그안)</th>
<th>순서</th>
<th>PC 사용</th>
<th>모바일 사용</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<div class="form-group form-group-sm">
<input type="text" name="men_name" class="form-control input-sm" value="" />
</div>
</td>
<td>
<div class="form-group form-group-sm">
<select name="men_parent" class="form-control input-sm">
<option value="0">최상위메뉴</option>
<?php
if (element('list', element('data', $view))) {
foreach (element('list', element('data', $view)) as $result) {
?>
<option value="<?php echo html_escape(element('men_id', $result)); ?>"><?php echo html_escape(element('men_name', $result)); ?>의 하위메뉴</option>
<?php
}
}
?>
</select>
</div>
</td>
<td>
<div class="form-group form-group-sm">
<select name="men_target" class="form-control input-sm">
<option value="">현재창</option>
<option value="_blank">새창</option>
</select>
</div>
</td>
<td>
<div class="form-group form-group-sm">
<input type="text" name="men_custom" class="form-control input-sm" value="" />
</div>
</td>
<td>
<div class="form-group form-group-sm">
<input type="number" name="men_order" class="form-control input-sm" value="0" />
</div>
</td>
<td>
<div class="form-group form-group-sm">
<select name="men_desktop" class="form-control input-sm">
<option value="1">사용함</option>
<option value="0">사용안함</option>
</select>
</div>
</td>
<td>
<div class="form-group form-group-sm">
<select name="men_mobile" class="form-control input-sm">
<option value="1">사용함</option>
<option value="0">사용안함</option>
</select>
</div>
</td>
</tr>
<tr>
<th class="pull-right">링크주소</th>
<td colspan="6">
<div class="form-group form-group-sm">
<input type="text" name="men_link" class="form-control input-sm" value="" />
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="btn-group pull-right" role="group" aria-label="...">
<button type="submit" class="btn btn-outline btn-success btn-sm">메뉴 추가하기</button>
</div>
<?php echo form_close(); ?>
</div>
</div>
<script type="text/javascript">
//<![CDATA[
$(function() {
$('#fadminwrite').validate({
rules: {
men_nemu: { required:true},
men_link: { required:true}
}
});
});
//]]>
</script>

View File

@@ -0,0 +1,99 @@
<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" >&times;</button>', '</div>');
$attributes = array('class' => 'form-inline', 'name' => 'flist', 'id' => 'flist');
echo form_open(current_full_url(), $attributes);
?>
<div class="box-table-header">
<div class="btn-group btn-group-sm" role="group">
<a href="?" class="btn btn-sm <?php echo ($this->input->get('pop_activated') !== 'Y' && $this->input->get('pop_activated') !== 'N') ? 'btn-success' : 'btn-default'; ?>">전체배너</a>
<a href="?pop_activated=Y" class="btn btn-sm <?php echo ($this->input->get('pop_activated') === 'Y') ? 'btn-success' : 'btn-default'; ?>">활성</a>
<a href="?pop_activated=N" class="btn btn-sm <?php echo ($this->input->get('pop_activated') === 'N') ? 'btn-success' : 'btn-default'; ?>">비활성</a>
</div>
<?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>
<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('pop_id', element('sort', $view)); ?>">번호</a></th>
<th><a href="<?php echo element('pop_title', element('sort', $view)); ?>">제목</a></th>
<th><a href="<?php echo element('pop_device', element('sort', $view)); ?>">접속기기</a></th>
<th><a href="<?php echo element('pop_start_date', element('sort', $view)); ?>">시작일시</a></th>
<th><a href="<?php echo element('pop_end_date', element('sort', $view)); ?>">종료일시</a></th>
<th>시간</th>
<th>가운데정렬</th>
<th><a href="<?php echo element('pop_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 echo html_escape(element('pop_title', $result)); ?></td>
<td class="text-center"><?php echo element('pop_device', $result); ?></td>
<td><?php echo element('pop_start_date', $result); ?></td>
<td><?php echo element('pop_end_date', $result); ?></td>
<td class="text-center"><?php echo element('pop_disable_hours', $result); ?></td>
<td><?php echo element('pop_is_center', $result) ? '가운데정렬' : ''; ?></td>
<td><?php echo element('pop_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="10" 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>

View File

@@ -0,0 +1,129 @@
<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(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">
<input type="text" class="form-control" name="pop_title" value="<?php echo set_value('pop_title', element('pop_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="pop_start_date" value="<?php echo set_value('pop_start_date', element('pop_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="pop_end_date" value="<?php echo set_value('pop_end_date', element('pop_end_date', element('data', $view))); ?>" />
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">팝업정렬</label>
<div class="col-sm-10">
<label class="radio-inline" for="pop_is_center_1">
<input type="radio" name="pop_is_center" id="pop_is_center_1" value="1" <?php echo set_radio('pop_is_center', '1', (element('pop_is_center', element('data', $view)) === '1' ? true : false)); ?> /> 가운데정렬
</label>
<label class="radio-inline" for="pop_is_center_0">
<input type="radio" name="pop_is_center" id="pop_is_center_0" value="0" <?php echo set_radio('pop_is_center', '0', (element('pop_is_center', element('data', $view)) !== '1' ? true : false)); ?> /> 좌측정렬
</label>
</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="pop_left" value="<?php echo set_value('pop_left', element('pop_left', element('data', $view))); ?>" />px - 좌측정렬시만 해당
</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="pop_top" value="<?php echo set_value('pop_top', element('pop_top', element('data', $view))); ?>" />px
</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="pop_width" value="<?php echo set_value('pop_width', element('pop_width', element('data', $view))); ?>" />px,
세로 <input type="number" class="form-control" name="pop_height" value="<?php echo set_value('pop_height', element('pop_height', element('data', $view))); ?>" />px
</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="pop_device">
<option value="all" <?php echo set_select('pop_device', 'all', (element('pop_device', element('data', $view)) === 'all' ? true : false)); ?>>모든기기</option>
<option value="pc" <?php echo set_select('pop_device', 'pc', (element('pop_device', element('data', $view)) === 'pc' ? true : false)); ?>>PC만</option>
<option value="mobile" <?php echo set_select('pop_device', 'mobile', (element('pop_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 form-inline">
<select class="form-control" name="pop_page">
<option value="0" <?php echo set_select('pop_page', '0', (element('pop_page', element('data', $view)) !== '1' ? true : false)); ?>>홈페이지에서만</option>
<option value="1" <?php echo set_select('pop_page', '1', (element('pop_page', element('data', $view)) === '1' ? 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="pop_disable_hours" value="<?php echo set_value('pop_disable_hours', element('pop_disable_hours', element('data', $view))); ?>" /> 시간, 닫기 버튼 클릭시 쿠키적용시간, 해당 시간동안 팝업이 더이상 보이지 않습니다
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">팝업활성화</label>
<div class="col-sm-10">
<label class="radio-inline" for="pop_activated_1">
<input type="radio" name="pop_activated" id="pop_activated_1" value="1" <?php echo set_radio('pop_activated', '1', (element('pop_activated', element('data', $view)) === '1' ? true : false)); ?> /> 활성
</label>
<label class="radio-inline" for="pop_activated_0">
<input type="radio" name="pop_activated" id="pop_activated_0" value="0" <?php echo set_radio('pop_activated', '0', (element('pop_activated', element('data', $view)) !== '1' ? true : false)); ?> /> 비활성
</label>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">내용</label>
<div class="col-sm-10">
<?php echo display_dhtml_editor('pop_content', set_value('pop_content', element('pop_content', element('data', $view))), $classname = 'form-control dhtmleditor', $is_dhtml_editor = $this->cbconfig->item('use_popup_dhtml'), $editor_type = $this->cbconfig->item('popup_editor_type')); ?>
</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: {
pop_title: 'required',
pop_start_date: { alpha_dash:true, minlength:10, maxlength:10 },
pop_end_date: { alpha_dash:true, minlength:10, maxlength:10 },
pop_is_center: { required:true, number:true },
pop_left: { required :'#pop_is_center_1:checked', number:true },
pop_top: { required:true, number:true },
pop_width: { required:true, number:true },
pop_height: { required:true, number:true },
pop_device: 'required',
pop_page: 'required',
pop_disable_hours: { required:true, number:true },
pop_activated: 'required',
pop_content : {<?php echo ($this->cbconfig->item('use_popup_dhtml')) ? 'required_' . $this->cbconfig->item('popup_editor_type') : 'required'; ?> : true }
}
});
});
//]]>
</script>