81 lines
2.6 KiB
PHP
81 lines
2.6 KiB
PHP
<?php
|
|
// LOG
|
|
include_once "_common.php";
|
|
if (!isset($_SESSION['user_id'])) header( 'Location: FG_MANAGER_URL' ); // 로그인 되어있지 않으면 로그인 페이지로 보냄
|
|
include_once FG_MANAGER_PATH."/head.php";
|
|
|
|
// 검색을 위한 부분
|
|
$where = "";
|
|
if (isset($_REQUEST["search_word"])) {
|
|
$search_word = $_REQUEST["search_word"];
|
|
$where = "WHERE work LIKE '%$search_word%' OR work_detail LIKE '%$search_word%'";
|
|
}
|
|
|
|
$record_count = get_num_rows($fg['log_table']); // 전체 갯수 구하기
|
|
$query = "SELECT * FROM {$fg['log_table']} {$where} ORDER BY idx DESC {$query_limit}";
|
|
$result = sql_query($query);
|
|
$R = array();
|
|
while($row=sql_fetch_array($result)) { // 전체 배열에 저장
|
|
array_push($R, $row);
|
|
}
|
|
?>
|
|
<style>
|
|
.excel {position:relative;float:right;top:0}
|
|
</style>
|
|
<div class="searchform">
|
|
<form class="vipsearch" method="get" action="">
|
|
<div>
|
|
<div>
|
|
<label class="search_tit">검색</label>
|
|
<input type="text" name="search_word" class="form-control" placeholder="검색어를 입력하세요" style="width: 200px; display: inline-block; margin: 5px 10px 5px 10px; " autofocus >
|
|
<button type="submit" class="btn btn-primary" style="display: inline-block; margin: 0; ">검색</button>
|
|
</div>
|
|
</form>
|
|
작업구분, 작업내용에서 일치하는 검색어를 찾습니다.
|
|
</div>
|
|
|
|
<div class="text-left">
|
|
전체 로그 수 : <b><?=$record_count; ?></b>
|
|
<div class="excel">
|
|
<form method="post" action="vip_log.excel.php">
|
|
<input type="hidden" name="sql_common" value="<?=$query?>">
|
|
<!--<input type="submit" value="엑셀저장" class="list_excel">-->
|
|
<button type="submit" class="btn btn-primary" style="display: inline-block; margin: 0; ">엑셀변환</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="text-center">
|
|
<table class="table table-striped">
|
|
<colgroup>
|
|
<col width="100px">
|
|
<col width="100px">
|
|
<col>
|
|
<col width="100px">
|
|
<col width="200px">
|
|
</colgroup>
|
|
<thead>
|
|
<tr>
|
|
<th class="text-center">번호</th>
|
|
<th class="text-center">작업구분</th>
|
|
<th class="text-left">작업내용</th>
|
|
<th class="text-center">작업자</th>
|
|
<th class="text-center">작업일시</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php foreach($R as $R) { ?>
|
|
<tr>
|
|
<td class="text-center"><?=$R['idx']?></td>
|
|
<td class="text-center"><?=$R['work']?></td>
|
|
<td class="text-left"><?=$R['work_detail']?></td>
|
|
<td class="text-center"><?=$R['id']?></td>
|
|
<td class="text-center"><?=$R['date']?></td>
|
|
</tr>
|
|
<?php } // endforeach ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<?php
|
|
include_once FG_MANAGER_PATH."/tail.php";
|