%@LANGUAGE=JScript CODEPAGE=1252 %>
Add/Edit Module
<%
var bNewItem = false
var ModuleID = new Number( Request.QueryString("Val") )
var ModuleName = Request.Form( "ModuleName" )
var RecordAction = Request.Form( "RecordAction" )
var rsModuleData
if ( ModuleID == -1 )
bNewItem = true;
var g_DBConn = GetDBConnection ( Application( "SOLUTIONS3") )
if ( String( RecordAction ) != "undefined" )
{
try
{
var ModuleID = Request.Form("ModuleID")
var Query = "SEP_SetModuleData " + ModuleID + ",'" + ModuleName + "'"
var rsResults = g_DBConn.Execute( Query )
var ModuleID = new Number ( rsResults("ModuleID") )
Response.Write("")
bNewItem=false //trick it into thinking that there is a new record
}
catch ( err )
{
Response.Write( "Could not execute SEP_SetTemplateData(...)
" )
Response.Write( "Query: " + Query + "
" )
Response.Write( "[" + err.number + "] " + err.description )
Response.End
}
}
else
RecordAction = 0
if ( String(ModuleID) != "undefined" && bNewItem == false )
{
if ( ModuleID != 0 )
{
try
{
rsModuleData = g_DBConn.Execute( "SEP_GetModuleData " + ModuleID )
ModuleName = new String( rsModuleData("ModuleName") )
g_DBConn.Close()
}
catch ( err )
{
Response.Write( "Could not execute SEP_GetModuleData(...)
" )
Response.Write(" Query: " + "SEP_GetModuleData " + ModuleID + "
")
Response.Write( "[" + err.number + "] " + err.description )
Response.End
}
}
else
bNewItem=true
}
else
bNewItem=true
//if bNewTemplate is true then create a new template
if ( bNewItem )
{
ModuleName = "New Module"
ModuleID=-1
}
%>