최초커밋
This commit is contained in:
151
index.asp
Normal file
151
index.asp
Normal file
@@ -0,0 +1,151 @@
|
||||
<!-- #include virtual = "include/header.asp" -->
|
||||
<!-- #include virtual = "include/left.asp" -->
|
||||
<!-- Content Wrapper. Contains page content -->
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<div class="content-header">
|
||||
<h1>Main</h1>
|
||||
</div>
|
||||
<!-- /.content-header -->
|
||||
<!-- Main content -->
|
||||
<div class="content-body">
|
||||
<div class="content">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<!-- #include file = "login/main_note_12.asp" -->
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<!-- #include file = "login/main_project.asp" -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="display:none;" >
|
||||
<div class="col-6">
|
||||
<!-- #include file = "login/main_notice.asp" -->
|
||||
</div>
|
||||
<div class="col-6" id="calDiv">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="display:none;" >
|
||||
<div class="col-12">
|
||||
<!-- #include file = "login/main_project.asp" -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<!-- #include file = "login/main_ess.asp" -->
|
||||
</div>
|
||||
<div id="workDialog">
|
||||
<!-- #include file = "login/work_div.asp" -->
|
||||
</div>
|
||||
<div id="SignDialog">
|
||||
<!-- #include file = "login/SignPad.asp" -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.content -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/signature_pad@2.3.2/dist/signature_pad.min.js"></script>
|
||||
<!-- REQUIRED SCRIPTS -->
|
||||
<script>
|
||||
|
||||
|
||||
|
||||
var SignDialog = $("#SignDialog").dialog({
|
||||
width:"390",
|
||||
autoOpen:false,
|
||||
modal:true,
|
||||
resizable:false,
|
||||
title:"<22><><EFBFBD>ڰ<EFBFBD><DAB0><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>"
|
||||
});
|
||||
|
||||
SignDialog.dialog("option", "position", {
|
||||
my: 'center',
|
||||
at: 'center',
|
||||
of: window
|
||||
});
|
||||
|
||||
function SignDialogOpen(){
|
||||
SignDialog.dialog("open");
|
||||
}
|
||||
|
||||
var signaturePad = new SignaturePad($("#canv")[0], {
|
||||
backgroundColor: 'rgb(255, 255, 255)',
|
||||
penColor: 'rgb(0, 0, 0)',
|
||||
minWidth: 1,
|
||||
maxWidth: 5
|
||||
});
|
||||
|
||||
var blankCanvasData = signaturePad.toDataURL();
|
||||
function isCanvasBlank(canvas) {
|
||||
return canvas.toDataURL() === blankCanvasData;
|
||||
}
|
||||
|
||||
$(function(){
|
||||
var ym = new Date().format("yyyy-MM");
|
||||
$("#calDiv").load("/login/main_calendar.asp", {"ym":ym});
|
||||
$(document).on("click", "#calDiv th[data-action='previous']", function(){
|
||||
var ymDate = new Date(ym);
|
||||
var ymGetMonth = ymDate.getMonth();
|
||||
ymDate.setMonth(ymGetMonth - 1);
|
||||
ym = ymDate.format("yyyy-MM");
|
||||
$("#calDiv").load("/login/main_calendar.asp", {"ym":ym});
|
||||
});
|
||||
$(document).on("click", "#calDiv th[data-action='next']", function(){
|
||||
var ymDate = new Date(ym);
|
||||
var ymGetMonth = ymDate.getMonth();
|
||||
ymDate.setMonth(ymGetMonth + 1);
|
||||
ym = ymDate.format("yyyy-MM");
|
||||
$("#calDiv").load("/login/main_calendar.asp", {"ym":ym});
|
||||
});
|
||||
|
||||
var name = "<%=Session("loginuser")%>";
|
||||
var p_no = "<%=Session("User_Number")%>";
|
||||
var img = new Image();
|
||||
var url = '/images/sign/'+name+'_'+p_no+'.jpg';
|
||||
img.src = url;
|
||||
img.onerror = function(){
|
||||
alert("<22><><EFBFBD>ڰ<EFBFBD><DAB0><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ּ<EFBFBD><D6BC><EFBFBD>.");
|
||||
SignDialogOpen();
|
||||
};
|
||||
|
||||
$("#save").on("click", function(){
|
||||
if(isCanvasBlank(signaturePad)){
|
||||
alert("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><D7B7>ּ<EFBFBD><D6BC><EFBFBD>.");
|
||||
return false;
|
||||
}
|
||||
|
||||
var name = "<%=Session("loginuser")%>";
|
||||
var p_no = "<%=Session("User_Number")%>";
|
||||
var img = new Image();
|
||||
img.onload = function(){
|
||||
var canvas = document.createElement("canvas");
|
||||
canvas.width = 120;
|
||||
canvas.height = 120;
|
||||
canvas.getContext("2d").drawImage(img, 0, 0, 120, 120);
|
||||
var dataURL = canvas.toDataURL("image/png");
|
||||
var imgData = dataURL.replace('data:image/png;base64,', '');
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: "/login/saveSignFile.asp",
|
||||
data: { "imageName" : name + '_' + p_no, "imageData" : imgData },
|
||||
success: function (result) {
|
||||
alert('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ǿ<EFBFBD><C7BE><EFBFBD><EFBFBD>ϴ<EFBFBD>.');
|
||||
SignDialog.dialog("close");
|
||||
}
|
||||
});
|
||||
};
|
||||
img.src = signaturePad.toDataURL("image/png");
|
||||
});
|
||||
|
||||
$("#clear").on("click", function(){
|
||||
signaturePad.clear();
|
||||
});
|
||||
})
|
||||
</script>
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<!-- #include virtual = "include/footer.asp" -->
|
||||
Reference in New Issue
Block a user