최초커밋
This commit is contained in:
198
contact/include/calendar_month.html
Normal file
198
contact/include/calendar_month.html
Normal file
@@ -0,0 +1,198 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>KRI WEB CALENDAR</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr">
|
||||
</head>
|
||||
<link rel="StyleSheet" href="lucis.css" type="text/css">
|
||||
<script language="JavaScript">
|
||||
<!--
|
||||
if (document.all) {
|
||||
docObj = "document.all."
|
||||
styleObj = ".style"
|
||||
} else {
|
||||
docObj = "document."
|
||||
styleObj = ""
|
||||
}
|
||||
var icount = 0;
|
||||
function parseUrl() {
|
||||
var myValueIn = unescape(location.search.replace(/\+/g,' '));
|
||||
|
||||
myValueIn = myValueIn.substring(1).split('&');
|
||||
|
||||
var year = 0;
|
||||
var month = 0;
|
||||
var actval = "";
|
||||
|
||||
for(i=0;i<myValueIn.length;i++)
|
||||
myValueIn[i] = myValueIn[i].split('=');
|
||||
|
||||
for(i=0;i<myValueIn.length;i++){
|
||||
if(myValueIn[i][0] == "year") year = parseInt(myValueIn[i][1]);
|
||||
if(myValueIn[i][0] == "month") month = parseInt(myValueIn[i][1]);
|
||||
if(myValueIn[i][0] == "actval") actval = myValueIn[i][1];
|
||||
if(myValueIn[i][0] == "icount") icount = myValueIn[i][1];
|
||||
}
|
||||
setCal(year,month,actval);
|
||||
}
|
||||
|
||||
function leapYear(year) {
|
||||
if (year % 4 == 0) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
function getDays(month, year) {
|
||||
var ar = new Array(12);
|
||||
ar[0] = 31; ar[1] = (leapYear(year)) ? 29 : 28; ar[2] = 31; ar[3] = 30; ar[4] = 31; ar[5] = 30;
|
||||
ar[6] = 31; ar[7] = 31; ar[8] = 30; ar[9] = 31; ar[10] = 30; ar[11] = 31;
|
||||
return ar[month];
|
||||
}
|
||||
|
||||
function getMonthName(month) {
|
||||
var ar = new Array(12);
|
||||
ar[0] = "1<><31>"; ar[1] = "2<><32>"; ar[2] = "3<><33>"; ar[3] = "4<><34>"; ar[4] = "5<><35>"; ar[5] = "6<><36>";
|
||||
ar[6] = "7<><37>"; ar[7] = "8<><38>"; ar[8] = "9<><39>"; ar[9] = "10<31><30>"; ar[10] = "11<31><31>"; ar[11] = "12<31><32>";
|
||||
return ar[month];
|
||||
}
|
||||
|
||||
function setCal(year,month,actval) {
|
||||
var now = new Date();
|
||||
month = month - 1;
|
||||
var curyear = now.getYear();
|
||||
var curmonth = now.getMonth();
|
||||
if(year==0) year = now.getYear();
|
||||
if(month<0||month>11) month = now.getMonth();
|
||||
|
||||
var monthName = getMonthName(month);
|
||||
var date = now.getDate();
|
||||
now = null;
|
||||
|
||||
var firstDayInstance = new Date(year, month, 1);
|
||||
var firstDay = firstDayInstance.getDay();
|
||||
firstDayInstance = null;
|
||||
|
||||
var days = getDays(month, year);
|
||||
|
||||
drawCal(firstDay + 1, days, date, monthName, year, month, curyear, curmonth, actval);
|
||||
}
|
||||
|
||||
function drawCal(firstDay, lastDate, date, monthName, year, month, curyear, curmonth, actval) {
|
||||
var headerHeight = " "; // <20><><EFBFBD>̺<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
var border = 0; // <20><><EFBFBD>̺<EFBFBD> <20>θ<D7B5>
|
||||
var cellspacing = "1"; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
var headerColor = "black"; // <20><><EFBFBD>̺<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
var headerSize = "2"; // <20><><EFBFBD>̺<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> ũ<><C5A9>
|
||||
var colWidth = "27"; // <20><><EFBFBD>̺<EFBFBD> <20><><EFBFBD><EFBFBD> ũ<><C5A9>
|
||||
var dayCellHeight = "22";// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
var dayColor = "white"; // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
var cellHeight = "20"; // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
var todayColor = "red"; // <20><><EFBFBD><EFBFBD> <20><>¥ <20><><EFBFBD><EFBFBD>
|
||||
var timeColor = "blue"; // <20>ð<EFBFBD> ǥ<><C7A5> <20><><EFBFBD><EFBFBD>
|
||||
|
||||
var text = "";
|
||||
text += '<TABLE BORDER=' + border + ' CELLSPACING=' + cellspacing + ' align=\'center\'>';
|
||||
text += '<TR COLSPAN=1 HEIGHT=' + headerHeight + ' bgcolor="#FFFFFF">';
|
||||
/*<2A><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ <20>ڽ<EFBFBD> <20><><EFBFBD><EFBFBD>*/
|
||||
text += '<td>'+
|
||||
'<table border="0" width=\' \' height=\' \' >'+
|
||||
'<form name=\'date_list\'>'+
|
||||
'<input type=\'hidden\' name=\'actval\' value='+actval+'><tr>'+
|
||||
'<td align=center>'+
|
||||
'<select name=\'year\' onchange=\'change_year();\'>';
|
||||
|
||||
for(var i=1950; i<(curyear+2); i++) {
|
||||
if(year != i) {
|
||||
text += '<option value='+i+' >'+i;
|
||||
} else {
|
||||
text += '<option value='+i+' selected>'+i;
|
||||
}
|
||||
}
|
||||
text += '</select><b><3E><>'+
|
||||
'</td>'+
|
||||
'</tr></table></td>';
|
||||
|
||||
text += '<td>';
|
||||
text += '<img src="../imgs/common/rec_purple.gif" border=0 align=absmiddle OnClick="window.close()" style="cursor:hand" >';
|
||||
text += '</FONT></td>';
|
||||
|
||||
text += '</TR></form>';
|
||||
text += '</TABLE>';
|
||||
text += '<TABLE BORDER=' + border + ' CELLSPACING=' + cellspacing + ' bgcolor="#977BD0">';
|
||||
|
||||
var openCol = '<TD WIDTH=' + colWidth + ' HEIGHT=' + dayCellHeight + '>';
|
||||
openCol += '<FONT COLOR="' + dayColor + '">';
|
||||
var closeCol = '</FONT></TD>';
|
||||
|
||||
var digit = 0;
|
||||
for (var row = 1; row <=3; ++row){
|
||||
text += '<TR bgcolor="white" ALIGN="center">';
|
||||
for(var col = 1; col <= 4; ++col){
|
||||
digit++;
|
||||
text += '<TD bgcolor=yellow style=\'cursor:hand\' HEIGHT=50 width=50';
|
||||
text += ' onMouseOver="this.style.backgroundColor=\'#E1E9FF\'" onMouseOut="this.style.backgroundColor=\'\'"';
|
||||
text += ' onClick="sendVal(\'' + year + '\',\''+ digit + '\',\'' + actval + '\');">';
|
||||
text += digit + " <20><>";
|
||||
text += '</TD>';
|
||||
}
|
||||
text += '</TR>';
|
||||
}
|
||||
|
||||
|
||||
text += '</TABLE>';
|
||||
document.write(text);
|
||||
}
|
||||
|
||||
function sendVal(year, mon, actval) {
|
||||
|
||||
var dateStr = "";
|
||||
|
||||
if (mon <10) mon = 0+mon;
|
||||
|
||||
dateStr = year+ '-' + mon;
|
||||
|
||||
if((actval!=""||actval!= null)&&opener) {
|
||||
if(eval("opener.document.forms[0]." + actval)) {
|
||||
eval("opener.document.forms[0]." + actval).value = dateStr;
|
||||
eval("opener.document.forms[0]." + actval).focus();
|
||||
}
|
||||
} else alert(dateStr);
|
||||
|
||||
|
||||
|
||||
self.close();
|
||||
}
|
||||
|
||||
function change_year() {
|
||||
location.href = "calendar_month.html?year=" + date_list.year.value + "&actval=" + date_list.actval.value + "&icount="+icount; //+ "&month=" + date_list.month.value
|
||||
}
|
||||
|
||||
|
||||
|
||||
function SetInit()
|
||||
{ var ileft = new Number;
|
||||
var itop = new Number;
|
||||
ileft = window.event.clientX;
|
||||
itop = window.event.clientY;
|
||||
|
||||
//alert(ileft + " : " + itop);
|
||||
window.resizeTo(200,300);
|
||||
if((ileft) < 0 ) ileft = 0;
|
||||
if((itop) < 0 ) itop = 0;
|
||||
if(icount == 0){
|
||||
icount++;
|
||||
window.moveBy(ileft-50, itop-50);
|
||||
}
|
||||
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</head>
|
||||
<body bgcolor="#EEEEFF" leftmargin="0" topmargin="8" marginwidth="0" marginheight="0" OnLoad="SetInit()">
|
||||
<script language="JavaScript">
|
||||
<!--
|
||||
parseUrl();
|
||||
icount++;
|
||||
//alert(icount);
|
||||
//-->
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user