125 lines
3.5 KiB
PHP
125 lines
3.5 KiB
PHP
<?php
|
|
include_once './_common.php';
|
|
|
|
auth_check($auth[$sub_menu], 'r');
|
|
|
|
$token = get_token();
|
|
|
|
$sql_common = " FROM {$g5['item_modifylog']} o ";
|
|
$sql_search = " WHERE (1) ";
|
|
|
|
if ($stx) {
|
|
if ($sfl == 'ch_name') {
|
|
$sql_common .= ", {$g5['character_table']} c ";
|
|
$sql_search .= " AND c.ch_name LIKE '%{$stx}%' AND c.ch_id = o.ch_id ";
|
|
} else if ($sfl == 'it_name') {
|
|
$sql_common .= ", {$g5['item_table']} i ";
|
|
$sql_search .= " AND i.it_name LIKE '%{$stx}%' AND i.it_id = o.it_id ";
|
|
}
|
|
}
|
|
|
|
if (!$sst) {
|
|
$sst = "o.srl";
|
|
$sod = "DESC";
|
|
}
|
|
|
|
$sql_order = " ORDER BY {$sst} {$sod} ";
|
|
|
|
$sql = " SELECT count(*) AS cnt
|
|
{$sql_common}
|
|
{$sql_search}
|
|
{$sql_order} ";
|
|
|
|
$row = sql_fetch($sql);
|
|
|
|
$total_count = $row['cnt'];
|
|
$rows = $config['cf_page_rows'];
|
|
|
|
$total_page = ceil($total_count / $rows);
|
|
|
|
if ($page < 1)
|
|
$page = 1;
|
|
|
|
$from_record = ($page - 1) * $rows;
|
|
$sql = " SELECT *
|
|
{$sql_common}
|
|
{$sql_search}
|
|
{$sql_order}
|
|
LIMIT {$from_record}, {$rows} ";
|
|
|
|
$result = sql_query($sql);
|
|
$listall = '<a href="' . $_SERVER['PHP_SELF'] . '" class="ov_listall">전체목록</a>';
|
|
|
|
$ch = [];
|
|
if ($sfl == 'ch_id' && $stx)
|
|
$ch = get_member($stx);
|
|
|
|
$g5['title'] = '아이템 기록';
|
|
|
|
include_once './admin.head.php';
|
|
|
|
$colspan = 4; ?>
|
|
<div class="local_ov01 local_ov">
|
|
<?php echo $listall ?>
|
|
전체 <?php echo number_format($total_count) ?> 건
|
|
</div>
|
|
<form name="fsearch" id="fsearch" class="local_sch01 local_sch" method="get">
|
|
<label for="sfl" class="sound_only">검색대상</label>
|
|
<select name="sfl" id="sfl">
|
|
<option value="ch_name" <?php echo get_selected($_GET['sfl'], "ch_name"); ?>>캐릭터 이름</option>
|
|
<option value="it_name" <?php echo get_selected($_GET['sfl'], "it_name"); ?>>아이템 이름</option>
|
|
</select>
|
|
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
|
|
<input type="text" name="stx" value="<?php echo $stx ?>" id="stx" required class="required frm_input">
|
|
<input type="submit" class="btn_submit" value="검색">
|
|
</form>
|
|
<br />
|
|
<style>
|
|
.tbl_head01 tbody td.al {
|
|
text-align: left;
|
|
}
|
|
</style>
|
|
<div class="tbl_head01 tbl_wrap">
|
|
<table>
|
|
<caption><?php echo $g5['title']; ?> 목록</caption>
|
|
<colgroup>
|
|
<col style="width: 150px;" />
|
|
<col />
|
|
<col style="width: 150px;" />
|
|
<col style="width: 150px;" />
|
|
</colgroup>
|
|
<thead>
|
|
<tr>
|
|
<th scope="col">캐릭터명</th>
|
|
<th scope="col">아이템</th>
|
|
<th scope="col">구분</th>
|
|
<th scope="col">일시</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php
|
|
for ($i = 0; $row = sql_fetch_array($result); $i++) {
|
|
$bg = 'bg' . ($i % 2);
|
|
$it = get_item($row['it_id']);
|
|
$ch = get_character($row['ch_id']);
|
|
$mb = get_member($row['mb_id']);
|
|
?>
|
|
<tr class="<?php echo $bg; ?>">
|
|
<td><?php echo get_text($ch['ch_name']); ?></td>
|
|
<td class="al">
|
|
<img src="<?= $it['it_img'] ?>" style="max-width: 30px;" />
|
|
<?php echo get_text($it['it_name']); ?>
|
|
</td>
|
|
<td><?php echo get_text($row['using_type']); ?></td>
|
|
<td><?php echo ($row['regdate'] == '0000-00-00 00:00:00') ? '' : $row['regdate'] ?></td>
|
|
</tr><?php
|
|
}
|
|
if ($i == 0)
|
|
echo '<tr><td colspan="' . $colspan . '" class="empty_table">자료가 없습니다.</td></tr>';
|
|
?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<?php
|
|
echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&page=");
|
|
include_once './admin.tail.php';
|