<% b_sdate = b_sdate_y & "-" & Right( "0" & b_sdate_m, 2) & "-" & Right("0" & b_sdate_d, 2) '//******************* 금지단어 체크기능 *********************** If trim(a_noword) <> "" then a_noword = Split(a_noword, ",") '//제한파일.. for z=0 To UBound( a_noword ) iscontent = instr(b_content, a_noword(z)) '//내용에서 검색 issubject = instr(b_subject, a_noword(z)) '//글제목에서 검색.. if iscontent > 0 Or issubject > 0 then Call Back_back ( a_noword(z) & "은(는) 사용금지단어입니다. \n단어를 삭제하세요." ) End if next End if '//***************************************************************** If w_mode = "W" Or w_mode = "WR" then '//저장 If a_upload = "Y" then '//첨부파일 사용일때 '//폴더 없으면 새로 생성 strDirectory = server.mappath("/data/board/") & "\" & a_tablename& "\" Call FolderCreate( strDirectory ) '//폴더 없으면 새로 썸네일용 strDirectory2 = strDirectory & "thum\" Call FolderCreate( strDirectory2 ) '//첨부파일체크 for z = 1 To a_upload_len strDir = strDirectory ext_str = a_nofile '파일저장 b_file = wfile2("b_file" & z, a_nofilesize, strDir, ext_str) '필드명, 최대용량, 업로드경로, 허용파일(zip,gif,jpg...) If b_file <> "" Then execute("b_file" & z & "=""" & b_file & """") ext_chk_arr = Split( b_file, "." ) ext_chk = LCase( ext_chk_arr( UBound(ext_chk_arr) ) ) If ext_chk = "jpg" Or ext_chk = "gif" then '//썸네일 If a_level="nninc_tour" Then ' 대구방문의 해 - 관광정보 게시판 ww = 166 hh = 106 Else ww = 130 hh = 100 End if Call GD2_make_thumb( ww, hh, b_file, strDirectory, strDirectory2 ) End if End if next End if '//ref,step,level 체크 If b_type = "R" then '//답변이면 sql = "UPDATE " & a_tablename & " SET b_step = b_step+1 WHERE b_ref = " & b_ref & " AND b_step > " & b_step dbcon.execute sql b_step = b_step + 1 b_level = b_level + 1 End if b_cate = "" b_count = 0 b_look = "Y" '//사용/중지 '//$b_open = "Y"; //공개/비공개 b_id = SESSION("ss_m_id") b_regdate = getDateFm(Now(), 3) b_ip = request.ServerVariables("REMOTE_ADDR") b_chuchun = 0 If a_cate = "Y" then If b_type = "R" then '//답변이면 //상위분류값을 넣는다.. SQL = "SELECT b_cate, b_catename FROM " & a_tablename & " WHERE b_num=" & b_ref Set rs_cate = dbcon.execute( sql ) b_cate = rs_cate("b_cate") b_catename = rs_cate("b_catename") Set rs_cate = nothing else b_cate_str = Split(b_cate_tot, ",") b_cate = Trim(b_cate_str(0)) b_catename = Trim(b_cate_str(1)) End if else b_cate = 0 b_catename = "" End if b_c_count = 0 b_jumin = SESSION("ss_m_jumin") R_Fields_i = "b_type, b_id, b_name, b_pwd, b_subject, b_email, b_jumin, b_phone1, b_phone2, b_phone3, b_cate, b_catename, b_noticechk, b_content, b_ip, b_count, b_look, b_open, b_ref, b_step, b_level, b_regdate, b_chuchun, b_sbjclr, b_temp1, b_temp2, b_temp3, b_temp4, b_temp5, b_temp6, b_temp7, b_keyword, b_c_count, b_zip1, b_zip2, b_addr1, b_addr2 " If a_level = "default_calendar" Or a_level="nninc_invention" Or a_level = "calendar_request" Or a_level = "nninc_jichim" Or a_level = "nninc_suee" Then '//달력형태일때.. R_Fields_i = R_Fields_i & ", b_sdate, b_edate" End If If a_level = "nninc_job" Then R_Fields_i = R_Fields_i & ", b_temp9" End If ' 첨부파일 If Not IsNumeric(a_upload_len) Then a_upload_len = 5 For u=1 To a_upload_len R_Fields_i = R_Fields_i & ", b_file"&u '' b_file1, b_file2, b_file3, ‥‥ next Call InsertQuery ( R_Fields_i, a_tablename) If b_type = "N" then sql = "SELECT Max(b_num) as max_b_num FROM " & a_tablename Set rs1 = dbcon.execute( sql ) max_b_num = rs1("max_b_num") sql = "UPDATE " & a_tablename & " SET b_ref = " & max_b_num & " WHERE b_num = " & max_b_num dbcon.execute sql End if ok_url = "list.asp?a_num=" & a_num & "&" & page_info ' SMS 발송 If a_sendsms = "Y" Then rtn_url = "http://"&Request.ServerVariables("HTTP_HOST")&"/content/board/"&ok_url arr_bbsname = split(a_bbsname, ">") sms_bbsname = "[남부교육지원청]"&arr_bbsname(ubound(arr_bbsname)-1)&" " If b_type = "N" then '접수 msg = sms_bbsname&"게시판에 "&now()&"에 글이 접수 되었습니다." If a_sendsms_addr <> "" then '게시판 담당자에게 sms발송 sendSms a_sendsms_addr, msg, rtn_url,"" End If ElseIf b_type = "R" Then '답변 sql = "SELECT b_phone1,b_phone2,b_phone3 FROM "&a_tablename&" WHERE b_ref="&b_ref&" and b_step=0 and b_level=0" Set rs_sms=dbcon.execute(sql) If Not rs_sms.eof And Not rs_sms.bof Then if rs_sms(0) = "010" Or rs_sms(0) = "011" Or rs_sms(0) = "016" Or rs_sms(0) = "017" Or rs_sms(0) = "018" Or rs_sms(0) = "019" Then msg = sms_bbsname&"게시판에 "&now()&"에 답변이 등록 되었습니다." b_phone = rs_sms(0)&rs_sms(1)&rs_sms(2) If b_phone <> "" then '작성자(민원인)에게 sms발송 sendSms b_phone, msg, rtn_url,"" End If End If End If rs_sms.close : Set rs_sms = nothing End if End if ' email 발송 If a_sendmail = "Y" Then arr_bbsname = split(a_bbsname, ">") sms_bbsname = "[남부교육지원청]"&arr_bbsname(ubound(arr_bbsname)-1)&" " If b_type = "N" Then '접수 msg = sms_bbsname&"게시판에 "&now()&"에 글이 접수 되었습니다." If a_sendmail_addr <> "" then '게시판 담당자에게 메일발송 sendMail "web@dgnbe.go.kr", a_sendmail_addr, cc, bcc, msg, msg End If ElseIf b_type = "R" Then '답변 sql = "SELECT b_email FROM "&a_tablename&" WHERE b_ref="&b_ref&" and b_step=0 and b_level=0" Set rs_mail=dbcon.execute(sql) If Not rs_mail.eof And Not rs_mail.bof then msg = sms_bbsname&"게시판에 "&now()&"에 답변이 등록 되었습니다." b_email = rs_mail(0) If b_email <> "" Then '작성자(민원인)에게 메일발송 sendMail "web@dgnbe.go.kr", b_email, cc, bcc, msg, msg End if End If rs_mail.close : Set rs_mail = nothing End if End if elseIf w_mode = "M" then '//수정 If a_upload = "Y" then '//첨부파일 사용일때 '//폴더 없으면 새로 생성 strDirectory = server.mappath("/data/board/") & "\" & a_tablename & "\" Call FolderCreate( strDirectory ) '//폴더 없으면 새로 썸네일용 strDirectory2 = strDirectory & "thum\" Call FolderCreate( strDirectory2 ) '//------------------------------------------------------------------------------ For z=1 To a_upload_len b_file_chk = UploadForm("b_file_chk" & z) b_file_org = UploadForm("b_file_org" & z) ext_str = a_nofile If b_file_chk <> "" Then '//체크하면 파일삭제, 디비삭제 strDir = strDirectory strDir2 = strDirectory2 Call dfile( strDir, b_file_chk) Call dfile( strDir2, b_file_chk) sql = "UPDATE " & a_tablename & " SET b_file" & z & " = '' WHERE b_num=" & b_num dbcon.execute sql End if '파일저장 b_file = wfile2("b_file" & z, a_nofilesize, strDirectory, ext_str) '필드명, 최대용량, 업로드경로, 허용파일(zip,gif,jpg...) If b_file <> "" then '//첨부파일 있으면 strDir = strDirectory strDir2 = strDirectory2 If b_file_org <> "" then Call dfile( strDir, b_file_org ) Call dfile( strDir2, b_file_org ) End if ext_chk_arr = Split( b_file, "." ) ext_chk = LCase( ext_chk_arr( UBound(ext_chk_arr) ) ) If ext_chk = "jpg" Or ext_chk = "gif" then '//이미지파일저장 '//***************************************** '//썸네일 If a_level="nninc_tour" Then ' 대구방문의 해 - 관광정보 게시판 ww = 166 hh = 106 Else ww = 130 hh = 100 End if Call GD2_make_thumb( ww, hh, b_file, strDirectory, strDirectory2 ) End If sql = "UPDATE " & a_tablename & " SET b_file" & z & " = '" & b_file & "' WHERE b_num=" & b_num dbcon.execute sql '//***************************************** End if next End if '//------------------------------------------------------------------------------ if a_cate = "Y" then If b_type = "R" then '//답변이면 SQL = "SELECT b_cate, b_catename FROM " & a_tablename & " WHERE b_num=" & b_ref Set rs_cate = dbcon.execute( sql ) b_cate = rs_cate("b_cate") b_catename = rs_cate("b_catename") else b_cate_str = Split(b_cate_tot, ",") b_cate = Trim(b_cate_str(0)) b_catename = Trim(b_cate_str(1)) End if R_Fields2 = ",b_cate, b_catename" End if R_Fields = "b_name, b_pwd, b_subject, b_email, b_phone1, b_phone2, b_phone3, b_noticechk, b_content, b_sbjclr, b_temp1, b_temp2, b_temp3, b_temp4, b_temp5, b_temp6, b_temp7, b_keyword, b_open" & R_Fields2 If a_level = "default_calendar" Or a_level="nninc_invention" Or a_level = "calendar_request" Or a_level = "nninc_jichim" Or a_level = "nninc_suee" then '//달력형태일때.. R_Fields = R_Fields & ", b_sdate, b_edate" End If If a_level = "nninc_job" then ' 알림마당 > 인력풀 > 구직 (김천교육청) R_Fields = R_Fields & ", b_temp9 " End if If a_home = "Y" then '//주소사용시 R_Fields = R_Fields & ", b_zip1, b_zip2, b_addr1, b_addr2" End if Call UpdateQuery ( R_Fields, a_tablename, " where b_num=" & b_num ) ok_url = "list.asp?a_num=" & a_num & "&" & page_info End if Call loding ("0", ok_url) %>