<%@ 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 ' ------------------------------------------------------- tmpStatus = Request.QueryString("nStatus") tmpLangID = Request.QueryString("langId") ' ------------------------------------------------------- Set Conn = Server.CreateObject("ADODB.Connection") Set Rs = Server.CreateObject("ADODB.Recordset") Conn.Open GetConStr ("..\..\SiteResources\Data\") ' ---------------------------------------------------------------- ' // Update Document header SQL = "UPDATE Documents SET " SQL = SQL & " DocumentStatus = '" & tmpStatus & "' " SQL = SQL & "WHERE DocumentID = " & Session("DocID") Conn.Execute(SQL) SQL = "SELECT DocName FROM DocumentLanguages WHERE (DocId = " & Session("DocID") & ") AND (LangId = " & tmpLangID & ")" Rs.Open SQL, Conn, 1, 3 If Rs.RecordCount = 0 Then SQL = "INSERT INTO DocumentLanguages " & _ " (DocID, LangID, DocName, LangStatus) " &_ "VALUES (" & _ Session("DocID") & ", " & _ vLangID & ", '', " & _ tmpStatus & ")" Else SQL = "UPDATE DocumentLanguages SET " &_ " LangStatus=" &tmpStatus& _ " WHERE (DocId = " & Session("DocID") & ") AND (LangId = " & tmpLangID & ")" End If Rs.Close Conn.Execute(SQL) Set Rs = Nothing Conn.Close Set Conn = Nothing Randomize strKey = Round( Rnd( 9 ) ) * 256 Response.Redirect("DocEditContent.asp?lang=" & tmpLangID & "&key=" & strKey) ' ---------------------------------------------------------------- ' ---------------------------------------------------------------- %>