%@ 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 ' ---------------------------------------------------------------- ' -- sync template's fileds ' ---------------------------------------------------------------- Function nsync(vTemplate, bolRepair) Dim objConn, objRs, strSQL Dim strDocId, strID, strName, strMissing Dim dicTemplate, dicDefaults, dicLangs Set dicTemplate = Server.CreateObject("Scripting.Dictionary") Set dicDefaults = Server.CreateObject("Scripting.Dictionary") Set dicLangs = Server.CreateObject("Scripting.Dictionary") Set objConn = Server.CreateObject("ADODB.Connection") Set objRs = Server.CreateObject("ADODB.Recordset") objConn.Open GetConStr("..\..\..\SiteResources\Data\") strSQL = "SELECT ID, Code FROM Languages" objRs.Open strSQL, objConn, 1, 3 While Not objRs.EOF dicLangs.Add CStr(objRs("ID").Value), objRs("Code").Value objRs.MoveNext Wend objRs.Close If Join(vFields) <> "" Then For i = 1 to UBound( vFields ) - 1 For Each field In dicLangs dicTemplate.Add vFields(i) & "|" & field, False Next dicDefaults.Add vFields(i), vFieldDefaultValues(i) Next Else nsync = "No dynamic fields in template" Exit Function End If strResult = "" strSQL = "SELECT DocumentId, DocName FROM Documents WHERE (TemplateURL = '"&vTemplate&"') " objRs.Open strSQL, objConn While Not objRs.EOF strDocId = objRs("DocumentId").Value strResult = nsyncDocument(strDocId, dicTemplate, dicDefaults, dicLangs, objConn, bolRepair) ' (-->DocumentSync.asp) objRs.MoveNext Wend objRs.Close strResult = RenderResult( strResult, objConn, objRs ) objConn.Close Set objRs = Nothing Set objConn = Nothing Set dicTemplate = Nothing Set dicDefaults = Nothing Set dicLangs = Nothing nsync = strResult End Function ' ------------------------------------------------------- Dim vTemplate, vFix, strResult vTemplate = Request.QueryString("tempName") vFix = False If Request.QueryString("fix") = "yes" Then vFix = True LoadFields("../../../SiteResources/data/Templates/" & vTemplate) strResult = nsync(vTemplate, vFix) If strResult = "" Then strResult = "
| <%=langLabelSyncFields%> | <%=langLabelSyncLanguages%> | |||||
| <%=langLabelSyncDoc%> | <%=langLabelSyncMissing%> | <%=langLabelSyncDouble%> | <%=langLabelSyncAdditional%> | <%=langLabelSyncMissing%> | <%=langLabelSyncDouble%> | <%=langLabelSyncAdditional%> |