%
'===================================================================
' Common Subs
'===================================================================
%>
<%
'-----------------------------------------------------------------------------------------------------------------------------
Sub CloseWindow
%>
<%
End Sub
'-----------------------------------------------------------------------------------------------------------------------------
Sub OpenChildWindow ( SStitle, SSurl, SSH, SSW, BBscroll )
Dim scrlBar
If BBscroll Then
scrlBar = "yes"
Else
scrlBar = "no"
End If
%>
<%
End Sub
'-----------------------------------------------------------------------------------------------------------------------------
Sub OpenInParentWindow ( SSurl )
%>
<%
End Sub
'-----------------------------------------------------------------------------------------------------------------------------
Sub OpenInWindow ( SSurl )
Response.Redirect ( SSurl )
End Sub
'-----------------------------------------------------------------------------------------------------------------------------
Function onClickOpenWindow ( sURL, sWindowName, nWidth, nHeight, sWindowParams )
If NOT IsNull(sWindowParams) OR (sWindowParams <> "") Then sWindowParams = sWindowParams &"," ' Append comma if params are not empty
onClickOpenWindow = "onClick='MM_openBrWindow("""& sURL &""", """& sWindowName &""", """& sWindowParams &"width="& nWidth &",height="& nHeight &",top=200,left=""+ ( screen.width / 2 - "& nWidth \ 2 &" ) +"" "");'"
End Function
'-----------------------------------------------------------------------------------------------------------------------------
Function ReadFile( sPath )
Dim filesys, rfile
Set filesys = CreateObject("Scripting.FileSystemObject")
Set rfile = filesys.OpenTextFile( sPath, 1, false)
ReadFile = rfile.ReadAll
rfile.close
Set filesys = nothing
End Function
'-----------------------------------------------------------------------------------------------------------------------------
Function GetQuery ( sQryName )
GetQuery = ReadFile( QUERIES_PATH &"\"& sQryName )
End Function
'-----------------------------------------------------------------------------------------------------------------------------
Function BoldSelected ( sItem, bSelected )
If bSelected Then
BoldSelected = ""& sItem &""
Else
BoldSelected = sItem
End If
End Function
'-----------------------------------------------------------------------------------------------------------------------------
Function Expander ( sExpand )
Const IMG_PLUS = "
"
Const IMG_MINUS = "
"
Const IMG_NO_EXPAND = "
"
If (sExpand = "+") OR (NOT sExpand ) Then
Expander = IMG_PLUS
ElseIf ( sExpand = "-" ) OR ( sExpand ) Then
Expander = IMG_MINUS
Else
Expander = IMG_NO_EXPAND
End If
End Function
'-----------------------------------------------------------------------------------------------------------------------------
Function GetNodeImage ( nNode_id )
Dim query, rsQry
query = _
"SELECT nt.NODE_IMAGE "&_
" FROM NETWORK_NODES nn,"&_
" NODE_TYPES nt"&_
" WHERE nn.NODE_TYPE_ID = nt.NODE_TYPE_ID"&_
" AND nn.node_id = :NODE_ID"
OraDatabase.Parameters.Add "NODE_ID", nNode_id, ORAPARM_INPUT, ORATYPE_NUMBER
Set rsQry = OraDatabase.DbCreateDynaset( query , ORADYN_DEFAULT )
If ((NOT rsQry.BOF) AND (NOT rsQry.EOF)) Then
GetNodeImage = ""
End If
rsQry.Close
Set rsQry = Nothing
OraDatabase.Parameters.Remove "NODE_ID"
End Function
'-----------------------------------------------------------------------------------------------------------------------------
Sub GetApplicationDetails ( nApp_id, ByRef outobjDetails )
Dim rsQry, query
query = "SELECT * FROM APPLICATIONS WHERE app_id = "& nApp_id
Set rsQry = OraDatabase.DbCreateDynaset( query , ORADYN_DEFAULT )
If ((NOT rsQry.BOF) AND (NOT rsQry.EOF)) Then
outobjDetails.Item ("app_id") = rsQry("app_id")
outobjDetails.Item ("application_name") = rsQry("application_name")
Else
Err.Raise 8, "Sub GetApplicationDetails", "Empty record set returned. nApp_id="& nApp_id
End If
rsQry.Close
Set rsQry = Nothing
End Sub
'-----------------------------------------------------------------------------------------------------------------------------
Function ProgressBar ()
ProgressBar = "