ACTIVE SERVER PAGE > ´äº¯ ¸ÞÀÏ º¸³»±â
µî·ÏÀÏ : 2017-07-03 20:13
Á¶È¸¼ö : 52,700
[´äº¯±Û ¸ÞÀÏ ] ó¸®
'**************´äº¯Çü °Ô½ÃÆÇ¿¡¼ÀÇ Ãß°¡ºÎºÐ**********************'
if request("idx") <> "" then 'Áï ´äº¯¾²±â¶ó¸é
ref = Cint(request("ref"))
re_step = CInt(Request("re_step"))
re_level = CInt(Request("re_level"))
SQLString = "UPDATE "& tname &" SET re_step = re_step + 1 WHERE ref=" & ref & " AND re_step > " & re_step
db.Execute(SQLString)
re_step = re_step + 1
re_level = re_level + 1
'************* ´äº¯¿¡ ´ëÇÑ ¸ÞÀÏ º¸³»±â ±â´É ½ÃÀÛ*********************'
SQL="Select name,email,title from "& tname & " where ref="& ref &" and re_step=0"
Set rs1 = Server.CreateObject("ADODB.Recordset")
rs1.Open SQL, db
set objMail=Server.CreateObject("CDONTS.NewMail")
name=rs1("name")
email=rs1("email")
title=rs1("title")
conts="<html><head><title>Untitled</title></head><body bgcolor='white' text='black' link='blue' vlink='purple' alink='red'>"
conts=conts& "<p> <div align='center'><table border='0' cellspacing='0' bgcolor='#AADCFF'><tr>"
conts=conts& "<td width='512'><p align='center'> <font size='2'><b>"& name & "´Ô²²¼ Áú¹®ÇϽŠ³»¿ëÀÔ´Ï´Ù.</b></font></p>"
conts=conts& "<font size='2'><b><p align='center'> Á¦¸ñ : <u><font color='red' size='2'> "& title & "</font></u></p>"
conts=conts& "<font size='2' color='red'><b>´äº¯ÀÌ ¿Ã¶ó ¿Ô½À´Ï´Ù.</b></font><font size='2'>"
conts=conts& "<b> ¾È±Ô °øºÎ¹æ¿¡¼ È®ÀÎÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù. </b></font></td></tr><tr><td width='244' height='30' bgcolor='#EFCCF6'>"
conts=conts& "<p align='center'><a href='http://www.polcom.co.kr/ankyu'><img src='http://polcom.co.kr/image/banner.gif'"
conts=conts& "border='0'></a></td></center>"
conts=conts& "</tr></table></div><p> </p></body></html>"
objMail.To=email
objMail.From="cak0280@skylla.co.kr"
objMail.Subject="¾È±Ô °øºÎ¹æ¿¡¼ "&name&"´Ô²².."
objMail.BodyFormat=0 ' ÅؽºÆ®·Î º¸³½´Ù. html Çü½ÄÀº '0'ÀÌ µé¾î°£´Ù.
objMail.MailFormat=0 ' ÅؽºÆ®·Î º¸³½´Ù. html Çü½ÄÀº '0'ÀÌ µé¾î°£´Ù.
objMail.body=conts ' º¸³¾ ³»¿ëÀ» Body¿¡ ¿¬°áÇÑ´Ù.
objMail.Send ' ÀÌÁ¨ ¸ÞÀÏÀ» º¸³»°Ô µÈ´Ù.
set objMail=nothing
'************* ´äº¯¿¡ ´ëÇÑ ¸ÞÀÏ º¸³»±â ±â´É ³¡³»±â *********************'
else ' ÷ ±Û¾²±â¶ó¸é...
:
:
±âÁ¸ÀÇ ¸¹Àº ½ÎÀÌÆ®µé¿¡¼ °Ô½ÃÆÇ¿¡ ´ëÇÑ ¶Ç´Â ´äº¯±Û¿¡ ´ëÇÑ ¸¹Àº ¼Ò½ºµéÀ» Á¦°øÇÏ°í ÀÖ½À´Ï´Ù. Àü ±×·± ±â´ÉµéÀÇ ¼³¸íÀ»
ÀÏü ÇÏÁö ¾Ê¾ÒÀ¸¸ç, Ư¼öÇÑ(?) ±â´Éµé¸¸À» °£´ÜÇÏ°Ô ¼³¸íÇÏ°íÀÚ ÇÕ´Ï´Ù.
»ç¿ëÀÚ°¡ ±ÛÀ» ¾²¸é, ´Ù¸¥ »ç¿ëÀÚ´Â ±×¿¡´ëÇÑ ´äº¯À» Àû°Ô µË´Ï´Ù. ±×·¸ÁÒ?
±×·³, ±×·± ´äº¯µéÀÌ ¿Ã¶ó ¿Ô´Ù´Â ³»¿ëÀ» Áú¹®ÇÑ »ç¿ëÀÚ¿¡°Ô ¸ÞÀÏ·Î ¾Ë·Á ÁÖ´Â ±â´ÉÀ» Àû¾î ³õ¾Ò½À´Ï´Ù.
À§ÀÇ ¿¹Á¦¸¦ º¸¸é
'************* ´äº¯¿¡ ´ëÇÑ ¸ÞÀÏ º¸³»±â ±â´É ½ÃÀÛ*********************'
:
:
'************* ´äº¯¿¡ ´ëÇÑ ¸ÞÀÏ º¸³»±â ±â´É ³¡³»±â*********************'
±îÁö°¡ ¹Ù·Î ¸ÞÀÏÀ» º¸³»´Â ±â´ÉÀÔ´Ï´Ù. request(idx)<>"" ÀÌ¸é ´äº¯À» 󸮸¦ ÇÏ°Ô µË´Ï´Ù. step,refµîµîÀÇ ¼¼¼¼ÇÑ Çʵ带
Update ÇÏ°í ³ª¼, CDO ÄÄÆ÷³ÍÆ®¸¦ »ç¿ëÇؼ ¸ÞÀÏÀ» º¸³»¸é µË´Ï´Ù. ±×·³, ´©±¸ÇÑÅ× ¸ÞÀÏÀ» º¸³»¸é µÇ´À³Ä?
SQL="Select name,email,title from "& tname & " where ref="& ref &" and re_step=0"
ÀÌ°Ô Á¤´äÀÔ´Ï´Ù. À̸§,À̸áÁÖ¼Ò,Á¦¸ñÀ» ºÒ·¯¿À°Ô µË´Ï´Ù. ƯÁ¤ Å×ÀÌºí¿¡¼ ºÎ¸£¸é µÇ°ÚÁÒ? Àú °°Àº °æ¿ì´Â Å×À̺íÀ̸§±îÁö
³Ñ°Ü ÁáÀ¸´Ï±î¿ä... ±×¸®±¸, ref °¡ °°À¸¸é¼ re_step ÀÌ '0' À̸é ÇöÀç ´äº¯±Û¿¡ ´ëÇÑ °¡Àå »óÀ§¿¡ ÀÖ´Â ±ÛÀÌ µÇ°ÚÁÒ?
´ç¿¬È÷ Áú¹®±ÛÀÌ µÉ °ÍÀÔ´Ï´Ù.
ÀÌ·±°ªÀ» ºÒ·¯¿Í¼ ÇØ´çÇÏ´Â °÷¿¡ ÁöÁ¤ÇØ ³õÀ¸¸é µË´Ï´Ù.
¸ÞÀÏÀ» º¸³»´Â ±â´É¿¡ ´ëÇؼ´Â '±âŸ ±â´ÉÀÇ ¸ÞÀϸµ ¸®½ºÆ®¿¡¼ ¼³¸íÇØ ³õ¾ÒÀ¸´Ï ¿©±â¿¡¼´Â »ý·«Çصµ µÉ µí ÇÕ´Ï´Ù. '
±×·³, ¼º°øÇϼ¼¿ä....