178 lines
6.0 KiB
Plaintext
178 lines
6.0 KiB
Plaintext
<!-- #include virtual = "include/header.asp" -->
|
||
<%
|
||
dim command, txtmonth, search_year, search_month, Curr_date
|
||
dim cnt
|
||
dim Query
|
||
dim Last_day
|
||
|
||
command = Request("command")
|
||
txtmonth = request("txtmonth")
|
||
if txtmonth = "" then
|
||
txtmonth = mid(cdate(date),1,7)
|
||
end if
|
||
search_year = left(txtmonth, 4)
|
||
search_month = right(txtmonth, 2)
|
||
Curr_date = FormatDateTime(date,0)
|
||
Last_day = Day(DateSerial(search_year, search_month + 1, 0)) ''그달의 마지막 날짜 구하기
|
||
|
||
if command <> "excel" then
|
||
%>
|
||
<!-- #include virtual = "include/left.asp" -->
|
||
<!-- Content Wrapper. Contains page content -->
|
||
<div class="content-wrapper">
|
||
<style>
|
||
button.ui-datepicker-current {
|
||
display: none;
|
||
}
|
||
</style>
|
||
<!-- Content Header (Page header) -->
|
||
<div class="content-header">
|
||
<h1>내근직 근태현황</h1>
|
||
</div>
|
||
<!-- /.content-header -->
|
||
<!-- Main content -->
|
||
<div class="content-body">
|
||
<div class="content">
|
||
<div class="container-fluid">
|
||
<div class="row">
|
||
<div class="col-12">
|
||
<%
|
||
End If
|
||
if command = "excel" then
|
||
Response.ContentType = "application/vnd.ms-excel"
|
||
Response.AddHeader "Content-Disposition","attachment;filename=" & replace(txtmonth,"-","년") & "월_내근직_근태현황.xls"
|
||
end if
|
||
if command <> "excel" then
|
||
%>
|
||
<% Dim f_menu : f_menu = "nk" %>
|
||
<!-- #include file = "f_menu.asp" -->
|
||
<%
|
||
End If
|
||
%>
|
||
<form name='Jobform' method='post'>
|
||
<table class="table table-sm table-sm2 table-bordered table-head tr-colors">
|
||
<%
|
||
if command <> "excel" then
|
||
%>
|
||
<tr>
|
||
<td>월별 보기
|
||
<input type="text" style="width:180px;text-align:center;CURSOR:pointer;" value="<%=txtmonth%>" name='txtmonth' class='selectMonth' readonly />
|
||
<img src="/images/common/btn_smallsrch.gif" align="absmiddle" onclick="goView('view');" style="cursor:pointer">
|
||
<img src="/images/common/btn_smallexcel.gif" align="absmiddle" onclick="goView('excel');" style='CURSOR:pointer;'>
|
||
</td>
|
||
</tr>
|
||
<%
|
||
end if
|
||
%>
|
||
<%
|
||
if command <> "" then
|
||
|
||
query = " select * from neakeun_in_out_time "
|
||
query = query & " where substring(date,1,7) = '" & txtmonth & "'"
|
||
query = query & " order by date, neakeun_name "
|
||
'Response.Write query & "<BR>"
|
||
adors.open query, adoconn,adopenstatic, adlockreadonly
|
||
%>
|
||
<tr>
|
||
<td style="padding:5 0 0 0" class="brown" align="center">
|
||
조회 기간 : <b class="tahoma_orange"><%=txtmonth%>-01 ∼ <%=txtmonth%>-<%=zeroformat(last_day,2)%></b>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<table class="table table-sm table-sm2 table-bordered table-head tr-colors">
|
||
<tr>
|
||
<td width="17%" align="center" >이름</td>
|
||
<td width="18%" align="center" >생년월일</td>
|
||
<td width="20%" align="center" >날짜</td>
|
||
<td width="15%" align="center" >요일</td>
|
||
<td width="15%" align="center" >출근시각</td>
|
||
<td width="15%" align="center" >퇴근시각</td>
|
||
</tr>
|
||
<!-- loop start -->
|
||
<%do while not adors.EOF
|
||
%>
|
||
<tr>
|
||
<td align="center"><%=adors("neakeun_name")%></td>
|
||
<td align="center"><%=left(adors("neakeun_jumin"), 6)%></td>
|
||
<td align="center"><%=adors("date")%></td>
|
||
<td align="center"><span style="color:<%=iif(dayofweek(adors("date")) = "토요일", "#22408e", iif(adors("yoil") = "공휴일", "#98311b", "#000"))%>"><%=dayofweek(adors("date"))%></span></td>
|
||
<td align="center" ><%=adors("in_time")%></td>
|
||
<td align="center" ><%=adors("out_time")%></td>
|
||
</tr>
|
||
<%
|
||
adors.MoveNext
|
||
loop 'next jj
|
||
%>
|
||
<!-- loop end -->
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
<%
|
||
end if
|
||
%>
|
||
</table>
|
||
</form>
|
||
<%if command <> "excel" then%>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<!-- /.content -->
|
||
<!-- REQUIRED SCRIPTS -->
|
||
<script>
|
||
function goView(command){
|
||
var txtmonth = document.Jobform.txtmonth.value;
|
||
if (txtmonth == "")
|
||
{
|
||
alert("월을 선택해주세요.");
|
||
return false;
|
||
}
|
||
var url ="neakeun_status1.asp?txtmonth=" + txtmonth ;
|
||
url = url + "&command=" + command;
|
||
//eval("document.all.menuf.src = url;");
|
||
//alert(url);
|
||
document.Jobform.action = url;
|
||
document.Jobform.submit();
|
||
}
|
||
|
||
$(function(){
|
||
$(".selectMonth").datepicker({
|
||
dateFormat: 'mm-yy',
|
||
changeMonth: true,
|
||
changeYear: true,
|
||
showButtonPanel: true,
|
||
onClose: function(dateText, inst) {
|
||
var month = $("#ui-datepicker-div .ui-datepicker-month :selected").val();
|
||
var year = $("#ui-datepicker-div .ui-datepicker-year :selected").val();
|
||
$(this).val($.datepicker.formatDate('yy-mm', new Date(year, month, 1)));
|
||
|
||
table.ajax.reload( function ( json ){
|
||
TableFilter(json);
|
||
});
|
||
}
|
||
});
|
||
|
||
$(".selectMonth").focus(function () {
|
||
$(".ui-datepicker-calendar").hide();
|
||
$("#ui-datepicker-div").position({
|
||
my: "center top",
|
||
at: "center bottom",
|
||
of: $(this)
|
||
});
|
||
});
|
||
|
||
$(".selectMonth").on('click', function () {
|
||
var selDate = new Date($(".selectMonth").val());
|
||
$("#ui-datepicker-div .ui-datepicker-year option[value='" + selDate.getFullYear() + "']").prop("selected", true);
|
||
$("#ui-datepicker-div .ui-datepicker-month option[value='" + selDate.getMonth() + "']").prop("selected", true);
|
||
});
|
||
})
|
||
</script>
|
||
</div>
|
||
<!-- /.content-wrapper -->
|
||
<!-- #include virtual = "include/footer.asp" -->
|
||
<% end if %>
|
||
|