Hi Neil,
that might help. Still V9 but at least the basic structure should be ok.
Cheers,
Manuel
<%@ LANGUAGE="VBSCRIPT" %>
<% Option explicit %>
<%
Server.ScriptTimeout = 36000
response.buffer = true
'******************************************************************
'** All rights reserved. **
'** Developer: **
'** Company: **
'** Date: **
'** Project: "general" **
'** Modulname: **
'** WSM-Version: **
'** Release: 1.0 **
'** Copyright (c) OpenText Software GmbH 2013 **
'** -------------------------------------------------------------**
'** Description: **
'******************************************************************
'***************************
'* declare constants
'***************************
const sName = "*******"
const sPassword = "**********"
const sProjectGuid = ""
'**************************************
'* log on to the CMS
'**************************************
dim sLoginGuid
sLoginGuid = Login(sProjectGuid,sName,sPassword)
response.write "<br>LoginGuid: " & sLoginGuid & "<br>"
session("LoginGuid") = sLoginGuid
'**************************************
'* choose project (validate)
'**************************************
dim sSessionKey
sSessionKey = Validate(sLoginGuid,sProjectGuid)
response.write "<br>Sessionkey: " & sSessionKey & "<br>"
session("SessionKey") = sSessionKey
'**************************************
'* search for all pages based
'* on a specific content class
'**************************************
'**************************************
'* set schedule
'**************************************
'**************************************
'* logout
'**************************************
'**********************************************************************************************************************************************************
'* RQL Funktionen --- RQL Funktionen --- RQL Funktionen --- RQL Funktionen
--- RQL Funktionen --- RQL Funktionen --- RQL Funktionen --- RQL Funktionen
----
'**********************************************************************************************************************************************************
'*********************************************************************************
'* Login
'*********************************************************************************
function Login(sProjctGuid,sName,sPassword)
'***************************
'* declare variables
'***************************
dim XmlDom
dim RQLObject
dim RQLStatement
dim RQLRequest
dim sError
dim sLoginGuid
'***************************
'* initialize objects
'***************************
set XmlDom =
Server.CreateObject("RDCMSAspObj.RdObject")
set RQLObject =
Server.CreateObject("RDCMSAsp.RdPageData")
RQLObject.XmlServerClassName = XmlServerClassName
const XmlServerClassName = "RDCMSServer.XmlServer"
const DhtmlClassName = "RDCMSAsp.RdPageData"
RQLStatement = "<IODATA>" & _
"<ADMINISTRATION action=""login"" name=""" & sName & """
password=""" & sPassword & """/>" & _
"</IODATA>"
RQLRequest = RQLObject.ServerExecuteXml(RQLStatement, sError)
if sError>"" then Response.write "Login
Error:</BR></BR>"+sError
XMLDOM.LoadXml cstr(RQLRequest)
sLoginGuid = XMLDOM.objects("LOGIN")("guid")
Login = sLoginGuid
end function
'**********
'**********
'*********************************************************************************
'* Validate
'*********************************************************************************
function Validate(sLoginGuid,sProjectGuid)
'***************************
'* declare variables
'***************************
dim XmlDom
dim RQLObject
dim RQLStatement
dim RQLRequest
dim sError
dim sSessionKey
'***************************
'* initialize objects
'***************************
set XmlDom =
Server.CreateObject("RDCMSAspObj.RdObject")
set RQLObject =
Server.CreateObject("RDCMSAsp.RdPageData")
RQLObject.XmlServerClassName = XmlServerClassName
const XmlServerClassName = "RDCMSServer.XmlServer"
const DhtmlClassName = "RDCMSAsp.RdPageData"
RQLStatement = "<IODATA loginguid=""" & sLoginGuid & """>"&_
"<ADMINISTRATION action=""validate"" guid=""" &
sLoginGuid & """ checkonly=""1"" useragent=""script"" >"&_
"<PROJECT guid=""" & sProjectGuid & """ />"&_
"</ADMINISTRATION>"&_
"</IODATA>"
RQLRequest = RQLObject.ServerExecuteXml(RQLStatement, sError)
if sError>"" then Response.write "An error has
occured:</BR></BR>"+sError
XMLDOM.LoadXml cstr(RQLRequest)
sSessionKey=XMLDOM.objects("SERVER")("key")
Validate = sSessionKey
end function
'**********
'**********
'*********************************************************************************
'* Logout
'*********************************************************************************
function Logout(sLoginGuid)
'***************************
'* declare variables
'***************************
dim XmlDom
dim RQLObject
dim RQLStatement
dim RQLRequest
dim sError
'***************************
'* initialize objects
'***************************
set XmlDom =
Server.CreateObject("RDCMSAspObj.RdObject")
set RQLObject =
Server.CreateObject("RDCMSAsp.RdPageData")
RQLObject.XmlServerClassName = XmlServerClassName
const XmlServerClassName = "RDCMSServer.XmlServer"
const DhtmlClassName = "RDCMSAsp.RdPageData"
RQLStatement = "<IODATA loginguid=""" & sLoginGuid & """>"&_
"<ADMINISTRATION>"&_
"<LOGOUT guid=""" & sLoginGUID & """ />"&_
"</ADMINISTRATION>"&_
"</IODATA>"
RQLRequest = RQLObject.ServerExecuteXml(RQLStatement, sError)
if sError>"" then Response.write "Logout Error"+sError
end function
'**********
'**********
%>
On Thursday, March 14, 2013 10:40:16 AM UTC+1, Neil Fegen wrote:
>
> Hi guys
>
> We have vacancies/events pages that have an end date and I currently use
> in-page RQL to set a linking/appearance schedule based on this date.
>
> I realise it would be far better to run this as a user-defined job,
> looping through all events/vacancies and adding the schedule 'out of hours'
> to avoid performance drain on the system.
>
> Anybody any idea how to set this up as an .asp file?
>
> I know about searching for the pages based on template GUID x, storing the
> results in an array, and then for each page guid, encoding the date, and
> setting via RQL.
>
> Trying to turn this into a job that runs separately, however, is really
> tricky.
>
> Anybody done anything similar?
>
> Thanks
>
> Neil
>
>
>
--
You received this message because you are subscribed to the Google Groups
"RedDot CMS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/reddot-cms-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.