|
|
@@ -19,7 +19,7 @@
|
|
|
$add_sql = "where s.ds_delind='N'";
|
|
|
// $orderby = "order by s.dt_insert desc";
|
|
|
if(empty($PageSort)) {
|
|
|
- $orderby = "order by s.dt_update desc";
|
|
|
+ $orderby = "order by s.dt_end desc";
|
|
|
}else {
|
|
|
$sort = explode("|", $PageSort);
|
|
|
$orderby = "order by $sort[0] $sort[1] ";
|
|
|
@@ -37,14 +37,14 @@
|
|
|
|
|
|
if($searchword != ""){
|
|
|
if($searchtype=="" || $searchtype==null){
|
|
|
- $add_sql.= " and (s.nm_name like '$searchword%' or a.nm_number like '$searchword%') ";
|
|
|
+ $add_sql.= " and (s.nm_name like '%$searchword%' or a.nm_number like '%$searchword%') ";
|
|
|
}else{
|
|
|
- $add_sql.= " and $searchtype like '$searchword%'";
|
|
|
+ $add_sql.= " and $searchtype like '%$searchword%'";
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if($dt_start != "" && $dt_end != ""){
|
|
|
- $add_sql.= " and s.dt_end between '$dt_start' and '$dt_end' ";
|
|
|
+ $add_sql.= " and s.dt_end between '$dt_start' and '$dt_end 23:59:59' ";
|
|
|
}
|
|
|
|
|
|
if($ds_usertype != ""){
|
|
|
@@ -87,6 +87,7 @@
|
|
|
<form id="frmSearch" name="frmSearch" method="post">
|
|
|
<input type="hidden" id="PageSort" name="PageSort">
|
|
|
<input type="hidden" id="PageSize" name="PageSize">
|
|
|
+<input type="hidden" id="pageno" name="pageno" value="<?=$PageNo?>">
|
|
|
<input type="hidden" id="searchtype" name="searchtype" value="<?=$searchtype?>">
|
|
|
<table class="tbl_search">
|
|
|
<colgroup>
|
|
|
@@ -130,7 +131,7 @@
|
|
|
<span onclick="setSearchDate('month',-3)">3개월</span>
|
|
|
<span onclick="setSearchDate('year',-1)">1년</span>
|
|
|
</div>
|
|
|
- <input type="submit" class="rnd_btn ty3 gray" value="검색" title="검색">
|
|
|
+ <input type="button" class="rnd_btn ty3 gray" value="검색" title="검색" onclick="fnSearch()">
|
|
|
<div class="btn_right" style="margin-top:-28px">
|
|
|
<a href="javascript:;" id="btn_download_excel" class="rnd_btn black" style='width:110px;'>엑셀 다운로드</a>
|
|
|
</div>
|
|
|
@@ -317,7 +318,7 @@ while($col = mysql_fetch_array($r)) {
|
|
|
|
|
|
<div class="paging">
|
|
|
<?
|
|
|
- $url = "./$list_url?searchtype=$searchtype&searchword=$searchword&ds_status=$ds_status&ds_usertype=$ds_usertype&PageSort=$PageSort";
|
|
|
+ $url = "./$list_url?searchtype=$searchtype&searchword=$searchword&ds_status=$ds_status&ds_usertype=$ds_usertype&dt_start=$dt_start&dt_end=$dt_end&PageSort=$PageSort";
|
|
|
ListPg1($url ,$PageNo,$PageSize,10,$totalrows,$leftboard[1],$rootpath);
|
|
|
?>
|
|
|
</div>
|
|
|
@@ -346,6 +347,15 @@ while($col = mysql_fetch_array($r)) {
|
|
|
}
|
|
|
|
|
|
$(document).ready(function() {
|
|
|
+
|
|
|
+ // 엔터키로 검색 실행
|
|
|
+ $("#searchword").on("keypress", function(e) {
|
|
|
+ if(e.which == 13) {
|
|
|
+ fnSearch();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
$("#selSort div.jq_sel ul li a").bind("click",function(){
|
|
|
// alert(this.value);
|
|
|
// $("#PageSort").val(this.value);
|
|
|
@@ -377,6 +387,8 @@ while($col = mysql_fetch_array($r)) {
|
|
|
alert("검색어를 입력하세요");
|
|
|
return false;
|
|
|
}
|
|
|
+ // 검색 시 1페이지로 이동
|
|
|
+ $("#pageno").val(1);
|
|
|
$("#frmSearch").submit();
|
|
|
}
|
|
|
|