%
'----------------------------------------------------------------------------------------
'yyyymmddÀÇ Çü½ÄÀ¸·Î Æ÷¸Ë
'----------------------------------------------------------------------------------------
Function GetFormatDate1(dtDate)
GetFormatDate1 = year(dtDate) & Right("0" & Month(dtDate),2) & Right("0"&day(dtDate),2)
End Function
'----------------------------------------------------------------------------------------
'yyyymmdd ¸¦ yyyy-mm-dd·Î
'----------------------------------------------------------------------------------------
Function GetFormatDate2(strDt)
GetFormatDate2 = mid(strDt, 1, 4) & "-" & mid(strDt, 5, 2) & "-" & mid(strDt, 7, 2)
End Function
'----------------------------------------------------------------------------------------
'firstValue°¡ NullÀ̸é DefaultValue¸¦ return, NullÀÌ ¾Æ´Ï¸é firstValue¸¦ return
'----------------------------------------------------------------------------------------
Function SetDefault(firstValue, DefaultValue)
if firstValue = "" then
SetDefault = DefaultValue
else
SetDefault = firstValue
end if
End Function
'----------------------------------------------------------------------------------------
'ºó¹®ÀÚÀÌ¸é ·Î Ä¡È¯
'----------------------------------------------------------------------------------------
Function WriteChar(str)
if (trim(str) = "") or (isnull(str)) then
WriteChar = " "
else
WriteChar = str
end if
End Function
'----------------------------------------------------------------------------------------
'¼öÀÚÇüÀÇ µ¥ÀÌŸ¸¦ ¼¼ÀÚ¸®¸¶´Ù ÄÞ¸¶Ç¥½Ã (0Àº " "·Î return)
'----------------------------------------------------------------------------------------
Function WriteNumberZeroNull1(num)
if num <> "" then
if num <> 0 then
WriteNumberZeroNull1 = Formatnumber(num, 0)
elseif num = 0 then
WriteNumberZeroNull1 = " "
end if
else
WriteNumberZeroNull1 = " "
end if
End Function
'----------------------------------------------------------------------------------------
'¼öÀÚÇüÀÇ µ¥ÀÌŸ¸¦ ¼¼ÀÚ¸®¸¶´Ù ÄÞ¸¶Ç¥½Ã (0Àº ""À¸·Î return)
'----------------------------------------------------------------------------------------
Function WriteNumberZeroNull2(num)
if num <> "" then
if num <> 0 then
WriteNumberZeroNull2 = Formatnumber(num, 0)
elseif num = 0 then
WriteNumberZeroNull2 = ""
end if
else
WriteNumberZeroNull2 = ""
end if
End Function
'----------------------------------------------------------------------------------------
'¼öÀÚÇüÀÇ µ¥ÀÌŸ¸¦ ¼¼ÀÚ¸®¸¶´Ù ÄÞ¸¶Ç¥½Ã (0Àº 0À¸·Î return)
'----------------------------------------------------------------------------------------
Function WriteNumber(num)
if num > 0 then
WriteNumber = Formatnumber(num, 0)
elseif num < 0 then
WriteNumber = Formatnumber(num, 0)
elseif num = 0 then
WriteNumber = "0"
else
WriteNumber = " "
end if
End Function
'----------------------------------------------------------------------------------------
'numÀÌ NullÀ̸é 0À» return, NullÀÌ ¾Æ´Ï¸é numÀ» return
'----------------------------------------------------------------------------------------
Function NullCheck(num)
if num = "" then
NullCheck = 0
else
if len(trim(num)) <= 0 then
NullCheck = 0
end if
NullCheck = num
end if
End Function
'----------------------------------------------------------------------------------------
'¸Þ¼¼Áö Ç¥½ÃÇϱâ
'----------------------------------------------------------------------------------------
Sub DisplayMsg(intGb, strUrl)
Dim strMsg
select case intGb
case 0
strMsg = "DB°¡ ÀÌ»óÇÕ´Ï´Ù."
case 1
strMsg = "Á¶È¸µÈ ÀÚ·á°¡ ¾ø½À´Ï´Ù."
case 2
strMsg = "¼öÁ¤µÇ¾ú½À´Ï´Ù."
case 3
strMsg = "¼öÁ¤µÇÁö ¾Ê¾Ò½À´Ï´Ù."
case 4
strMsg = "µî·ÏµÇ¾ú½À´Ï´Ù."
case 5
strMsg = "µî·ÏµÇÁö ¾Ê¾Ò½À´Ï´Ù."
case 6
strMsg = "»ý¼ºµÇ¾ú½À´Ï´Ù."
case 7
strMsg = "»ý¼ºµÇÁö ¾Ê¾Ò½À´Ï´Ù."
case 8
strMsg = "»èÁ¦µÇ¾ú½À´Ï´Ù."
case 9
strMsg = "»èÁ¦µÇÁö ¾Ê¾Ò½À´Ï´Ù."
case 10
strMsg = "ÀúÀåµÇ¾ú½À´Ï´Ù."
case 11
strMsg = "ÀúÀåµÇÁö ¾Ê¾Ò½À´Ï´Ù."
end select
if strUrl <> "" then
response.write " " & vbnewline
else
response.write " " & vbnewline
end if
End Sub
'----------------------------------------------------------------------------------------
'Ư¼ö¹®ÀÚ¸¦ º¯È¯
'----------------------------------------------------------------------------------------
Function EncodeWord(ByVal CheckValue)
CheckValue = replace(CheckValue, "'", "''")
EncodeWord = CheckValue
End Function
'----------------------------------------------------------------------------------------
'Ư¼ö¹®ÀÚ¸¦ º¯È¯
'----------------------------------------------------------------------------------------
Function DecodeWord(ByVal CheckValue)
CheckValue = replace(CheckValue, "''", "'")
DecodeWord = CheckValue
End Function
'----------------------------------------------------------------------------------------
'html ÅÂ±× º¯È¯
'----------------------------------------------------------------------------------------
Function Tag2Text(text)
Dim str
str = Replace(text, "&" , "&")
str = Replace(str, "<", "<")
str = Replace(str, ">", ">")
Tag2Text = str
End Function
%>