%@ language=VBScript %> <% ' /////////////////////////////////////////////////////// ' // Dimac CMS ' // Copyright 2004-2008 Dimac Development AB, Sweden ' // www.Dimac.net ' // ' // NOTE: ' // You are not allowed to remove this ' // Copyright information without written ' // permission from Dimac Development. ' /////////////////////////////////////////////////////// If NOT CBool(Session("ValidAdminUser")) Then Response.Redirect("../LIO/loggin.asp") End IF ' ------------------------------------------------------- tmpPID = Request.QueryString("pID") ' ------------------------------------------------------- Set Conn = Server.CreateObject("ADODB.Connection") Set Rs = Server.CreateObject("ADODB.Recordset") Conn.Open GetConStr ("..\..\SiteResources\Data\") tDate = Year(Now) & "-" & FixNumber(Month(Now)) & "-" & FixNumber(Day(Now)) ' ---------------------------------------------------------------- ' // Update Document header SQL = "UPDATE Documents SET " SQL = SQL & " DocumentStatus = 2 , " SQL = SQL & " ApprovalID = " & tmpPID & " , " SQL = SQL & " SentForApprovalDate = '" & tDate & "' " SQL = SQL & "WHERE DocumentID = " & Session("DocID") Conn.Execute(SQL) 'SQL = "SELECT dlID FROM DocumentLanguages WHERE Session("contentLanguage") SQL = "UPDATE DocumentLanguages SET " SQL = SQL & " LangStatus = 2 " SQL = SQL & "WHERE (DocId = " & Session("DocID") & ") " SQL = SQL & " AND (LangId = " & Session("contentLanguage") & ") " Response.Write SQL Conn.Execute(SQL) ' ---------------------------------------------------------------- ' /// E-mail notification for document publishers ' /// This uses w3Jmail that you can download at: www.dimac.net ' ---------------------------------------------------------------- 'Dim Mailserver, mailTO 'SQL = "SELECT * FROM Users WHERE UserID = " & tmpPID 'set Rs = Conn.Execute(SQL) 'mailTO = Trim(rs("email").value) 'Mailserver = "mail.yourserver.com" 'set msg = Server.CreateOBject( "JMail.Message" ) 'msg.From = "you@yoursite.com" 'msg.FromName = "Yoursite mailer" 'msg.AddRecipient mailTO 'msg.Subject = "You have a new document to approve for publication." 'msg.Body = "You have a new document to approve for publication. " & vbCrLf & vbCrLf & "/ Your websitemailer" 'msg.Send(Mailserver) ' ---------------------------------------------------------------- ' /// E-mail notification for document publishers ' /// This uses CDONTS ' ---------------------------------------------------------------- SQL = "SELECT * FROM Users WHERE UserID = " & tmpPID set Rs = Conn.Execute(SQL) If RS("EmailApprovalInfoYN").value = 1 Then ' Set mail = Server.CreateObject ("CDONTS.NewMail") ' mail.BodyFormat = 1 ' mail.MailFormat = 0 ' on error resume next ' vToEmail = Trim(rs("email").value) ' vYourName = fromName ' vToYourEmail = fromEmail ' vMessage = langLabelApprovalEmail ' mail.Send vToYourEmail, vToEmail, langLabelApprovalEmail , vMessage End If ' ---------------------------------------------------------------- Response.Redirect("DocEditContent.asp") ' ---------------------------------------------------------------- ' ---------------------------------------------------------------- %>