Merge branch 'g5'

This commit is contained in:
chicpro
2014-03-24 09:48:37 +09:00
5 changed files with 55 additions and 62 deletions

View File

@ -9,11 +9,7 @@ $g5['title'] = '접속자검색';
include_once('./admin.head.php');
include_once(G5_PLUGIN_PATH.'/jquery-ui/datepicker.php');
$search_word = trim($_GET['search_word']);
$search_sort = trim($_GET['search_sort']);
$colspan = 5;
$qstr = 'search_word='.$search_word.'&search_sort='.$search_sort; //페이징 처리관련 변수
$listall = '<a href="'.$_SERVER['PHP_SELF'].'">처음</a>'; //페이지 처음으로 (초기화용도)
?>
@ -21,28 +17,13 @@ $listall = '<a href="'.$_SERVER['PHP_SELF'].'">처음</a>'; //페이지 처음
<form name="fvisit" method="get" onsubmit="return fvisit_submit(this);">
<?=$listall?>
<label for="sch_sort" class="sound_only">검색분류</label>
<select name="search_sort" id="sch_sort" class="search_sort">
<?php
//echo '<option value="vi_ip" '.($search_sort=='vi_ip'?'selected="selected"':'').'>IP</option>'; //selected 추가
if($search_sort=='vi_ip'){ //select 안의 옵셥값이 vi_ip면
echo '<option value="vi_ip" selected="selected">IP</option>'; //selected 추가
}else{
echo '<option value="vi_ip">IP</option>';
}
if($search_sort=='vi_referer'){ //select 안의 옵셥값이 vi_referer면
echo '<option value="vi_referer" selected="selected">접속경로</option>'; //selected 추가
}else{
echo '<option value="vi_referer">접속경로</option>';
}
if($search_sort=='vi_date'){ //select 안의 옵셥값이 vi_date면
echo '<option value="vi_date" selected="selected">날짜</option>'; //selected 추가
}else{
echo '<option value="vi_date">날짜</option>';
}
?>
<select name="sfl" id="sch_sort" class="search_sort">
<option value="vi_ip"<?php echo get_selected($sfl, 'vi_ip'); ?>>IP</option>
<option value="vi_referer"<?php echo get_selected($sfl, 'vi_referer'); ?>>접속경로</option>
<option value="vi_date"<?php echo get_selected($sfl, 'vi_date'); ?>>날짜</option>
</select>
<label for="sch_word" class="sound_only">검색어</label>
<input type="text" name="search_word" size="20" value="<?php echo $search_word?>" id="sch_word" class="frm_input">
<input type="text" name="stx" size="20" value="<?php echo stripslashes($stx); ?>" id="sch_word" class="frm_input">
<input type="submit" value="검색" class="btn_submit">
</form>
</div>
@ -61,11 +42,11 @@ $listall = '<a href="'.$_SERVER['PHP_SELF'].'">처음</a>'; //페이지 처음
<tbody>
<?php
$sql_common = " from {$g5['visit_table']} ";
if ($search_sort) {
if($search_sort=='vi_ip' || $search_sort=='vi_date'){
$sql_search = " where $search_sort like '$search_word%' ";
if ($sfl) {
if($sst=='vi_ip' || $sst=='vi_date'){
$sql_search = " where $sfl like '$stx%' ";
}else{
$sql_search = " where $search_sort like '%$search_word%' ";
$sql_search = " where $sfl like '%$stx%' ";
}
}
$sql = " select count(*) as cnt
@ -95,7 +76,7 @@ $listall = '<a href="'.$_SERVER['PHP_SELF'].'">처음</a>'; //페이지 처음
$title = "";
if ($row['vi_referer']) {
$referer = get_text(cut_str($row[vi_referer], 255, ""));
$referer = get_text(cut_str($row['vi_referer'], 255, ""));
$referer = urldecode($referer);
if (!is_utf8($referer)) {
@ -103,7 +84,7 @@ $listall = '<a href="'.$_SERVER['PHP_SELF'].'">처음</a>'; //페이지 처음
}
$title = str_replace(array("<", ">"), array("&lt;", "&gt;"), $referer);
$link = "<a href='$row[vi_referer]' target=_blank title='$title '>";
$link = '<a href="'.$row['vi_referer'].'" target="_blank" title="'.$title.'">';
}
if ($is_admin == 'super')
@ -117,11 +98,11 @@ $listall = '<a href="'.$_SERVER['PHP_SELF'].'">처음</a>'; //페이지 처음
$bg = 'bg'.($i%2);
?>
<tr class="<?php echo $bg; ?>">
<td class="td_id"><a href="<?php echo $_SERVER['PHP_SELF']; ?>?search_sort=vi_ip&amp;search_word=<?php echo $ip; ?>"><?php echo $ip; ?></a></td>
<td class="td_id"><a href="<?php echo $_SERVER['PHP_SELF']; ?>?sfl=vi_ip&amp;stx=<?php echo $ip; ?>"><?php echo $ip; ?></a></td>
<td><?php echo $link.$title; ?></a></td>
<td class="td_idsmall"><?php echo $brow; ?></td>
<td class="td_idsmall"><?php echo $os; ?></td>
<td class="td_datetime"><a href="<?php echo $_SERVER['PHP_SELF']; ?>?search_sort=vi_date&amp;search_word=<?php echo $row['vi_date']; ?>"><?php echo $row['vi_date']; ?></a> <?php echo $row['vi_time']; ?></td>
<td class="td_datetime"><a href="<?php echo $_SERVER['PHP_SELF']; ?>?sfl=vi_date&amp;stx=<?php echo $row['vi_date']; ?>"><?php echo $row['vi_date']; ?></a> <?php echo $row['vi_time']; ?></td>
</tr>
<?php } ?>
<?php if ($i == 0) echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>'; ?>
@ -145,6 +126,7 @@ $(function(){
$("#sch_word").datepicker("destroy"); // datepicker 미실행
}
});
if($("#sch_sort option:selected").val()=="vi_date"){ // select #sch_sort 의 옵션중 selected 된것의 값이 vi_date라면
$("#sch_word").datepicker({ changeMonth: true, changeYear: true, dateFormat: "yy-mm-dd", showButtonPanel: true, yearRange: "c-99:c+99", maxDate: "+0d" }); // datepicker 실행
}

View File

@ -12,6 +12,13 @@ $sql = " select * from {$g5['new_win_table']}
and nw_device IN ( 'both', 'pc' ) and nw_division IN ( 'both', '".$pop_division."' )
order by nw_id asc ";
$result = sql_query($sql, false);
?>
<!-- 팝업레이어 시작 { -->
<div id="hd_pop">
<h2>팝업레이어 알림</h2>
<?php
for ($i=0; $row_nw=sql_fetch_array($result); $i++)
{
// 이미 체크 되었다면 Continue
@ -22,19 +29,19 @@ for ($i=0; $row_nw=sql_fetch_array($result); $i++)
$nw = sql_fetch($sql);
?>
<!-- 팝업레이어 시작 { -->
<div id="hd_pops_<?php echo $nw['nw_id'] ?>" class="hd_pops" style="top:<?php echo $nw['nw_top']?>px;left:<?php echo $nw['nw_left']?>px">
<div class="hd_pops_con" style="width:<?php echo $nw['nw_width'] ?>px;height:<?php echo $nw['nw_height'] ?>px">
<?php echo conv_content($nw['nw_content'], 1); ?>
<div id="hd_pops_<?php echo $nw['nw_id'] ?>" class="hd_pops" style="top:<?php echo $nw['nw_top']?>px;left:<?php echo $nw['nw_left']?>px">
<div class="hd_pops_con" style="width:<?php echo $nw['nw_width'] ?>px;height:<?php echo $nw['nw_height'] ?>px">
<?php echo conv_content($nw['nw_content'], 1); ?>
</div>
<div class="hd_pops_footer">
<button class="hd_pops_reject hd_pops_<?php echo $nw['nw_id']; ?> <?php echo $nw['nw_disable_hours']; ?>"><strong><?php echo $nw['nw_disable_hours']; ?></strong>시간 동안 다시 열람하지 않습니다.</button>
<button class="hd_pops_close hd_pops_<?php echo $nw['nw_id']; ?>">닫기</button>
</div>
</div>
<div class="hd_pops_footer">
<button class="hd_pops_reject hd_pops_<?php echo $nw['nw_id']; ?> <?php echo $nw['nw_disable_hours']; ?>"><strong><?php echo $nw['nw_disable_hours']; ?></strong>시간 동안 다시 열람하지 않습니다.</button>
<button class="hd_pops_close hd_pops_<?php echo $nw['nw_id']; ?>">닫기</button>
</div>
</div>
<?php }
if ($i == 0) echo '<span class="sound_only">팝업레이어 알림이 없습니다.</span>';
?>
</div>
<script>
$(function() {

View File

@ -29,12 +29,11 @@ if (G5_IS_MOBILE) {
<div id="skip_to_container"><a href="#container">본문 바로가기</a></div>
<?php if(defined('_INDEX_')) { // index에서만 실행 ?>
<div id="hd_pop">
<h2>팝업레이어 알림</h2>
<?php include G5_BBS_PATH.'/newwin.inc.php'; // 팝업레이어 ?>
</div>
<?php } ?>
<?php
if(defined('_INDEX_')) { // index에서만 실행
include G5_BBS_PATH.'/newwin.inc.php'; // 팝업레이어
}
?>
<div id="hd_wrapper">

View File

@ -15,12 +15,10 @@ include_once(G5_LIB_PATH.'/popular.lib.php');
<div class="to_content"><a href="#container">본문 바로가기</a></div>
<?php if(defined('_INDEX_')) { // index에서만 실행 ?>
<div id="hd_pop">
<h2>팝업레이어 알림</h2>
<?php include G5_MOBILE_PATH.'/newwin.inc.php'; // 팝업레이어 ?>
</div>
<?php } ?>
<?php
if(defined('_INDEX_')) { // index에서만 실행
include G5_MOBILE_PATH.'/newwin.inc.php'; // 팝업레이어
} ?>
<div id="hd_wrapper">

View File

@ -12,6 +12,13 @@ $sql = " select * from {$g5['new_win_table']}
and nw_device IN ( 'both', 'mobile' ) and nw_division IN ( 'both', '".$pop_division."' )
order by nw_id asc ";
$result = sql_query($sql, false);
?>
<!-- 팝업레이어 시작 { -->
<div id="hd_pop">
<h2>팝업레이어 알림</h2>
<?php
for ($i=0; $row_nw=sql_fetch_array($result); $i++)
{
// 이미 체크 되었다면 Continue
@ -22,19 +29,19 @@ for ($i=0; $row_nw=sql_fetch_array($result); $i++)
$nw = sql_fetch($sql);
?>
<!-- 팝업레이어 시작 { -->
<div id="hd_pops_<?php echo $nw['nw_id'] ?>" class="hd_pops" style="top:<?php echo $nw['nw_top']?>px;left:<?php echo $nw['nw_left']?>px;">
<div class="hd_pops_con" style="width:<?php echo $nw['nw_width'] ?>px;height:<?php echo $nw['nw_height'] ?>px">
<?php echo conv_content($nw['nw_content'], 1); ?>
<div id="hd_pops_<?php echo $nw['nw_id'] ?>" class="hd_pops" style="top:<?php echo $nw['nw_top']?>px;left:<?php echo $nw['nw_left']?>px;">
<div class="hd_pops_con" style="width:<?php echo $nw['nw_width'] ?>px;height:<?php echo $nw['nw_height'] ?>px">
<?php echo conv_content($nw['nw_content'], 1); ?>
</div>
<div class="hd_pops_footer">
<button class="hd_pops_reject hd_pops_<?php echo $nw['nw_id']; ?> <?php echo $nw['nw_disable_hours']; ?>"><strong><?php echo $nw['nw_disable_hours']; ?></strong>시간 동안 다시 열람하지 않습니다.</button>
<button class="hd_pops_close hd_pops_<?php echo $nw['nw_id']; ?>">닫기</button>
</div>
</div>
<div class="hd_pops_footer">
<button class="hd_pops_reject hd_pops_<?php echo $nw['nw_id']; ?> <?php echo $nw['nw_disable_hours']; ?>"><strong><?php echo $nw['nw_disable_hours']; ?></strong>시간 동안 다시 열람하지 않습니다.</button>
<button class="hd_pops_close hd_pops_<?php echo $nw['nw_id']; ?>">닫기</button>
</div>
</div>
<?php }
if ($i == 0) echo '<span class="sound_only">팝업레이어 알림이 없습니다.</span>';
?>
</div>
<script>
$(function() {