!INC Local Scripts.EAConstants-JScript
/*
* Script Name: Document Properties
* Author: Tom O'Reilly
* Purpose: To display the properties of a document
* Date: 02/10/2012
*/
function MyRtfData(objectID)
{
var i;
var xmlDOM = new ActiveXObject( "MSXML2.DOMDocument.4.0" );
xmlDOM.validateOnParse = false;
xmlDOM.async = false;
var node = xmlDOM.createProcessingInstruction("xml", "version='1.0'");
xmlDOM.appendChild(node);
var xmlRoot = xmlDOM.createElement( "EADATA" );
xmlDOM.appendChild(xmlRoot);
var xmlDataSet = xmlDOM.createElement( "Dataset_0" );
xmlRoot.appendChild(xmlDataSet);
var xmlData = xmlDOM.createElement( "Data" );
xmlDataSet.appendChild(xmlData);
var xmlRow = xmlDOM.createElement( "Row" );
xmlData.appendChild(xmlRow);
var xmlName = xmlDOM.createElement( "DateGen" );
var today = new Date();
var dd = today.getDate();
var mm = today.getMonth()+1; //January is 0!
var yyyy = today.getFullYear();
if(dd<10){dd='0'+dd} if(mm<10){mm='0'+mm} today = mm+'/'+dd+'/'+yyyy;
xmlName.text = today;
xmlRow.appendChild(xmlName);
var xmlName = xmlDOM.createElement( "TimeGen" );
var currentTime = new Date()
var hours = currentTime.getHours()
var minutes = currentTime.getMinutes()
if (minutes < 10)
{
minutes = "0" + minutes
}
xmlName.text = hours + ":" + minutes + " ";
xmlRow.appendChild(xmlName);
var xmlName = xmlDOM.createElement( "Author" );
xmlName.text = Session.UserName;
xmlRow.appendChild(xmlName);
var xmlName = xmlDOM.createElement( "EA_REPOS" );
xmlName.text = Repository.ConnectionString;
xmlRow.appendChild(xmlName);
return xmlDOM.xml;
};
Session.Output( MyRtfData(439));