<%@ Language=VBScript %> <%option explicit%> <% Dim arrLanguage, objLookup, listLanguage, listProblemCode, strRegionInsert Dim arrProbCode, arrDynamicLabel, arrLabelValue, strProdCode, strRegion, arrFormProd Dim objCase, lngReturnCaseID, strContactName, strLoginID', strContactID Dim i, j, arrUDF, strSubmitUDF,strFontReqField, strFuncCheckReqField, strRetDynamicField Dim strIsNumericField, strX, nExtension,strSelect, strAllUDF, bValidate,strFoundError Dim dEnteredDate, sProblem, sDescription,g_arrAddCase,xmlhttp,visibleXMLDoc Dim xsldoc,sPath,dataToSend,sQueryString, strRedirect if Request.QueryString("post")=1 then Set objCase = server.CreateObject("PKSPprj.cCase") lngReturnCaseID = objCase.AddCase(join(Session("arrAddCase"),chr(9))) if lngReturnCaseID > 0 then If len(Session("sProdCode"))<>0 then dim arrAddActivity(),lngActID,objActivity redim arrAddActivity(6) arrAddActivity(0) = lngReturnCaseID arrAddActivity(1) = "CASE" arrAddActivity(2) = "NA" arrAddActivity(3) = "User performed Kanisa Search for " & Session("sProdCode") arrAddActivity(4) = NowGMT() arrAddActivity(5) =Session("sSearchText") arrAddActivity(6) ="KANISA" Set objActivity = server.CreateObject("PKSPprj.cActivity") lngActID = 0 lngActID = objActivity.AddActivity(join(arrAddActivity,chr(9)),g_sUserGUID) Set objActivity = Nothing Session("sProdCode")="" Session("sSearchText")="" Session("sSessionID")="" end if ResetCaseCache strRedirect = "/case/list_case.asp" call ResetCaseCache() StoreMessage "" & replace(GetMsg("v_addcasesuccess"),"_CASEID_",cStr(lngReturnCaseID)) & "", false Response.Redirect strRedirect else StoreMessage GetMsg("v_add_fail") , true end if Set objCase = Nothing end if g_arrAddCase = Session("arrAddCase") sQueryString=mid(g_arrAddCase(13),3,len(g_arrAddCase(13))-2) 'testing dataToSend="queryString=" & g_arrAddCase(11) & "&productId=" & g_arrAddCase(8) & "&userId=" & g_sUserGUID & "&userType=2" On Error Resume Next set xmlhttp = Server.CreateObject("msxml2.serverxmlhttp") xmlhttp.open "POST", "https://knowledgemap.nai.com/PHPClient/naisearchpage.aspx" , false xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded" xmlhttp.Send dataToSend if Err.number >0 then Set objCase = server.CreateObject("PKSPprj.cCase") lngReturnCaseID = objCase.AddCase(join(Session("arrAddCase"),chr(9))) if lngReturnCaseID > 0 then strRedirect = "/case/list_case.asp" StoreMessage "" & replace(GetMsg("v_addcasesuccess"),"_CASEID_",cStr(lngReturnCaseID)) & "" Session("sProdCode")="" Session("sSearchText")="" Session("sSessionID")="" ResetCaseCache end if Set objCase = Nothing Response.Redirect strRedirect else 'load response in to dom document Set visibleXMLDoc = CreateObject("msxml2.domdocument") visibleXMLDoc.async = false visibleXMLDoc.preserveWhiteSpace = true visibleXMLDoc.loadXML(xmlhttp.responseText) sPath=server.mappath("NAIDialogResponse.xsl") Set xsldoc=Server.CreateObject("msxml2.domdocument") xsldoc.async=false xsldoc.load(sPath) 'Response.Write visibleXMLDoc.TransformNode(xsldoc.documentElement) if visibleXMLDoc.ParseError.errorCode <> 0 or len(visibleXMLDoc.xml)=0 then Set objCase = server.CreateObject("PKSPprj.cCase") lngReturnCaseID = objCase.AddCase(join(Session("arrAddCase"),chr(9))) if lngReturnCaseID > 0 then strRedirect = "/case/list_case.asp" StoreMessage "" & replace(GetMsg("v_addcasesuccess"),"_CASEID_",cStr(lngReturnCaseID)) & "" Session("sProdCode")="" Session("sSearchText")="" Session("sSessionID")="" ResetCaseCache end if Set objCase = Nothing Response.Redirect strRedirect End If end if %> <%call WriteTopHTMLAboveTabs(GetMsg("v_pagetitle"),"")%> <%call WriteTopHTMLBelowTabs(True,GetMsg("hd_pagename"))%>
<%=GetMsg("v_kanisa_product")%> <%=Session("strProdDesc")%>
<%=GetMsg("v_kanisa_prod_version")%> <%=g_arrAddCase(22)%>
<%=GetMsg("v_kanisa_subject")%> <%=g_arrAddCase(11)%>
<%=GetMsg("v_kanisa_detail")%> <%=sQueryString%>
 
" border="0" WIDTH="76" HEIGHT="18" > " border="0" WIDTH="83" HEIGHT="18" id=image1 name=image1> " border="0" WIDTH="76" HEIGHT="18" id=image3 name=image3>
 
<%=GetMsg("v_kanisa_article")%>
<%Response.Write visibleXMLDoc.TransformNode(xsldoc.documentElement)%>
 
" border="0" WIDTH="76" HEIGHT="18" >  " border="0" WIDTH="83" HEIGHT="18">   " border="0" WIDTH="76" HEIGHT="18" id=image3 name=image3>
<%call WriteBottomHTML()%> <%set objLookup = Nothing %>