|
|
|
|
俵ÀÌ / 2000-06-21 / ¿ÀÈÄ 6:21:59 / 203.255.3.190
Á¶È¸¼ö : 139
|
[Áú¹®] ÀÚ·á¾÷·Îµå ¿¡·¯ Á» ºÁÁÖ¼¼¿ä...ÀÌ°Ç Á¤¸» Áß¿äÇѰǵ¥¿ä |
> 俵´Ô Á˼ÛÇÏÁö¸¸ ÀÌ°Í Á» ºÁÁÖ¼¼¿ä...ÇöÀç ¹®ÀåÀÇ ³¡ÀÌ ¾ø´Ù°í ¿¡·¯ ¸Þ¼¼Áö°¡ ¶ß´Âµ¥,¾Æ¹«¸® ºÁµµ ãÀ»¼ö°¡ ¾ø±º¿ä....
> ÀÌ°÷ÀÇ Ç¥ÇöÀÌ ¸Â´ÂÁöµµ ¸ð¸£¸é¼ ±×Àú ´Ù¸¥ ºÐÀÇ ¼Ò½º¸¦ Âü°í·Î Çؼ ¸¸µé¾ú°Åµç¿ä....±×·¡¼ ´õ Èûµé±¸¿ä.¾÷·Îµå´Â ÷À̶ó¼,²À Á» ºÎŹÇÕ´Ï´Ù.±×¸®°í ÀÌ°÷ ¸»°í¿ä ÀÔ·ÂÇÏ´Â ±×·¯´Ï±î,¾Æ·¡ ¼Ò½º´Â ÀÔ·Â ¹ÞÀº°ÍÀ» ³Ñ±â´Â °ÍÀε¥,Ȥ½Ã ÀÔ·Â Æû¿¡¼µµ Ưº°È÷ À¯ÀÇÇÒ°ÍÀÌ ÀÖÀ¸¸é ¾ËÄÑÁÖ½Ã¸é °¨»çÇÏ°Ú½À´Ï´Ù.
>
> <%
>
> set db = server.CreateObject("ADODB.Connection")
> 'µ¥ÀÌÅͺ£À̽º ¿¬°áÀ» À§ÇÑ Connetion°³Ã¼ÀÇ ÀνºÅϽº¸¦ »ý¼ºÇÑ´Ù.
> db.Open("sell")
> 'db open(DNS)DNS¿¬°á
> SQL = "Select MAX(num) as maxnum from myboard"
> 'µ¥ÀÌÅÍ Äõ¸®¹®
> set rs = Server.CreateObject("ADODB.Recordset")
> '·¹ÄÚµå¼Â ÀνºÅϽº »ý¼º
> rs.Open SQL,db
> 'ÁöÁ¤ÇÑ Äõ¸®·Î db¿¬°á....·¹ÄÚµå¼Â °³Ã¼ °á°ú dbÀúÀå
>
> If rs("maxnum")="" Then
> number = 1
> else
> number = rs("maxnum") + 1
> End If
>
> Set Uploadform = Server.CreateObkect("SiteGalaxyUpload.Form") 'ÆÄÀÏ ¾÷·Îµå ÄÄÆ÷³ÍÆ® »ý¼º
>
> 'request °³Ã¼¸¦ ÅëÇØ ³Ñ¾î¿Â °ªµéÀ» º¯¼ö¿¡ ÀúÀåÇÑ´Ù.ÀÌ°÷¿¡¼´Â À̹ÌÁö ¾÷·Îµå¶«½Ã »ý·«
> 'brandname = request("brandname")
> 'product = request("product")
> 'short = request("short")
> 'mcode = request("mcode")
> 'country = request("country")
> 'content = request("content")
> 'filename = request("filename")
> 'filesize = request("filesize")
> 'company = request("company")
> 'contactperson = request("contactperson")
> 'addre = request("addre")
> 'tel = request("tel")
> 'fax = request("fax")
> 'email = request("email")
> 'url = request("url")
> 'payment = request("payment")
> 'packing = request("packing")
> 'fob = request("fob")
> 'markets = request("markets")
>
> 'pwd = request("pwd")
>
>
>
> 'ÀÌ°÷¿¡¼ ºÎÅÍ ¾÷·Îµå(»çÀÌÆ®°¶·°½Ã)°¡ ½ÃÀ۵ȴÙ....
> if isnull(cf("img")) = false or cf("img")<> "" then
> response.write ""
> end if
> if UploadForm("index") = "write" then
>
> ' ÀÌ°÷¿¡¼ºÎÅÍ ÀÔ·ÂÆû¿¡¼ °¢°¢ÀÇ Å×ÀÌºí °ªÀ» °¡Á®¿Â´Ù.
> brandname = UploadForm("brandname")
> product = UploadForm("product")
> short = UploadForm("short")
> mcode = UploadForm("mcode")
> country = UploadForm("country")
> content = UploadForm("content")
> company = Uploadform("company")
> contactperson = UploadForm("contactperson")
> addre = UploadForm("addre")
> tel = UploadForm("tel")
> fax = UploadForm("fax")
> email = UploadForm("email")
> url = trim(UploadForm("url"))
> if url="http://" then
> url=""
> end if
> payment = UploadForm("payment")
> packing = UploadForm("packing")
> fob = UploadForm("fob")
> markets = UploadForm("markets")
>
> pwd = UploadForm("pwd")
> upfile=UploadForm("upfile")
> subject=Replace("subject","'","''")
> subject=trim(subject)
> content=Replace("content","'","''")
> content=trim(content)
>
> '¾÷·Îµå ÈÀÏ ÀÖÀ»¶§ ó¸®
> if Len(upfile) > 0 then
> filesize=UploadForm("upfile").size
> maxsize=Cint(cf("limitfile")) * 1024
>
> if filesize > maxsize then 'ÆÄÀÏÀÇ Å©±â¸¦ üũÇÏ¿© °ü¸®ÀÚ°¡ ¼³Á¤ÇÑ Å©±âº¸´Ù Å©¸é ¿¡·¯Ã³¸®
>
> cf.close
> Set cd=nothing
> fc.close
> Set fc=nothing
> db.close
> Set db=nothing
>
>
> end if
> set fc = CreateObject("scripting.FileSystemObject")
>
> storedir = Server.mappath(",")&"/images/" '¾÷·ÎµåÇÑ À̹ÌÁö ÆÄÀÏ ÀúÀå Æú´õ °æ·Î
>
> attach_filed=UploadForm("upfile").filepath
> filename = mid(attach_file,instrrev(attach_file,"\")+1)
> '°æ·Î¸íÀ» Á¦¿ÜÇÑ ÈÀϸí ÃàÃâ
> strname=mid(filename, 1, instrrev(filename,".")-1)
> 'ÈÀÏ¸í¿¡¼ À̸§°ú È®ÀåÀÚ ºÐ¸®--------
> strext=mid(filename,instrrev(filename,".")+1)
> strfilename=storedir & filename
>
> fexit = true
> count=0
>
> do while fexist 'ÆÄÀÏÀÌ Áߺ¹µÉ °æ¿ì À̸§À» ´Ù½Ã ÁöÁ¤ - ÆÄÀÏ À̸§ µÚ¿¡ ¼ýÀÚ¸¦ ºÙ¿©¼ ¾÷·Îµå
>
> if(fc.fileexists(strfilename)) then
> count=count+1
> filename=strname&"-"&count&"."&strext
> strfilename=storedir & filename
> else
> fexist=false
> end if
> loop
> UploadForm("upfile").saveas strfilename
> 'ÄÞÆÛ³ÍÆ®¿¡ ÀÇÇØ ½ÇÁ¦ ÈÀÏÀ» ¾÷·Îµå
> end if
> 'ÀÏ·Ã ¹øÈ£¸¦ ºÙÀÓ
> sqlRead="SELECT max(board_idx) FROM "&id
> Set rs=db.Execute(sqlRead)
>
> if IsNull(rs(0)) then
> maxboard_idx=1
> else
> maxboard_idx=Cint(rs(0))+1
> end if
> rs.close
> Set rs=nothing
> '¾÷·Îµå ÈÀÏÀÌ ¾øÀ»¶§ ÀûÀýÇÑ °ªÀ¸·Î ´ëü
> if upfile = "" then
> filesize=0
> filename=""
> end if
>
> if cf("db")="access" then
> indate="getdate()"
> end if
>
> 'µî·ÏµÈ ±ÛÀ» db¿¡ »ðÀÔ
> sqlInsert="INSERT INTO "&id&" values ("&maxboard_idx&","&writeday&","&brandname&",&product&","&short&","&mcode&","&country&","&content&","&filename&","&filesize&","&company&","&contactperson&","&addre&","&tel&","&fax&","&url&","&payment&","&packing&","&fob&","&markets&","&pwd&")"
> =======À§ insertºÎºÐÀÇ ³¡ÀÌ Á¾°áµÇÁö ¾Ê¾Ò´Ù´Â ¸Þ¼¼ÁöÀÓ´Ù.======
> 'response.write sql 'response test
> db.execute(sqlInsert)
>
>
> end if
> cf.close
> Set cf=nothing
> fc.close
> Set fc=nothing
> db.close
> set db=nothing
>
>
> %>
>
>
>
-----------------------------------------------------------
INSERT ¹®¿¡¼ INSERT¸¦ ÇϽǶ§´Â µ¥ÀÌŸ°¡ ¼ýÀÚÇüÀ϶§´Â
±×³É ÀÔ·ÂÇÏ½Ã¸é µÇÁö¸¸ ¹®ÀÚÇüÀ϶§´Â ÁÖÀ§¸¦ ÀÛÀº µû¿ÈÇ¥·Î ¹¾îÁּžßÇÕ´Ï´Ù.
Áï brandnameÀÌ µé¾î°¥ Å×À̺íÀÇ µ¥ÀÌŸÇüÀÌ ¹®ÀÚÇüÀ̶ó¸é
"&brandname&"°Ô ¾Æ´Ï°í '"&brandname&"' ÀÌ·¸°Ô µÇ¾î¾ß ÇÑ´Ù´Â ¶æÀÔ´Ï´Ù.
p.s. Àü ÇÏ·ç¿¡ ÇѹøÁ¤µµ º°¾ÆÇØ´Ô ½ÎÀÌÆ®¸¦ ¹æ¹®ÇÕ´Ï´Ù.
Èñö´ÔÀº Ç×»ó Á¦ ½ÎÀÌÆ®¶û º°¾ÆÇØ´Ô ½ÎÀÌÆ®¿¡ Áú¹®À» °°ÀÌ ÇϽô±º¿ä...
±×°Íµµ À̸§Àº ¹Ù²ã°¡¸é¼ ¸»ÀÌÁÒ...
´©°¡ ¸ÕÀú ´ä ¿Ã·Á ÁÖ³ª °¨½Ã¶óµµ ÇϽô °ÍÀԴϱî?
|
|
|
|