| Line 688... |
Line 688... |
| 688 |
Function LogError ( SSlog, SSstr )
|
688 |
Function LogError ( SSlog, SSstr )
|
| 689 |
'|errstr1||errstr2||errstr3|...
|
689 |
'|errstr1||errstr2||errstr3|...
|
| 690 |
LogError = SSlog &"|"& SSstr &"|"
|
690 |
LogError = SSlog &"|"& SSstr &"|"
|
| 691 |
End Function
|
691 |
End Function
|
| 692 |
'-----------------------------------------------------------------------------------------------------------------------------
|
692 |
'-----------------------------------------------------------------------------------------------------------------------------
|
| - |
|
693 |
' Send an email
|
| - |
|
694 |
' Args: SSfromName - Text Name of sender
|
| - |
|
695 |
' SSfrom - email address of sender
|
| - |
|
696 |
' SSto - email address of receipient. May be comma sep list or a soem type of object
|
| - |
|
697 |
' SSsubject - email subject
|
| - |
|
698 |
' SSbody - Body of the email. Email is sent as html.
|
| - |
|
699 |
' oAttachments - email attachments. May be empty, a file or a HashRef of files
|
| - |
|
700 |
'
|
| 693 |
Sub Send_Email ( SSfromName, SSfrom, SSto, SSsubject, SSbody, oAttachments )
|
701 |
Sub Send_Email ( SSfromName, SSfrom, SSto, SSsubject, SSbody, oAttachments )
|
| 694 |
Dim Mail, Keys, Key, canSend
|
702 |
Dim Mail, Keys, Key, canSend
|
| 695 |
'Response.write "<pre>Send_Email:SSfromName:" & SSfromName
|
703 |
'Response.write "<pre>Send_Email:SSfromName:" & SSfromName
|
| 696 |
'Response.write "<br>Send_Email:SSfrom:" & SSfrom
|
704 |
'Response.write "<br>Send_Email:SSfrom:" & SSfrom
|
| 697 |
'Response.write "<br>Send_Email:SSto:" & SSto
|
705 |
'Response.write "<br>Send_Email:SSto:" & SSto
|
| Line 739... |
Line 747... |
| 739 |
|
747 |
|
| 740 |
On Error Resume Next
|
748 |
On Error Resume Next
|
| 741 |
If canSend Then Mail.Send ' send message
|
749 |
If canSend Then Mail.Send ' send message
|
| 742 |
|
750 |
|
| 743 |
End Sub
|
751 |
End Sub
|
| - |
|
752 |
|
| - |
|
753 |
'-----------------------------------------------------------------------------------------------------------------
|
| - |
|
754 |
' Record and Report a Release Manager event
|
| - |
|
755 |
' Record in the machines Event Log
|
| - |
|
756 |
' Report via email
|
| - |
|
757 |
' Used to report error conditions that need to be bought to the attention of some sys admin
|
| - |
|
758 |
' Args: eventType - one of enumEVENT_* ( ie:enumEVENT_ERROR)
|
| - |
|
759 |
' SSlocation - Indication of location/operation
|
| - |
|
760 |
' SSvalues - Values. Will be added into the message
|
| - |
|
761 |
' SSerror_message - Error message
|
| - |
|
762 |
'
|
| - |
|
763 |
Sub Report_Event ( eventType, SSlocation, SSvalues, SSerror_message )
|
| - |
|
764 |
On Error Resume Next
|
| - |
|
765 |
Dim WshNetwork, SSmsg
|
| - |
|
766 |
Set WshNetwork = Server.CreateObject("WScript.Network")
|
| - |
|
767 |
|
| - |
|
768 |
' Compose Message
|
| - |
|
769 |
SSmsg = _
|
| - |
|
770 |
"-- User Info --"& VBNewLine &_
|
| - |
|
771 |
"Logged In: " & objAccessControl.UserLogedIn & VBNewLine &_
|
| - |
|
772 |
"Domain: " & objAccessControl.Domain & VBNewLine &_
|
| - |
|
773 |
"UserName: " & objAccessControl.UserName & VBNewLine &_
|
| - |
|
774 |
"FullName: " & objAccessControl.FullName & VBNewLine &_
|
| - |
|
775 |
"UserEmail: " & objAccessControl.UserEmail & VBNewLine &_
|
| - |
|
776 |
"UserId: " & objAccessControl.UserId & VBNewLine &_
|
| - |
|
777 |
VBNewLine &_
|
| - |
|
778 |
"-- Script Info --"& VBNewLine &_
|
| - |
|
779 |
"Host Name: "& Request.ServerVariables("SERVER_NAME") & ":" & Request.ServerVariables("SERVER_PORT") & VBNewLine &_
|
| - |
|
780 |
"Script Name: "& Request.ServerVariables("SCRIPT_NAME") & VBNewLine &_
|
| - |
|
781 |
VBNewLine &_
|
| - |
|
782 |
"-- Error Location --"& VBNewLine &_
|
| - |
|
783 |
SSlocation & VBNewLine &_
|
| - |
|
784 |
VBNewLine &_
|
| - |
|
785 |
"-- Values --"& VBNewLine &_
|
| - |
|
786 |
SSvalues & VBNewLine &_
|
| - |
|
787 |
VBNewLine &_
|
| - |
|
788 |
"-- Error Message --"& VBNewLine &_
|
| - |
|
789 |
SSerror_message & VBNewLine
|
| - |
|
790 |
|
| - |
|
791 |
'-- Raise this message at these places...
|
| - |
|
792 |
'-- Create an event in the system event log
|
| - |
|
793 |
'-- Send out an email
|
| - |
|
794 |
Call Send_Event( eventType, SSmsg )
|
| - |
|
795 |
Call Send_Email ( "Release Manager Notification", _
|
| - |
|
796 |
adminEmail, _
|
| - |
|
797 |
FAULT_EMAIL_LIST, _
|
| - |
|
798 |
"Release Manager Error", _
|
| - |
|
799 |
Replace(SSmsg,VBNewLine, "<br>"), _
|
| - |
|
800 |
null )
|
| - |
|
801 |
|
| - |
|
802 |
'----------------------------------------
|
| - |
|
803 |
Set WshNetwork = Nothing
|
| - |
|
804 |
End Sub
|
| - |
|
805 |
|
| - |
|
806 |
'-----------------------------------------------------------------------------------------------------------------------------
|
| - |
|
807 |
' Record Event in OS log
|
| - |
|
808 |
' Create an event in the system event log
|
| - |
|
809 |
'
|
| - |
|
810 |
' Args: eventType - one of enumEVENT_* ( ie:enumEVENT_ERROR)
|
| - |
|
811 |
' SSmsg - Message Body
|
| - |
|
812 |
Sub Send_Event( eventType, SSmsg )
|
| - |
|
813 |
On Error Resume Next
|
| - |
|
814 |
Dim WshShell
|
| - |
|
815 |
Set WshShell = Server.CreateObject("WScript.Shell")
|
| - |
|
816 |
WshShell.LogEvent eventType, SSmsg
|
| - |
|
817 |
Set WshShell = Nothing
|
| - |
|
818 |
End Sub
|
| - |
|
819 |
|
| 744 |
'-----------------------------------------------------------------------------------------------------------------------------
|
820 |
'-----------------------------------------------------------------------------------------------------------------------------
|
| 745 |
Sub Iterate_UP_the_tree ( NNrtag_id, HHstart_with, HHresult )
|
821 |
Sub Iterate_UP_the_tree ( NNrtag_id, HHstart_with, HHresult )
|
| 746 |
Dim rsTemp, Query_String
|
822 |
Dim rsTemp, Query_String
|
| 747 |
Dim seekPKGs, seekNOTpkgs
|
823 |
Dim seekPKGs, seekNOTpkgs
|
| 748 |
|
824 |
|