| Line 21... |
Line 21... |
| 21 |
' DD/MM/YYYY -> Saturday, June 26, 1943
|
21 |
' DD/MM/YYYY -> Saturday, June 26, 1943
|
| 22 |
If IsNull(dDate) Then Exit Function
|
22 |
If IsNull(dDate) Then Exit Function
|
| 23 |
ToLongDate = FormatDateTime(dDate, 1)
|
23 |
ToLongDate = FormatDateTime(dDate, 1)
|
| 24 |
End Function
|
24 |
End Function
|
| 25 |
'-----------------------------------------------------------------------------------------------------------------------------
|
25 |
'-----------------------------------------------------------------------------------------------------------------------------
|
| - |
|
26 |
Function EuroDateTimeForCalendarControl(dDate)
|
| - |
|
27 |
' Ensures Euro DateTime format DD-MM-YYYY H24:MIN:SS
|
| - |
|
28 |
If IsNull(dDate) Then Exit Function
|
| - |
|
29 |
EuroDateTimeForCalendarControl = Day(dDate) &"-"& Month(dDate) &"-"& Year(dDate) &" "& Hour(dDate) & ":" & Minute(dDate) & ":" & Second(dDate)
|
| - |
|
30 |
End Function
|
| - |
|
31 |
'-----------------------------------------------------------------------------------------------------------------------------
|
| 26 |
Function TO_ORADATE ( SSdate )
|
32 |
Function TO_ORADATE ( SSdate )
|
| 27 |
'DD/MM/YYYY -> ORADATE
|
33 |
'DD/MM/YYYY -> ORADATE
|
| 28 |
TO_ORADATE = "TO_DATE( '"& SSdate &"','DD/MM/YYYY' )"
|
34 |
TO_ORADATE = "TO_DATE( '"& SSdate &"','DD/MM/YYYY' )"
|
| 29 |
End Function
|
35 |
End Function
|
| 30 |
'-----------------------------------------------------------------------------------------------------------------------------
|
36 |
'-----------------------------------------------------------------------------------------------------------------------------
|
| Line 66... |
Line 72... |
| 66 |
Function To_ClearCase ( SSpkgLabel )
|
72 |
Function To_ClearCase ( SSpkgLabel )
|
| 67 |
To_ClearCase = "element * "& SSpkgLabel
|
73 |
To_ClearCase = "element * "& SSpkgLabel
|
| 68 |
End Function
|
74 |
End Function
|
| 69 |
'-----------------------------------------------------------------------------------------------------------------------------
|
75 |
'-----------------------------------------------------------------------------------------------------------------------------
|
| 70 |
Function To_HTML ( sStr )
|
76 |
Function To_HTML ( sStr )
|
| 71 |
If NOT IsNull(sStr) Then To_HTML = Server.HTMLEncode( sStr )
|
77 |
If NOT IsNull(sStr) Then To_HTML = Server.HTMLEncode( sStr )
|
| 72 |
End Function
|
78 |
End Function
|
| 73 |
'-----------------------------------------------------------------------------------------------------------------------------
|
79 |
'-----------------------------------------------------------------------------------------------------------------------------
|
| 74 |
Function SQLstring ( SSstr )
|
80 |
Function SQLstring ( SSstr )
|
| 75 |
If IsNull(SSstr) OR (SSstr = "") Then Exit Function
|
81 |
If IsNull(SSstr) OR (SSstr = "") Then Exit Function
|
| 76 |
SQLstring = Replace( Trim(SSstr), "'", "''")
|
82 |
SQLstring = Replace( Trim(SSstr), "'", "''")
|
| Line 102... |
Line 108... |
| 102 |
End Function
|
108 |
End Function
|
| 103 |
'-----------------------------------------------------------------------------------------------------------------------------
|
109 |
'-----------------------------------------------------------------------------------------------------------------------------
|
| 104 |
Function QuoteCSV ( SSstr )
|
110 |
Function QuoteCSV ( SSstr )
|
| 105 |
Dim tempStr
|
111 |
Dim tempStr
|
| 106 |
tempStr = SSstr
|
112 |
tempStr = SSstr
|
| 107 |
If tempStr = "" Then
|
113 |
If tempStr = "" Then
|
| 108 |
QuoteCSV = ""
|
114 |
QuoteCSV = ""
|
| 109 |
Exit Function
|
115 |
Exit Function
|
| 110 |
End If
|
116 |
End If
|
| 111 |
|
117 |
|
| 112 |
tempStr = Replace(tempStr, " ", "") ' remove any spaces
|
118 |
tempStr = Replace(tempStr, " ", "") ' remove any spaces
|
| 113 |
QuoteCSV = "'"& Replace( UCase(tempStr), ",", "','") &"'"
|
119 |
QuoteCSV = "'"& Replace( UCase(tempStr), ",", "','") &"'"
|
| 114 |
End Function
|
120 |
End Function
|
| 115 |
'-----------------------------------------------------------------------------------------------------------------------------
|
121 |
'-----------------------------------------------------------------------------------------------------------------------------
|
| 116 |
Function QuoteCSVwithLIKE ( SSstr )
|
122 |
Function QuoteCSVwithLIKE ( SSstr )
|
| 117 |
Dim tempStr
|
123 |
Dim tempStr
|
| 118 |
tempStr = SSstr
|
124 |
tempStr = SSstr
|
| 119 |
If tempStr = "" Then
|
125 |
If tempStr = "" Then
|
| 120 |
QuoteCSVwithLIKE = ""
|
126 |
QuoteCSVwithLIKE = ""
|
| 121 |
Exit Function
|
127 |
Exit Function
|
| 122 |
End If
|
128 |
End If
|
| 123 |
|
129 |
|
| 124 |
tempStr = Replace(tempStr, " ", "") ' remove any spaces
|
130 |
tempStr = Replace(tempStr, " ", "") ' remove any spaces
|
| 125 |
QuoteCSVwithLIKE = "'%"& Replace( UCase(tempStr), ",", "','") &"'"
|
131 |
QuoteCSVwithLIKE = "'%"& Replace( UCase(tempStr), ",", "','") &"'"
|
| 126 |
End Function
|
132 |
End Function
|
| 127 |
'-----------------------------------------------------------------------------------------------------------------------------
|
133 |
'-----------------------------------------------------------------------------------------------------------------------------
|
| 128 |
Function SplitPipes ( SSstr )
|
134 |
Function SplitPipes ( SSstr )
|
| 129 |
' split |val1||val2||val3| to array
|
135 |
' split |val1||val2||val3| to array
|
| 130 |
SplitPipes = Split( Replace( Replace(SSstr,"||","%"), "|","") , "%" )
|
136 |
SplitPipes = Split( Replace( Replace(SSstr,"||","%"), "|","") , "%" )
|
| 131 |
End Function
|
137 |
End Function
|
| 132 |
'-----------------------------------------------------------------------------------------------------------------------------
|
138 |
'-----------------------------------------------------------------------------------------------------------------------------
|
| 133 |
Function SplitAmpasans ( SSstr )
|
139 |
Function SplitAmpasans ( SSstr )
|
| 134 |
' split &val1&&val2&&val3& to array
|
140 |
' split &val1&&val2&&val3& to array
|
| 135 |
SSstr = Left (SSstr, Len(SSstr)-1) 'remove last &
|
141 |
SSstr = Left (SSstr, Len(SSstr)-1) 'remove last &
|
| 136 |
SSstr = Right (SSstr, Len(SSstr)-1) 'remove first &
|
142 |
SSstr = Right (SSstr, Len(SSstr)-1) 'remove first &
|
| 137 |
SplitAmpasans = Split( SSstr , "&&" )
|
143 |
SplitAmpasans = Split( SSstr , "&&" )
|
| 138 |
End Function
|
144 |
End Function
|
| 139 |
'-----------------------------------------------------------------------------------------------------------------------------
|
145 |
'-----------------------------------------------------------------------------------------------------------------------------
|
| Line 176... |
Line 182... |
| 176 |
End Function
|
182 |
End Function
|
| 177 |
'-----------------------------------------------------------------------------------------------------------------------------
|
183 |
'-----------------------------------------------------------------------------------------------------------------------------
|
| 178 |
Function Highlight_Substring ( SSstr, SSsubstr )
|
184 |
Function Highlight_Substring ( SSstr, SSsubstr )
|
| 179 |
Dim leftSTR, startPos
|
185 |
Dim leftSTR, startPos
|
| 180 |
startPos = InStr( 1, SSstr, SSsubstr, 1 )
|
186 |
startPos = InStr( 1, SSstr, SSsubstr, 1 )
|
| 181 |
|
187 |
|
| 182 |
If startPos > 0 Then
|
188 |
If startPos > 0 Then
|
| 183 |
leftSTR = Left ( SSstr, startPos - 1 )
|
189 |
leftSTR = Left ( SSstr, startPos - 1 )
|
| 184 |
Highlight_Substring = leftSTR &"<SPAN style='background:#ffff99;'>"& Mid( SSstr, startPos, Len(SSsubstr) ) &"</SPAN>"& Right ( SSstr, Len(SSstr) - Len(leftSTR) - Len(SSsubstr) )
|
190 |
Highlight_Substring = leftSTR &"<SPAN style='background:#ffff99;'>"& Mid( SSstr, startPos, Len(SSsubstr) ) &"</SPAN>"& Right ( SSstr, Len(SSstr) - Len(leftSTR) - Len(SSsubstr) )
|
| 185 |
Else
|
191 |
Else
|
| 186 |
' Subtring not found
|
192 |
' Subtring not found
|
| 187 |
Highlight_Substring = SSstr
|
193 |
Highlight_Substring = SSstr
|
| 188 |
End If
|
194 |
End If
|
| 189 |
|
195 |
|
| 190 |
End Function
|
196 |
End Function
|
| 191 |
'-----------------------------------------------------------------------------------------------------------------------------
|
197 |
'-----------------------------------------------------------------------------------------------------------------------------
|
| 192 |
Function NewLine_To_BR (SSstr)
|
198 |
Function NewLine_To_BR (SSstr)
|
| 193 |
If SSstr = "" OR IsNull(SSstr) Then
|
199 |
If SSstr = "" OR IsNull(SSstr) Then
|
| 194 |
Exit Function
|
200 |
Exit Function
|
| 195 |
Else
|
201 |
Else
|
| 196 |
NewLine_To_BR = Replace ( SSstr, VBNewLine, "<br>")
|
202 |
NewLine_To_BR = Replace ( SSstr, VBNewLine, "<br>")
|
| 197 |
End If
|
203 |
End If
|
| 198 |
End Function
|
204 |
End Function
|
| 199 |
'-----------------------------------------------------------------------------------------------------------------------------
|
205 |
'-----------------------------------------------------------------------------------------------------------------------------
|
| 200 |
Function IsTicked ( ByVal nParId, ByVal sParList )
|
206 |
Function IsTicked ( ByVal nParId, ByVal sParList )
|
| 201 |
' Used only with check boxes as they send comma-separated list
|
207 |
' Used only with check boxes as they send comma-separated list
|
| 202 |
nParId = ","& Replace(nParId, " ", "") &","
|
208 |
nParId = ","& Replace(nParId, " ", "") &","
|
| 203 |
sParList = ","& Replace(sParList, " ", "") &","
|
209 |
sParList = ","& Replace(sParList, " ", "") &","
|
| 204 |
|
210 |
|
| 205 |
If InStr( sParList, nParId ) > 0 Then
|
211 |
If InStr( sParList, nParId ) > 0 Then
|
| 206 |
IsTicked = TRUE
|
212 |
IsTicked = TRUE
|
| 207 |
Else
|
213 |
Else
|
| 208 |
IsTicked = FALSE
|
214 |
IsTicked = FALSE
|
| 209 |
End If
|
215 |
End If
|
| 210 |
End Function
|
216 |
End Function
|
| 211 |
'------------------------------------------------------------------------------------------------------------------
|
217 |
'------------------------------------------------------------------------------------------------------------------
|
| 212 |
Function FormatVersion ( ByVal nVersion )
|
218 |
Function FormatVersion ( ByVal nVersion )
|
| 213 |
Dim arrVersion, MajorVersion, MinorVersion
|
219 |
Dim arrVersion, MajorVersion, MinorVersion
|
| 214 |
If IsNull( nVersion ) Then Exit Function
|
220 |
If IsNull( nVersion ) Then Exit Function
|
| 215 |
If NOT IsNumeric(nVersion) Then
|
221 |
If NOT IsNumeric(nVersion) Then
|
| 216 |
FormatVersion = nVersion
|
222 |
FormatVersion = nVersion
|
| 217 |
Exit Function
|
223 |
Exit Function
|
| 218 |
End If
|
224 |
End If
|
| 219 |
|
225 |
|
| 220 |
nVersion = FormatNumber( nVersion, 3 )
|
226 |
nVersion = FormatNumber( nVersion, 3 )
|
| 221 |
|
227 |
|
| 222 |
arrVersion = Split( CStr( nVersion ), ".")
|
228 |
arrVersion = Split( CStr( nVersion ), ".")
|
| 223 |
MajorVersion = arrVersion(0)
|
229 |
MajorVersion = arrVersion(0)
|
| 224 |
MinorVersion = CInt(arrVersion(1))
|
230 |
MinorVersion = CInt(arrVersion(1))
|
| 225 |
FormatVersion = MajorVersion &"."& MinorVersion
|
231 |
FormatVersion = MajorVersion &"."& MinorVersion
|
| 226 |
|
232 |
|
| 227 |
End Function
|
233 |
End Function
|
| 228 |
'-----------------------------------------------------------------------------------------------------------------------------
|
234 |
'-----------------------------------------------------------------------------------------------------------------------------
|
| 229 |
Function GetBuildTypeString( enumBuildType )
|
235 |
Function GetBuildTypeString( enumBuildType )
|
| 230 |
|
236 |
|
| 231 |
If (NOT IsNull(enumBuildType)) OR (NOT enumBuildType = "") Then
|
237 |
If (NOT IsNull(enumBuildType)) OR (NOT enumBuildType = "") Then
|
| 232 |
|
238 |
|
| 233 |
Select Case CInt(enumBuildType)
|
239 |
Select Case CInt(enumBuildType)
|
| 234 |
Case enumDB_BUILD_TYPE_NONE
|
240 |
Case enumDB_BUILD_TYPE_NONE
|
| 235 |
GetBuildTypeString = "Build type not specified"
|
241 |
GetBuildTypeString = "Build type not specified"
|
| 236 |
|
242 |
|
| 237 |
Case enumDB_BUILD_TYPE_DEBUG
|
243 |
Case enumDB_BUILD_TYPE_DEBUG
|
| 238 |
GetBuildTypeString = "Debug"
|
244 |
GetBuildTypeString = "Debug"
|
| 239 |
|
245 |
|
| 240 |
Case enumDB_BUILD_TYPE_PROD
|
246 |
Case enumDB_BUILD_TYPE_PROD
|
| 241 |
GetBuildTypeString = "Production"
|
247 |
GetBuildTypeString = "Production"
|
| 242 |
|
248 |
|
| 243 |
Case enumDB_BUILD_TYPE_PROD_AND_DEBUG
|
249 |
Case enumDB_BUILD_TYPE_PROD_AND_DEBUG
|
| 244 |
GetBuildTypeString = "Production and Debug"
|
250 |
GetBuildTypeString = "Production and Debug"
|
| 245 |
|
251 |
|
| 246 |
Case enumDB_BUILD_TYPE_JAVA_1_4
|
252 |
Case enumDB_BUILD_TYPE_JAVA_1_4
|
| 247 |
GetBuildTypeString = "Java 1.4"
|
253 |
GetBuildTypeString = "Java 1.4"
|
| 248 |
|
254 |
|
| 249 |
Case enumDB_BUILD_TYPE_JAVA_1_5
|
255 |
Case enumDB_BUILD_TYPE_JAVA_1_5
|
| 250 |
GetBuildTypeString = "Java 1.5"
|
256 |
GetBuildTypeString = "Java 1.5"
|
| 251 |
|
257 |
|
| 252 |
Case enumDB_BUILD_TYPE_JAVA_1_6
|
258 |
Case enumDB_BUILD_TYPE_JAVA_1_6
|
| 253 |
GetBuildTypeString = "Java 1.6"
|
259 |
GetBuildTypeString = "Java 1.6"
|
| 254 |
|
260 |
|
| 255 |
End Select
|
261 |
End Select
|
| 256 |
|
262 |
|
| 257 |
Else
|
263 |
Else
|
| 258 |
GetBuildTypeString = "Build type not defined"
|
264 |
GetBuildTypeString = "Build type not defined"
|
| 259 |
End If
|
265 |
End If
|
| 260 |
|
266 |
|
| 261 |
|
267 |
|
| 262 |
End Function
|
268 |
End Function
|
| 263 |
'-----------------------------------------------------------------------------------------------------------------------------
|
269 |
'-----------------------------------------------------------------------------------------------------------------------------
|
| 264 |
%>
|
- |
|
| 265 |
|
270 |
%>
|
| - |
|
271 |
|