¾È³ç Çϼ¼¿ä?
¾÷·ÎµåÄÄÆ÷³ÍÆ®(ECAM_KSFileUpLoad.FileUpLoad)°¡ ¼³Ä¡ µÇ¾î ÀÖÁö ¾Ê¾Æ¼ ȸ¿ø °¡ÀÔÀÌ ¾ÈµÇ°í ÀÖ½À´Ï´Ù.
ECAM_KSFileUpLoad ¸¦ ±¸ÇÏ·Á°í ÀÏÁÖÀÏ° Çì¸Å¿´Áö¸¸ ¼ÒµæÀÌ ¾ø¾î¼ Æ÷±âÇÏ°í,
TABS¾÷·ÎµåÄÄÆ÷³ÍÆ®·Î ¹Ù²Ù·Á°í Çϴµ¥¿ä...
¾îµð¸¦ ¾î¶»°Ô °íÃÄ¾ß Çϳª¿ä? Âü Ȳ´çÇÑ Áú¹®À¸·Î µé¸®½Ã°ÚÁö¸¸...¸çÄ¥°£ µµ¼°ü¿¡ Àִ åµéÀ» ´Ù µÚÁ® ºÃÁö¸¸...´Þ¸® ¹æµµ°¡ ¾ø¾î¼¿ä... T,.T;
Á¶¾ð ºÎŹ µå¸³´Ï´Ù.
[¿¡·¯ ¸Þ¼¼Áö]
¼¹ö °³Ã¼ error 'ASP 0177 : 800401f3'
Server.CreateObject ½ÇÆÐ
/member/member_insert.asp, line 40
À߸øµÈ ÇÁ·Î±×·¥ IDÀÔ´Ï´Ù. ÀÌ ¸Þ½ÃÁö¿¡ ´ëÇÑ Ãß°¡ Á¤º¸¸¦ º¸·Á¸é ´ÙÀ½ Microsoft ¿Â¶óÀÎ Áö¿ø »çÀÌÆ®¸¦ ¹æ¹®
ÇϽʽÿÀ: http://www.microsoft.com/contentredirect.asp.
================================================================================
<% @LANGUAGE = "VBSCRIPT" %>
<% OPTION EXPLICIT %>
<% RESPONSE.BUFFER = TRUE %>
<% RESPONSE.EXPIRES = 0 %>
<!--#include file = "../LIB/ADOVBS.INC" -->
<!--#include file = "../LIB/DEFAULT.ASP" -->
<%
dim FU
dim strDirectory
dim id , name , reg_id , gender , pwd , phone , fax , handphone , birthday , birthsollu , homepage , email , zip_code
dim address , merried , dcode , school , major , job , picture , reader_yn, reader_id, good_s_dt, good_e_dt
dim attached , strfile , strRet
dim CHK_FLAG, MSG
dim file_nm, file_ext, make_file_nm, tailNum
dim Retval
dim cnt
''''''''''''''''''''''''''''''
'Á¸ÀçÇÏ´Â ¾ÆÀ̵ðÀÎÁö °Ë»ç
function id_exist(member)
dim count
Call connectDatabase() 'DB Connect
SQL = " "
SQL = SQL & " select count(id) "
SQL = SQL & " from member "
SQL = SQL & " where id = '" & member & "'"
Set rs = cn.Execute (SQL)
count = trim(rs(0))
rs.close
Call disconnectDatabase() 'DB disConnect
id_exist = count
end function
''''''''''''''''''''''''''''''
Server.ScriptTimeOut = 99999999
Set FU = Server.CreateObject("ECAM_KSFileUpLoad.FileUpLoad") 'Create FileUpload Object
strDirectory = Server.MapPath("design1")
id = Trim(FU.getValueName("id"))
name = Trim(FU.getValueName("name"))
reg_id = Trim(FU.getValueName("reg_id_1")) & Trim(FU.getValueName("reg_id_2"))
gender = Trim(FU.getValueName("gender"))
pwd = Trim(FU.getValueName("pwd_1"))
phone = Trim(FU.getValueName("phone_1")) & "-" & Trim(FU.getValueName("phone_2")) & "-" & Trim(FU.getValueName("phone_3"))
fax = Trim(FU.getValueName("fax_1")) & "-" & Trim(FU.getValueName("fax_2")) & "-" & Trim(FU.getValueName("fax_3"))
handphone = Trim(FU.getValueName("handphone_1")) & "-" & Trim(FU.getValueName("handphone_2")) & "-" & Trim(FU.getValueName("handphone_3"))
birthday = Trim(FU.getValueName("birthday_1")) & Trim(FU.getValueName("birthday_2")) & Trim(FU.getValueName("birthday_3"))
birthsollu = Trim(FU.getValueName("birthsollu"))
homepage = Trim(FU.getValueName("homepage"))
email = Trim(FU.getValueName("email"))
zip_code = Trim(FU.getValueName("zip_code"))
address = Trim(FU.getValueName("address"))
merried = Trim(FU.getValueName("merried"))
dcode = Trim(FU.getValueName("dcode"))
school = Trim(FU.getValueName("school"))
major = Trim(FU.getValueName("major"))
job = Trim(FU.getValueName("job"))
picture = Mid(Trim(FU.getValueName("picture")), InstrRev(Trim(FU.getValueName("picture")), "\") + 1)
reader_yn = Trim(FU.getValueName("reader_yn"))
good_s_dt = Trim(FU.getValueName("good_s_dt"))
good_e_dt = Trim(FU.getValueName("good_e_dt"))
'response.write reader_yn
'response.end
'reader_id = Trim(FU.getValueName("reader_id"))
'¾ÆÀ̵ð Á¸Àç È®ÀÎ
cnt = id_exist(id)
if cnt >0 then
Response.write "<script language='javascript'>alert('À̹ÌÁ¸ÀçÇÏ´Â ¾ÆÀ̵ð ÀÔ´Ï´Ù.\n´Ù¸¥ ¾ÆÀ̵𸦠¼±ÅÃÇØÁֽʽÿÀ.'); history.back();</script>"
end if
strfile = strDirectory & "\" & picture
If Len(picture) > 3 Then
strRet = FU.FileUpload("picture", CStr(strfile))
End If
'--------------------------------------------------------------------
'Deal By Return Value - Renaming Reupload Or Error Occurring
'--------------------------------------------------------------------
If (Len(strRet) < 10) And Len(picture) > 3 Then
If strRet = "-101" Then 'File Is Null
MSG = """¼±ÅÃÇϽŠÆÄÀÏÀº NullÆÄÀÏ ÀÔ´Ï´Ù."" & chr(13) & chr(13) & ""È®ÀÎÈÄ ´Ù½Ã ½ÃµµÇϽñ⠹ٶø´Ï´Ù."""
response.write "<script language='vbscript'> msgbox " & MSG & ", 16, "" FileUpload Error : The File Is Null""</script>"
CHK_FLAG = "Fail"
ElseIf strRet = "-102" Then 'Is Not A Object
MSG = """ÁöÁ¤µÈ °´Ã¼°¡ Á¸ÀçÇÏÁö ¾Ê½À´Ï´Ù."" & chr(13) & chr(13) & ""È®ÀÎÈÄ ´Ù½Ã ½ÃµµÇϽñ⠹ٶø´Ï´Ù."""
response.write "<script language='vbscript'> msgbox " & MSG & ", 16, "" FileUpload Error : The Object Is Not Exist""</script>"
CHK_FLAG = "Fail"
ElseIf strRet = "-100" Then 'Exists Same File Name
file_nm = Mid(picture, 1, InStrRev(picture, ".") - 1)
file_ext = Mid(picture, InStrRev(picture, ".") + 1)
make_file_nm = file_nm & "_" & Replace(date(),"-","") & Trim(Right(Replace(time(),":",""),6)) & "." & file_ext
strfile = strDirectory & "\" & picture
Set FSO = CreateObject("Scripting.FileSystemObject")
tailNum = 0
Loop_chk = True
Do While Loop_chk
If (FSO.FileExists(strfile)) Then
tailNum = tailNum + 1
make_file_nm = file_nm & "~" & tailNum & "." & file_ext
strfile = strDirectory & "\" & make_file_nm
Else
Loop_chk = False
End If
Loop
Set FSO = Nothing
strRet = FU.FileUpload("picture", CStr(strfile))
picture = make_file_nm
CHK_FLAG = "Success"
Else 'Unknown Problem
MSG = """¾Ë ¼ö ¾ø´Â ÀÌÀ¯·Î ´õÀÌ»óÀÇ °úÁ¤À» ÁøÇàÇÒ ¼ö ¾ø½À´Ï´Ù."" & chr(13) & chr(13) ""È®ÀÎÈÄ ´Ù½Ã ½ÃµµÇϽñ⠹ٶø´Ï´Ù."""
response.write "<script language='vbscript'> msgbox " & MSG & ", 16, "" FileUpload Error : Unknown Error""</script>"
Set FU = Nothing 'Nothing FileUpload Object
CHK_FLAG = "Fail"
End If
End If
'--------------------------------------------------------------------
'Save Row In Database
'--------------------------------------------------------------------
If (Len(strRet) > 10) Or Len(picture) = 0 Then
CHK_FLAG = "Success"
Call connectDatabase() 'DB Connect
Set cm = Server.CreateObject("ADODB.Command")
cm.CommandText = "SP_MEMBER_SAVE"
cm.CommandType = 4
cm.ActiveConnection = cn
cm.Parameters.Append cm.CreateParameter("@iretval", adInteger, adParamReturnValue)
cm.Parameters.Append cm.CreateParameter("@id", adVarChar, adParamInput, 10, id)
cm.Parameters.Append cm.CreateParameter("@name", adVarChar, adParamInput, 50, name)
cm.Parameters.Append cm.CreateParameter("@reg_id", adVarChar, adParamInput, 20, reg_id)
cm.Parameters.Append cm.CreateParameter("@gender", adVarChar, adParamInput, 1, gender)
cm.Parameters.Append cm.CreateParameter("@pwd", adVarChar, adParamInput, 10, pwd)
cm.Parameters.Append cm.CreateParameter("@phone", adVarChar, adParamInput, 20, phone)
cm.Parameters.Append cm.CreateParameter("@fax", adVarChar, adParamInput, 20, fax)
cm.Parameters.Append cm.CreateParameter("@handphone", adVarChar, adParamInput, 20, handphone)
cm.Parameters.Append cm.CreateParameter("@birthday", adVarChar, adParamInput, 8, birthday)
cm.Parameters.Append cm.CreateParameter("@birthsollu", adVarChar, adParamInput, 1, birthsollu)
cm.Parameters.Append cm.CreateParameter("@homepage", adVarChar, adParamInput, 200, homepage)
cm.Parameters.Append cm.CreateParameter("@email", adVarChar, adParamInput, 100, email)
cm.Parameters.Append cm.CreateParameter("@zipcode", adVarChar, adParamInput, 10, zip_code)
cm.Parameters.Append cm.CreateParameter("@address", adVarChar, adParamInput, 200, address)
cm.Parameters.Append cm.CreateParameter("@merried", adVarChar, adParamInput, 10, merried)
cm.Parameters.Append cm.CreateParameter("@dcode", adVarChar, adParamInput, 10, dcode)
cm.Parameters.Append cm.CreateParameter("@school", adVarChar, adParamInput, 100, school)
cm.Parameters.Append cm.CreateParameter("@major", adVarChar, adParamInput, 100, major)
cm.Parameters.Append cm.CreateParameter("@job", adVarChar, adParamInput, 10, job)
cm.Parameters.Append cm.CreateParameter("@picture", adVarChar, adParamInput, 100, picture)
cm.Parameters.Append cm.CreateParameter("@auth_yn", adVarChar, adParamInput, 1, "N")
cm.Parameters.Append cm.CreateParameter("@reader_yn", adVarChar, adParamInput, 1, reader_yn)
cm.Parameters.Append cm.CreateParameter("@reader_id", adVarChar, adParamInput, 20, "")
cm.Parameters.Append cm.CreateParameter("@good_s_dt", adVarChar, adParamInput, 8, "")
cm.Parameters.Append cm.CreateParameter("@good_e_dt", adVarChar, adParamInput, 8, "")
cm.Execute
Call disconnectDatabase() 'DB disConnect
End If
Set FU = Nothing 'Nothing FileUpload Object
response.write "<script language='javascript'>alert('ÀúÀåµÇ¾ú½À´Ï´Ù.');</script>"
response.write "<script language='javascript'>location.href='/content.asp';</script>"
%>