관리자: #11 접속자검색 마크업

This commit is contained in:
whitedot
2013-11-15 13:25:40 +09:00
parent effc8231ac
commit 5a670fa304

View File

@ -13,16 +13,14 @@ $search_word = escape_trim($_GET['search_word']);
$search_sort = escape_trim($_GET['search_sort']);
$colspan = 5;
$qstr = "search_word=$search_word&search_sort=$search_sort"; //페이징 처리관련 변수
$listall = "<a href='{$_SERVER['PHP_SELF']}' class=tt>처음</a>"; //페이지 처음으로 (초기화용도)
$qstr = 'search_word='.$search_word.'&amp;search_sort='.$search_sort; //페이징 처리관련 변수
$listall = '<a href="'.$_SERVER['PHP_SELF'].'">처음</a>'; //페이지 처음으로 (초기화용도)
?>
<table width="100%" cellpadding="3" cellspacing="1">
<div class="local_sch local_sch01">
<form name="fvisit" method="get" onsubmit="return fvisit_submit(this);">
<tr>
<td class="sch_wrp">
<?=$listall?>
<label for="sch_sort">검색분류</label>
<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 추가
@ -43,28 +41,24 @@ $listall = "<a href='{$_SERVER['PHP_SELF']}' class=tt>처음</a>"; //페이지
}
?>
</select>
<input type="text" name="search_word" size="20" value="<?=$search_word?>" id="sch_word" class="ed">
<input type="submit" value="검색">
</td>
</tr>
<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="submit" value="검색" class="btn_submit">
</form>
</table>
</div>
<table width="100%" cellpadding="0" cellspacing="1" border="0">
<colgroup width="100">
<colgroup width="350">
<colgroup width="100">
<colgroup width="100">
<colgroup width="">
<tr><td colspan="<?=$colspan?>" class="line1"></td></tr>
<tr class="bgcol1 bold col1 ht center">
<td>IP</td>
<td>접속 경로</td>
<td>브라우저</td>
<td>OS</td>
<td>일시</td>
<div class="tbl_wrap tbl_head01">
<table>
<thead>
<tr>
<th scope="col">IP</th>
<th scope="col">접속 경로</th>
<th scope="col">브라우저</th>
<th scope="col">OS</th>
<th scope="col">일시</th>
</tr>
<tr><td colspan="<?=$colspan?>" class="line2"></td></tr>
</thead>
<tbody>
<?php
$sql_common = " from {$g5['visit_table']} ";
if ($search_sort) {
@ -124,29 +118,28 @@ for ($i=0; $row=sql_fetch_array($result); $i++) {
else
$ip = preg_replace("/([0-9]+).([0-9]+).([0-9]+).([0-9]+)/", "\\1.♡.\\3.\\4", $row['vi_ip']);
if ($brow == '기타') { $brow = "<span title='$row[vi_agent]'>$brow</span>"; }
if ($os == '기타') { $os = "<span title='$row[vi_agent]'>$os</span>"; }
if ($brow == '기타') $brow = '<span title="'.$row['vi_agent'].'">'.$brow.'</span>';
if ($os == '기타') $os = '<span title="'.$row['vi_agent'].'">'.$os.'</span>';
$list = ($i%2);
echo "
<tr class='list$list col1 ht center'>
<td align='left'>&nbsp;<a href='{$_SERVER['PHP_SELF']}?search_sort=vi_ip&amp;search_word=$ip'>$ip</a></td>
<td align=left><nobr style='display:block; overflow:hidden; width:350;'>$link$title</a></nobr></td>
<td>$brow</td>
<td>$os</td>
<td><a href='{$_SERVER['PHP_SELF']}?search_sort=vi_date&amp;search_word={$row['vi_date']}'>$row[vi_date]</a> $row[vi_time]</td>
</tr>";
}
?>
<tr>
<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><?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>
</tr>
<?php } ?>
<?php if ($i == 0) echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>'; ?>
</tbody>
</table>
</div>
if ($i == 0)
echo "<tr><td colspan='$colspan' height=100 align=center>자료가 없습니다.</td></tr>";
echo "<tr><td colspan='$colspan' class='line2'></td></tr>";
echo "</table>";
$page = get_paging($config['cf_write_pages'], $page, $total_page, "$_SERVER[PHP_SELF]?$qstr&domain=$domain&page=");
if ($page) {
echo "<table width=100% cellpadding=3 cellspacing=1><tr><td align=right>$page</td></tr></table>";
<?php
$pagelist = get_paging($config['cf_write_pages'], $page, $total_page, $_SERVER['PHP_SELF'].'?'.$qstr.'&amp;domain='.$domain.'&amp;page=');
if ($pagelist) {
echo $pagelist;
}
?>