 |
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0 |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|

July 23rd, 2010, 08:56 AM
|
Registered User
|
|
Join Date: Jul 2010
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Error Type: Microsoft VBScript compilation (0x800A0411) Name redefined
So, I get this error on this page; any suggestions?
Error Type: Microsoft VBScript compilation (0x800A0411) Name redefined /asp/connDB_flextime.inc, line 2, column 4
Browser Type:
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; InfoPath.2; .NET CLR 1.1.4322; MS-RTC EA 2; MS-RTC LM 8)
Page:
POST 122 bytes to /asp/dtsShowForm.asp
POST Data:
ps=1&employeeinfo=1484%3BADAMS%2CJOEL%3Bjoela%3B58 2%3BBOS%3B6%3B5&slctName=1484%3BADAMS%2CJOEL%3Bjoe la%3B582%3BBOS%3B6%3B5
|

July 23rd, 2010, 07:06 PM
|
Friend of Wrox
|
|
Join Date: Jun 2008
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
|
|
Well, first of all, fix your browser.
Click on TOOLS menu.
Click on INTERNET OPTIONS
Click on ADVANCED tab
*UN*check "show friendly HTTP error messages"
OK
Now you will get *real* error messages.
********
Anyway, the problem is *EXACTLY* what the message says: On line 2 of "connDB_flextime.inc" you are doing a DIM of a variable that was already DIM-ed.
*Probably* the variable is DIM-ed in your main code, the page that is doing a #include of that file.
If you showed us the code of dtsShowForm.asp up to the #include line and the code of that .inc file, we could tell you right away. When you don't show code, all we can do is guess.
|

July 26th, 2010, 11:40 AM
|
Registered User
|
|
Join Date: Jul 2010
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Error Type: Microsoft VBScript compilation (0x800A0411) Name redefined
here is the include file code:
Code:
<%
Dim connDB_flextime
Set connDB_flextime = Server.CreateObject("ADODB.Connection")
connDB_flextime.Open "Provider=SQLOLEDB.1;Password=flextyme;Persist Security Info=True;User ID=flextime;Initial Catalog=FlexTime;Data Source=RGV-BOS-BL2;"
'connDB_flextime.Close
'Set connDB_flextime = Nothing
%>
dtsshowform.asp code:
Code:
<%
if 0 then
response.write "this application will live soon"
response.end
end if
%>
<!-- #include virtual="/asp/headfoot.inc" -->
<!-- #include virtual="/asp/connDB_flextime.inc"-->
<!-- #include virtual="/asp/dtsInclude.inc"-->
<!-- #include virtual="/asp/getEmployeeInfo.inc"-->
<%
SiteURL = getSiteURL
siteName = getSiteName
if 0 then
response.write "siteName=[" & siteName & "]<br />" & vbCrLf
end if
' strManagerOption = getManagerOption
session("MANAGERAPPROVAL") = ""
if 0 then
strManagerOption = "<select>" & strManagerOption & "</select>"
response.write "strManagerOption=[" & strManagerOption & "]<br />" & vbCrLf
response.end
end if
idnumberCookie = request.cookies("IDNUMBER")
userTypeCookie = request.cookies("USERTYPE")
TicketType = request("TicketType")
if idnumberCookie = "" or isnull(idnumberCookie) then
idnumberCookie = 0
end if
if userTypeCookie = "" or isnull(userTypeCookie) then
userTypeCookie = 0
end if
'*** define userType ***
pagesource = request("ps") '*** pagesource = 1 => with user information
'*** pagesource = 2 => without user information
'*** pagesource = 1 => working
if pagesource = "" or isnull(pagesource) then
pagesource = 2
end if
workmode = request("workmode") '*** workmode = 5 => DTS Staff Working
'*** workmode = 8 => Second Level Staff Working
userType = pagesource
if 0 then
response.write "idnumberCookie=[" & idnumberCookie & "]<br />" & vbCrLf
response.write "userTypeCookie=[" & userTypeCookie & "]<br />" & vbCrLf
response.write "TicketType=[" & TicketType & "]<br />" & vbCrLf
response.write "pagesource=[" & pagesource & "]<br />" & vbCrLf
response.write "workmode=[" & workmode & "]<br />" & vbCrLf
response.write "userType=[" & userType & "]<br />" & vbCrLf
end if
blnIsITManager = 0
if userTypeCookie > 0 then
select case userTypeCookie
case 4
select case pagesource
case 1
userType = 3
case 2
userType = 4
case 3
userType = 5
end select
case 5
select case pagesource
case 1
userType = 6
case 2
userType = 7
case 3
userType = 8
end select
case 6
if TicketType = 8 then
userType = 8
else
userType = 5
end if
blnIsITManager = 1
select case pagesource
case 1
userType = 3
case 2
userType = 4
case 3
' userType = 5
end select
case 7
userType = TicketType
case 9 '*** DTS rotation staff ***
select case pagesource
case 1
userType = 3
end select
select case TicketType
case 5
userType = 5
case 8
userType = 8
end select
end select
end if
if pagesource = 2 then
userType = 4
end if
if 0 then
response.write "userType=[" & userType & "]<br />" & vbCrLf
response.write "blnIsITManager=[" & blnIsITManager & "]<br />" & vbCrLf
end if
'*** end of define userType ***
'*** initialization ***
creationdate = ""
requestedby = ""
emailaddress = ""
extention = ""
location = 0
floor = 0
machineid = 0
receivedby = 0
assignedto = 0
priorityid = 0
sourceid = 0
detail = ""
hardwareid = 0
softwareid = 0
imformedid = 0
timesolved = ""
dtssolution = ""
dtssolutionuser = ""
level2support = 0
solutionNT = ""
hasLevel2Support = 0
'*** index initialization ***
receivedbyIndex = 0
assignedtoIndex = 0
priorityIndex = 0
sourceIndex = 0
statusIndex = 0
hardwareIndex = 0
softwareIndex = 0
informedIndex = 0
yearIndexDTS = 0
monthIndexDTS = 0
dayIndexDTS = 0
hourIndexDTS = 0
minuteIndexDTS = 0
ampmIndexDTS = 0
staffIndexNT = 0
monthIndexNT = 0
dayIndexNT = 0
yearIndexNT = 0
ntdone = 0
'*** end of initialization
'*** userType info **********************************************
'*** userType = 1 => normal user with info ***
'*** userType = 2 => normal user without info ***
'*** userType = 3 => DTS staff new request with info ***
'*** userType = 4 => DTS staff new request without info ***
'*** userType = 5 => DTS staff working ***
'*** userType = 6 => Level2Support new request with info ***
'*** userType = 7 => Level2Support new request without info ***
'*** userType = 8 => Level2Support working ***
'*** userType = 9 => IT manager working ***
'*** ***
'****************************************************************
blnDTSWorking = false
if userType = 3 or userType = 4 then
blnDTSWorking = true
strSQL = "exec it_AddRequest " & _
"null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null"
if 0 then
response.write "strSQL=[" & vbCrLf & strSQL & vbCrLf & "]"
end if
set rsRequest = connDB.execute(strSQL)
intNewTicketNumber = rsRequest("TicketNumber")
if 0 then'
response.write "intNewTicketNumber=[" & intNewTicketNumber & "]"
response.end
end if
set rsRequest = nothing
end if
'*** handle different userType ***
if userType = 1 or userType = 3 or userType = 6 then
employeeinfo = request("employeeinfo")
if 0 then
response.write "[" & employeeinfo & "]"
end if
aryEmployeeInf = split(employeeinfo,";")
employeeid = aryEmployeeInf(0)
requestedby = aryEmployeeInf(1)
emailaddress = lcase(trim(aryEmployeeInf(2)))
extention = trim(aryEmployeeInf(3))
location = trim(aryEmployeeInf(4))
floor = cstr(trim(aryEmployeeInf(5)))
department = trim(aryEmployeeInf(6))
end if
if 0 then
response.write "[" & employeeinfo & "]"
end if
if userType = 5 or userType = 8 or blnDTSWorking then
if blnDTSWorking then
TicketNubmer = intNewTicketNumber
else
TicketNubmer = request("TicketNubmer")
end if
Session("TICKETNUMBER") = TicketNubmer
'*** get attachment ***
strSQL = " select * from fileattach where ticketnumber = " & TicketNubmer
if 0 then
response.write "strSQL=[" & strSQL & "]<br />" & vbCrLf
end if
set rsFileAttach = connDB.execute(strSQL)
if rsFileAttach.eof then
strAttachFile = ""
else
strAttachFile = ""
do while not rsFileAttach.eof
strFileURL = rsFileAttach("URL")
if 0 then
response.write "strFileURL=[" & strFileURL & "]<br />" & vbCrLf
end if
strAttachFile = strAttachFile & _
"<img src=""/images/spacer.gif"" width=""10"" height=""1"" border=""0"" />" & _
"<a href=""" & SiteURL & strFileURL & """ target=""_blank""><img " & _
"src=""/images/attach.gif"" width=""12"" height=""10"" border=""0"" /></a>"
rsFileAttach.movenext
loop
end if
set rsFileAttach = nothing
if 0 then
response.write "strAttachFile=[" & strAttachFile & "]<br />" & vbCrLf
end if
strSQL = "select * from request where ticketnumber = " & TicketNubmer
if 0 then
response.write "strSQL=[" & strSQL & "]<br />" & vbCrLf
end if
set rsRequest = connDB.Execute(strSQL)
creationdate_origin = rsRequest("creationdate")
creationdate = formatdatetime(creationdate_origin,0)
creationdate1 = formatdatetime(creationdate_origin,2)
if not blnDTSWorking then
requestedby = rsRequest("requestedby")
if instr(rsRequest("emailaddress"),"hercules") > 0 then
emailaddress = split(rsRequest("emailaddress"),"@")(0)
else
emailaddress = rsRequest("emailaddress")
end if
extention = rsRequest("Extention")
location = rsRequest("location")
floor = cstr(trim(rsRequest("floor")))
machineid = rsRequest("machineid")
if machineid = "" or isnull(machineid) then
machineid = 0
end if
receivedby = rsRequest("receivedby")
assignedto = rsRequest("assignedto")
priorityid = rsRequest("priorityid")
sourceid = rsRequest("sourceid")
statusid = rsRequest("statusid")
detail = rsRequest("detail")
hardwareid = rsRequest("hardwareid")
softwareid = rsRequest("softwareid")
informedid = rsRequest("informedid")
dtssolution = rsRequest("dtssolution")
dtssolutionuser = rsRequest("dtssolutionuser")
if dtssolutionuser = "" or isnull(dtssolutionuser) or dtssolutionuser = "0" then
dtssolutionuser = ""
end if
level2support = rsRequest("level2support")
end if
if userType = 5 then
timesolved = rsRequest("timesolved")
end if
if 0 then
response.write "creationdate=[" & creationdate & "]<br />" & vbCrLf
response.write "requestedby=[" & requestedby & "]<br />" & vbCrLf
response.write "emailaddress=[" & emailaddress & "]<br />" & vbCrLf
response.write "extention=[" & extention & "]<br />" & vbCrLf
response.write "location=[" & location & "]<br />" & vbCrLf
response.write "floor=[" & floor & "]<br />" & vbCrLf
response.write "machineid=[" & machineid & "]<br />" & vbCrLf
response.write "receivedby=[" & receivedby & "]<br />" & vbCrLf
response.write "assignedto=[" & assignedto & "]<br />" & vbCrLf
response.write "priorityid=[" & priorityid & "]<br />" & vbCrLf
response.write "sourceid=[" & sourceid & "]<br />" & vbCrLf
response.write "detail=[" & detail & "]<br />" & vbCrLf
response.write "hardwareid=[" & hardwareid & "]<br />" & vbCrLf
response.write "softwareid=[" & softwareid & "]<br />" & vbCrLf
response.write "imformedid=[" & imformedid & "]<br />" & vbCrLf
response.write "timesolved=[" & timesolved & "]<br />" & vbCrLf
response.write "dtssolution=[" & dtssolution & "]<br />" & vbCrLf
response.write "dtssolutionuser=[" & dtssolutionuser & "]<br />" & vbCrLf
response.write "level2support=[" & level2support & "]<br />" & vbCrLf
end if
'*** retrieve receivebyIndex ***
if receivedby = "" or isnull(receivedby) then
receivedbyIndex = 0
else
if receivedby > 0 then
receivedbyIndex = getStaffIndex("1,4,5,6,7,9",receivedby)
end if
end if
if 0 then
response.write "receivedbyIndex=[" & receivedbyIndex & "]<br />" & vbCrLf
end if
'*** retrieve assignedtoIndex ***
if assignedto="" or isnull(assignedto) then
assignedtoIndex = getStaffIndex("4,7,6,9",assignedto)
else
if assignedto > 0 then
assignedtoIndex = getStaffIndex("4,7,6,9",assignedto)
end if
end if
if 0 then
response.write "assignedtoIndex=[" & assignedtoIndex & "]<br />" & vbCrLf
end if
'*** retrieve priorityIndex ***
if priorityid="" or isnull(priorityid) then
priorityIndex = 0
else
if priorityid > 0 then
priorityIndex = getPrioityIndex(priorityid)
end if
end if
'*** retrieve sourceIndex ***
if sourceid="" or isnull(sourceid) then
sourceIndex = 0
else
if sourceid > 0 then
sourceIndex = getSourceIndex(sourceid)
end if
end if
'*** retrieve statusIndex ***
if statusid = "" or isnull(statusid) then
statusIndex = 0
else
if statusid > 0 then
statusIndex = getStatusIndex(statusid)
end if
end if
'*** retrieve softwareIndex ***
if softwareid = "" or isnull(softwareid) or softwareid = 0 then
softwareIndex = 0
else
softwareIndex = getSoftwareIndex(softwareid)
end if
'*** retrieve hardwareIndex ***
if hardwareid="" or isnull(hardwareid) then
hardwareIndex = 0
else
if hardwareid > 0 then
hardwareIndex = getHardwareIndex(hardwareid)
end if
end if
'*** retrieve informedIndex ***
if informedid="" or isnull(informedid) then
informedIndex = 0
else
if informedid > 0 then
informedIndex = getSourceIndex(informedid)
end if
end if
'*** build request time ***
yearRequest = getYear(creationdate_origin)
monthRequest = getMonth(creationdate_origin)
dayRequest = getDate(creationdate_origin)
strYearOption = getYearOption(yearRequest,2)
strMonthOption = getMonthOption(monthRequest,6)
strDayOption = getTimeOption(1,31)
strHourOption = getTimeOption(0,12)
strMinuteOption = getTimeOption(0,59)
'*** build time solved ***
if timesolved="" or isnull(timesolved) then
yearIndexDTS = 0
monthIndexDTS = 0
dayIndexDTS = 0
hourIndexDTS = 0
minuteIndexDTS = 0
ampmIndexDTS = 0
else
yearSolvedDTS = getYear(timesolved)
monthSolvedDTS = getMonth(timesolved)
daySolvedDTS = getDate(timesolved)
hourSolvedDTS = getHour(timesolved)
minuteSolvedDTS = getMinute(timesolved)
if monthSolvedDTS < monthRequest then
monthSolvedDTS = monthSolvedDTS + 12
end if
if hourSolvedDTS > 11 then
hourSolvedDTS = hourSolvedDTS - 12
end if
yearIndexDTS = (yearSolvedDTS - yearRequest) + 1
monthIndexDTS = (monthSolvedDTS - monthRequest) + 1
dayIndexDTS = daySolvedDTS
hourIndexDTS = hourSolvedDTS
minuteIndexDTS = minuteSolvedDTS + 1
if right(timesolved,2) = "AM" then
ampmIndexDTS = 1
else
ampmIndexDTS = 2
end if
end if
if 0 then
response.write "yearRequest=[" & yearRequest & "]<br />" & vbCrLf
response.write "yearSolvedDTS=[" & yearSolvedDTS & "]<br />" & vbCrLf
response.write "monthRequest=[" & monthRequest & "]<br />" & vbCrLf
response.write "monthSolvedDTS=[" & monthSolvedDTS & "]<br />" & vbCrLf
response.write "dayRequest=[" & dayRequest & "]<br />" & vbCrLf
response.write "daySolvedDTS=[" & daySolvedDTS & "]<br />" & vbCrLf
response.write "hourSolvedDTS=[" & hourSolvedDTS & "]<br />" & vbCrLf
response.write "minuteIndexDTS=[" & minuteIndexDTS & "]<br />" & vbCrLf
response.write "yearIndexDTS=[" & yearIndexDTS & "]<br />" & vbCrLf
response.write "monthIndexDTS=[" & monthIndexDTS & "]<br />" & vbCrLf
response.write "dayIndexDTS=[" & dayIndexDTS & "]<br />" & vbCrLf
response.write "hourIndexDTS=[" & hourIndexDTS & "]<br />" & vbCrLf
response.write "minuteIndexDTS=[" & minuteIndexDTS & "]<br />" & vbCrLf
response.write "ampmIndexDTS=[" & ampmIndexDTS & "]<br />" & vbCrLf
end if
'*** retrieve networksupport info ***
strSQL = "select * from networksupport where ticketnumber = " & TicketNubmer
if 0 then
response.write "strSQL=[" & strSQL & "]<br />" & vbCrLf
end if
set rsRequest = connDB.Execute(strSQL)
if not rsRequest.eof then
hasLevel2Support = 1
level2Support = 1
creationdateNT = rsRequest("creationdate")
TicketNumberNT = rsRequest("ticketnumber")
employeeidNT = rsRequest("employeeid")
solutionNT = rsRequest("solution")
estimatedateNT = rsRequest("estimatedate")
finishdateNT = rsRequest("finishdate")
if finishdateNT = "" or isnull(finishdateNT) then
ntdone = 0
else
ntdone = 1
end if
if estimatedateNT="" or isnull(estimatedateNT) then
monthIndexNT = 0
dayIndexNT = 0
yearIndexNT = 0
else
yearEstimateNT = getYear(estimatedateNT)
monthEstimateNT = getMonth(estimatedateNT)
dayEstimateNT = getDate(estimatedateNT)
if monthEstimateNT < monthRequest then
monthEstimateNT = monthEstimateNT + 12
end if
if 0 then
response.write "yearEstimateNT=[" & yearEstimateNT & "]<br />" & vbCrLf
response.write "yearRequest=[" & yearRequest & "]<br />" & vbCrLf
response.write "monthEstimateNT=[" & monthEstimateNT & "]<br />" & vbCrLf
response.write "monthRequest[" & monthRequest & "]<br />" & vbCrLf
response.write "dayEstimateNT=[" & dayEstimateNT & "]<br />" & vbCrLf
end if
yearIndexNT = (yearEstimateNT - yearRequest) + 1
monthIndexNT = (monthEstimateNT - monthRequest) + 1
dayIndexNT = dayEstimateNT
end if
else
hasLevel2Support = 0
level2Support = 0
end if '*** if not rsRequest.eof then ***
set rsRequest = nothing
staffIndexNT = getStaffIndex("5,6,7,9",employeeidNT)
if 0 then
response.write "creationdateNT=[" & creationdateNT & "]<br />" & vbCrLf
response.write "TicketNumberNT=[" & TicketNumberNT & "]<br />" & vbCrLf
response.write "employeeidNT=[" & employeeidNT & "]<br />" & vbCrLf
response.write "solutionNT=[" & solutionNT & "]<br />" & vbCrLf
response.write "estimatedateNT=[" & estimatedate & "]<br />" & vbCrLf
response.write "finishdateNT=[" & finishdateNT & "]<br />" & vbCrLf
response.write "staffIndexNT=[" & staffIndexNT & "]<br />" & vbCrLf
response.write "receivedbyIndex=[" & receivedbyIndex & "]<br />" & vbCrLf
response.write "assignedtoIndex=[" & assignedtoIndex & "]<br />" & vbCrLf
response.write "priorityIndex=[" & priorityIndex & "]<br />" & vbCrLf
response.write "sourceIndex=[" & sourceIndex & "]<br />" & vbCrLf
response.write "statusIndex=[" & statusIndex & "]<br />" & vbCrLf
response.write "softwareIndex=[" & softwareIndex & "]<br />" & vbCrLf
response.write "hardwareIndex=[" & hardwareIndex & "]<br />" & vbCrLf
response.write "informedIndex=[" & informedIndex & "]<br />" & vbCrLf
response.write "creationdate_origin=[" & creationdate_origin & "]<br />" & vbCrLf
response.write "yearRequest=[" & yearRequest & "]<br />" & vbCrLf
response.write "monthRequest=[" & monthRequest & "]<br />" & vbCrLf
response.write "dayRequest=[" & dayRequest & "]<br />" & vbCrLf
response.write "strYearOption=[" & strYearOption & "]<br />" & vbCrLf
response.write "strMonthOption=[" & strMonthOption & "]<br />" & vbCrLf
response.write "strDayOption=[" & strDayOption & "]<br />" & vbCrLf
response.write "strHourOption=[" & strHourOption & "]<br />" & vbCrLf
response.write "strMinuteOption=[" & strMinuteOption & "]<br />" & vbCrLf
end if
end if '*** if userType = 5 or userType = 8 then ***
if 0 then
response.write "requestedby=[" & requestedby & "]<br />" & vbCrLf
response.write "emailaddress=[" & emailaddress & "]<br />" & vbCrLf
end if
'*** end of handle different userType ***
'*** buile Location and Floor select option list ***
strFloorSelectBegin = " <select name=""slctFloor"">"
strFloorSelectEnd = vbCrLf & " </select></font>" & vbCrLf
strFloorOptionEmpty = " <option selected><< Choose a Location</option>" & vbCrLf
strFloorOption = ""
strFloorSelectOption = ""
'*** construct location and floor selection objects ***
strSQL = "select distinct home_office from employee order by home_office"
set rsLocation = connDB_flextime.Execute(strSQL)
strLocationFloor = "var aryLocationFloor = new Array();" & vbCrLf
intLocationCounter = 0
indexLocation = 0
indexFloor = 0
do while not rsLocation.eof
strOffice = trim(rsLocation("home_office"))
if strOffice <> "FLA" then
intLocationCounter = intLocationCounter + 1
blnLocation = false
if userType = 1 or userType = 3 or userType = 5 or userType = 6 or userType = 8 or userType = 9 then
'response.write "location=[" & location & "]<br />"
'response.write "strOffice=[" & strOffice & "]<br />"
if lcase(location) = lcase(strOffice) then
indexLocation = intLocationCounter
blnLocation = true
end if
end if
strLocationFloor = strLocationFloor & "aryLocationFloor[" & intLocationCounter & "] = new Array(""" & strOffice
strSQL = "select distinct office_floor from employee where home_office = '" & strOffice & "' order by office_floor"
if 0 then
response.write "strSQL=[" & strSQL & "]<br />" & vbCrLf
response.end
end if
set rsFloor = connDB_flextime.Execute(strSQL)
intCounterFloor = 0
do while not rsFloor.eof
intCounterFloor = intCounterFloor + 1
strFloor = trim(rsFloor("office_floor"))
if 0 then
response.write "strFloor=[" & strFloor & "]<br />" & vbCrLf
end if
if blnLocation then
strFloorOption = strFloorOption & vbCrLf & _
" <option value=""" & strFloor & """>" & strFloor & "</option>"
if (floor = strFloor) and indexFloor = 0 then
if 0 then
response.write "<font color=red>[" & intCounterFloor & "]<br /></font>"
end if
indexFloor = intCounterFloor
end if
end if
strLocationFloor = strLocationFloor & """,""" & strFloor
rsFloor.movenext
loop
set rsFloor = nothing
strLocationFloor = strLocationFloor & """);" & vbCrLf
end if
rsLocation.movenext
loop
set rsLocation = nothing
' connDB_flextime.Close
if userType=2 or userType=4 or userType=7 then
strFloorSelectOption = strFloorSelectBegin & strFloorOptionEmpty & strFloorSelectEnd
else
strFloorSelectOption = strFloorSelectBegin & strFloorOption & strFloorSelectEnd
end if
if 0 then
response.write "<br />" & vbCrLf
response.write strFloorSelectOption
response.write "<br />" & vbCrLf
response.write "strLocationFloor=[" & strLocationFloor & "]<br />" & vbCrLf
response.write "indexLocation=[" & indexLocation & "]<br />" & vbCrLf
response.write "indexFloor=[" & indexFloor & "]<br />" & vbCrLf
end if
if userType = 3 or userType = 4 or userType = 5 or userType = 8 or userType = 9 then
strTitleName = "<img src=""/images/spacer.gif"" width=""40"" height=""1"" border=""0"" />Desktop Service Database"
else
strTitleName = "Desktop Service Request Form"
end if
' *** Start Form Header ***
strDTSFHeader = "<table width=""672"" bgcolor=""#FFFFCC"" cellpadding=""0"" cellspacing=""1"" bordercolor=""#006666"" border=""2"">" & vbCrLf & _
" <tr>" & vbCrLf & _
" <td align=""center""><table width=""100%"" cellpadding=""0"" cellspacing=""0"" border=""0"">" & vbCrLf & _
" <tr>" & vbCrLf & _
" <td align=""center"">" & vbCrLf & _
" <br />" & vbCrLf & _
" <font class=""formtitle1"">" & strTitleName & "</font></td>" & vbCrLf & _
" </tr>" & vbCrLf
if userType = 1 or userType = 2 then
strDTSFHeader = strDTSFHeader & vbCrLf
else
strDTSFHeader = strDTSFHeader & _
"<img src=""/images/spacer.gif"" width=""630"" height=""1"" border=""0"" /><a " & _
"href=""javascript:printForm(document.form1)""><img src=""/images/print.gif"" width=""16"" height=""14"" alt=""Print"" border=""0"" /></a>" & vbCrLf
end if
strDTSFHeader = strDTSFHeader & _
" <form name=""form1"" action=""/asp/dtsAddRequest.asp"" method=""post"" onsubmit=""frmValidate(document.form1); return false;"">" & vbCrLf & _
" <input type=""hidden"" name=""cf"" value=""1"">" & vbCrLf & _
" <input type=""hidden"" name=""TicketNubmer"" value=""" & TicketNubmer & """>" & vbCrLf & _
" <input type=""hidden"" name=""CreationDate"" value=""" & creationdate & """>" & vbCrLf & _
" <input type=""hidden"" name=""userType"" value="""">" & vbCrLf & _
" <input type=""hidden"" name=""Machine"" value="""">" & vbCrLf & _
" <input type=""hidden"" name=""Manager"" value="""">" & vbCrLf & _
" <input type=""hidden"" name=""ReceivedBy"" value="""">" & vbCrLf & _
" <input type=""hidden"" name=""Source"" value="""">" & vbCrLf & _
" <input type=""hidden"" name=""AssignedTo"" value="""">" & vbCrLf & _
" <input type=""hidden"" name=""Priority"" value="""">" & vbCrLf & _
" <input type=""hidden"" name=""Hardware"" value="""">" & vbCrLf & _
" <input type=""hidden"" name=""Software"" value="""">" & vbCrLf & _
" <input type=""hidden"" name=""Status"" value="""">" & vbCrLf & _
" <input type=""hidden"" name=""InformedUser"" value="""">" & vbCrLf & _
" <input type=""hidden"" name=""TimeSolved"" value="""">" & vbCrLf & _
" <input type=""hidden"" name=""StaffNT"" value="""">" & vbCrLf & _
" <input type=""hidden"" name=""NTEstimatedTime"" value="""">" & vbCrLf & _
" <input type=""hidden"" name=""DoneNT"" value="""">" & vbCrLf & _
" <input type=""hidden"" name=""MoreInfo"" value="""">" & vbCrLf & _
" <input type=""hidden"" name=""hasLevel2Support"" value="""">" & vbCrLf & _
" <input type=""hidden"" name=""txtrUploadFile"" value="""">" & vbCrLf & _
" </table>" & vbCrLf
' *** End Form Header ***
'*** Start Ticket Number ***
strDTSFTicketNumber = " <table width=""99%"" bgcolor=""#FFFFCC"" cellspacing=""0"" cellpadding=""0"" border=""0"">" & vbCrLf & _
" <tr>" & vbCrLf & _
" <td align=""left""><font class=""formfont9""> Ticket Number: </font> <font class=""formfont12"">" & TicketNubmer & "</font></td>" & vbCrLf & _
" <td align=""right""><font class=""formfont9"">Requested Date: <font class=""formfont8"">" & creationdate & " </font></font></td>" & vbCrLf & _
" </tr>" & vbCrLf & _
" </table>" & vbCrLf
'*** End Ticket Number ***
'*** Start Request Info ***
strDTSFRequest = " <table width=""99%"" bgcolor=""#FFFFCC"" cellspacing=""0"" cellpadding=""0"" border=""0"">" & vbCrLf & _
" <tr>" & vbCrLf & _
" <td align=""left""><img src=""/images/spacer.gif"" width=""117"" height=""1"" border=""0"" /><font class=""formfont1"">" & vbCrLf & _
" Machine Type<img src=""/images/spacer.gif"" width=""1"" height=""1"" border=""0"" />" & vbCrLf & _
" <select name=""slctMachine"" size=""1"">" & vbCrLf & _
" <option value=""""> - - select one - - </option>" & vbCrLf & _
getMachineOption & _
" </select></font>" & vbCrLf & _
" <font class=""formfont10""></font></td>" & vbCrLf & _
" </tr> " & vbCrLf & _
" </table>" & vbCrLf
'*** End Request Info ***
'*** Start DTS Staff I ***
strDTSFDTSStaff_I = " <table width=""99%"" bgcolor=""#FFFFCC"" cellspacing=""0"" cellpadding=""0"" border=""0"">" & vbCrLf & _
" <tr>" & vbCrLf & _
" <td align=""left""><font class=""formfont7""> </font></td>" & vbCrLf & _
" </tr>" & vbCrLf & _
" <tr>" & vbCrLf & _
" <td align=""left""><img src=""/images/spacerR.gif"" width=""99%"" height=""1"" border=""0"" /></td>" & vbCrLf & _
" </tr>" & vbCrLf & _
" <tr>" & vbCrLf & _
" <td align=""left""><font class=""formfont7""> </font></td>" & vbCrLf & _
" </tr>" & vbCrLf & _
" <tr>" & vbCrLf & _
" <td align=""left""><font class=""formfont7"">" & vbCrLf & _
" Received By:" & vbCrLf & _
" <img src=""/images/spacer.gif"" width=""10"" height=""1"" border=""0"" />" & vbCrLf & _
" <select name=""slctReceivedBy"" size=""1"">" & vbCrLf & _
" <option value="""" selected> - - select one - - </option>" & vbCrLf & _
getITStaffOption("1,4,5,6,7,9") & _
" </select>" & vbCrLf & _
" <img src=""/images/spacer.gif"" width=""32"" height=""1"" border=""0"" />" & vbCrLf & _
" Source:" & vbCrLf & _
" <img src=""/images/spacer.gif"" width=""2"" height=""1"" border=""0"" />" & vbCrLf & _
" <select name=""slctSource"" size=""1"">" & vbCrLf & _
" <option value="""" selected> - - select source - - </option>" & vbCrLf & _
getSourceOption & _
" </select></td>" & vbCrLf & _
" </tr> " & vbCrLf & _
" </table>" & vbCrLf
'*** End DTS Staff I Info ***
'*** Start DTS Staff ***
strDTSFDTSStaff = " <table width=""99%"" bgcolor=""#FFFFCC"" cellspacing=""0"" cellpadding=""0"" border=""0"">" & vbCrLf & _
" <tr>" & vbCrLf & _
" <td align=""left""><font class=""formfont9""> </font></td>" & vbCrLf & _
" </tr>" & vbCrLf & _
" <tr>" & vbCrLf & _
" <td align=""left""><font class=""formfont7""> Assigned To: " & vbCrLf & _
" <img src=""/images/spacer.gif"" width=""10"" height=""1"" border=""0"" />" & vbCrLf & _
" <select name=""slctAssignedTo"" size=""1"" onchange=""changeSelection(form1,2)"">" & vbCrLf & _
" <option value="""" selected> - - select one - - </option>" & vbCrLf & _
getITStaffOption("4,7,6,9") & _
" </select>" & vbCrLf & _
" <img src=""/images/spacer.gif"" width=""34"" height=""1"" border=""0"" />" & vbCrLf & _
" Priority:" & vbCrLf & _
" <img src=""/images/spacer.gif"" width=""2"" height=""1"" border=""0"" />" & vbCrLf & _
" <select name=""slctPriority"" size=""1"">" & vbCrLf & _
" <option value="""" selected> - - select priority - - </option>" & vbCrLf & _
getPriorityOption & _
" </select></td>" & vbCrLf & _
" </tr>" & vbCrLf & _
" </table>" & vbCrLf
'*** End DTS Staff ***
'*** Start Manager Use ***
strDTSFManagerUse = " <table width=""99%"" bgcolor=""#FFFFCC"" cellspacing=""0"" cellpadding=""0"" border=""0"">" & vbCrLf & _
" <tr>" & vbCrLf & _
" <td align=""left""><font class=""formfont7""> </font></td>" & vbCrLf & _
" </tr>" & vbCrLf & _
" <tr>" & vbCrLf & _
" <td align=""left""><img src=""/images/spacerR.gif"" width=""99%"" height=""1"" border=""0"" /></td>" & vbCrLf & _
" </tr>" & vbCrLf & _
" <tr>" & vbCrLf & _
" <td align=""center"">" & vbCrLf & _
" <br />" & vbCrLf & _
" <table width=""580"" cellpadding=""2"" cellspacing=""0"" bgcolor=""#EEEEEE"" border=""0"">" & vbCrLf & _
" <tr>" & vbCrLf & _
" <td align=""left""><font class=""formfont8"">Select One of the ""Planned Service Requests"" ( Need manager's approval ) </font></td>" & vbCrLf & _
" </tr>" & vbCrLf & _
" <tr>" & vbCrLf & _
" <td align=""left"">" & vbCrLf & _
getManagerUseOption & _
" </td>" & vbCrLf & _
" </tr>" & vbCrLf & _
" <tr>" & vbCrLf & _
" <td align=""right""><input name=""butReset"" type=""button"" value=""Reset"" onclick=""disableManagerUse(this.form)"" style=""border-bottom:thin solid #336633;border-right:thin solid #009900;border-top:thin solid #CCCCCC;border-left:thin solid #CCCCCC;font-size:11px;font-family:Arial;font-weight:bold;background-color:#009900;color:#FFFFFF;line-height:.85;padding-top:3px;text-transform: capitalize;cursor: hand;width:60px"" />" & vbCrLf & _
" <img src=""/images/spacer.gif"" width=""250"" height=""1"" border=""0"" /><font class=""formfont7""><b>Manager:</b>" & vbCrLf & _
" " & vbCrLf & _
" <select name=""slctManager"" onchange=""checkManagerListIndex(this.form)"">" & vbCrLf & _
" <option value=""""> <<- - Choose Item - - </option>" & vbCrLf & _
" </select></td>" & vbCrLf & _
" </tr>" & vbCrLf & _
" <tr>" & vbCrLf & _
" <td align=""left""><font class=""formfont11""> Note <br />" & _
" <img src=""/images/spacer.gif"" width=""10"" height=""1"" border=""0"" align=""left"" /><table width=""90%"" cellpadding=""0"" cellspacing=""0"" border=""0""><tr><td align=""left""><font class=""formfont12"">(If this is not a Planned Service Request type in detail description of problem. If it is a planned service request and you have selected a bullet above, you can type additional information in Detailed Description Box below.)</font></td></tr></table></td>" & vbCrLf & _
" </tr>" & vbCrLf & _
" </table>" & vbCrLf & _
" <br />" & vbCrLf
%>
<%
' Get check boxes
%>
<!-- #include virtual="/asp/dtsCheckBox.inc" -->
<%
strDTSFManagerUse = strDTSFManagerUse & getCheckBox() & vbCrLf & _
" </td>" & vbCrLf & _
" </tr>" & vbCrLf & _
" </table>" & vbCrLf
'*** End Manager Use ***
'*** Start Detail ***
strDTSFDetail = " <table width=""99%"" bgcolor=""#FFFFCC"" cellspacing=""0"" cellpadding=""0"" border=""0"">" & vbCrLf & _
" <tr>" & vbCrLf & _
" <td align=""left""><font class=""formfont7""> </font></td>" & vbCrLf & _
" </tr>" & vbCrLf & _
" <tr>" & vbCrLf & _
" <td align=""left""><img src=""/images/spacerR.gif"" width=""99%"" height=""1"" border=""0"" /></td>" & vbCrLf & _
" </tr>" & vbCrLf & _
" <tr>" & vbCrLf & _
" <td align=""left""><font class=""formfont7""> </font></td>" & vbCrLf & _
" </tr>" & vbCrLf & _
" <tr>" & vbCrLf & _
" <td align=""left""><font class=""formfont7""> Detailed Description " & _
"<img src=""/images/spacer.gif"" width=""10"" height=""5"" border=""0"" />" & strAttachFile & "</td>" & vbCrLf & _
" </tr>" & vbCrLf & _
" <tr>" & vbCrLf & _
" <td align=""center""><textarea rows=""6"" name=""Detail"" cols=""75"">" & detail & "</textarea></td>" & vbCrLf & _
" </tr>" & vbCrLf & _
" <tr>" & vbCrLf & _
" <td align=""left""><font class=""formfont7""> </font></td>" & vbCrLf & _
" </tr>" & vbCrLf
if userType = 1 or userType = 2 then
strDTSFDetail = strDTSFDetail & _
" <tr>" & vbCrLf & _
" <td align=""left""><font class=""formfont7""> Please attach any files needed</font>" & vbCrLf & _
" <img src=""/images/spacer.gif"" width=""280"" height=""5"" border=""0"" />" & vbCrLf & _
" <font class=""formfont7""><a name=""aHA_UploadFile""" & vbCrLf & _
" title=""Handle Attachment""" & vbCrLf & _
" href=""javascript:goToFileAttach(document.form1,document.form1.txtrUploadFile1,document.anchors('aHA_UploadFile'))""" & vbCrLf & _
" onmouseover=""status='Handle Attachment'; return true;""" & vbCrLf & _
" onmouseover=""status=''; return true;""><b>Click here to add attachment</b></a></font>" & vbCrLf & _
" </tr>" & vbCrLf & _
" <tr>" & vbCrLf & _
" <td align=""center""><textarea name=""txtrUploadFile1"" cols=""75"" rows=""1"" value="""" disabled=""disabled""></textarea>" & vbCrLf & _
" <br />" & vbCrLf & _
" <br />" & vbCrLf & _
" </td>" & vbCrLf & _
" </tr>" & vbCrLf
end if
strDTSFDetail = strDTSFDetail & _
" </table>" & vbCrLf
'*** End Detail ***
'*** Start DTS Staff II ***
strDTSFDTSStaff_II = " <table width=""99%"" bgcolor=""#FFFFCC"" cellspacing=""3"" cellpadding=""0"" border=""0"">" & vbCrLf & _
" <tr>" & vbCrLf & _
" <td align=""left""><img src=""/images/spacerR.gif"" width=""99%"" height=""1"" border=""0"" /></td>" & vbCrLf & _
" </tr>" & vbCrLf & _
" <tr>" & vbCrLf & _
" <td align=""left""><font class=""formfont7""> </font></td>" & vbCrLf & _
" </tr>" & vbCrLf & _
" <tr>" & vbCrLf & _
" <td align=""left""><font class=""formfont7"">" & vbCrLf & _
" Hardware:" & vbCrLf & _
" <img src=""/images/spacer.gif"" width=""20"" height=""1"" border=""0"" />" & vbCrLf & _
" <select name=""slctHardware"" size=""1"">" & vbCrLf & _
" <option value="""" selected> - - select one - - </option>" & vbCrLf & _
getHardwareOption & _
" </select>" & vbCrLf & _
" <img src=""/images/spacer.gif"" width=""40"" height=""1"" border=""0"" />" & vbCrLf & _
" Software:" & vbCrLf & _
" <img src=""/images/spacer.gif"" width=""10"" height=""1"" border=""0"" />" & vbCrLf & _
" <select name=""slctSoftware"" size=""1"">" & vbCrLf & _
" <option value="""" selected> - - select one - - </option>" & vbCrLf & _
getSoftwareOption & _
" </select></td>" & vbCrLf & _
" </tr> " & vbCrLf & _
" </table>" & vbCrLf
'*** End DTS Staff II ***
strDTSFDTSStaff_IIII = " <table width=""99%"" bgcolor=""#FFFFCC"" cellspacing=""3"" cellpadding=""0"" border=""0"">" & vbCrLf & _
" <tr>" & vbCrLf & _
" <td align=""left""><font class=""formfont9""> </font></td>" & vbCrLf & _
" </tr>" & vbCrLf & _
" <tr>" & vbCrLf & _
" <td align=""left""><font class=""formfont7"">" & vbCrLf & _
" Status: " & vbCrLf & _
" <img src=""/images/spacer.gif"" width=""38"" height=""1"" border=""0"" />" & vbCrLf & _
" <select name=""slctStatus"" size=""1"" onchange=""changeSelection(form1,1)"">" & vbCrLf & _
" <option value="""" selected > - - select one - - </option>" & vbCrLf & _
getStatusOption & _
" </select>" & vbCrLf & _
" <img src=""/images/spacer.gif"" width=""45"" height=""1"" border=""0"" />" & vbCrLf & _
" Problem Resolved By:" & vbCrLf & _
" <img src=""/images/spacer.gif"" width=""10"" height=""1"" border=""0"" />" & vbCrLf & _
" <select name=""slctInformedUser"" size=""1"">" & vbCrLf & _
" <option value="""" selected> - - select one - - </option>" & vbCrLf & _
getSourceOption & _
" </select></td>" & vbCrLf & _
" </tr>" & vbCrLf & _
" </table>" & vbCrLf
'*** End DTS Staff IIII ***
strDTSFDTSStaff_TimeSolved = " <table width=""99%"" bgcolor=""#FFFFCC"" cellspacing=""3"" cellpadding=""0"" border=""0"">" & vbCrLf & _
" <tr> " & vbCrLf & _
" <td align=""left""><font class=""formfont7"">" & vbCrLf & _
" <img src=""/images/spacer.gif"" width=""1"" height=""8"" border=""0"" /><br />" & vbCrLf & _
" Time Solved: " & vbCrLf & _
" <img src=""/images/spacer.gif"" width=""11"" height=""1"" border=""0"" />" & vbCrLf & _
" <select name=""slctYearDTS"" size=""1"">" & vbCrLf & _
" <option value=""""></option>" & vbCrLf & _
strYearOption & _
" </select>" & vbCrLf & _
" <select name=""slctMonthDTS"" size=""1"">" & vbCrLf & _
" <option value=""""></option>" & vbCrLf & _
strMonthOption & _
" </select>" & vbCrLf & _
" <select name=""slctDayDTS"" size=""1"">" & vbCrLf & _
" <option value=""""></option>" & vbCrLf & _
strDayOption & _
" </select>" & vbCrLf & _
" <select name=""slctHourDTS"" size=""1"">" & vbCrLf & _
" <option value=""""></option>" & vbCrLf & _
strHourOption & _
" </select>" & vbCrLf & _
" <select name=""slctMinuteDTS"" size=""1"">" & vbCrLf & _
" <option value=""""></option>" & vbCrLf & _
strMinuteOption & _
" </select>" & vbCrLf & _
" <select name=""slctAMPMDTS"" size=""1"">" & vbCrLf & _
" <option value=""""></option>" & vbCrLf & _
" <option value=""AM"">AM</option>" & vbCrLf & _
" <option value=""PM"">PM</option>" & vbCrLf & _
" </select> <font class=""formfont8"">(YYYY/MM/DD HOUR:MINUTE AM/PM )</font><br /><img src=""/images/spacer.gif"" width=""1"" height=""8"" border=""0"" /></td>" & vbCrLf & _
" </tr>" & vbCrLf & _
" </table>" & vbCrLf
'*** End DTS Staff time solved ***
strDTSFDTSStaff_III = " <table width=""99%"" bgcolor=""#FFFFCC"" cellspacing=""3"" cellpadding=""0"" border=""0"">" & vbCrLf & _
" <tr>" & vbCrLf & _
" <td align=""left""><font class=""formfont7""> DTS Staff Solution</font></td>" & vbCrLf & _
" </tr>" & vbCrLf & _
" <tr>" & vbCrLf & _
" <td align=""center""><textarea rows=""6"" name=""SolutionDTS"" cols=""75"">" & dtssolution & "</textarea></td>" & vbCrLf & _
" </tr>" & vbCrLf & _
" <tr>" & vbCrLf & _
" <td align=""left""><font class=""formfont7""> DTS Staff Solution to User</font></td>" & vbCrLf & _
" </tr>" & vbCrLf & _
" <tr>" & vbCrLf & _
" <td align=""center""><textarea rows=""6"" name=""SolutionDTSUser"" cols=""75"">" & dtssolutionuser & "</textarea></td>" & vbCrLf & _
" </tr>" & vbCrLf & _
" <tr>" & vbCrLf & _
" <td align=""left""><img src=""/images/spacer.gif"" width=""17"" height=""1"" border=""0"" /><input name=""SpellChk.x"" onclick=""DoSpell('form1', 'SolutionDTSUser', '')"" type=""button"" value=""Check Spelling"" /></td>" & vbCrLf & _
" </tr>" & vbCrLf & _
" </table>" & vbCrLf
'*** End DTS Staff III ***
'*** Start Network Staff ***
strDTSFNetworkStaff = " <table width=""99%"" bgcolor=""#FFFFCC"" cellspacing=""0"" cellpadding=""0"" border=""0"">" & vbCrLf & _
" <tr>" & vbCrLf & _
" <td align=""left""><img src=""/images/spacer.gif"" width=""99%"" height=""1"" border=""0"" /></td>" & vbCrLf & _
" </tr>" & vbCrLf & _
" <tr>" & vbCrLf & _
" <td align=""left""><font class=""formfont7""> </font></td>" & vbCrLf & _
" </tr>" & vbCrLf & _
" <tr>" & vbCrLf & _
" <td align=""left""><img src=""/images/spacerR.gif"" width=""99%"" height=""1"" border=""0"" /></td>" & vbCrLf & _
" </tr>" & vbCrLf & _
" <tr>" & vbCrLf & _
" <td align=""left""><font class=""formfont7""> </font></td>" & vbCrLf & _
" </tr>" & vbCrLf & _
" <tr>" & vbCrLf & _
" <td align=""left""><font class=""formfont7"">" & vbCrLf & _
" IT Staff: " & vbCrLf & _
" <select name=""slctStaffNT"" size=""1"" onchange=""changeSelection(form1,3)"">" & vbCrLf & _
" <option value="""" selected> - - select one - - </option>" & vbCrLf & _
getITStaffOption("5,6,7,9") & _
" </select>" & vbCrLf
'*** End Network Staff ***
'*** Start Network Staff I ***
strDTSFNetworkStaff_I = " <img src=""/images/spacer.gif"" width=""20"" height=""1"" border=""0"" />" & vbCrLf & _
" Date: " & vbCrLf & _
" <select name=""slctMonthNT"" size=""1"">" & vbCrLf & _
" <option value=""""></option>" & vbCrLf & _
strMonthOption & _
" </select>" & vbCrLf & _
" <select name=""slctDayNT"" size=""1"">" & vbCrLf & _
" <option value=""""></option>" & vbCrLf & _
strDayOption & _
" </select>" & vbCrLf & _
" <select name=""slctYearNT"" size=""1"">" & vbCrLf & _
" <option value=""""></option>" & vbCrLf & _
strYearOption & _
" </select>" & vbCrLf & _
" <img src=""/images/spacer.gif"" width=""15"" height=""1"" border=""0"" />" & vbCrLf & _
" Done: " & vbCrLf & _
" <input name=""chkDone"" type=""checkbox"" value="""" />" & vbCrLf & _
" <img src=""/images/spacer.gif"" width=""8"" height=""1"" border=""0"" />" & vbCrLf
if userType = 5 then
strDTSFNetworkStaff_I = strDTSFNetworkStaff_I & _
" More Info: <input name=""chkMore"" type=""checkbox"" value="""" />" & vbCrLf
end if
if userType = 8 then
strDTSFNetworkStaff_I = strDTSFNetworkStaff_I & _
" Need more info: " & vbCrLf & _
" <input name=""chkMore"" type=""checkbox"" value="""" />" & vbCrLf
end if
'*** End Network Staff I ***
'*** Start Network Staff II ***
strDTSFNetworkStaff_II = " <br /><img src=""/images/spacer.gif"" width=""1"" height=""8"" border=""0"" /></td>" & vbCrLf & _
" </tr>" & vbCrLf
'*** Start Network Staff III ***
strDTSFNetworkStaff_III = " <tr>" & vbCrLf & _
" <td align=""left""><font class=""formfont7""> Solution</font></td>" & vbCrLf & _
" </tr>" & vbCrLf & _
" <tr>" & vbCrLf & _
" <td align=""center""><textarea rows=""6"" name=""SolutionNT"" cols=""75"">" & solutionNT & "</textarea></td>" & vbCrLf & _
" </tr>" & vbCrLf & _
" <tr>" & vbCrLf & _
" <td align=""left""><font class=""formfont7""> </font></td>" & vbCrLf & _
" </tr>" & vbCrLf
'*** Start Network Staff END ***
strDTSFNetworkStaff_END = " </table>" & vbCrLf
'*** End Network Staff END ***
'*** DTS Form End ***
strDTSFEnd = " <br />" & vbCrLf & _
" <center><input type=""Submit"" value=""Submit"" name=""cmdSubmit"" />" & vbCrLf & _
" <input type=""button"" value="" Clear "" name=""cmdClear"" onclick=""location.reload();"" /></center>" & vbCrLf & _
"</form>" & vbCrLf
'*** DTS Form End ***
strDTSFEnd_I = " <br />" & vbCrLf & _
" <img src=""/images/spacer.gif"" width=""30"" height=""8"" border=""0"" />" & vbCrLf & _
" <input type=""submit"" value=""Update"" name=""cmdUpdate"" />" & vbCrLf & _
" <input type=""button"" value=""Cancel"" name=""cmdCancel"" onclick=""javascript:history.back();""/>" & vbCrLf & _
"</form>" & vbCrLf
'*** DTS Form End ***
strDTSFEnd_II = " <br />" & vbCrLf & _
" <img src=""/images/spacer.gif"" width=""230"" height=""8"" border=""0"" />" & vbCrLf & _
" <input type=""Submit"" value=""Submit"" name=""cmdSubmit"" />" & vbCrLf & _
" <input type=""button"" value="" Clear "" name=""cmdClear"" onclick=""location.reload(); document.form1.txtFirstName.focus();"" />" & vbCrLf & _
"</form>" & vbCrLf
'*** build the form ***
' strDTSFHeader
' strDTSFTicketNumber
' strDTSFRequest
' strDTSFDTSStaff_I
' strDTSFDTSStaff
' strDTSFManagerUse
' strDTSFDetail
' strDTSFDTSStaff_II
' strDTSFDTSStaff_IIII
' strDTSFDTSStaff_III
' strDTSFNetworkStaff
' strDTSFNetworkStaff_I
' strDTSFNetworkStaff_II
' strDTSFNetworkStaff_III
' strDTSFNetworkStaff_END
' strDTSFEnd
strTableTemp = "<table width=""99%"" cellpadding=""0"" cellspacing=""0"" bgcolor=""#FFFFCC"" border=""0"">" & vbCrLf & _
" <tr>" & vbCrLf & _
" <td align=""left""> </td>" & vbCrLf & _
" </tr>" & vbCrLf & _
"</table>" & vbCrLf
strDTSFHeader_Original = strDTSFHeader
strDTSFHeader = ""
select case userType
case 1
strDTSForm = strDTSFRequest & strDTSFManagerUse & strDTSFDetail & strDTSFEnd
case 2
strDTSForm = strDTSFRequest & strDTSFManagerUse & strDTSFDetail & strDTSFEnd
' case 3
' strDTSForm = strDTSFRequest & strDTSFDTSStaff_I & strDTSFManagerUse & strDTSFDetail & strDTSFDTSStaff_II & strTableTemp & strDTSFEnd
' case 4
' strDTSForm = strDTSFRequest & strDTSFDTSStaff_I & strDTSFManagerUse & strDTSFDetail & strDTSFDTSStaff_II & strTableTemp & strDTSFEnd
case 3,4,5
if hasLevel2Support then
strDTSForm = strDTSFRequest & strDTSFDTSStaff_I & strDTSFDTSStaff & strDTSFDetail & strDTSFDTSStaff_II & strDTSFDTSStaff_IIII & strDTSFDTSStaff_TimeSolved & strDTSFDTSStaff_III & strDTSFNetworkStaff & strDTSFNetworkStaff_I & strDTSFNetworkStaff_II & strDTSFNetworkStaff_III & strDTSFNetworkStaff_END & strDTSFEnd_I
else
strDTSForm = strDTSFRequest & strDTSFDTSStaff_I & strDTSFDTSStaff & strDTSFDetail & strDTSFDTSStaff_II & strDTSFDTSStaff_IIII & strDTSFDTSStaff_TimeSolved & strDTSFDTSStaff_III & strDTSFNetworkStaff & strDTSFNetworkStaff_II & strDTSFNetworkStaff_END & strDTSFEnd_I
end if
case 6
strDTSForm = strDTSFRequest & strDTSFDTSStaff_I & strDTSFManagerUse & strDTSFDetail & strDTSFDTSStaff_II & strTableTemp & strDTSFEnd
case 7
strDTSForm = strDTSFRequest & strDTSFDTSStaff_I & strDTSFManagerUse & strDTSFDetail & strDTSFDTSStaff_II & strTableTemp & strDTSFEnd
case 8,9
if hasLevel2Support then
strDTSForm = strDTSFRequest & strDTSFDTSStaff_I & strDTSFDTSStaff & strDTSFDetail & strDTSFDTSStaff_II & strDTSFDTSStaff_IIII & strTableTemp & strDTSFDTSStaff_III & strDTSFNetworkStaff & strDTSFNetworkStaff_I & strDTSFNetworkStaff_II & strDTSFNetworkStaff_III & strDTSFNetworkStaff_END & strDTSFEnd
else
strDTSForm = strDTSFRequest & strDTSFDTSStaff_I & strDTSFDTSStaff & strDTSFDetail & strDTSFDTSStaff_II & strDTSFDTSStaff_IIII & strTableTemp & strDTSFDTSStaff_III & strDTSFNetworkStaff & strDTSFEnd
end if
case else
response.write "Ops... Problem"
end select
'*** display General Information section ***
getHeader "hercules - Desktop Services Request Form","1"
response.write strDTSFHeader_Original
select case userType
case "3","4","5","8","9"
response.write strDTSFTicketNumber
end select
if 0 then
Response.Write "employeeid=[" & employeeid & "]<br />" & vbCrLf
Response.Write "requestedby=[" & requestedby & "]<br />" & vbCrLf
Response.Write "emailaddress=[" & emailaddress & "]<br />" & vbCrLf
Response.Write "extention=[" & extention & "]<br />" & vbCrLf
Response.Write "location=[" & location & "]<br />" & vbCrLf
Response.Write "floor=[" & floor & "]<br />" & vbCrLf
Response.Write "department=[" & department & "]<br />" & vbCrLf
end if
'response.end
showGeneralInfo 666,employeeid,requestedby,emailaddress,extention,location,floor,department
%>
<%
' Get DTS Manager List include file
%>
<!-- #include virtual="/asp/dtsManagerList.inc" -->
<script language="JavaScript" type="text/javascript">
<!--
function checkManagerListIndex(objForm) {
if(objForm.slctManager[0].selected == true) {
disableManagerUse(objForm);
}
}
function doManagerOptionList(objForm,inArray) {
// alert("doManagerOptionList" + "\n" + objForm.name + "\n" + inArray.length)
var objItem = objForm.ManagerUse;
for(i=0;i<objItem.length;i++) {
if(objItem[i].checked == true) {
var strTemp = objItem[i].value.split("###SEPERATOR###")[0];
// alert(strTemp);
break;
};
};
if(confirm("You have selected a planned service request \n\n[ " + strTemp + " ] \n\nif this is what you want to request select \"OK\" and your manager from the list. \nIf not select \"Cancel\" and type your problem in the box provided.")) {
objForm.slctManager.options.length = inArray.length;
for (var j=1; j<inArray.length; j++) {
objForm.slctManager.options[j].text = inArray[j][0];
objForm.slctManager.options[j].value = inArray[j][1];
}
objForm.slctManager.options[0].text = " - - select Manager - - ";
objForm.slctManager.options[0].value = "";
objForm.slctManager.options[0].selected = true;
} else {
disableManagerUse(objForm);
}
}
function disableManagerUse(objForm) {
var objItem = objForm.ManagerUse;
for(i=0;i<objItem.length;i++) {
objItem[i].checked = false;
};
resetManagerListIndex(objForm);
document.anchors("aHA_UploadFile").disabled = false;
}
function resetManagerListIndex(objForm) {
objForm.slctManager.options.length = 1;
objForm.slctManager.options[0].text = " <<- - Choose Item - - ";
objForm.slctManager.options[0].value = "";
}
//-->
</script>
</head>
<!--
<body background="/images/logoback2.gif" onload="initializeLocation(document.form1); document.form1.txtFirstName.focus();">
-->
<% if userType = 2 or userType = 4 or userType = 7 then %>
<body background="/images/logoback2.gif" onload="initializeLocation(document.form1);">
<% else %>
<body background="/images/logoback2.gif" onload="initializeLocation(document.form1);">
<% end if %>
<script language="javascript" type="text/javascript" src="/asp/spell/spellchecker.js"></script>
<script type="text/javascript" language="JavaScript">
<!--
function printForm(objForm) {
objForm.action = "/asp/dtsPrintForm.asp";
objForm.submit();
}
<%=strLocationFloor%>
var level2Support = <%=level2Support%>;
var userType = <%=userType%>;
var blnIsITManager = <%=blnIsITManager%>;
var userID = <%=idnumberCookie%>;
var assignedtoIndex = <%=assignedtoIndex%>;
var statusIndex = <%=statusIndex%>;
var staffIndexNT = <%=staffIndexNT%>;
var ntdone = <%=ntdone%>;
var hasLevel2Support = <%=hasLevel2Support%>;
var strFirstName = "";//FirstName";
var strLastName = "";//LastName";
var strUserName = "username";
function checkValue(objForm,inCode) {
if (inCode == 1) {
if(objForm.txtFirstName.value == strFirstName) {
objForm.txtFirstName.value = "";
frmFocus(objForm.From);
}
if(objForm.txtLastName.value == strLastName) {
objForm.txtLastName.value = "";
frmFocus(objForm.From);
}
}
if (inCode == 2) {
if(objForm.Email.value == strUserName) {
objForm.Email.value = "";
frmFocus(objForm.Email);
}
}
}
function disableStatus(objForm) {
objForm.slctStatus.disabled = true;
}
function enableStatus(objForm) {
objForm.slctStatus.disabled = false;
}
function disableStaffNT(objForm) {
objForm.slctStaffNT.disabled = true;
}
function enableStaffNT(objForm) {
objForm.slctStaffNT.disabled = false;
}
function enableAssignedTo(objForm) {
objForm.slctAssignedTo.disabled = false;
}
function disableAssignedTo(objForm) {
objForm.slctAssignedTo.disabled = true;
}
function disableDateDTS(objForm) {
objForm.slctInformedUser.disabled = true;
objForm.slctYearDTS.disabled = true;
objForm.slctMonthDTS.disabled = true;
objForm.slctDayDTS.disabled = true;
objForm.slctHourDTS.disabled = true;
objForm.slctMinuteDTS.disabled = true;
objForm.slctAMPMDTS.disabled = true;
}
function enableDateDTS(objForm) {
objForm.slctInformedUser.disabled = false;
objForm.slctYearDTS.disabled = false;
objForm.slctMonthDTS.disabled = false;
objForm.slctDayDTS.disabled = false;
objForm.slctHourDTS.disabled = false;
objForm.slctMinuteDTS.disabled = false;
objForm.slctAMPMDTS.disabled = false;
}
function defaultDateDTS(objForm) {
objForm.slctInformedUser[0].selected = true;
objForm.slctYearDTS[0].selected = true;
objForm.slctMonthDTS[0].selected = true;
objForm.slctDayDTS[0].selected = true;
objForm.slctHourDTS[0].selected = true;
objForm.slctMinuteDTS[0].selected = true;
objForm.slctAMPMDTS[0].selected = true;
}
function enableDateTimeDTS(objForm) {
var objDate = new Date()
var objCreationdate = new Date("<%=creationdate_origin%>")
/*
alert("objCreationdate.getYear()=[" + objCreationdate.getYear() + "]\n" +
"objCreationdate.getMonth()=[" + objCreationdate.getMonth() + "]\n" +
"objCreationdate.getDate()=[" + objCreationdate.getDate() + "]\n" +
"objCreationdate.getHours()=[" + objCreationdate.getHours() + "]\n" +
"objCreationdate.getMinutes()=[" + objCreationdate.getMinutes() + "]\n\n" +
"objDate.getYear()=[" + objDate.getYear() + "]\n" +
"objDate.getMonth()=[" + objDate.getMonth() + "]\n" +
"objDate.getDate()=[" + objDate.getDate() + "]\n" +
"objDate.getHours()=[" + objDate.getHours() + "]\n" +
"objDate.getMinutes()=[" + objDate.getMinutes() + "]\n")
*/
//alert((objDate.getYear() - objCreationdate.getYear()) + 1)
objForm.slctYearDTS[(objDate.getYear() - objCreationdate.getYear()) + 1].selected = true;
if(objDate.getMonth() < objCreationdate.getMonth())
objForm.slctMonthDTS[((objDate.getMonth() + 12) - objCreationdate.getMonth()) + 1].selected = true;
else
objForm.slctMonthDTS[(objDate.getMonth() - objCreationdate.getMonth()) + 1].selected = true;
objForm.slctDayDTS[0].selected = true; //objDate.getDate()
objForm.slctMinuteDTS[objDate.getMinutes() + 1].selected = true;
//alert(objDate.getHours())
if (objDate.getHours() > 11){
if (objDate.getHours() == 12) {
objForm.slctHourDTS[objDate.getHours() + 1].selected = true;
} else {
objForm.slctHourDTS[objDate.getHours() - 11].selected = true;
}
objForm.slctAMPMDTS[2].selected = true;
} else {
objForm.slctHourDTS[objDate.getHours() + 1 ].selected = true;
objForm.slctAMPMDTS[1].selected = true;
}
}
function changeSelection(objForm,intCode) {
switch (intCode) {
case 1: //*** status ***
if (objForm.slctStatus.selectedIndex == 2) {
disableAssignedTo(objForm);
enableDateDTS(objForm);
enableDateTimeDTS(objForm);
} else {
disableDateDTS(objForm);
defaultDateDTS(objForm);
enableAssignedTo(objForm);
}
break;
case 2: //*** assignedto ***
if (objForm.slctAssignedTo.selectedIndex > 0) {
enableStaffNT(objForm);
} else {
objForm.slctStaffNT.selectedIndex = 0;
disableStaffNT(objForm);
}
if (objForm.slctAssignedTo[objForm.slctAssignedTo.selectedIndex].value.split(",")[0] == userID) {
objForm.slctStatus.disabled = false;
//enableDateDTS(objForm);
} else {
objForm.slctStatus.disabled = true
disableDateDTS(objForm);
}
break;
case 3: //*** staffNT ***
if (objForm.slctStaffNT.selectedIndex > 0) {
disableStatus(objForm);
} else {
enableStatus(objForm);
}
break;
}
}
function initializeLocation(objForm) {
if (userType == 1 || userType == 2 || userType == 3 || userType == 4 || userType == 6 || userType == 7) {
alert("Please verify the data before submitting this form");
}
if (objForm.txtFirstName.value == "") {
objForm.txtFirstName.value = strFirstName;
}
if (objForm.txtLastName.value == "") {
objForm.txtLastName.value = strLastName;
}
if (objForm.txtEmail.value == "") {
objForm.txtEmail.value = strUserName;
}
//alert(userType + "\n" + objForm.txtEmail.value)
if(userType != 4 && objForm.Email.value.toLowerCase().indexOf("hercules")> -1) {
//inititalize the 'Location' selection
var indexFloor = <%=indexFloor%>;
var indexLocation = <%=indexLocation%>;
//alert(indexFloor + "\n" + indexLocation)
objForm.slctLocation.options.length = aryLocationFloor.length;
//select all locations amd populate the 'Location' drop down
for (var i=1; i < aryLocationFloor.length; i++){
objForm.slctLocation.options[i].text = aryLocationFloor[i][0];
objForm.slctLocation.options[i].value = aryLocationFloor[i][0];
}
objForm.slctLocation.options[0].text = " - - select location - - ";
objForm.slctLocation.options[0].value = "";
objForm.slctLocation.options[<%=indexLocation%>].selected = true;
if (indexFloor > 0) {
objForm.slctFloor.options[indexFloor-1].selected = true;
} else {
objForm.slctFloor.options[0].text = "<< Choose a Location";
objForm.slctFloor.options[0].value = "";
objForm.slctFloor.options[0].selected = true;
}
}
if(<%=machineid%> > 0) {
objForm.slctMachine[<%=machineid%>].selected = true;
}
if(<%=receivedbyIndex%> > 0) {
objForm.slctReceivedBy[<%=receivedbyIndex%>].selected = true;
}
if(assignedtoIndex > 0) {
objForm.slctAssignedTo[assignedtoIndex].selected = true;
if (userType != 8) {
if (objForm.slctAssignedTo[assignedtoIndex].value.split(",")[0] != userID) {
objForm.slctStatus.disabled = true;
disableDateDTS(objForm)
}
}
} else {
if (userType == 5 || userType == 8) {
disableStaffNT(objForm);
disableStatus(objForm);
}
}
if(<%=priorityIndex%> > 0) {
objForm.slctPriority[<%=priorityIndex%>].selected = true;
}
if(statusIndex > 0) {
objForm.slctStatus[statusIndex].selected = true;
if (userType != 8) {
if (statusIndex == 1) {
disableDateDTS(objForm);
}
}
}
if(<%=sourceIndex%> > 0) {
objForm.slctSource[<%=sourceIndex%>].selected = true;
}
if(<%=softwareIndex%> > 0) {
objForm.slctSoftware[<%=softwareIndex%>].selected = true;
}
if(<%=hardwareIndex%> > 0) {
objForm.slctHardware[<%=hardwareIndex%>].selected = true;
}
if(<%=informedIndex%> > 0) {
objForm.slctInformedUser[<%=informedIndex%>].selected = true;
}
if(<%=yearIndexDTS%> > 0) {
objForm.slctYearDTS[<%=yearIndexDTS%>].selected = true;
}
if(<%=yearIndexDTS%> > 0) {
objForm.slctYearDTS[<%=yearIndexDTS%>].selected = true;
}
if(<%=monthIndexDTS%> > 0) {
objForm.slctMonthDTS[<%=monthIndexDTS%>].selected = true;
}
if(<%=dayIndexDTS%> > 0) {
objForm.slctDayDTS[<%=dayIndexDTS%>].selected = true;
}
if(<%=hourIndexDTS%> > 0) {
objForm.slctHourDTS[<%=hourIndexDTS%>].selected = true;
}
if(<%=minuteIndexDTS%> > 0) {
objForm.slctMinuteDTS[<%=minuteIndexDTS%>].selected = true;
}
if(<%=ampmIndexDTS%> > 0) {
objForm.slctAMPMDTS[<%=ampmIndexDTS%>].selected = true;
}
if(staffIndexNT > 0) {
objForm.slctStaffNT[<%=staffIndexNT%>].selected = true;
if (userType == 5) {
objForm.slctYearNT.disabled = true;
objForm.slctMonthNT.disabled = true;
objForm.slctDayNT.disabled = true;
objForm.chkDone.disabled = true;
if (hasLevel2Support == 1 && ntdone == 0) {
disableStatus(objForm);
}
}
if (userType == 8) {
objForm.slctMachine.disabled = true;
objForm.slctLocation.disabled = true;
objForm.slctFloor.disabled = true;
objForm.slctReceivedBy.disabled = true;
objForm.slctSource.disabled = true;
objForm.slctAssignedTo.disabled = true;
objForm.slctPriority.disabled = true;
objForm.slctHardware.disabled = true;
objForm.slctSoftware.disabled = true;
objForm.slctStatus.disabled = true;
objForm.slctInformedUser.disabled = true;
if(blnIsITManager == 0) {
objForm.slctStaffNT.disabled = true;
}
}
}
if(<%=monthIndexNT%> > 0) {
objForm.slctMonthNT[<%=monthIndexNT%>].selected = true;
}
if(<%=dayIndexNT%> > 0) {
objForm.slctDayNT[<%=dayIndexNT%>].selected = true;
}
if(<%=yearIndexNT%> > 0) {
objForm.slctYearNT[<%=yearIndexNT%>].selected = true;
}
if(ntdone > 0) {
objForm.chkDone.checked = true;
objForm.chkDone.disabled = true;
objForm.slctStaffNT.disabled = true;
}
if(userType == 3 || userType == 4) {
objForm.slctStatus[1].selected = true;
objForm.slctPriority[2].selected = true;
disableStatus(objForm);
disableDateDTS(objForm);
disableStaffNT(objForm);
}
}
function selectFloor(objForm) {
if(userType == 1 || userType == 2)
disableManagerUse(objForm);
//obtain the first dimension position of the currently selected location
var i = objForm.slctLocation.selectedIndex;
if (i > 0){
//inititalize the new 'Floor' selection
objForm.slctFloor.options.length = aryLocationFloor[i].length;
//select the foors associated with the selected location
for (var j=1; j < aryLocationFloor[i].length; j++) {
objForm.slctFloor.options[j].text = aryLocationFloor[i][j];
objForm.slctFloor.options[j].value = aryLocationFloor[i][j]; // + "###SEPERATOR###" + j;;
}
objForm.slctFloor.options[0].text = " - - select floor - - ";
objForm.slctFloor.options[0].value = "";
}
else {
//reset the "Loation" option
objForm.slctFloor.options.length = 1;
objForm.slctFloor.options[0].text = "<< Choose a Location";
objForm.slctFloor.options[0].value = "";
}
objForm.slctFloor.options[0].selected = true;
}
function frmValidate(theForm){
if(userType==4 || theForm.txtEmail.value.indexOf("@") > -1) {
theForm.Location.value = theForm.txtLocation.value;
theForm.Floor.value = theForm.txtFloor.value;
} else {
if (theForm.slctLocation.selectedIndex < 1)
{
alert("Please selece Location.");
theForm.slctLocation.focus();
return (false);
}
if (theForm.slctFloor.selectedIndex < 0)
{
alert("Please selece Floor.");
theForm.slctFloor.focus();
return (false);
}
theForm.Location.value = theForm.slctLocation.options[theForm.slctLocation.selectedIndex].value;
theForm.Floor.value = theForm.slctFloor.options[theForm.slctFloor.selectedIndex].value;
}
theForm.Machine.value = theForm.slctMachine.options[theForm.slctMachine.selectedIndex].value;
theForm.hasLevel2Support.value = hasLevel2Support;
/*
alert("Location=[" + theForm.Location.value + "]\n" +
"Floor=[" + theForm.Floor.value + "]\n" +
"Machine=[" + theForm.Machine.value + "]\n" +
"Manager=[" + theForm.Manager.value + "]\n")
*/
if (theForm.txtFirstName.value == strFirstName && theForm.txtLastName.value == strLastName) {
var From = strLastName + ", " + strFirstName;
} else {
// var From = theForm.From.value.split(" ").join("");
var From = RemoveHeadingTrailingSpace(theForm.txtLastName.value) + "," + RemoveHeadingTrailingSpace(theForm.txtFirstName.value);
}
if(IsEmptyString(theForm.txtFirstName.value) || IsEmptyString(theForm.txtLastName.value)) {
var From = "";
}
var strNameFrom = "LastName, FirstName";
var Email = theForm.txtEmail.value.split(" ").join("");
var Phone = theForm.txtExt.value.split(" ").join("");
var Location = theForm.Location.value;
var Floor = theForm.Floor.value;
var Machine = theForm.Machine.value;
var Detail = theForm.Detail.value;
Detail = removeWhiteSpace(Detail);
if (IsEmptyString(theForm.txtFirstName.value)) {
alert("First Name is required.");
frmFocus(theForm.txtFirstName);
return false;
}
if (IsEmptyString(theForm.txtLastName.value)) {
alert("Last Name is required.");
frmFocus(theForm.txtLastName);
return false;
}
if (Email == "") {
alert("Email is required.");
frmFocus(theForm.txtEmail);
return false;
}
if (Email.indexOf("@")==-1 || Email.indexOf(".")==-1) {
theForm.Email.value = Email + "@hercules.com";
} else {
theForm.Email.value = Email;
}
if (!ValidateEmailAddress(theForm.Email,2)) {
return;
}
if (Phone == "")
{
alert("Phone extension is required.");
frmFocus(theForm.txtExt);
return (false);
} else {
if(!IsNumberString(Phone)) {
alert("Invalid phone extension");
frmFocus(theForm.txtExt);
return (false);
}
}
if (Machine == "")
{
// alert("Please selece Machine Type.");
// theForm.slctMachine.focus();
// return (false);
}
if (Location == "")
{
alert("Please selece Location.");
if(userType==4 || Email.indexOf("@")>-1)
theForm.txtLocation.focus();
else
theForm.slctLocation.focus();
return (false);
}
if (Floor == "")
{
alert("Please selece Floor.");
if(userType==4 || Email.indexOf("@")>-1)
theForm.txtFloor.focus();
else
theForm.slctFloor.focus();
return (false);
}
if (userType != 1 && userType != 2 ) {
theForm.Hardware.value = theForm.slctHardware.options[theForm.slctHardware.selectedIndex].value;
theForm.Software.value = theForm.slctSoftware.options[theForm.slctSoftware.selectedIndex].value;
theForm.Source.value = theForm.slctSource.options[theForm.slctSource.selectedIndex].value;
if (theForm.slctReceivedBy.selectedIndex < 1) {
alert("Received by is required");
theForm.slctReceivedBy.focus();
return;
} else {
theForm.ReceivedBy.value = theForm.slctReceivedBy[theForm.slctReceivedBy.selectedIndex].value;
}
if (theForm.slctSource.selectedIndex < 1) {
alert("Source by is required");
theForm.slctSource.focus();
return;
} else {
theForm.Source.value = theForm.slctSource[theForm.slctSource.selectedIndex].value;
}
if (userType == 5 || userType == 8 || userType == 9) {
if (theForm.slctAssignedTo.selectedIndex < 1) {
alert("Assigned To is required");
theForm.slctAssignedTo.focus();
return;
} else {
theForm.AssignedTo.value = theForm.slctAssignedTo[theForm.slctAssignedTo.selectedIndex].value;
}
if (theForm.slctPriority.selectedIndex < 1) {
alert("Priority is required");
theForm.slctPriority.focus();
return;
} else {
theForm.Priority.value = theForm.slctPriority[theForm.slctPriority.selectedIndex].value;
}
}
if (userType == 5) {
theForm.cf.value = 2;
} else {
if (userType == 8) {
theForm.cf.value = 2;
} else {
theForm.cf.value = 1;
}
}
}
if (userType == 1 || userType == 2 || userType == 6 || userType == 7) {
theForm.Manager.value = theForm.slctManager.options[theForm.slctManager.selectedIndex].value;
var Manager = theForm.Manager.value;
if (theForm.ManagerUse[0].checked || theForm.ManagerUse[1].checked || theForm.ManagerUse[2].checked || theForm.ManagerUse[3].checked || theForm.ManagerUse[4].checked || theForm.ManagerUse[5].checked) {
if (Manager == "") {
alert("Please select Manager.");
theForm.slctManager.focus();
return;
}
} else {
if (Detail == "") {
alert("Detail is required");
frmFocus(theForm.Detail);
return;
}
}
}
if (userType == 3 || userType == 4) {
if (Detail == "") {
alert("Detail is required");
frmFocus(theForm.Detail);
return;
}
}
if (userType == 5 || userType == 8 || userType == 3 || userType == 4) {
var SolutionDTS = theForm.SolutionDTS.value;
SolutionDTS = removeWhiteSpace(SolutionDTS);
theForm.ReceivedBy.value = theForm.slctReceivedBy.options[theForm.slctReceivedBy.selectedIndex].value;
theForm.Source.value = theForm.slctSource.options[theForm.slctSource.selectedIndex].value;
theForm.AssignedTo.value = theForm.slctAssignedTo.options[theForm.slctAssignedTo.selectedIndex].value;
theForm.Priority.value = theForm.slctPriority.options[theForm.slctPriority.selectedIndex].value;
theForm.Hardware.value = theForm.slctHardware.options[theForm.slctHardware.selectedIndex].value;
theForm.Software.value = theForm.slctSoftware.options[theForm.slctSoftware.selectedIndex].value;
theForm.StaffNT.value = theForm.slctStaffNT.options[theForm.slctStaffNT.selectedIndex].value;
if (userType == 5 || userType == 3 || userType == 4) {
theForm.Status.value = theForm.slctStatus.options[theForm.slctStatus.selectedIndex].value;
theForm.InformedUser.value = theForm.slctInformedUser.options[theForm.slctInformedUser.selectedIndex].value;
if (theForm.slctStatus.selectedIndex > 1 || theForm.slctMonthDTS.selectedIndex > 0 || theForm.slctDayDTS.selectedIndex > 0 ||
theForm.slctYearDTS.selectedIndex > 0 || theForm.slctHourDTS.selectedIndex > 0 ||
theForm.slctMinuteDTS.selectedIndex > 0 || theForm.slctAMPMDTS.selectedIndex > 0 ) {
if (theForm.slctInformedUser.selectedIndex < 1) {
alert("Inform user required")
theForm.slctInformedUser.focus();
return;
}
if (SolutionDTS == "") {
alert("DTS solution required")
theForm.SolutionDTS.focus();
return;
}
if (staffIndexNT > 0) {
if (theForm.chkDone.checked == false) {
alert("Network support has not been completed")
return;
}
}
if (theForm.slctMonthDTS.selectedIndex < 1 || theForm.slctDayDTS.selectedIndex < 1 ||
theForm.slctYearDTS.selectedIndex < 1 || theForm.slctHourDTS.selectedIndex < 1 ||
theForm.slctMinuteDTS.selectedIndex < 1 || theForm.slctAMPMDTS.selectedIndex < 1 ) {
alert("Incorrect time");
if (theForm.slctYearDTS.selectedIndex < 1) {
theForm.slctYearDTS.focus();
return;
}
if (theForm.slctMonthDTS.selectedIndex < 1) {
theForm.slctMonthDTS.focus();
return;
}
if (theForm.slctDayDTS.selectedIndex < 1) {
theForm.slctDayDTS.focus();
return;
}
if (theForm.slctHourDTS.selectedIndex < 1) {
theForm.slctHourDTS.focus();
return;
}
if (theForm.slctMinuteDTS.selectedIndex < 1) {
theForm.slctMinuteDTS.focus();
return;
}
if (theForm.slctAMPMDTS.selectedIndex < 1) {
theForm.slctAMPMDTS.focus();
return;
}
} else {
theForm.TimeSolved.value = theForm.slctMonthDTS.options[theForm.slctMonthDTS.selectedIndex].value +
"/" +
theForm.slctDayDTS.options[theForm.slctDayDTS.selectedIndex].value +
"/" +
theForm.slctYearDTS.options[theForm.slctYearDTS.selectedIndex].value +
" " +
theForm.slctHourDTS.options[theForm.slctHourDTS.selectedIndex].value +
":" +
theForm.slctMinuteDTS.options[theForm.slctMinuteDTS.selectedIndex].value +
":00 " +
theForm.slctAMPMDTS.options[theForm.slctAMPMDTS.selectedIndex].value;
var requesteddate_dts = new Date("<%=creationdate_origin%>");
var TimeSolvedDate = new Date(theForm.TimeSolved.value);
if (requesteddate_dts.getTime() > TimeSolvedDate.getTime()) {
alert("Invalid date");
theForm.slctYearDTS.focus();
return;
}
}
}
if (theForm.slctStaffNT.selectedIndex > 0) {
var strSolutionDTS = theForm.SolutionDTS.value;
strSolutionDTS = removeWhiteSpace(strSolutionDTS);
if (strSolutionDTS == "") {
alert("Need input for DTS solution");
theForm.SolutionDTS.focus();
return;
}
}
} else { //** userType == 8 ***
if (theForm.slctStaffNT.selectedIndex < 1) {
alert("Select person");
theForm.slctStaffNT.focus();
return;
}
if (theForm.slctMonthNT.selectedIndex < 1 && theForm.slctDayNT.selectedIndex < 1 &&
theForm.slctYearNT.selectedIndex < 1 && theForm.chkMore.checked == false) {
var strNTStaffIDTemp = theForm.slctStaffNT[theForm.slctStaffNT.selectedIndex].value;
if(<%=idnumberCookie%> == strNTStaffIDTemp.substring(0,strNTStaffIDTemp.indexOf(","))) {
alert("Date is required");
theForm.slctMonthNT.focus();
return;
}
} else {
if ((theForm.slctMonthNT.selectedIndex < 1 || theForm.slctDayNT.selectedIndex < 1 ||
theForm.slctYearNT.selectedIndex < 1) && theForm.chkMore.checked == false) {
alert("Incorrect time");
if (theForm.slctMonthNT.selectedIndex < 1) {
theForm.slctMonthNT.focus();
return;
}
if (theForm.slctDayNT.selectedIndex < 1) {
theForm.slctDayNT.focus();
return;
}
if (theForm.slctYearNT.selectedIndex < 1) {
theForm.slctYearNT.focus();
return;
}
} else {
theForm.NTEstimatedTime.value = theForm.slctMonthNT.options[theForm.slctMonthNT.selectedIndex].value +
"/" +
theForm.slctDayNT.options[theForm.slctDayNT.selectedIndex].value +
"/" +
theForm.slctYearNT.options[theForm.slctYearNT.selectedIndex].value;
}
}
var requesteddate_nt = new Date("<%=creationdate1%>");
var NTEstimatedDate = new Date(theForm.NTEstimatedTime.value);
if (requesteddate_nt.getTime() > NTEstimatedDate.getTime()) {
alert("Invalid date");
theForm.slctDayNT.focus();
return;
}
if (theForm.chkDone.checked == true) {
theForm.DoneNT.value = 1;
var solutionNtTemp = theForm.SolutionNT.value;
if (removeWhiteSpace(solutionNtTemp) == "") {
alert("Solution is required")
frmFocus(theForm.SolutionNT);
return;
}
} else {
theForm.DoneNT.value = "";
}
}
if (userType == 8) {
if (theForm.chkMore.checked) {
theForm.MoreInfo.value = 1;
var solutionNtTemp = theForm.SolutionNT.value;
if (removeWhiteSpace(solutionNtTemp) == "") {
alert("Input is required")
frmFocus(theForm.SolutionNT);
return;
}
}
}
if (userType == 5 && staffIndexNT > 0) {
if (theForm.chkMore.checked) {
theForm.MoreInfo.value = 1;
}
}
if (theForm.slctStatus.selectedIndex == 2 && removeWhiteSpace(theForm.SolutionDTSUser.value) == "") {
alert("Solution to user is required");
theForm.SolutionDTSUser.focus();
return;
}
}
theForm.userType.value = userType;
if(userType == 1 || userType == 2) {
theForm.txtrUploadFile.value = theForm.txtrUploadFile1.value;
}
// alert(theForm.userType.value);
theForm.action = "/asp/dtsAddRequest.asp";
theForm.submit();
}
//-->
</script>
<%
response.write strDTSForm
response.write "</td></tr></table>" & vbCrLf
connDB.Close
%>
<br />
<br />
<form name="SPELLDATA">
<input name="formname" type=hidden >
<input name="subjectname" type=hidden >
<input name="messagebodyname" type=hidden >
<input name="TextBox3" type=hidden value='subject2'>
<input name="companyID" type=hidden >
<input name="language" type=hidden >
<input name="opener" type=hidden >
<input name="formaction" type=hidden >
</form>
<% getFooter 1 %>
<%
if trim(siteName) = "(WORKING)" then
DebugDisplaySession 3
DebugDisplayCookies 3
end if
%>
|

July 26th, 2010, 03:10 PM
|
Friend of Wrox
|
|
Join Date: Jun 2008
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
|
|
Don't see it there.
Possibly it is because of the contents of "headfoot.inc" ???
Maybe "headfoot.inc" *also* does a #include of that "connDB_flextime.inc" ??
|

July 26th, 2010, 03:24 PM
|
Registered User
|
|
Join Date: Jul 2010
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Error Type: Microsoft VBScript compilation (0x800A0411) Name redefined
No such luck.
|

July 26th, 2010, 04:04 PM
|
Friend of Wrox
|
|
Join Date: Jun 2008
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
|
|
Well, it's mildly hacky, but an easy answer would be to get rid of the DIM on line 2 there.
You might go a step further:
Code:
<%
If Not IsObject(connDB_flextime) Then
Set connDB_flextime = Server.CreateObject("ADODB.Connection")
End If
If connDB_flextime.State <> 1 Then
connDB_flextime.Open "Provider=SQLOLEDB.1;Password=flextyme;Persist Security Info=True;User ID=flextime;Initial Catalog=FlexTime;Data Source=RGV-BOS-BL2;"
End If
%>
Try that code for that #include'd file.
|

July 27th, 2010, 06:29 AM
|
Registered User
|
|
Join Date: Jul 2010
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Error Type: Microsoft VBScript compilation (0x800A0411) Name redefined
This is the new error message after implementing the above code:
Technical Information (for support personnel)
Error Type:
Microsoft VBScript runtime (0x800A01A8)
Object required: ''
/asp/dtsShowForm.asp, line 2101
Browser Type:
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; InfoPath.2; .NET CLR 1.1.4322; MS-RTC EA 2; MS-RTC LM 8)
Page:
POST 124 bytes to /asp/dtsShowForm.asp
POST Data:
ps=1&employeeinfo=1123%3BALLEN%2CTODD%3Btallen%3B7 42%3BBOS%3B4%3B3&slctName=1123%3BALLEN%2CTODD%3Bta llen%3B742%3BBOS%3B4%3B3
|

July 27th, 2010, 06:34 AM
|
Registered User
|
|
Join Date: Jul 2010
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Error Type: Microsoft VBScript compilation (0x800A0411) Name redefined
Thank you all! The last code change worked; I changed the code as the last replier said; and then closed it properly at the end of the code on page dtsshowform.asp. Thank you all very, very much! You guys ROCK!
|

July 27th, 2010, 07:59 AM
|
Registered User
|
|
Join Date: Jul 2010
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Error Type:ADODB.Recordset (0x800A0CC1)
Well, Just when I thought I was in the clear, there is a new error:
Technical Information (for support personnel)
Error Type:
ADODB.Recordset (0x800A0CC1)
Item cannot be found in the collection corresponding to the requested name or ordinal.
/asp/dtsAddRequest.asp, line 947
Browser Type:
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; InfoPath.2; .NET CLR 1.1.4322; MS-RTC EA 2; MS-RTC LM 8)
Page:
POST 439 bytes to /asp/dtsAddRequest.asp
POST Data:
cf=1&TicketNubmer=&CreationDate=&userType=1&Machin e=&Manager=&ReceivedBy=&Source=&AssignedTo=&Priori ty=&Hardware=&Software=&Status=&InformedUser=&Time Solved=&StaffNT=&NTEstimatedTime=&DoneNT=&MoreInfo
|

July 27th, 2010, 08:23 AM
|
Registered User
|
|
Join Date: Jul 2010
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Error Type: ADODB.Recordset (0x800A0CC1)
Here is the code for the dtsAddRequest.asp form:
Code:
<!-- #include virtual="/asp/libraryDebug.inc" -->
<!-- #include virtual="/asp/headfoot.inc"-->
<!-- #include virtual="/asp/libraryFileSystemObject.inc"-->
<!-- #include virtual="/asp/libraryString.inc"-->
<!-- #include virtual="/asp/libraryCookie.inc"-->
<!-- #include virtual="/asp/libraryASPErrHandler.inc"-->
<!-- #include virtual="/asp/libraryEmail.inc"-->
<!-- #include virtual="/asp/connDB_site.inc"-->
<!-- #include virtual="/asp/dtsInclude.inc"-->
<!-- #include virtual="/asp/connDB_flextime.inc"-->
<%
idnumber = request.cookies("IDNUMBER")
if session("THISSITE") = "" or isnull(session("THISSITE")) then
setSessionVariable
end if
TheSite = getSiteName
if 0 then
response.write "TheSite =[" & TheSite & "]<br />" & vbCrLf
response.write "session(""THISSITE"") =[" & session("THISSITE") & "]<br />" & vbCrLf
end if
siteURL = getSiteURL
if Request.ServerVariables("HTTP_REFERER") = "" then
errHandler ("DSFORM")
end if
%>
<!-- #include virtual="/Asp/libraryFileSystemObject.inc"-->
<% '*** saving page hit *** %>
<!-- include virtual="/asp/usesite.inc"-->
<%
'*** initialization ***
blnSendEmail = false
strConfirm = Request("cf")
userType = Request("userType")
if strConfirm = 1 or strConfirm = 2 or strConfirm = 3 then
blnConfirm = true
else
blnConfirm = false
end if
if 0 then
response.write "strConfirm =[" & strConfirm & "]<br />" & vbCrLf
response.write "blnConfirm=[" & blnConfirm & "]<br />" & vbCrLf
response.write "userType=[" & userType & "]<br />" & vbCrLf
end if
From = Trim(request("txtLastName")) & ", " & trim(request("txtFirstName"))
Email = Trim(Request("Email"))
Phone = Trim(Request("txtExt"))
CC_Original = Trim(Request("txtCC"))
Machine_Original = Trim(Request("Machine"))
if Machine_Original = "" or isnull(MoreInfo) then
Machine_Original = "null"
end if
Location_Original = Trim(Request("Location"))
Floor_Original = Trim(Request("Floor"))
Detail_Original = Trim(Request("Detail"))
ManagerUse_Original = Trim(Request("ManagerUse"))
Manager_Original = Trim(Request("Manager"))
ReceivedBy = request("ReceivedBy")
SourceID = request("Source")
AssignedTo = request("AssignedTo")
PriorityID = request("Priority")
HardwareID = request("Hardware")
SoftwareID = request("Software")
StatusID = request("Status")
InformedID = request("InformedUser")
TimeSolved = request("TimeSolved")
DTSSolution = request("SolutionDTS")
DTSSolutionUser = request("SolutionDTSUser")
hasLevel2Support = request("hasLevel2Support")
StaffNT = request("StaffNT")
if StaffNT <> "" then
StaffNT = trim(StaffNT)
idnumberTemp = left(StaffNT,instr(StaffNT,",") - 1)
userTypeCookie = request.cookies("USERTYPE")
idnumberCookie = request.cookies("IDNUMBER")
if userTypeCookie = 6 then
if idnumberTemp = idnumberCookie then
userType = 8
end if
end if
if 0 then
response.write "StaffNT=[" & StaffNT & "]<br />" & vbCrLf
response.write "idnumberTemp=[" & idnumberTemp & "]<br />" & vbCrLf
response.write "idnumberCookie=[" & idnumberCookie & "]<br />" & vbCrLf
response.write "userTypeCookie=[" & userTypeCookie & "]<br />" & vbCrLf
response.write "userType=[" & userType & "]<br />" & vbCrLf
response.end
end if
end if
NTEstimatedTime = request("NTEstimatedTime")
if NTEstimatedTime = "//" then
NTEstimatedTime = ""
end if
DoneNT = request("DoneNT")
MoreInfo = request("MoreInfo")
if MoreInfo = "" or isnull(MoreInfo) then
MoreInfo = 0
end if
SolutionNT = request("SolutionNT")
if 0 then
response.write "From=[" & From & "]<br />" & vbCrLf
response.write "Email=[" & Email & "]<br />" & vbCrLf
response.write "Phone=[" & Phone & "]<br />" & vbCrLf
response.write "CC_Original=[" & CC_Original & "]<br />" & vbCrLf
response.write "Machine_Original=[" & Machine_Original & "]<br />" & vbCrLf
response.write "Location_Original=[" & Location_Original & "]<br />" & vbCrLf
response.write "Floor_Original=[" & Floor_Original & "]<br />" & vbCrLf
response.write "Detail_Original=[" & Detail_Original & "]<br />" & vbCrLf
response.write "ManagerUse_Original=[" & ManagerUse_Original & "]<br />" & vbCrLf
response.write "Manager_Original=[" & Manager_Original & "]<br />" & vbCrLf
response.write "ReceivedBy=[" & ReceivedBy & "]<br />" & vbCrLf
response.write "SourceID=[" & SourceID & "]<br />" & vbCrLf
response.write "AssignedTo=[" & AssignedTo & "]<br />" & vbCrLf
response.write "PriorityID=[" & PriorityID & "]<br />" & vbCrLf
response.write "HardwareID=[" & HardwareID & "]<br />" & vbCrLf
response.write "SoftwareID=[" & SoftwareID & "]<br />" & vbCrLf
response.write "StatusID=[" & StatusID & "]<br />" & vbCrLf
response.write "TimeSolved=[" & TimeSolved & "]<br />" & vbCrLf
response.write "DTSSolution=[" & DTSSolution & "]<br />" & vbCrLf
response.write "DTSSolutionUser=[" & DTSSolutionUser & "]<br />" & vbCrLf
response.write "StaffNT=[" & StaffNT & "]<br />" & vbCrLf
response.write "hasLevel2Support=[" & hasLevel2Support & "]<br />" & vbCrLf
response.write "NTEstimatedTime=[" & NTEstimatedTime & "]<br />" & vbCrLf
response.write "DoneNT=[" & DoneNT & "]<br />" & vbCrLf
response.write "MoreInfo=[" & MoreInfo & "]<br />" & vbCrLf
response.write "SolutionNT=[" & SolutionNT & "]<br />" & vbCrLf
end if
if userType = 1 or userType = 2 then
SourceID = 1
StatusID = 1
end if
if ReceivedBy <> "" then
aryReceivedBy = split(ReceivedBy,",")
ReceivedBy = aryReceivedBy(0)
ReceivedByEmailAddress = aryReceivedBy(1)
end if
if AssignedTo <> "" then
aryAssignedTo = split(AssignedTo,",")
AssignedTo = aryAssignedTo(0)
AssignedToEmailAddress = aryAssignedTo(1)
end if
CC = CC_Original
CCTemp = Split(CC,";")
intTemp = ubound(CCTemp)
if intTemp <> -1 then
CC = ""
for i=0 to intTemp
CC = CC & CCTemp(i) & "@company.com;"
next
if right(CC,1) = ";" then
CC = left(CC,len(CC) - 1)
end if
end if
if 0 then
response.write "ReceivedBy=[" & ReceivedBy & "]<br />" & vbCrLf
response.write "ReceivedByEmailAddress=[" & ReceivedByEmailAddress & "]<br />" & vbCrLf
response.write "AssignedTo=[" & AssignedTo & "]<br />" & vbCrLf
response.write "AssignedToEmailAddress=[" & AssignedToEmailAddress & "]<br />" & vbCrLf
response.write "CC=[" & CC & "]<br />" & vbCrLf
response.write "bcc=[" & bcc & "]<br />" & vbCrLf
end if
Location = Location_Original
Floor = Floor_Original
Machine = Machine_Original
Detail = Detail_Original
ManagerUse = ManagerUse_Original
Manager = Manager_Original
if 0 then
response.write "Location=[" & Location & "]<br />" & vbCrLf
response.write "Floor=[" & Floor & "]<br />" & vbCrLf
response.write "Machine=[" & Machine & "]<br />" & vbCrLf
response.write "Detail=[" & Detail & "]<br />" & vbCrLf
response.write "ManagerUse=[" & ManagerUse & "]<br />" & vbCrLf
response.write "Manager=[" & Manager & "]<br />" & vbCrLf
end if
blnNeedManagerApproval = false
If Manager <> "" then
blnNeedManagerApproval = true
ManagerUse = Split(ManagerUse,"###SEPERATOR###")
ManagerUseText = ManagerUse(0)
ManagerUseID = ManagerUse(1)
blnHasChosen = true
Manager = Split(Manager,";")
ManagerName = Manager(0)
ManagerID = Manager(1)
ManagerEmailAddress = Manager(2)
' Detail = ManagerUseText & vbCrLf & vbCrLf & Detail
if lcase(Email) = lcase(ManagerEmailAddress) then
blnNeedManagerApproval = false
' strTitle = "The following information will be sent to " & Manager(0) & " for approval, <br /> you will get a copy of this request through email"
end if
else
blnHasChosen = false
end if
if session("MANAGERAPPROVAL") = "" then
session("MANAGERAPPROVAL") = 0
end if
if 0 then
response.write "ManagerUseText=[" & ManagerUseText & "]<br />" & vbCrLf
response.write "ManagerUseID=[" & ManagerUseID & "]<br />" & vbCrLf
response.write "blnHasChosen=[" & blnHasChosen & "]<br />" & vbCrLf
response.write "ManagerName=[" & ManagerName & "]<br />" & vbCrLf
response.write "ManagerID=[" & ManagerID & "]<br />" & vbCrLf
response.write "ManagerEmailAddress=[" & ManagerEmailAddress & "]<br />" & vbCrLf
response.write "Email=[" & Email & "]<br />" & vbCrLf
response.write "blnNeedManagerApproval=[" & blnNeedManagerApproval & "]<br />" & vbCrLf
response.write "session(""MANAGERAPPROVAL"")=[" & session("MANAGERAPPROVAL") & "]<br />" & vbCrLf
response.end
end if
if blnNeedManagerApproval and session("MANAGERAPPROVAL") <> 1 then
ManagerApprovalID = doManagerApproval(From,Email,Phone,Location,Floor,Machine,ManagerUseID,ManagerUseText,Detail_original,ManagerName,ManagerEmailAddress)
'*** send email to requestedby ***
' strTitle = "Thank you for your request. The request has been sent to " & ManagerName & " for approval. <br /> You will get a copy of this request via email."
if 0 then
response.write "ManagerApprovalID=[" & ManagerApprovalID & "]<br />" & vbCrLf
end if
strFrom = "DL-Bos-IT-DTS@company.com" '*** sender's email ***
strTo = Email '*** recipient's email **
'strbcc = "DL-Bos-IT-DTS@company.com"
strEmailBody = "<table width=""500"" cellpadding=""5"" cellspacing=""0"" border=""5"">" & vbCrLf & _
"<tr><td colspan=""2"" align=""center""><font class=""formfont3"">Desktop Service Request Form</font></td></tr>" & vbCrLf & _
"<tr><td colspan=""2""> </td></tr>" & vbCrLf & _
"<tr><td width=""150""><font class=""mySmallFont"" bgcolor=""#CCCCCC"">From:</font> </td><td width=""380"" bgcolor=""#BBBBBB"">" & strFrom & "</td></tr>" & vbCrLf & _
"<tr><td width=""150""><font class=""mySmallFont"" bgcolor=""#CCCCCC"">To:</font> </td><td width=""380"" bgcolor=""#BBBBBB"">" & strTo & "</td></tr>" & vbCrLf & _
"<tr><td valign=""top""><font class=""mySmallFont"" bgcolor=""#CCCCCC"">Detail:</font> </td><td bgcolor=""#BBBBBB"">" & replace(ManagerUseText,vbCrLf,"<br />") & "<br /><br />" & detail & "</td></tr>" & vbCrLf & _
"<tr><td colspan=""2"" align=""center""><font class=""formfont11""><br />The request has been sent to <b>" & ManagerName & "</b> for approval</font></td></tr>" & vbCrLf & _
"</table><br />" & vbCrLf
strSubject = "Desktop Services Request Form" ' email subject
strBody = MakePage(strSubject,strEmailBody)
Set objSendMail = CreateObject("CDONTS.NewMail")
objSendMail.From = strFrom
objSendMail.To = strTo
'objSendMail.BCC = "DL-Bos-IT-DTS@company.com"
objSendMail.Subject = TheSite & strSubject ' email subject
objSendMail.Body = strBody
objSendMail.BodyFormat = CdoBodyFormatHTML
objSendMail.MailFormat = CdoMailFormatMime
objSendMail.Importance = CdoNormal
objSendMail.Send
Set objSendMail = Nothing
'*** send email to manager ***
strFrom = Email '*** sender's email ***
strTo = ManagerEmailAddress '*** recipient's email ***
strEmailBody = "<table width=""500"" cellpadding=""5"" cellspacing=""0"" border=""5"">" & vbCrLf & _
"<tr><td colspan=""2"" align=""center""><font class=""formfont3"">Desktop Service Request Form</font></td></tr>" & vbCrLf & _
"<tr><td colspan=""2""> </td></tr>" & vbCrLf & _
"<tr><td width=""150""><font class=""mySmallFont"" bgcolor=""#CCCCCC"">From:</font> </td><td width=""380"" bgcolor=""#BBBBBB"">" & strFrom & "</td></tr>" & vbCrLf & _
"<tr><td width=""150""><font class=""mySmallFont"" bgcolor=""#CCCCCC"">To:</font> </td><td width=""380"" bgcolor=""#BBBBBB"">" & strTo & "</td></tr>" & vbCrLf & _
"<tr><td valign=""top""><font class=""mySmallFont"" bgcolor=""#CCCCCC"">Detail:</font> </td><td bgcolor=""#BBBBBB"">" & replace(ManagerUseText,vbCrLf,"<br />") & "<br /><br />" & detail & "</td></tr>" & vbCrLf & _
"<tr><td colspan=""2"" align=""center""><font class=""formfont11"">Manager click <a href=""" & siteURL & "/asp/dtsDoManagerApproval.asp?mp=" & ManagerApprovalID & """>here</a> to approve this request</font></td></tr>" & vbCrLf & _
"</table><br />" & vbCrLf
strSubject = "Desktop Services Request Form" ' email subject
strBody = MakePage(strSubject,strEmailBody)
Set objSendMail = CreateObject("CDONTS.NewMail")
objSendMail.From = strFrom
objSendMail.To = strTo
'objSendMail.BCC = "DL-Bos-IT-DTS@company.com"
objSendMail.Subject = TheSite & strSubject
objSendMail.Body = strBody
objSendMail.BodyFormat = CdoBodyFormatHTML
objSendMail.MailFormat = CdoMailFormatMime
objSendMail.Importance = CdoNormal
objSendMail.Send
Set objSendMail = Nothing
session("MANAGERAPPROVAL") = 1
if 0 then
response.write "{{{if}}}"
end if
else
if 0 then
response.write "{{{else}}}"
end if
end if
if 0 then
response.write "ManagerUseID=[" & ManagerUseID & "]<br />" & vbCrLf
response.write "ManagerUseText=[" & ManagerUseText & "]<br />" & vbCrLf
response.write "ManagerID=[" & ManagerID & "]<br />" & vbCrLf
response.write "ManagerEmailAddress=[" & ManagerEmailAddress & "]<br />" & vbCrLf
response.write "blnNeedManagerApproval=[" & blnNeedManagerApproval & "]<br />" & vbCrLf
response.write "blnHasChosen=[" & blnHasChosen& "]<br />" & vbCrLf
response.write "Detail=[" & Detail& "]<br />" & vbCrLf
response.write "strParam=[" & strParam& "]<br />" & vbCrLf
end if
if Manager_Original <> "" and blnNeedManagerApproval then
strTitle = "The request has been sent to <b>" & ManagerName & "</b> for approval, <br /> you will get a copy of this request through email"
end if
strNoEntry = "<font size=-2"" color=""brwon""><b>NO ENTRY</b></font>"
if CC = "" then
CC = strNoEntry
end if
if Detail = "" then
Detail = strNoEntry
end if
if not blnHasChosen then
ManagerUse = strNoEntry
Manager = strNoEntry
end if
strServerMappath = Server.Mappath("/asp")
strHTMLPath_Header = strServerMappath & "\RGVStandardHeader.inc"
strHTMLPath_Footer = strServerMappath & "\RGVStandardFooter.inc"
strHTML_RGVStandardHeader = ReadFiles(strHTMLPath_Header)
strHTML_RGVStandardHeader = Replace(strHTML_RGVStandardHeader,"$$$TITLE$$$","Vanderweil - Desktop Services Request Form")
strHTML_RGVStandardHeader = Replace(strHTML_RGVStandardHeader,"background=""/images/bkg_grid.gif""","bgcolor=""#00CCCC""")
strHTMLPath_Footer = ReadFiles(strHTMLPath_Footer)
strHTML = vbCrlf & _
"<script language=""JavaScript"" type=""text/javascript"" >" & vbCrLf & _
"<!--" & vbCrLf & _
"// getRGVCOEBanner(4);" & vbCrLf & _
"//-->" & vbCrLf & _
"</script>" & vbCrLf & _
vbCrLf & "<table width=""760""><tr><td align=""center"">" & vbCrLf
strHTML_RGVStandardHeader = strHTML_RGVStandardHeader + strHTML
strHTMLBody = "<tr><td width=""100""><font class=""mySmallFont"">Request By:</font> </td><td width=""500"" bgcolor=""#CCCCCC"">" & From & "</td></tr>" & vbCrLf & _
"<tr><td><font class=""mySmallFont"">Contact Email:</font> </td><td bgcolor=""#CCCCCC"">" & Email & "</td></tr>" & vbCrLf & _
"<tr><td><font class=""mySmallFont"">Phone Ext.:</font> </td><td bgcolor=""#CCCCCC"">" & Phone & "</td></tr>" & vbCrLf & _
"<tr><td><font class=""mySmallFont"">Email CC:</font> </td><td bgcolor=""#CCCCCC"">" & CC & "</td></tr>" & vbCrLf & _
"<tr><td><font class=""mySmallFont"">Location:</font> </td><td bgcolor=""#CCCCCC"">" & Location & "</td></tr>" & vbCrLf & _
"<tr><td><font class=""mySmallFont"">Floor:</font> </td><td bgcolor=""#CCCCCC"">" & Floor & "</td></tr>" & vbCrLf & _
"<tr><td><font class=""mySmallFont"">Machine:</font> </td><td bgcolor=""#CCCCCC"">" & Machine & "</td></tr>" & vbCrLf
if Detail <> "" then
strHTMLBody = strHTMLBody & _
"<tr><td valign=""top""><font class=""mySmallFont"">Detailed Description:</font> </td><td bgcolor=""#CCCCCC"">" & Detail & "</td></tr>" & vbCrLf
end if
if blnHasChosen then
strHTMLBody = strHTMLBody & _
"<tr><td valign=""top""><font class=""mySmallFont"">Manager Use:</font> </td><td bgcolor=""#CCCCCC"">" & ManagerUse(0) & "</td></tr>" & vbCrLf & _
"<tr><td valign=""top""><font class=""mySmallFont"">Manager:</font> </td><td bgcolor=""#CCCCCC"">" & Manager(0) & "</td></tr>" & vbCrLf
else
strHTMLBody = strHTMLBody & _
"<tr><td valign=""top""><font class=""mySmallFont"">Manager Use:</font> </td><td bgcolor=""#CCCCCC"">" & ManagerUse & "</td></tr>" & vbCrLf & _
"<tr><td valign=""top""><font class=""mySmallFont"">Manager:</font> </td><td bgcolor=""#CCCCCC"">" & Manager & "</td></tr>" & vbCrLf
end if
if not blnConfirm then
response.write strHTML_RGVStandardHeader & _
"<br /><br /><center><form action=""/asp/dtsAddRequest.asp"" method=""post"">" & vbCrLf & _
"<input type=""hidden"" name=""cf"" value=""1"" />" & _
"<input type=""hidden"" name=""From"" value=""" & From & """ />" & vbCrLf & _
"<input type=""hidden"" name=""Email"" value=""" & Email & """ />" & vbCrLf & _
"<input type=""hidden"" name=""txtExt"" value=""" & Phone & """ />" & vbCrLf & _
"<input type=""hidden"" name=""txtCC"" value=""" & CC_Original & """ />" & vbCrLf & _
"<input type=""hidden"" name=""Machine"" value=""" & Machine_Original & """ />" & vbCrLf & _
"<input type=""hidden"" name=""slctLocation"" value=""" & Location_Original & """ />" & vbCrLf & _
"<input type=""hidden"" name=""slctFloor"" value=""" & Floor_Original & """ />" & vbCrLf & _
"<input type=""hidden"" name=""Detail"" value=""" & Replace(Detail_Original,"""",""") & """ />" & vbCrLf & _
"<input type=""hidden"" name=""ManagerUse"" value=""" & ManagerUse_Original & """ />" & vbCrLf & _
"<input type=""hidden"" name=""Manager"" value=""" & Manager_Original & """ />" & vbCrLf & _
"<table width=""650"" cellpadding=""5"" cellspacing=""0"" border=""5"">" & vbCrLf & _
"<tr><td colspan=""2"" align=""center""><font class=""myTitle"">Please confirm the Information</font></td></tr>" & vbCrLf & _
"<tr><td colspan=""2"" align=""center""><font size=""-2"" color=""brown""><b>" & strTitle & "</b></font></td></tr>" & vbCrLf & _
strHTMLBody & vbCrLf & _
"</table><br />" & vbCrLf & _
"<input type=""button"" value=""Modify"" name=""btnMofify"" onclick=""javascript:history.back();"" /> " & vbCrLf & _
"<input type=""submit"" value="" Send "" />" & vbCrLf & _
"</form></center>" & vbCrLf & _
strHTMLPath_Footer
else
strSession = "[" & From & "]" & _
"[" & Email & "]" & _
"[" & CC_Original & "]" & _
"[" & Phone & "]" & _
"[" & Location & "]" & _
"[" & Floor & "]" & _
"[" & Machine & "]" & _
"[" & DTSSolution & "]" & _
"[" & SolutionNT & "]" & _
"[" & Detail & "]"
if 0 then
response.write "strSession=[" & strSession & "]<br />" & vbCrLF
end if
if blnHasChosen then
strSession = strSession & "[" & ManagerUse(1) & "][" & Manager(1) & "]"
else
strSession = strSession & "[" & ManagerUse & "][" & Manager & "]"
end if
if 0 then
response.write "strSession=[<font color=""red"">" & strSession & "</font>]<br />" & vbCrLf
response.write "Session(""TOSAVE"")=[<font color=""red"">" & Session("TOSAVE") & "</font>]<br />" & vbCrLf
end if
'*** check the save flag ***
if Session("TOSAVE") = strSession then
blnToSave = False
else
Session("TOSAVE") = strSession
blnToSave = True
end if
if 0 then
response.write "blnToSave=[<font color=""blue"">" & blnToSave & "</font>]<br />" & vbCrLf
end if
if Detail = strNoEntry then
Detail = ""
end if
if CompletionDate = strNoEntry then
CompletionDate = "NULL"
else
CompletionDate = "'" & CompletionDate & "'"
end if
if ReceivedBy = "" or IsNull(ReceivedBy) then
ReceivedBy = "null"
end if
if AssignedTo = "" or IsNull(AssignedTo) then
AssignedTo = "null"
end if
if PriorityID = "" or IsNull(PriorityID) then
PriorityID = "null"
end if
if SourceID = "" or IsNull(SourceID) then
SourceID = "null"
end if
if HardwareID = "" or IsNull(HardwareID) then
HardwareID = "null"
end if
if SoftwareID = "" or IsNull(SoftwareID) then
SoftwareID = "null"
end if
if StatusID = "" or IsNull(StatusID) then
StatusID = 1
end if
if InformedID = "" or IsNull(InformedID) then
InformedID = "null"
end if
if TimeSolved = "" or IsNull(TimeSolved) then
TimeSolved = "null"
else
TimeSolved = "'" & TimeSolved & "'"
end if
if DTSSolution = "" or IsNull(DTSSolution) then
DTSSolution = ""
end if
if Level2Support = "" or IsNull(Level2Support) then
Level2Support = 0
end if
if Manager_Original <> "" and not blnNeedManagerApproval then
Detail = ManagerUseText & vbCrLf & Detail
end if
if userType = 5 or userType = 8 or userType = 3 or userType = 4 then
blnSendEmail = false
TicketNubmer = Session("TICKETNUMBER")
'*** handle DTS working ***
if userType = 3 or userType = 4 then
strFrom = "DL-Bos-IT-DTS@company.com" '*** sender's email ***
strTo = Email '*** recipient's email ***
strCC = ReceivedByEmailAddress
if CC <> strNoEntry then
strCC = strCC & ";" & CC
end if
if 0 then
response.write "<font color=blue>strFrom=[<font color=""green"">" & strFrom & "</font>]<br /></font>" & vbCrLf
response.write "<font color=blue>strTo=[<font color=""green"">" & strTo & "</font>]<br /></font>" & vbCrLf
response.write "<font color=blue>strCC=[<font color=""green"">" & strCC& "</font>]<br /></font>" & vbCrLf
response.end
end if
'strbcc ="DL-Bos-IT-DTS@company.com" 'bcc
strEmailBody = "<table width=""500"" cellpadding=""5"" cellspacing=""0"" border=""5"">" & vbCrLf & _
"<tr><td colspan=""2"" align=""center""><font class=""formfont3"">Desktop Service Request Form</font></td></tr>" & vbCrLf & _
"<tr><td colspan=""2""> </td></tr>" & vbCrLf & _
"<tr><td width=""150""><font class=""mySmallFont"" bgcolor=""#CCCCCC"">From:</font> </td><td width=""380"" bgcolor=""#BBBBBB"">" & strFrom & "</td></tr>" & vbCrLf & _
"<tr><td width=""150""><font class=""mySmallFont"" bgcolor=""#CCCCCC"">To:</font> </td><td width=""380"" bgcolor=""#BBBBBB"">" & strTo & "</td></tr>" & vbCrLf & _
"<tr><td width=""150""><font class=""mySmallFont"" bgcolor=""#CCCCCC"">CC:</font> </td><td width=""380"" bgcolor=""#BBBBBB"">" & strCC & "</td></tr>" & vbCrLf & _
"<tr><td width=""150""><font class=""mySmallFont"" bgcolor=""#CCCCCC"">Ticket Number:</font> </td><td width=""380"" bgcolor=""#BBBBBB"">" & TicketNubmer & "</td></tr>" & vbCrLf & _
"<tr><td valign=""top""><font class=""mySmallFont"" bgcolor=""#CCCCCC"">Detail:</font> </td><td bgcolor=""#BBBBBB"">" & replace(Detail_Original,vbCrLf,"<br />") & "</td></tr>" & vbCrLf & _
"</table><br />" & vbCrLf
strEmailBodyTemp = "<br />" & strEmailBody
strSubject = "Desktop Services Request Form ( Ticket Number:" & Session("TICKETNUMBER") & " )" ' email subject
strBody = MakePage(strSubject,strEmailBody)
Set objSendMail = CreateObject("CDONTS.NewMail")
objSendMail.From = strFrom
objSendMail.To = strTo
objSendMail.CC = strCC
'objSendMail.BCC = "DL-Bos-IT-DTS@company.com"
objSendMail.Subject = TheSite & strSubject
objSendMail.Body = strBody
objSendMail.BodyFormat = CdoBodyFormatHTML
objSendMail.MailFormat = CdoMailFormatMime
objSendMail.Importance = CdoNormal
if strTo <> "" then
objSendMail.Send
end if
set objSendMail = nothing
end if
if 0 then
response.write "TicketNubmer=[" & TicketNubmer & "]<br />" & vbCrLf
' response.end
end if
if NTEstimatedTime = "" or IsNull(NTEstimatedTime) then
NTEstimatedTime = "null"
else
NTEstimatedTime = "'" & NTEstimatedTime & "'"
end if
if SolutionNT = "" or IsNull(SolutionNT) then
SolutionNT = "null"
else
SolutionNT = replace(SolutionNT,"'","''")
SolutionNT = "'" & SolutionNT & "'"
end if
' if SolutionNT = "" or IsNull(SolutionNT) then
' SolutionNT = ""
' end if
if DoneNT = "" or IsNull(DoneNT) then
DoneNT = 0
end if
if StaffNT = "" or IsNull(StaffNT) then
StaffNT = "null"
else
StaffNTTemp = StaffNT
StaffNT = split(StaffNTTemp,",")(0)
StaffNTEmailAddress = split(StaffNTTemp,",")(1)
end if
'*** initialize email ***
blnNewTicketNT = false
strClick = "click <b><a href=""" & siteURL & "/asp/dtsLogin.asp"">here</a></b> to view the details."
if 0 then
response.write "<font color=blue>getAssignedTo(" & TicketNubmer & "," & assignedto & ")=[<font color=""green"">" & getAssignedTo(TicketNubmer,assignedto) & "</font>]<br /></font>" & vbCrLf
end if
if (getAssignedTo(TicketNubmer,assignedto) = 0 and (userType = 5 or userType = 8 or userType = 3 or userType = 4)) then
if userType = 3 or userType = 4 then
blnSendEmail = false
else
blnSendEmail = false
end if
strFrom = ReceivedByEmailAddress '*** sender's email ***
strTo = AssignedToEmailAddress '*** recipient's email ***
strCC = ReceivedByEmailAddress
if 0 then
response.write "<font color=blue>strFrom=[<font color=""green"">" & strFrom & "</font>]<br /></font>" & vbCrLf
response.write "<font color=blue>strTo=[<font color=""green"">" & strTo & "</font>]<br /></font>" & vbCrLf
response.write "<font color=blue>strCC=[<font color=""green"">" & strCC& "</font>]<br /></font>" & vbCrLf
response.end
end if
strbcc = "DL-Bos-IT-DTS@company.com" 'bcc
strEmailBody = "<table width=""500"" cellpadding=""5"" cellspacing=""0"" border=""5"">" & vbCrLf & _
"<tr><td colspan=""2"" align=""center""><font class=""formfont3"">Desktop Service Request Form</font></td></tr>" & vbCrLf & _
"<tr><td colspan=""2""> </td></tr>" & vbCrLf & _
"<tr><td width=""150""><font class=""mySmallFont"" bgcolor=""#CCCCCC"">From:</font> </td><td width=""380"" bgcolor=""#BBBBBB"">" & strFrom & "</td></tr>" & vbCrLf & _
"<tr><td width=""150""><font class=""mySmallFont"" bgcolor=""#CCCCCC"">To:</font> </td><td width=""380"" bgcolor=""#BBBBBB"">" & strTo & "</td></tr>" & vbCrLf & _
"<tr><td width=""150""><font class=""mySmallFont"" bgcolor=""#CCCCCC"">CC:</font> </td><td width=""380"" bgcolor=""#BBBBBB"">" & strCC & "</td></tr>" & vbCrLf & _
"<tr><td width=""150""><font class=""mySmallFont"" bgcolor=""#CCCCCC"">Ticket Number:</font> </td><td width=""380"" bgcolor=""#BBBBBB"">" & TicketNubmer & "</td></tr>" & vbCrLf & _
"<tr><td valign=""top""><font class=""mySmallFont"" bgcolor=""#CCCCCC"">Detail:</font> </td><td bgcolor=""#BBBBBB"">This is your new ticket, " & strClick & "</td></tr>" & vbCrLf & _
"</table><br />" & vbCrLf
strSubject = "Desktop Services Request Form ( Ticket Number:" & Session("TICKETNUMBER") & " )" ' email subject
strBody = MakePage(strSubject,strEmailBody)
Set objSendMail = CreateObject("CDONTS.NewMail")
objSendMail.From = strFrom
objSendMail.To = strTo
objSendMail.CC = strCC
'objSendMail.BCC = "DL-Bos-IT-DTS@company.com"
objSendMail.Subject = TheSite & strSubject
objSendMail.Body = strBody
objSendMail.BodyFormat = CdoBodyFormatHTML
objSendMail.MailFormat = CdoMailFormatMime
objSendMail.Importance = CdoNormal
if strFrom <> strTo and strTo <> "" then
objSendMail.Send
end if
Set objSendMail = Nothing
' response.write "<font color=red>Assign to send email</font>]<br />" & vbCrLf
else
' response.write "<font color=red>Assign to don't send email</font>]<br />" & vbCrLf
end if
if TimeSolved = "null" then
if StaffNT <> "null" then
if DoneNT <> 1 then
if 0 then
response.write "<font color=blue>getTicketNumberNT(TicketNubmer,StaffNT)=[<font color=""green"">" & getTicketNumberNT(TicketNubmer,StaffNT) & "</font>]<br /></font>" & vbCrLf
end if
if MoreInfo = 1 then
strTicketInfoNT = getTicketInfoNT(TicketNubmer)
strNewNTName = getEmployeeName(StaffNT)
aryTicketInfoNT = split(strTicketInfoNT,";")
if userType = 8 then
strFrom = aryTicketInfoNT(3) ' sender's email
strTo = AssignedToEmailAddress
strEmailBody = "<table width=""500"" cellpadding=""5"" cellspacing=""0"" border=""5"">" & vbCrLf & _
"<tr><td align=""center""><font class=""formfont3"">Desktop Service Request Form</font></td></tr>" & vbCrLf & _
"<tr><td> </td></tr>" & vbCrLf & _
"<tr><td bgcolor=""#BBBBBB"">Need more info for ticket number <b>" & TicketNubmer & "</b></td></tr>" & vbCrLf & _
"<tr><td bgcolor=""#BBBBBB"" align=""center"">" & strClick & "</td></tr>" & vbCrLf & _
"</table><br />" & vbCrLf
else
strFrom = AssignedToEmailAddress
strTo = aryTicketInfoNT(3) ' sender's email
strEmailBody = "<table width=""500"" cellpadding=""5"" cellspacing=""0"" border=""5"">" & vbCrLf & _
"<tr><td align=""center""><font class=""formfont3"">Desktop Service Request Form</font></td></tr>" & vbCrLf & _
"<tr><td> </td></tr>" & vbCrLf & _
"<tr><td bgcolor=""#BBBBBB"">More info for ticket number <b>" & TicketNubmer & "</b></td></tr>" & vbCrLf & _
"<tr><td bgcolor=""#BBBBBB"" align=""center"">" & strClick & "</td></tr>" & vbCrLf & _
"</table><br />" & vbCrLf
end if
strCC = strFrom
if 0 then
response.write "<font color=blue>strTicketInfoNT=[<font color=""green"">" & strTicketInfoNT & "</font>]<br /></font>" & vbCrLf
response.write "<font color=blue>strNewNTName=[<font color=""green"">" & strNewNTName & "</font>]<br /></font>" & vbCrLf
response.write "<font color=blue>strFrom=[<font color=""green"">" & strFrom & "</font>]<br /></font>" & vbCrLf
response.write "<font color=blue>strTo=[<font color=""green"">" & strTo & "</font>]<br /></font>" & vbCrLf
'response.end
end if
strbcc = "DL-Bos-IT-DTS@vancderweil.com" ' bcc
strSubject = "Desktop Services Request Form ( Ticket Number:" & Session("TICKETNUMBER") & " )" ' email subject
strBody = MakePage(strSubject,strEmailBody)
Set objSendMail = CreateObject("CDONTS.NewMail")
objSendMail.From = strFrom
objSendMail.To = strTo
objSendMail.CC = strCC
objSendMail.BCC = "DL-Bos-IT-DTS@company.com"
objSendMail.Subject = TheSite & strSubject
objSendMail.Body = strBody
objSendMail.BodyFormat = CdoBodyFormatHTML
objSendMail.MailFormat = CdoMailFormatMime
objSendMail.Importance = CdoNormal
objSendMail.Send
Set objSendMail = Nothing
end if '*** if MoreInfo = 1 ***
if getTicketNumberNT(TicketNubmer,StaffNT) = 0 then
EmployeeEmailAddressTemp = getEmployeeEmail(idnumber)
if lcase(EmployeeEmailAddressTemp) = lcase(AssignedToEmailAddress) then
blnIsITManager = true
else
blnIsITManager = false
end if
'*** send email to original NT assigee ***
strTicketInfoNT = getTicketInfoNT(TicketNubmer)
strNewNTName = getEmployeeName(StaffNT)
if strTicketInfoNT <> "" then
aryTicketInfoNT = split(strTicketInfoNT,";")
if blnIsITManager then
strFrom = EmployeeEmailAddressTemp ' sender's email
strCC = AssignedToEmailAddress
strbcc = "DL-Bos-IT-DTS@company.com"
else
strFrom = AssignedToEmailAddress ' sender's email
strCC = ""
strbcc = "falisalaam@company.com"
end if
strTo = aryTicketInfoNT(3)
strEmailBody = "<table width=""500"" cellpadding=""5"" cellspacing=""0"" border=""5"">" & vbCrLf & _
"<tr><td align=""center""><font class=""formfont3"">Desktop Service Request Form</font></td></tr>" & vbCrLf & _
"<tr><td> </td></tr>" & vbCrLf & _
"<tr><td bgcolor=""#BBBBBB"">Ticket number <b>" & TicketNubmer & "</b> has been reassigned to " & strNewNTName & "</td></tr>" & vbCrLf & _
"</table><br />" & vbCrLf
if 0 then
response.write "strFrom=[" & strFrom & "]<br />" & vbCrLf
response.write "strNewNTName=[" & strNewNTName & "]<br />" & vbCrLf
end if
strSubject = "Desktop Services Request Form ( Ticket Number:" & Session("TICKETNUMBER") & " )" ' email subject
strBody = MakePage(strSubject,strEmailBody)
Set objSendMail = CreateObject("CDONTS.NewMail")
objSendMail.From = strFrom
objSendMail.To = strTo
objSendMail.CC = strCC
'objSendMail.BCC = "DL-Bos-IT-DTS@company.com"
objSendMail.Subject = TheSite & strSubject
objSendMail.Body = strBody
objSendMail.BodyFormat = CdoBodyFormatHTML
objSendMail.MailFormat = CdoMailFormatMime
objSendMail.Importance = CdoNormal
if strFrom <> strTo then
objSendMail.Send
end if
Set objSendMail = Nothing
else
' response.write "Problem accured when call getTicketInfoNT File:[/asp/dtsAddRequest.asp],TicketNubmer=[" & TicketNubmer & "]"
' response.end
end if
strFrom = AssignedToEmailAddress ' sender's email
strTo = StaffNTEmailAddress 'recipient's email
strCC = AssignedToEmailAddress
strbcc = "falisalaam@company.com" 'bcc
if strFrom = strTo then
blnSendEmail = false
else
blnSendEmail = true
end if
strEmailBody = "<table width=""500"" cellpadding=""5"" cellspacing=""0"" border=""5"">" & vbCrLf & _
"<tr><td colspan=""2"" align=""center""><font class=""formfont3"">Desktop Service Request Form</font></td></tr>" & vbCrLf & _
"<tr><td colspan=""2""> </td></tr>" & vbCrLf & _
"<tr><td width=""150""><font class=""mySmallFont"" bgcolor=""#CCCCCC"">From:</font> </td><td width=""380"" bgcolor=""#BBBBBB"">" & strFrom & "</td></tr>" & vbCrLf & _
"<tr><td width=""150""><font class=""mySmallFont"" bgcolor=""#CCCCCC"">To:</font> </td><td width=""380"" bgcolor=""#BBBBBB"">" & strTo & "</td></tr>" & vbCrLf & _
"<tr><td width=""150""><font class=""mySmallFont"" bgcolor=""#CCCCCC"">CC:</font> </td><td width=""380"" bgcolor=""#BBBBBB"">" & strCC & "</td></tr>" & vbCrLf & _
"<tr><td width=""150""><font class=""mySmallFont"" bgcolor=""#CCCCCC"">Ticket Number:</font> </td><td width=""380"" bgcolor=""#BBBBBB"">" & TicketNubmer & "</td></tr>" & vbCrLf & _
"<tr><td valign=""top""><font class=""mySmallFont"" bgcolor=""#CCCCCC"">Detail:</font> </td><td bgcolor=""#BBBBBB"">This ticket needs network staff support, " & strClick & "</td></tr>" & vbCrLf & _
"</table><br />" & vbCrLf
end if '*** if getTicketNumberNT(TicketNubmer,StaffNT) = 0 ***
if NTEstimatedTime <> "null" then
if 0 then
response.write "<font color=blue>getEstimatedTimeNT(TicketNubmer,NTEstimatedTime)=[<font color=""green"">" & getEstimatedTimeNT(TicketNubmer,NTEstimatedTime) & "</font>]<br /></font>" & vbCrLf
end if
if getEstimatedTimeNT(TicketNubmer,NTEstimatedTime) = 0 then
blnSendEmail = true
strFrom = StaffNTEmailAddress ' sender's email
strTo = AssignedToEmailAddress 'recipient's email
strCC = StaffNTEmailAddress
strbcc = "falisalaam@company.com"
strEmailBody = "<table width=""500"" cellpadding=""5"" cellspacing=""0"" border=""5"">" & vbCrLf & _
"<tr><td colspan=""2"" align=""center""><font class=""formfont3"">Desktop Service Request Form</font></td></tr>" & vbCrLf & _
"<tr><td colspan=""2""> </td></tr>" & vbCrLf & _
"<tr><td width=""150""><font class=""mySmallFont"" bgcolor=""#CCCCCC"">From:</font> </td><td width=""380"" bgcolor=""#BBBBBB"">" & strFrom & "</td></tr>" & vbCrLf & _
"<tr><td width=""150""><font class=""mySmallFont"" bgcolor=""#CCCCCC"">To:</font> </td><td width=""380"" bgcolor=""#BBBBBB"">" & strTo & "</td></tr>" & vbCrLf & _
"<tr><td width=""150""><font class=""mySmallFont"" bgcolor=""#CCCCCC"">CC:</font> </td><td width=""380"" bgcolor=""#BBBBBB"">" & strCC & "</td></tr>" & vbCrLf & _
"<tr><td width=""150""><font class=""mySmallFont"" bgcolor=""#CCCCCC"">Ticket Number:</font> </td><td width=""380"" bgcolor=""#BBBBBB"">" & TicketNubmer & "</td></tr>" & vbCrLf & _
"<tr valign=""top""><td><font class=""mySmallFont"" bgcolor=""#CCCCCC"">Detail:</font> </td><td bgcolor=""#BBBBBB"">Estimate finish date is [" & formatdatetime(cdate(replace(NTEstimatedTime,"'","")),1) & "], " & strClick & "</td></tr>" & vbCrLf & _
"</table><br />" & vbCrLf
end if
end if
else
if 0 then
response.write "<font color=blue>getDoneNT(TicketNubmer)=[<font color=""green"">" & getDoneNT(TicketNubmer) & "</font>]<br /></font>" & vbCrLf
end if
if getDoneNT(TicketNubmer) = 0 then
blnSendEmail = true
strFrom = StaffNTEmailAddress ' sender's email
strTo = AssignedToEmailAddress 'recipient's email
strCC = StaffNTEmailAddress
strbcc = "falisalaam@company.com" 'bcc
strEmailBody = "<table width=""500"" cellpadding=""5"" cellspacing=""0"" border=""5"">" & vbCrLf & _
"<tr><td colspan=""2"" align=""center""><font class=""myTitle"">Desktop Service Request Form</font></td></tr>" & vbCrLf & _
"<tr><td colspan=""2""> </td></tr>" & vbCrLf & _
"<tr><td width=""150""><font class=""mySmallFont"" bgcolor=""#CCCCCC"">From:</font> </td><td width=""380"" bgcolor=""#BBBBBB"">" & strFrom & "</td></tr>" & vbCrLf & _
"<tr><td width=""150""><font class=""mySmallFont"" bgcolor=""#CCCCCC"">To:</font> </td><td width=""380"" bgcolor=""#BBBBBB"">" & strTo & "</td></tr>" & vbCrLf & _
"<tr><td width=""150""><font class=""mySmallFont"" bgcolor=""#CCCCCC"">CC:</font> </td><td width=""380"" bgcolor=""#BBBBBB"">" & strCC & "</td></tr>" & vbCrLf & _
"<tr><td width=""150""><font class=""mySmallFont"" bgcolor=""#CCCCCC"">Ticket Number:</font> </td><td width=""380"" bgcolor=""#BBBBBB"">" & TicketNubmer & "</td></tr>" & vbCrLf & _
"<tr><td valign=""top""><font class=""mySmallFont"" bgcolor=""#CCCCCC"">Detail:</font> </td><td bgcolor=""#BBBBBB"">This ticket is done for network staff support part, " & strClick & "</td></tr>" & vbCrLf & _
"</table><br />" & vbCrLf
end if
end if
end if
else
if 0 then
response.write "<font color=blue>getTimeSolved(TicketNubmer)=[<font color=""green"">" & getTimeSolved(TicketNubmer) & "</font>]<br /></font>" & vbCrLf
end if
if getTimeSolved(TicketNubmer) > 0 then
blnSendEmail = true
strFrom = "DL-Bos-IT-DTS@company.com" ' sender's email
strTo = Email 'recipient's email
strCC = AssignedToEmailAddress
strbcc = "falisalaam@company.com"
strEmailBody = "<table width=""500"" cellpadding=""5"" cellspacing=""0"" bgcolor=""#FFFFFF"" border=""5"">" & vbCrLf & _
"<tr><td colspan=""2"" align=""center""><font class=""myTitle"">Desktop Service Request Form</font></td></tr>" & vbCrLf & _
"<tr><td colspan=""2""> </td></tr>" & vbCrLf & _
"<tr><td width=""150""><font class=""mySmallFont"" bgcolor=""#CCCCCC"">Ticket Number:</font> </td><td width=""380"" bgcolor=""#BBBBBB"">" & TicketNubmer & "</td></tr>" & vbCrLf & _
"<tr><td valign=""top""><font class=""mySmallFont"" bgcolor=""#CCCCCC"">Detail:</font> </td><td bgcolor=""#BBBBBB"">This problem is solved and ticket is closed. :-) <br /><br />If you have any further questions regarding this ticket click <a href=""" & siteURL & "/template/misc/doMailTo.htm?mailto:" & AssignedToEmailAddress & "&subject=$$$strSubject$$$""><b>here</b></a> to send an email to the Desktop Services Analyst that worked on your request.</td></tr>" & vbCrLf & _
"<tr><td valign=""top""><font class=""mySmallFont"" bgcolor=""#CCCCCC"">Original Problem:</font> </td><td bgcolor=""#BBBBBB"" valign=""top"">" & replace(Detail,vbCrLf,"<br />") & "</td></tr>" & vbCrLf & _
"<tr><td valign=""top""><font class=""mySmallFont"" bgcolor=""#CCCCCC"">DTS Solution:</font> </td><td bgcolor=""#BBBBBB"" valign=""top"">" & replace(DTSSolutionUser,vbCrLf,"<br />") & "</td></tr>" & vbCrLf & _
"</table><br />" & vbCrLf
end if
end if
if 0 then
response.write "DTSSolution=[" & DTSSolution & "]<br />" & vbCrLf
response.write "DTSSolutionUser=[" & DTSSolutionUser & "]<br />" & vbCrLf
response.write "SolutionNT=[" & SolutionNT & "]<br />" & vbCrLf
end if
strSQL = "exec it_UpdateRequest " & userType & "," & request("TicketNubmer") & _
",'" & replace(From,"'","''") & "','" & Email & "'," & Phone & ",'" & Location & "','" & Floor & _
"'," & Machine & ",'" & Replace(Detail,"'","''") & _
"'," & ReceivedBy & "," & AssignedTo & "," & PriorityID & "," & SourceID & _
"," & HardwareID & "," & SoftwareID & "," & StatusID & "," & InformedID & _
"," & TimeSolved & ",'" & Replace(DTSSolution,"'","''") & _
"','" & Replace(DTSSolutionUser,"'","''") & "'," & Level2Support & "," & StaffNT & "," & NTEstimatedTime & "," & SolutionNT & "," & DoneNT
Session("TICKETNUMBER") = request("TicketNubmer")
if 0 then
response.write "<font color=green>strSQL=[<font color=""green"">" & strSQL & "</font>]<br /></font>" & vbCrLf
' response.end
end if
set rsRequest = connDB_site.execute(strSQL)
set rsRequest = nothing
else '*** if userType = 5 or userType = 8 then ***
if blnToSave and not blnNeedManagerApproval then
strSQL = "exec it_AddRequest " & _
"'" & replace(From,"'","''") & "','" & Email & "'," & Phone & ",'" & Location & "','" & Floor & _
"'," & Machine & ",'" & Replace(Detail,"'","''") & _
"'," & ReceivedBy & "," & AssignedTo & "," & PriorityID & "," & SourceID & _
"," & HardwareID & "," & SoftwareID & "," & StatusID & "," & InformedID & _
"," & TimeSolved & ",'" & Replace(DTSSolution,"'","''") & _
"','" & Replace(DTSSolutionUser,"'","''") & "'," & Level2Support
if 0 then
response.write "strSQL=[<font color=""green"">" & strSQL & "</font>]<br />" & vbCrLf
response.end
end if
set rsAddRequest = connDB_site.Execute(strSQL)
strTicketNumber = rsAddRequest("TicketNubmer")
Session("TICKETNUMBER") = strTicketNubmer
set reAddRequest = nothing
'*** initialize email ***
blnSendEmail = true
strEmailBody = "<table width=""500"" cellpadding=""5"" cellspacing=""0"" border=""5"">" & vbCrLf & _
"<tr><td colspan=""2"" align=""center""><font class=""myTitle"">Received Desktop Service Request Form</font></td></tr>" & vbCrLf & _
"<tr><td colspan=""2""> </td></tr>" & vbCrLf & _
"<tr><td width=""150""><font class=""mySmallFont"" bgcolor=""#CCCCCC"">Ticket Number:</font> </td><td width=""380"" bgcolor=""#BBBBBB"">" & Session("TICKETNUMBER") & "</td></tr>" & vbCrLf & _
"<tr><td valign=""top""><font class=""mySmallFont"" bgcolor=""#CCCCCC"">Detail:</font> </td><td bgcolor=""#BBBBBB"">" & replace(Detail,vbCrLf,"<br />") & "</td></tr>" & vbCrLf & _
"</table><br />" & vbCrLf
if 0 then
response.write "strEmailBody=[<font color=""green"">" & strEmailBody & "</font>]<br />" & vbCrLf
end if
strFrom = "DL-Bos-IT-DTS@company.com" ' sender's email
strTo = Email 'recipient's email
strbcc = "falisalaam@company.com"
if CC = strNoEntry then
strCC = ""
else
strCC = CC
end if
else
' response.write "done"
end if
end if '*** if userType = 5 or userType = 8 then ***
if 0 then
response.write "Session(""TICKETNUMBER"")=[<font color=""green"">" & Session("TICKETNUMBER") & "</font>]<br />" & vbCrLf
response.write "strFrom=[<font color=""green"">" & strFrom & "</font>]<br />" & vbCrLf
response.write "strTo=[<font color=""green"">" & strTo & "</font>]<br />" & vbCrLf
response.write "strCC=[<font color=""green"">" & strCC & "</font>]<br />" & vbCrLf
response.write "strbCC=[<font color=""green"">" & strbCC & "</font>]<br />" & vbCrLf
response.write "strEmailBody=[<font color=""green"">" & strEmailBody & "</font>]<br />" & vbCrLf
response.write "blnSendEmail=[<font color=""green"">" & blnSendEmail & "</font>]<br />" & vbCrLf
end if
if blnSendEmail then
strSubject = "Desktop Services Request Form ( Ticket Number:" & Session("TICKETNUMBER") & " )" ' email subject
strBody = MakePage(strSubject,replace(strEmailBody,"$$$strSubject$$$",strSubject))
if 0 then
response.write "strFrom=[<font color=""green"">" & strFrom & "</font>]<br />" & vbCrLf
response.write "strTo=[<font color=""green"">" & strTo & "</font>]<br />" & vbCrLf
response.write "strCC=[<font color=""green"">" & strCC & "</font>]<br />" & vbCrLf
response.write "strbCC=[<font color=""green"">" & strbCC & "</font>]<br />" & vbCrLf
response.write "strSubject=[<font color=""green"">" & strSubject & "</font>]<br />" & vbCrLf
response.write "strBody=[<font color=""green"">" & strBody & "</font>]<br />" & vbCrLf
end if
'*** testing ***
' strTo = "DL-Bos-IT-DTS@company.com" ' recipient's email
'*** end of testing ***
' the following section creates the mail object and sends the mail
Set objSendMail = CreateObject("CDONTS.NewMail")
objSendMail.From = strFrom
objSendMail.To = strTo
objSendMail.CC = strCC
'objSendMail.BCC = "DL-Bos-IT-DTS@company.com"
objSendMail.Subject = TheSite & strSubject
objSendMail.Body = strBody
objSendMail.BodyFormat = CdoBodyFormatHTML
objSendMail.MailFormat = CdoMailFormatMime
objSendMail.Importance = CdoNormal
objSendMail.Send
Set objSendMail = Nothing
end if
if userType = 1 or userType = 2 then
strBody = "Thank you. Your request has been sent to Desktop Service.<br /><br />" & _
"The ticket number of your request is: " & _
"<b><font color=""brown"">" & Session("TICKETNUMBER") & "</font></b>. <br /><br />" & _
"You will also receive an email from Desktop Services with your ticket number.<br /><br />"
else
strUpdatedRecord = "Thank you. The record has been updated.<br /><br />"
strTicketList = "Click <b><a href=""/asp/dtsListRequest.asp""" & _
"title=""Ticket List""" & _
"onmouseover=""status='Ticket List';return true;""" & _
"onmouseout=""status='';return true;"">here</a></b> to go back to main page.<br />"
if blnSendEmail then
if strBody <> "" then
strBody = "Thank you. Your request has been sent as follows:<br /><br />" & strBody & "<br /><br />" & strTicketList
else
strBody = strUpdatedRecord & strTicketList
end if
else
strBody = strUpdatedRecord & strTicketList
if userType = 3 or userType = 4 then
strBody = strBody & strEmailBodyTemp
end if
end if
end if
If Manager_Original <> "" and blnNeedManagerApproval then
strBody = strTitle
end if
response.write strHTML_RGVStandardHeader & vbCrLf & _
"<br /><br /><center><table width=""70%""><tr><td>" & _
strBody & _
"</td></tr></table></center><br /><br /><br />" & _
strHTMLPath_Footer
end if
'*** handle file attachment ***
if userType = 1 or userType = 2 then
attachment = request("txtrUploadFile")
if 0 then
response.write "attachment =[" & attachment & "]<br />" & vbCrLf
' response.end
end if
if attachment = "" or isnull(attachment) then
else
'*** clean up deleted files ***
handleFileAttach attachment,session.sessionid
strSource = getMappathWWWRoot & "\template\upload\f" & session.sessionid & "\"
strTemp = "\html\it\dts\webformattach\t" & Session("TICKETNUMBER") & "\"
strDestination = getMappathWWWRoot & strTemp
strURLDestination = replace(strTemp,"\","/")
if 0 then
response.write "strSource =[" & strSource & "]<br />" & vbCrLf
response.write "strTemp =[" & strTemp & "]<br />" & vbCrLf
response.write "strDestination =[" & strDestination & "]<br />" & vbCrLf
response.write "strURLDestination =[" & strURLDestination & "]<br />" & vbCrLf
response.write "blnNeedManagerApproval =[" & blnNeedManagerApproval & "]<br />" & vbCrLf
response.write "checkFolderExists(strSource)=[" & checkFolderExists(strSource) & "]<br />" & vbCrLf
response.write "checkFolderExists(strDestination)=[" & checkFolderExists(strDestination) & "]<br />" & vbCrLf
end if
if not blnNeedManagerApproval then
if checkFolderExists(strSource) then
if not checkFolderExists(strDestination) then
if right(strDestination,1) = "\" then
strDestinationTemp = left(strDestination,len(strDestination) - 1)
else
strDestinationTemp = strDestination
end if
createNewFolder(strDestinationTemp)
end if
if 0 then
response.write "createNewFolder(strDestinationTemp) =[" & createNewFolder(strDestinationTemp) & "]<br />" & vbCrLf
end if
fileList = ShowFileList(strSource)
if 0 then
response.write "fileList =[" & fileList & "]<br />" & vbCrLf
end if
aryFileList = split(fileList,"<br />")
for i=0 to ubound(aryFileList)
FileNameTemp = trim(replace(aryFileList(i),vbCrLf,""))
if 0 then
response.write "FileNameTemp=[" & FileNameTemp & "]<br />" & vbCrLf
end if
copyFile strSource & FileNameTemp, strDestination & FileNameTemp
strSQL = " insert into fileattach values (getdate()," & Session("TICKETNUMBER") & ",'" & strURLDestination & FileNameTemp & "')"
if 0 then
response.write "strSQL=[" & strSQL & "]<br />" & vbCrLf
end if
set rsAttach = connDB_site.execute(strSQL)
set rsAttach = nothing
next
if 0 then
response.write "strSource=[" & left(strSource,len(strSource) -1 ) & "]<br />" & vbCrLf
end if
deleteFolder left(strSource,len(strSource) -1 )
end if
end if
end if
end if
%>
<!-- #include virtual="/asp/connDB_site_close.inc"-->
<%
if 0 then
DebugDisplaySession 3
DebugDisplayCookies 3
end if
%>
|
|
 |