<% returnurl = "/new/mbr/login.asp?returnUrl=/new/intro/intro08.asp" If session("user_id") = "" Then RESPONSE.WRITE ExecJavaAlert2("�α����� �̿����ּ���.",returnurl) RESPONSE.END End If Dim smsVariant, smsContents Dim time1, time2, time3, tran_date Dim branchCode, branchName, content Dim admMobile, admEmail admMobile = "010-3564-6079" '����� ����ó(SMS ����) admEmail = "mdmarketing@nate.com" '����� �̸���(�̸��� ����) Response.Expires = 0 Server.ScriptTimeOut = 1000 Set upload = Server.CreateObject("DEXT.FileUpload") upload.DefaultPath = PathDir&"\data" upload.MaxFileLen = 5 * 1024000 DirectoryPath = PathDir&"\data\tbl_incruit" ''/// ������ ����� �������� ��� B_IP = Request.ServerVariables("REMOTE_ADDR") idx = trim(upload("idx")) user_id = trim(upload("user_id")) If user_id = "" Then user_id = "Guest" user_name = trim(upload("user_name")) user_age = trim(upload("user_age")) user_sex = trim(upload("user_sex")) user_tel = trim(upload("user_tel")) user_email = trim(upload("user_email")) user_tel1 = trim(upload("user_tel1")) user_tel2 = trim(upload("user_tel2")) user_tel3 = trim(upload("user_tel3")) user_tel = user_tel1&"-"&user_tel2&"-"&user_tel3 user_email1 = trim(upload("user_email1")) user_email2 = trim(upload("user_email2")) user_email = user_email1&"@"&user_email2 user_pass = trim(upload("user_pass")) bbs_type_u = trim(upload("bbs_type_u")) reple_type1 = trim(upload("reple_type1")) reple_type2 = trim(upload("reple_type2")) reple_type3 = trim(upload("reple_type3")) reple_type4 = trim(upload("reple_type4")) user_year = trim(upload("user_year")) user_month = trim(upload("user_month")) user_day = trim(upload("user_day")) user_week = trim(upload("user_week")) store_type = trim(upload("store_type")) b_subject = trim(upload("b_subject")) b_content = trim(upload("b_content")) b_file0 = trim(upload("b_file0")) b_file1 = trim(upload("b_file1")) b_content_re = trim(upload("b_content_re")) b_writedate = trim(upload("b_writedate")) b_re_writedate = trim(upload("b_re_writedate")) b_doctor_type = trim(upload("b_doctor_type")) write_mode = trim(upload("write_mode")) user_spam2 = trim(upload("user_spam2")) admin_type = Trim(upload("admin_type")) vSesID = cipherDecode(upload("sesID"), "psymonkey") vSesID = Mid(vSesID,2,1) & Mid(vSesID,4,1) & Mid(vSesID,6,1) & Mid(vSesID,8,1) IF CStr(vSesID) <> CStr(user_spam2) Then RESPONSE.WRITE ExecJavaAlert("������ȣ Ȯ�� �ٶ��ϴ�.",0) RESPONSE.END End If B_SUBJECT = GetReplaceInput(B_SUBJECT,0) B_CONTENT = GetReplaceInput(B_CONTENT,0) ''************************************* ''* ���ϸ����� ''************************************* Dim ARR_FILE_ONLY_DELETE_U(1) for i = 0 to 1 ARR_FILE_ONLY_DELETE_U(i) = upload("filedelete0") if ARR_FILE_ONLY_DELETE_U(i) = "" then ARR_FILE_ONLY_DELETE_U(i) = "N" else ARR_FILE_ONLY_DELETE_U(i) = "Y" end if Next ''************************************* ''* ������ �ش�Խù����� ''************************************* IF write_mode = "edit" THEN set RS = DBCon.Execute("select * from tbl_incruit where IDX="&IDX&" ") FILENAME_0 = RS("B_FILE0") FILENAME_1 = RS("B_FILE1") ARR_OLDFILE_NAME = Array(FILENAME_0,FILENAME_1) RS.CLOSE : SET RS = NOTHING ''************************************* ''* �մԱ��̸� �н����带 üũ ''************************************* IF STRCOMP(EDIT_C_PWD,B_PWD) = 0 THEN ELSE RESPONSE.WRITE ExecJavaAlert("��й�ȣ�� ��ġ���� �ʽ��ϴ�.",0) RESPONSE.END END IF End If ''************************************* ''* ���Ͼ��ε� ''************************************* Dim ARR_UPLOAD_FILENAME(9) For i = 0 to 1 IF upload("B_FILE"&i&"") <> "" THEN ARR_UPLOAD_FILENAME(i) = upload("B_FILE"&i&"").filename ARR_UPLOAD_FILENAME(i) = replace(ARR_UPLOAD_FILENAME(i)," ","") ARR_UPLOAD_FILENAME(i) = replace(ARR_UPLOAD_FILENAME(i),"'","") FileWholePath = GetUniqueName(ARR_UPLOAD_FILENAME(i), DirectoryPath) IF write_mode = "edit" THEN DBCon.Execute("update tbl_incruit set B_FILE"&i&" = '" & ARR_UPLOAD_FILENAME(i) & "' where IDX = '" & IDX & "' ") if ARR_OLDFILE_NAME(i) <> "" Then Call ExecFileDelete(DirectoryPath, ARR_OLDFILE_NAME(i)) End if END If 'response.write FileWholePath upload("B_FILE"&i&"").SaveAs FileWholePath End if Next SELECT CASE write_mode CASE "add" SQL = "INSERT INTO tbl_incruit " &_ " (user_id, user_name, user_age, user_sex, user_tel, user_email, "&_ " user_pass, bbs_type_u, reple_type1, reple_type2, reple_type3, reple_type4, "&_ " user_year, user_month, user_day, user_week, store_type, b_subject, "&_ " b_content, b_file0, b_file1, b_doctor_type, b_content_re, b_writedate, b_re_writedate,b_reple_type)"&_ " VALUES " &_ " ('"&user_id&"', '"&user_name&"', '"&user_age&"', '"&user_sex&"', '"&user_tel&"', '"&user_email&"', "&_ " '"&user_pass&"', '"&bbs_type_u&"', '"&reple_type1&"', '"&reple_type2&"', '"&reple_type3&"', '"&reple_type4&"', "&_ " '"&user_year&"', '"&user_month&"', '"&user_day&"', '"&user_week&"', '"&store_type&"', '"&b_subject&"', "&_ " '"&b_content&"', '"&ARR_UPLOAD_FILENAME(0)&"', '"&ARR_UPLOAD_FILENAME(1)&"', '0', '"&b_content_re&"', getdate(), '', '0')" 'response.write sql DBCON.EXECUTE(SQL) '### 2. SMS �� ########################## '�߰� �ð���� �����, �������� ��� �� time1 = "20:59" '�̽ð� ���� ũ�� ���� ��ħ time3�� �� time1 = CDate(time1) time2 = "08:59" '�̽ð� ���� ������ ���� ��ħ time3�� �� time2 = CDate(time2) time3 = "09:00" '�ۺҰ� �ð��� �̽ð����� ����� If Time() > time1 Then tran_date = Date() + 1 & " " & time3 & ":00" ElseIf Time() < time2 Then tran_date = Date() & " " & time3 & ":00" Else tran_date = "0" '��� �� End If 'SMS �� ���� smsContents = "[ä��ȳ�] " & Left(b_subject, 25) & " - " & user_name '���� ������(����) ���� �������� branchCode = "UNI0" & store_type 'store_type�� branchCode���·� ��ȯ SQL = "SELECT branchName FROM TB_BRANCH WHERE branchCode = '" & branchCode & "'" Set RS = Dbcon.Execute(SQL) If RS.eof = false Then branchName = RS("branchName") '������ 'branchMobile = RS("branchMobile") '���� ������ ���� 'branchEmail = RS("branchEmail") '���� ������ �̸��� End If RS.Close Set RS = Nothing '******************************************************************************************************************* '���ϸ� : sms.asp '�Լ����� ' GetMsgLen() ���� ��ü ���̸� ����ϴ� �Լ� ' MakeQuery() �� ������ ����� �Լ� ' Submit() ���� ������ ���� �Լ� ' ErrorNum(str, Max, Gubun) �Էµ� �������� ���Ἲ�� üũ�ϴ� �Լ� ' StrLenByte(str) �Էµ� �������� Byte�� ����ϴ� �Լ� ' AsciiConf(char) ASCII ���� ������ Byte�� �����ϴ� �Լ� ' WaitForData( o ) ������ �̿��Ͽ� �̺�Ʈ�� �� ������� ������ ���� ���ϵǴ� ������ Catch�ϱ� ���� �Լ� ' HanCount(str) �۵� ���� ���� �� �ѱ��� ������ ���� �Լ� ' CommError(ErrNum) ���� ��ȣ�� ���� ���� ���� ���� �Լ� ' - Made by Gabia Inc. '******************************************************************************************************************* Response.Write "
" 'SMS ��� ���� �Ⱥ��̰� ó�� Set smsVariant = New MVariant ' Ŭ���� ���� smsVariant.smsServer = "sms.gabia.com" ' ���� �ּ� �Ǵ� IP smsVariant.smsPort = "5000" ' ���� ��Ʈ smsVariant.smsTimeout = 10 ' ���� TimeOut ���� smsVariant.smsStatus = "1" ' ���ۻ��¼��� smsVariant.sms_key = "GS" ' SMS Ű������ smsVariant.cTranid = "uni114" ' SMS ����� ID smsVariant.cTranpasswd = "uni1141003" ' SMS ����� ��ȣ smsVariant.cTranphone = admMobile ' ## �»�� �ڵ��� ��ȣ smsVariant.cTrancallback = user_tel ' ## ������ ��� �ڵ��� ��ȣ(���� ��ȣ) smsVariant.cTrandate = tran_date ' ## ���� ��¥ (���� '0' �ϰ�� ���ݴ��庸���°�, �� �ܿ� ���� ���� ��� ��¥ ������ YYYY-MM-DD HH:MM:SS �̴�) smsVariant.cTranmsg = smsContents ' ## ���� ���� smsVariant.smsEndOfCommand = chr(10) ' ���Ṯ�� Set sms = Server.CreateObject("Intrafoundation.TCPClient") sms.Clear() sms.Open smsVariant.smsServer, smsVariant.smsPort ' ������ ���� - ������ �̿��Ͽ� �̺�Ʈ�� �� ��������� �ش� �̺�Ʈ�� ���� ������ .LastError �ҵ�� Ȯ�� �� �� �ִ�. sms.Timeout = smsVariant.smsTimeout If sms.Connected = 1 Then ' ������ ���� ���� ��� Call Submit ' ������ �����ϴ� �Լ� ȣ�� smsVariant.ReturnMSG = sms.Recv ' ���� ���� ���� response.write smsVariant.ReturnMSG & "
" Err_Message = CommError(smsVariant.ReturnMSG) ' ���� ������ ���� ������ ���� sms.Close ' ���� ���� ���� set sms = nothing ' SMS ���� ��ü �ʱ�ȭ set smsVariant = nothing ' Ŭ���� �ʱ�ȭ response.write Err_Message end If Response.Write "
" '==================================== '### 3. �̸��� �� ######################### ' ######## ���� ������ ���� set objMessage = createobject("cdo.message") set objConfig = createobject("cdo.configuration") Schemas = "Http://Schemas.Microsoft.Com/Cdo/Configuration" Set Flds = objConfig.Fields With Flds Flds.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 1 '1 (���� SMTP) / 2 (�ܺ� SMTP) Flds.item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 'SMTP Port Flds.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "localhost" 'ȣ��Ʈ ���� Flds.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirectory") = "c:\Inetpub\mailroot\Pickup" 'Pickup ���丮 ���� Flds.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 30 '���� �ð� Flds.update End With Set objMessage.Configuration = objConfig '########## ���� ���� �� to_email = admEmail '�����(�»��) from_email = "help@uni114.co.kr" subject = "[ä��ȳ�] " & user_name & " - " & b_subject '���� b_content = Replace(b_content, chr(13) & chr(10), "
") '�ۼ��� �ٹٲ� '���� ���� content = "" content = content & "" content = content & "" content = content & "" content = content & "" content = content & "" content = content & "
���ؾ��� ä��ȳ�
" content = content & "" content = content & "" content = content & "" content = content & "" content = content & "" content = content & "" content = content & "" content = content & "
����
" & branchName & "
����
" & user_name & "
����ó
" & user_tel & "
�̸���
" & user_email & "
����
" & b_subject & "
����
" & b_content & "
" content = content & "
�������� 1661-6020
" objMessage.To = to_email ' �»�� objMessage.From = from_email ' �����»�� objMessage.bcc = "" '���� ���� objMessage.Subject = subject ' ���� objMessage.HTMLBody = content ' ���� objMessage.BodyPart.Charset="ks_c_5601-1987" ' ���� �ѱ� objMessage.HTMLBodyPart.Charset="ks_c_5601-1987" objMessage.fields.update if to_email <> "" then objMessage.Send ' ������ ������ �ҵ� end if set objMessage = nothing set objConfig = nothing set Flds = Nothing '==================================== '���� �� �̵��� ������ Response.Write "" Response.End CASE "edit" ''***************************** ''* ���ϸ������� ó�� ''***************************** for i = 0 to 1 if ARR_FILE_ONLY_DELETE_U(i) = "Y" then s_filename = Split(ARR_OLDFILE_NAME(i),".") CALL ExecFileDelete(DirectoryPath,ARR_OLDFILE_NAME(i)) Dbcon.Execute("Update tbl_incruit Set B_FILE"&i&" = '' where IDX = "&IDX&"") end if Next If admin_type = "1" Then SQL = "UPDATE tbl_incruit SET " &_ " user_tel='"&user_tel&"', user_email='"&user_email&"',bbs_type_u='"&bbs_type_u&"', "&_ " reple_type1='"&reple_type1&"', reple_type2='"&reple_type2&"', reple_type3='"&reple_type3&"', reple_type4='"&reple_type4&"', "&_ " user_year='"&user_year&"', user_month='"&user_month&"', user_day='"&user_day&"', store_type='"&store_type&"', b_subject='"&b_subject&"', "&_ " b_content='"&b_content&"' "&_ " WHERE IDX='"&IDX&"'" DBCON.EXECUTE(SQL) Else SQL = "UPDATE tbl_incruit SET " &_ " user_tel='"&user_tel&"', user_email='"&user_email&"', user_pass='"&user_pass&"', bbs_type_u='"&bbs_type_u&"', "&_ " reple_type1='"&reple_type1&"', reple_type2='"&reple_type2&"', reple_type3='"&reple_type3&"', reple_type4='"&reple_type4&"', "&_ " user_year='"&user_year&"', user_month='"&user_month&"', user_day='"&user_day&"', store_type='"&store_type&"', b_subject='"&b_subject&"', "&_ " b_content='"&b_content&"' "&_ " WHERE IDX='"&IDX&"'" DBCON.EXECUTE(SQL) End If Response.Write "" Response.End Case "reply" SQL = "SELECT * FROM tbl_incruit where idx = '"&idx&"' " SET Rs = DBCON.EXECUTE(SQL) bbs_type_u = RS("bbs_type_u") reple_type1 = RS("reple_type1") reple_type2 = RS("reple_type2") reple_type3 = RS("reple_type3") reple_type4 = RS("reple_type4") user_tel = RS("user_tel") user_email = RS("user_email") If reple_type3 = "1" Then ' ######## ���� ������ ���� set objMessage = createobject("cdo.message") set objConfig = createobject("cdo.configuration") Schemas = "Http://Schemas.Microsoft.Com/Cdo/Configuration" Set Flds = objConfig.Fields With Flds Flds.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 1 '1 (���� SMTP) / 2 (�ܺ� SMTP) Flds.item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 'SMTP Port Flds.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "localhost" 'ȣ��Ʈ ���� Flds.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirectory") = "c:\Inetpub\mailroot\Pickup" 'Pickup ���丮 ���� Flds.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 30 '���� �ð� Flds.update End With Set objMessage.Configuration = objConfig '########## ���� ���� �� to_email = user_email from_email = admin_email subject = email_subject content = b_content_re objMessage.To = to_email ' �»�� objMessage.From = from_email ' �����»�� objMessage.bcc = " " '���� ���� objMessage.Subject = subject ' ���� objMessage.HTMLBody = content ' ���� objMessage.BodyPart.Charset="ks_c_5601-1987" ' ���� �ѱ� objMessage.HTMLBodyPart.Charset="ks_c_5601-1987" objMessage.fields.update if to_email <> "" then objMessage.Send ' ������ ������ �ҵ� end if set objMessage = nothing set objConfig = nothing set Flds = nothing End If If reple_type4 = "1" Then '******************************************************************************************************************* '���ϸ� : sms.asp '�Լ����� ' GetMsgLen() ���� ��ü ���̸� ����ϴ� �Լ� ' MakeQuery() �� ������ ����� �Լ� ' Submit() ���� ������ ���� �Լ� ' ErrorNum(str, Max, Gubun) �Էµ� �������� ���Ἲ�� üũ�ϴ� �Լ� ' StrLenByte(str) �Էµ� �������� Byte�� ����ϴ� �Լ� ' AsciiConf(char) ASCII ���� ������ Byte�� �����ϴ� �Լ� ' WaitForData( o ) ������ �̿��Ͽ� �̺�Ʈ�� �� ������� ������ ���� ���ϵǴ� ������ Catch�ϱ� ���� �Լ� ' HanCount(str) �۵� ���� ���� �� �ѱ��� ������ ���� �Լ� ' CommError(ErrNum) ���� ��ȣ�� ���� ���� ���� ���� �Լ� ' - Made by Gabia Inc. '******************************************************************************************************************* Set smsVariant = New MVariant ' Ŭ���� ���� smsVariant.smsServer = "sms.gabia.com" ' ���� �ּ� �Ǵ� IP smsVariant.smsPort = "5000" ' ���� ��Ʈ smsVariant.smsTimeout = 10 ' ���� TimeOut ���� smsVariant.smsStatus = "1" ' ���ۻ��¼��� smsVariant.sms_key = "GS" ' SMS Ű������ smsVariant.cTranid = "uni114" ' SMS ����� ID smsVariant.cTranpasswd = "uni1141003" ' SMS ����� ��ȣ smsVariant.cTranphone = user_tel ' �»�� �ڵ��� ��ȣ smsVariant.cTrancallback = admin_tel ' ������ ��� �ڵ��� ��ȣ smsVariant.cTrandate = "0" ' ���� ��¥ (���� '0' �ϰ�� ���ݴ��庸���°�, �� �ܿ� ���� ���� ��� ��¥ ������ YYYY-MM-DD HH:MM:SS �̴�) smsVariant.cTranmsg = sms_message ' ���� ���� smsVariant.smsEndOfCommand = chr(10) ' ���Ṯ�� Set sms = Server.CreateObject("Intrafoundation.TCPClient") sms.Clear() sms.Open smsVariant.smsServer, smsVariant.smsPort ' ������ ���� - ������ �̿��Ͽ� �̺�Ʈ�� �� ��������� �ش� �̺�Ʈ�� ���� ������ .LastError �ҵ�� Ȯ�� �� �� �ִ�. sms.Timeout = smsVariant.smsTimeout If sms.Connected = 1 Then ' ������ ���� ���� ��� Call Submit ' ������ �����ϴ� �Լ� ȣ�� smsVariant.ReturnMSG = sms.Recv ' ���� ���� ���� response.write smsVariant.ReturnMSG & "
" Err_Message = CommError(smsVariant.ReturnMSG) ' ���� ������ ���� ������ ���� sms.Close ' ���� ���� ���� set sms = nothing ' SMS ���� ��ü �ʱ�ȭ set smsVariant = nothing ' Ŭ���� �ʱ�ȭ response.write Err_Message end if End If SQL = "UPDATE tbl_incruit SET " &_ " b_doctor_type = '"&b_doctor_type&"', b_reple_type = '1', b_content_re = '"&b_content_re&"', b_re_writedate=getdate() "&_ " WHERE IDX='"&IDX&"'" DBCON.EXECUTE(SQL) RESPONSE.REDIRECT "/new/intro/incruit_view.asp?idx="&idx&"&gotopage="&gotopage&"&reply=1&store_type="&store_type End Select %>