%@LANGUAGE=JScript%>
<%
var Language = new String( Request.QueryString("Lang") );
if ( Language == "ja" )
{
Session.CodePage = 932;
Response.CharSet = "shift-jis";
}
else
{
Session.CodePage = 1252
Response.CharSet="iso-8859-1"
}
var TemplateID = Request.QueryString("Val");
var TemplateName = "";
var TemplateDescription = new String();
var LangButtons = "";
var TemplateData = { en : { BtnColor : "red"},
ja : { BtnColor : "red" },
de : { BtnColor : "red" },
fr : { BtnColor : "red" }
};
//get database connection object g_DBConn
var g_DBConn = GetDBConnection( Application("SOLUTIONS3") )
function fnCleanText ( text )
{
try
{
text = text.replace( /\n|\r/g, "" );
text = text.replace( /"/g, "'" );
}
catch( err )
{
return "undefined"
}
return text
}
if ( TemplateID != -1 )
{
try
{
rsTemplateData = g_DBConn.Execute( "SEP_GetTemplateData " + TemplateID )
TemplateName = String(rsTemplateData("TemplateName")).replace( /\n|\r/g, "" );
//Response.Write("What the hell: " + rsTemplateData("Description") + "
" )
while ( !rsTemplateData.EOF )
{
//Response.Write("Language: " + Language + " rsTemplatedata: " + rsTemplateData("Lang") + "
");
//Response.Write("Language: " + String( Language ).length + " rsTemplatedata: " + String(rsTemplateData("Lang")).length + "
");
//var rsLang = new String( rsTemplateData("Lang") )
//Response.Write("rslang: " + typeof( rsLang ) + " typeof language: " + typeof( Language ) + " desc: " + rsTemplateData("Description") )
//if ( rsLang.toString() == Language.toString() )
if ( rsTemplateData("Lang") == Language.toString() )
{
var TemplateDescription = new String( rsTemplateData("Description") )
//Response.Write("
Set description: " + TemplateDescription );
}
TemplateData[ String(rsTemplateData("Lang"))].BtnColor = ""
//pTemplateDescription = TemplateDescription.replace( /\n|\r/g, "" );
//pTemplateDescription = pTemplateDescription.replace( /"/g, "'" );
//TemplateData[ String(rsTemplateData("Lang"))].TemplateName = new String(rsTemplateData("TemplateName")).replace( /\n|\r/g, "" );
//TemplateData[ String(rsTemplateData("Lang"))].BodyText = new String( pTemplateDescription )
//TemplateData[ String(rsTemplateData("Lang"))].BtnColor = ""
rsTemplateData.moveNext();
}
g_DBConn.Close()
}
catch ( err )
{
Response.Write( "Could not execute SEP_GetTemplateData(...)
" )
Response.Write( "[" + err.number + "] " + err.description )
Response.End
}
}
else
{
TemplateName = "New template";
TemplateDescription="
Place Template Title Here
\nPlace prelim text here
\nAnalysis
\nPlace analysis text here
\nGetting Help
\nPlace additional help text here
" } %>
Template Preview |
|
<% //Response.Write( "name En: " + TemplateData[en].TemplateName + "
" ) //Response.Write("" ) %>