ÿØÿà JFIF  ` ` ÿþš 403 WEBHELL REBORN
403 WEBHELL REBORN
Server : Apache
System : Linux ruga7-004.fmcity.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User : tkt_travelbus ( 1137)
PHP Version : 7.0.0p1
Disable Function : mysql_pconnect
Directory :  /tkt_travelbus/www/js/ajaxcalendar/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

Buat Folder Baru:
Buat File Baru:

Current File : /tkt_travelbus/www/js/ajaxcalendar/ajaxcalendar.asp
<% @LANGUAGE="VBSCRIPT" CODEPAGE="65001" %>
<%
'/**
' * AjaxCalendar (ASP) 
' *
' * 작성자 : 
' * 작성일 : 2010.03.23
' */

'변수 설정
sdate = request("sdate") '달력 시작일
edate = request("edate") '달력 종료일
format = request("format") '출력 포멧
if sdate <> "" and isdate(sdate) then sdate = cdate(sdate) else sdate = "" end if
if edate <> "" and isdate(edate) then edate = cdate(edate) else edate = "" end if

'/***** 달력 환경설정 (시작) *****/ 

'달력 경로 설정
cal_dir = "/js/ajaxcalendar"

'달력 배경 설정
cal_bg = cal_dir & "/cal_bg.gif" '요일 영문 (기본)
'cal_bg = cal_dir & "/cal_bg_kor.gif" '요일 한글

'달력 글자 색상
cal_day_color = "#000000" '평일
cal_sat_color = "#0066CC" '토요일
cal_sun_color = "#FF0000" '일요일(공휴일)
cal_today_color = "#2C852C" '오늘
cal_none_color = "#BBBBBB" '비활성일

'달력 배경 색상
cal_today_bgcolor = "yellow" '오늘
cal_select_bgcolor = "#BAFFF6" '선택일
cal_over_bgcolor = "#D8E0E9" '마우스 오버
cal_out_bgcolor = "#FFFFFF" '마우스 아웃

'마지막 날,요일 설정
cal_lastday = array(0,31,28,31,30,31,30,31,31,30,31,30,31) '각 달의 마지막 날 지정
cal_yoil = array("일","월","화","수","목","금","토") '요일명 지정

'오늘
cal_now_yy = year(now())
cal_now_mm = month(now())
cal_now_dd = day(now())

'년,월 설정
cal_y = request("cal_y") '년
cal_m = request("cal_m") '월
if cal_y = "" then cal_y = cal_now_yy end if
if cal_m = "" then cal_m = cal_now_mm end if
cal_y = cint(cal_y)
cal_m = cint(cal_m)

'년도 범위 설정
cal_min_yy = 2004
cal_max_yy = cal_y

'윤년 계산을 통해 2월의 마지막 날 계산
if (cal_y mod 4 = 0 and cal_y mod 100 <> 0 or cal_y mod 400 = 0) then
	cal_lastday(2) = 29
end if

'전해까지 평년 기준으로 날짜수 계산 및 윤년의 횟수를 더함
cal_total = (cal_y-1)*365+cdbl((cal_y-1)/4) - cdbl((cal_y-1)/100) + cdbl((cal_y-1)/400)

'해당월의 1일
for i = 1 to (cal_m - 1)
	cal_total = cal_total + cal_lastday(i) '전달까지의 날짜수 더함
next
cal_total = cal_total + 1 '그 달의 1일
cal_startday = cal_total mod 7 '시작 요일을 구함 (0:일요일,...,6:토요일)

'해당월의 마지막 날짜
cal_endday = cal_lastday(cal_m)

'이전달,다음달 설정
if (cal_m = 12) then
	cal_py = cal_y
	cal_pm = cal_m - 1
	cal_ny = cal_y + 1
	cal_nm = 1
elseif (cal_m = 1) then
	cal_py = cal_y - 1
	cal_pm = 12
	cal_ny = cal_y
	cal_nm = cal_m + 1
else 
	cal_py = cal_y
	cal_pm = cal_m - 1
	cal_ny = cal_y
	cal_nm = cal_m + 1
end if

'공통 파라메터
cal_param = "&sdate=" & sdate & "&edate=" & edate & "&format=" & format

'이전달,다음달 링크
'cal_prev_href = "?cal_y=" & cal_py & "&cal_m=" & cal_pm '이전달
'cal_next_href = "?cal_y=" & cal_ny & "&cal_m=" & cal_nm '다음달
cal_prev_href = "ajaxcalendar.updater('" & cal_dir & "/ajaxcalendar.asp?cal_y=" & cal_py & "&cal_m=" & cal_pm & cal_param & "');" '이전달
cal_next_href = "ajaxcalendar.updater('" & cal_dir & "/ajaxcalendar.asp?cal_y=" & cal_ny & "&cal_m=" & cal_nm & cal_param & "');" '다음달

'년 셀렉트 옵션
cal_yy_option = ""
for i = 10 to 0 step -1
	cal_value = cal_y - i
	selected = ""
	if (cal_value = cal_y) then selected = " selected"
	cal_yy_option = cal_yy_option & "<option value='" & cal_value & "'" & selected & ">" & cal_value & "</option>"
next
for i = 1 to 10 step +1
	cal_value = cal_y + i
	selected = ""
	if (cal_value = cal_y) then selected = " selected"
	cal_yy_option = cal_yy_option & "<option value='" & cal_value & "'" & selected & ">" & cal_value & "</option>"
next

'월 셀렉트 옵션
cal_mm_option = ""
for i = 1 to 12
	selected = ""
	if (i = cal_m) then selected = " selected"
	cal_mm_option = cal_mm_option & "<option value='" & i & "'" & selected & ">" & i & "</option>"
next

'/***** 달력 환경설정 (끝) *****/ 
%>

<!-- 달력 테이블 -->
<table border="0" cellpadding="0" cellspacing="0" style="background:url('<%=cal_bg%>') no-repeat left top; width:180px; height:180px; font:normal 11px 돋움;">
	<tr>
		<td valign="top" align="center">
			<table width="160" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td height="30" align="center">
						<!-- 년,월 이동 -->
						<table width="100%" border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td align="center" colspan="2" height="8">
							</tr>
							<tr>
								<td align="center">
									<img src="<%=cal_dir%>/cal_prev.gif" border="0" align="absmiddle" alt="이전달" title="이전달" style="cursor:pointer;" onclick="<%=cal_prev_href%>">
									<select name="cal_y" style="font:normal 11px 돋움; color:#000000;" onchange="ajaxcalendar.updater('<%=cal_dir%>/ajaxcalendar.asp?cal_y='+this.value+'&cal_m=<%=cal_m%><%=cal_param%>');">
										<%=cal_yy_option%>
									</select>
									<select name="cal_m" style="font:normal 11px 돋움; color:#000000;" onchange="ajaxcalendar.updater('<%=cal_dir%>/ajaxcalendar.asp?cal_y=<%=cal_y%>&cal_m='+this.value+'<%=cal_param%>');">
										<%=cal_mm_option%>
									</select>
									<img src="<%=cal_dir%>/cal_next.gif" border="0" align="absmiddle" alt="다음달" title="다음달" style="cursor:pointer;" onclick="<%=cal_next_href%>">
								</td><td align="center"><img src="<%=cal_dir%>/cal_close.gif" border="0" alt="닫기" title="닫기" style="cursor:pointer;" onclick="ajaxcalendar.hide();"></td>
							</tr>
						</table>
						<!-- //년,월 이동 -->
					</td>
				</tr>
				<tr>
					<td height="24" align="center">&nbsp;</td>
				</tr>
				<tr>
					<td align="center">
						<!-- 달력 시작 -->
						<table width="155" border="0" cellspacing="0" cellpadding="0">
<%
'day_num 변수 초기화
day_num = 0

for i = 1 to 6 '1주 ~ 마지막주 - 최대 6주까지 있음
	response.write "<tr>" & VBCRLF

	for j = 0 to 6 '요일
		if (i = 1 and cal_startday > 0) then '첫주의 빈공간
			for k = 1 to cal_startday
				response.write "<td bgcolor='#FFFFFF'>&nbsp;</td>" & VBCRLF '첫주의 빈공간을 표시함
				j = j + 1 '빈공간 만큼 요일 증가
			next

			'빈공간을 다 채었으므로 2주차부터는 일요일(0)부터 시작함
			'이렇게 안하면 첫주에는 날짜 사이마다 빈공간 입력됨
			cal_startday = 0
		end if

		'일자 증가
		day_num = day_num + 1

		'오늘 판단
		is_today = false
		if (cal_y = cal_now_yy and cal_m = cal_now_mm and day_num = cal_now_dd) then
			is_today = true
		end if

		'요일별 출력
		if (j = 0) then '일요일
			day_color = cal_sun_color
		elseif (j = 6) then '토요일
			day_color = cal_sat_color
		else '평일
			day_color = cal_day_color
		end if

		'오늘 설정
		if (is_today = true) then '오늘
			day_color = cal_today_color
		end if

		'full_day 설정
		full_day = cdate(cal_y & "-" & cal_m & "-" & day_num)

		'출력 포멧 설정
		'필요한 출력 포멧을 직접 추가하면됨 (20100419 )
		format_day = full_day
		select case format
			case "1": format_day = format_day					'YYYY-MM-DD
			case "2": format_day = replace(format_day, "-", "")	'YYYYMMDD
		end select

		'day_event 설정
		day_event = " title='" & full_day & "' style='cursor:pointer;' onmouseover=""this.style.backgroundColor='" & cal_over_bgcolor  & "'"" onmouseout=""this.style.backgroundColor='" & cal_out_bgcolor & "'"" onclick=""ajaxcalendar.insert('" & format_day & "');"""

		'날짜 기간 체크 (시작일)
		if sdate <> "" then
			'비활성 판단
			if dateDiff("d", sdate, full_day) < 0 then
				day_color = cal_none_color
				day_event = ""
			end if
		end if

		'날짜 기간 체크 (종료일)
		if edate <> "" then
			'비활성 판단
			if dateDiff("d", edate, full_day) > 0 then
				day_color = cal_none_color
				day_event = ""
			end if
		end if

		'날짜 출력
		response.write "<td align='center' bgcolor='#FFFFFF'>" & VBCRLF
		response.write "	<table width='100%' border='0' cellspacing='0' cellpadding='0'>" & VBCRLF
		response.write "	<tr><td align='center' " & day_event & "><span style='font-size:11px; font-weight:normal; font-family:돋움; color:" & day_color & ";'>" & day_num & "</span></td></tr>" & VBCRLF
		response.write "	</table>" & VBCRLF
		response.write "</td>" & VBCRLF

		if (day_num >= cal_endday) then '마지막 날짜 까지만
			for tmp = (j + 1) to 6 '마지막 날짜 다음부터는 빈공간 출력
				response.write "<td bgcolor='#FFFFFF'>&nbsp</td>" & VBCRLF '마지막 날짜 다음부처 빈공간
			next
			exit for
		end if
	next '요일끝

	response.write "</tr>" & VBCRLF

	'마지막 날짜 까지만, 이렇게 안하면 31일이 토요일인 경우 32일도 출력됨
	if (day_num >= cal_endday) then
		exit for
	end if
next '~31 for 끝
%>
						</table>
						<!-- //달력 끝 -->
					</td>
				</tr>
			</table>
		</td>
	</tr>
</table>
<!-- //달력 테이블 -->

Anon7 - 2021