home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 November / Chip_2002-11_cd1.bin / zkuste / vbasic / Data / Utils / WME71SDK.exe / RCDATA / CABINET / loadencoder.asp < prev    next >
Text File  |  2001-04-26  |  2KB  |  85 lines

  1. <%@ Language=VBScript CODEPAGE=65001 %>
  2. <HTML>
  3. <HEAD>
  4. <meta NAME="GENERATOR" Content="Microsoft FrontPage 4.0">
  5. <meta http-equiv="Content-Language" content="en-us">
  6. <meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
  7. <SCRIPT LANGUAGE=javascript>
  8. <!--
  9.  
  10. function Error_Display(iNum,sDesc){
  11.     if (iNum!=0){
  12.         alert(sDesc)
  13.         }     
  14.  
  15.     }
  16. //-->
  17.  
  18. </SCRIPT>
  19. <TITLE>
  20.     Load Encoder 
  21. </TITLE>
  22. </HEAD>
  23. <BODY>
  24. <%on Error Resume Next
  25. if Request.Form("hOpt")=0 then
  26.  
  27.         Response.Write("You chose To Cancel The Creation Of The New Encoder")%>
  28.     <BR>
  29.     <BR>
  30.     <A href=RemoteControl.htm>Return To The  Statistics Page</A>
  31. <%else
  32.         Path=Request.Form("tPath")
  33.         EncName=Request.Form("tName")
  34.         set AgentLoc=Session("AgentLocSess")
  35.         if Err.number <> 0 then
  36.             ErrorNum=1
  37.             ErrorDesc=Err.description
  38.             Err.Clear
  39.         end if
  40.         MchName=Session("MchNameSess")
  41.         
  42.         set EncAgent=AgentLoc.GetAgent(MchName)
  43.         if Err.number <> 0 then
  44.             ErrorNum=1
  45.             ErrorDesc=Err.description
  46.             Err.Clear
  47.         end if
  48.         set Session(EncName)=EncAgent.CreateEncoder(EncName) 
  49.         if Err.number <> 0 then
  50.             ErrorNum=1
  51.             ErrorDesc=Err.description
  52.             Err.Clear
  53.         end if    
  54.         set Encoder=EncAgent.GetEncoder(EncName)
  55.         Encoder.Load Path
  56.         Encoder.Name=EncName
  57.         if Err.number <> 0 then
  58.             ErrorNum=1
  59.             ErrorDesc=Err.description
  60.             Err.Clear
  61.         end if
  62.         Encoder.PrepareToEncode(True)
  63.         if Err.number <> 0 then
  64.             ErrorNum=1
  65.             ErrorDesc=Err.description
  66.             Err.Clear
  67.         end if
  68.         if ErrorNum<>0 then
  69.             set Session(EncName)=nothing%>
  70.             <SCRIPT LANGUAGE=javascript>
  71.             <!--
  72.                 Error_Display ("<%=ErrorNum%>","<%=ErrorDesc%>")
  73.             //-->
  74.             </SCRIPT>
  75.  
  76.         <%else
  77.             Response.Write("Encoder Sucessfully Created")
  78.         end if%>
  79.         <BR>
  80.         <BR>
  81.         <A href=RemoteControl.htm>Return To The  Statistics Page</A>
  82. <%end if%>            
  83. </BODY>
  84. </HTML>
  85.