최초커밋

This commit is contained in:
2025-09-29 17:55:08 +09:00
parent 90af30c0d0
commit e39813395a
3334 changed files with 338522 additions and 0 deletions

View File

@@ -0,0 +1,361 @@
<!-- #include virtual = "include/header.asp" -->
<%
dim command
command = Request("command")
s_date_st = request("s_date_st")
s_date_end = request("s_date_end")
s_name = request("s_name")
s_work = request("s_work")
s_p_sn = request("s_p_sn")
s_p_subject = request("s_p_subject")
s_column = replace(request("s_column"), " ", "")
Dim column_dic
Set column_dic = Server.CreateObject("Scripting.Dictionary")
With column_dic
.Add "p_child_sn", "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD>ڵ<EFBFBD>"
.Add "p_subject", "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE>"
.Add "prj_code", "CATI<54>ڵ<EFBFBD>"
.Add "new_id", "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ID"
.Add "log_user_name", "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
.Add "log_date", "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
.Add "in_time", "<22><><EFBFBD>ٽð<D9BD>"
.Add "out_time", "<22><><EFBFBD>ٽð<D9BD>"
.Add "first_call", "ùCall"
.Add "Last_call", "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Call"
.Add "<22>Ϸ<EFBFBD>", "<22>Ϸ<EFBFBD>"
.Add "<22><><EFBFBD><EFBFBD>", "<22><><EFBFBD><EFBFBD>"
.Add "<22>ߴ<EFBFBD>", "<22>ߴ<EFBFBD>"
.Add "<22><><EFBFBD>Ϳ<EFBFBD><CDBF><EFBFBD>", "<22><><EFBFBD>Ϳ<EFBFBD><CDBF><EFBFBD>"
.Add "<22><><EFBFBD><EFBFBD>", "<22><><EFBFBD><EFBFBD>"
.Add "<22><><EFBFBD><EFBFBD><EFBFBD>ھƴ<DABE>", "<22><><EFBFBD><EFBFBD><EFBFBD>ھƴ<DABE>"
.Add "<22><><EFBFBD><EFBFBD>", "<22><><EFBFBD><EFBFBD>"
.Add "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
.Add "<22><>ȭ<EFBFBD><C8AD>", "<22><>ȭ<EFBFBD><C8AD>"
.Add "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
End With
if command <> "excel" then
%>
<!-- #include virtual = "include/left.asp" -->
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<style>
.t_table .t_head{
cursor:pointer;
}
</style>
<!-- Content Header (Page header) -->
<div class="content-header">
<h1>CATI <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>Ȳ</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=CATI_Status.xls"
end if
%>
<form name="work_status" method="post">
<input type="hidden" value="<%=command %>" name="command" />
<input type="hidden" value="<%=s_work %>" name="s_work_arr" />
<input type="hidden" value="<%=s_column %>" name="s_column_arr" />
<table class="table table-sm table-sm2 table-bordered table-head tr-colors">
<% If command <> "excel" Then %>
<tr>
<td align="center" width="12%"><3E><> <20><></td>
<td align="left" width="38%">
<input type="text" style="width:120;text-align:center;CURSOR: pointer;" value="<%=s_date_st %>" name="s_date_st" class='selectDate' readonly />
~
<input type="text" style="width:120;text-align:center;CURSOR: pointer;" value="<%=s_date_end %>" name="s_date_end" class='selectDate' readonly />
</td>
<td align="center" width="12%"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD></td>
<td align="left" width="38%">
<input type="text" name="s_name" value="<%=s_name %>" style="width:200px;"/>
</td>
</tr>
<tr>
<td align="center" width="12%"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20>ڵ<EFBFBD></td>
<td align="left" width="38%">
<input type="text" name="s_p_sn" value="<%=s_p_sn %>" style="width:200px;"/>
</td>
<td align="center" width="12%"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><></td>
<td align="left" width="38%">
<input type="text" name="s_p_subject" value="<%=s_p_subject %>" style="width:200px;"/>
</td>
</tr>
<tr>
<td align="center" width="12%"><3E><><EFBFBD><EFBFBD> Column <20><><EFBFBD><EFBFBD></td>
<td align="left" width="88%" colspan="3">
<label class='mx-2' for="log_date"><input type="checkbox" value="log_date" id="log_date" name="s_column"/> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¥</label>
<label class='mx-2' for="intranet_project"><input type="checkbox" value="p_child_sn,p_subject" id="intranet_project" name="s_column"/> <20><>Ʈ<EFBFBD><C6AE><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ</label>
<label class='mx-2' for="prj_code"><input type="checkbox" value="p_child_sn,p_subject,prj_code" id="prj_code" name="s_column"/> CATI <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ</label>
<label class='mx-2' for="log_user_name"><input type="checkbox" value="log_user_name" id="log_user_name" name="s_column"/> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD></label>
</td>
</tr>
<tr>
<td colspan="3" align="right"><font color="red"><b><3E>˻<EFBFBD> <20><> 1<>п<EFBFBD><D0BF><EFBFBD> 10<31><30> <20><><EFBFBD><EFBFBD> <20>ҿ<EFBFBD><D2BF><EFBFBD> <20><> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD></b></font></td>
<td colspan="1" align="right">
<a href="javascript:search_go('view');"><img src="/images/common/btn_smallsrch.gif" /></a>
<a href="javascript:search_go('excel');"><img src="/images/common/btn_smallexcel.gif" /></a>
</td>
</tr>
<% End if %>
<% if command <> "" Then %>
<tr>
<td colspan="4" align="center">
<div style="width:100%;overflow-y:scroll;max-height:545px;height:545px;">
<table class="t_table table table-sm table-sm2 table-bordered table-head tr-colors" style='font-size:12px;'>
<%
query = " SELECT "
if s_column <> "" Then
query = query & " " & s_column & ", "
else
query = query & " p_child_sn, p_subject, prj_code, new_id, log_user_name, log_date, in_time, out_time, first_call, Last_call, "
End if
query = query & " SUM(<28>Ϸ<EFBFBD>) as <20>Ϸ<EFBFBD>, SUM(<28><><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD>, SUM(<28>ߴ<EFBFBD>) as <20>ߴ<EFBFBD>, SUM(<28><><EFBFBD>Ϳ<EFBFBD><CDBF><EFBFBD>) as <20><><EFBFBD>Ϳ<EFBFBD><CDBF><EFBFBD>, SUM(<28><><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD>, "
query = query & " SUM(<28><><EFBFBD><EFBFBD><EFBFBD>ھƴ<DABE>) as <20><><EFBFBD><EFBFBD><EFBFBD>ھƴ<DABE>, SUM(<28><><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD>, SUM(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, SUM(<28><>ȭ<EFBFBD><C8AD>) as <20><>ȭ<EFBFBD><C8AD>, SUM(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) as <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> "
query = query & " FROM "
query = query & " ( "
query = query & " SELECT c.p_child_sn, c.p_subject, a.prj_code, "
query = query & " a.log_user, (SELECT TOP 1 new_id FROM man WHERE id = a.log_user) AS new_id, a.log_user_name, a.log_date, "
query = query & " a.in_time, a.out_time, a.first_call, a.Last_call, "
query = query & " <20>Ϸ<EFBFBD>, <20><><EFBFBD><EFBFBD>, <20>ߴ<EFBFBD>, <20><><EFBFBD>Ϳ<EFBFBD><CDBF><EFBFBD>, <20><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD>ھƴ<DABE>, <20><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><>ȭ<EFBFBD><C8AD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> "
query = query & " FROM V_Cati_callcount a LEFT JOIN new_cati.dbo.project b "
query = query & " ON a.prj_code = b.prj_code LEFT JOIN project2.dbo.T_project_method c "
query = query & " ON b.intranet_project = c.p_child_sn "
query = query & " WHERE a.log_date BETWEEN '" & s_date_st & "' AND '" & s_date_end & "' "
query = query & " ) T "
If s_name <> "" Then
query = query & " AND log_user_name LIKE '%" & s_name & "%' "
End If
If s_p_sn <> "" Then
query = query & " AND p_child_sn LIKE '" & s_p_sn & "%' "
End If
If s_p_subject <> "" Then
query = query & " AND p_subject LIKE '%" & s_p_subject & "%' "
End If
if s_column <> "" Then
query = query & " GROUP BY " & s_column & " "
query = query & " ORDER BY " & s_column & " "
Else
query = query & " GROUP BY p_child_sn, p_subject, prj_code, new_id, log_user_name, log_date, in_time, out_time, first_call, Last_call "
query = query & " ORDER BY p_child_sn, p_subject, prj_code, new_id, log_user_name, log_date, in_time, out_time, first_call, Last_call "
End if
'response.Write query
AdoRs.open query, adoconn, adopenstatic, adlockreadonly
Dim all_cnt
If AdoRs.RecordCount > 0 Then
%>
<tr height="25px" class="t_head">
<%
For i = 0 To AdoRs.fields.count - 1
%>
<%If column_dic.Item(AdoRs.fields(i).Name)="<22>Ϸ<EFBFBD>" Then %>
<td align="center"><3E><> Count&nbsp;</td>
<%End If %>
<td align="center"><%= column_dic.Item(AdoRs.fields(i).Name) %>&nbsp;</td>
<%
Next
%>
</tr>
<%
Else
%>
<tr height="25px">
<td align="center" width="100%"><3E>˻<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD></td>
</tr>
<%
End If
Do While Not AdoRs.Eof
%>
<tr class="t_contents">
<%
For i = 0 To AdoRs.fields.count - 1
If column_dic.Item(AdoRs.fields(i).Name) = "<22>Ϸ<EFBFBD>" Then
all_cnt = 0
all_cnt = Adors("<22>Ϸ<EFBFBD>") + Adors("<22><><EFBFBD><EFBFBD>") + Adors("<22>ߴ<EFBFBD>") + Adors("<22><><EFBFBD>Ϳ<EFBFBD><CDBF><EFBFBD>") +Adors("<22><><EFBFBD><EFBFBD>") + Adors("<22><><EFBFBD><EFBFBD><EFBFBD>ھƴ<DABE>")+ Adors("<22><><EFBFBD><EFBFBD>")+ Adors("<22><><EFBFBD><EFBFBD>")+ Adors("<22><>ȭ<EFBFBD><C8AD>")+ Adors("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
%>
<td align="center" style=""><%= all_cnt %></td>
<%
End If
%>
<td align="center" style=""><%= AdoRs.fields(i) %></td>
<%
Next
%>
</tr>
<%
AdoRs.MoveNext
Loop
%>
</table>
</div>
</td>
</tr>
<% End if %>
</table>
</form>
<%if command <> "excel" then%>
</div>
</div>
</div>
</div>
</div>
<!-- /.content -->
<!-- REQUIRED SCRIPTS -->
<script>
$(function () {
$(".selectDate").datepicker();
if ($("input[name=s_work_arr]").val() != "") {
$("input[name=s_work]").each(function (i) {
if ($("input[name=s_work_arr]").val().indexOf("'" + $(this).val() + "'") > -1) {
$(this).prop("checked", true);
}
});
}
if ($("input[name=s_column_arr]").val() != "") {
$("input[name=s_column]").each(function (i) {
if ($("input[name=s_column_arr]").val().indexOf($(this).val()) > -1) {
$(this).prop("checked", true);
}
});
}
var sort_col_check = [];
$(".t_table .t_head td").each(function (index) {
sort_col_check[index] = 0; // 1<><31> asc, 2<><32> desc, 0<><30> <20>ʱ<EFBFBD>
});
$(".t_table .t_head td").click(function () {
// $(".t_table .t_head td").index(this) Ŭ<><C5AC><EFBFBD><EFBFBD> <20>÷<EFBFBD><C3B7><EFBFBD> INDEX
// $(".t_table .t_head > td").length tr<74><72> column <20><>
// $(".t_table .t_contents").length tr<74><72> row <20><>
// var arr_tb = new array($(".t_table .t_contents").length, $(".t_table .t_head > td").length);
var num_yn = true;
var equal_value = true;
var prev_value = "";
var s_col_index = $(".t_table .t_head td").index(this);
var arr_tb = [];
if (sort_col_check[s_col_index] == 1) {
sort_col_check[s_col_index] = 2;
} else {
sort_col_check[s_col_index] = 1;
}
$(".t_table .t_contents").each(function (tr_i) {
arr_tb[tr_i] = $(this).find("td").eq(s_col_index).text();
if (prev_value == "") {
prev_value = arr_tb[tr_i];
}
if (prev_value != arr_tb[tr_i]) {
equal_value = false;
}
if (isNaN(arr_tb[tr_i]) == true) {
num_yn = false;
}
$(this).find("td").each(function (td_i) {
if (td_i != s_col_index) {
arr_tb[tr_i] = arr_tb[tr_i] + "^||^" + $(this).text();
}
});
});
if (equal_value != true) { // <20>÷<EFBFBD><C3B7><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ʾƾ<CABE> Sort <20><><EFBFBD><EFBFBD>
if (num_yn == true) { // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD>
if (sort_col_check[s_col_index] == 1) {
arr_tb.sort(function (a, b) { return a.split("^||^")[0] - b.split("^||^")[0]; }); // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> Asc
$(".t_table .t_head td").each(function (e) {
if (e == s_col_index) {
$(this).text($(this).text().replace("<22><>", "").replace("<22><>", "") + "<22><>");
} else {
$(this).text($(this).text().replace("<22><>", "").replace("<22><>", ""));
}
});
} else if (sort_col_check[s_col_index] == 2) {
arr_tb.reverse(function (a, b) { return a.split("^||^")[0] - b.split("^||^")[0]; }); // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> Desc
$(".t_table .t_head td").each(function (e) {
if (e == s_col_index) {
$(this).text($(this).text().replace("<22><>", "").replace("<22><>", "") + "<22><>");
} else {
$(this).text($(this).text().replace("<22><>", "").replace("<22><>", ""));
}
});
}
} else { // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD>
if (sort_col_check[s_col_index] == 1) {
arr_tb.sort(); // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> Asc
$(".t_table .t_head td").each(function (e) {
if (e == s_col_index) {
$(this).text($(this).text().replace("<22><>", "").replace("<22><>", "") + "<22><>");
} else {
$(this).text($(this).text().replace("<22><>", "").replace("<22><>", ""));
}
});
} else if (sort_col_check[s_col_index] == 2) {
arr_tb.reverse(); // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> Desc
$(".t_table .t_head td").each(function (e) {
if (e == s_col_index) {
$(this).text($(this).text().replace("<22><>", "").replace("<22><>", "") + "<22><>");
} else {
$(this).text($(this).text().replace("<22><>", "").replace("<22><>", ""));
}
});
}
}
}
$(".t_table .t_contents").each(function (tr_i) {
var tmp_arr = arr_tb[tr_i].split("^||^");
var chk_ind = 0;
$(this).find("td").eq(s_col_index).text(tmp_arr[0]);
for (var i = 0; i < tmp_arr.length; i++) {
if (i != s_col_index) {
chk_ind = chk_ind + 1;
$(this).find("td").eq(i).text(tmp_arr[chk_ind]);
}
}
});
});
});
function dateDiff(_date1, _date2) {
var diffDate_1 = _date1 instanceof Date ? _date1 : new Date(_date1);
var diffDate_2 = _date2 instanceof Date ? _date2 : new Date(_date2);
diffDate_1 = new Date(diffDate_1.getFullYear(), diffDate_1.getMonth() + 1, diffDate_1.getDate());
diffDate_2 = new Date(diffDate_2.getFullYear(), diffDate_2.getMonth() + 1, diffDate_2.getDate());
var diff = Math.abs(diffDate_2.getTime() - diffDate_1.getTime());
diff = Math.ceil(diff / (1000 * 3600 * 24));
return diff;
}
function search_go(command) {
var month_limit = 90;
var frm = document.work_status;
var chk_yn = false;
if (frm.s_date_st.value == "" || frm.s_date_end.value == "") {
alert("<22>Ⱓ<EFBFBD><E2B0A3> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ּ<EFBFBD><D6BC><EFBFBD>");
return;
}
if (dateDiff(frm.s_date_st.value, frm.s_date_end.value) > 90) {
alert("90<39><30> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ⱓ<EFBFBD><E2B0A3> <20>˻<EFBFBD><CBBB><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>");
return;
}
frm.action = "./n_work_status.asp?command=" + command;
frm.submit();
}
</script>
</div>
<!-- /.content-wrapper -->
<!-- #include virtual = "include/footer.asp" -->
<% end if %>