home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 February / CHIP_2_98.iso / software / pelne / optionp / iis4_03.cab / iierrls.asp < prev    next >
Text File  |  1997-11-12  |  6KB  |  231 lines

  1. <%@ LANGUAGE=VBScript %>
  2. <% Option Explicit %>
  3. <% Response.Expires = 0 %>
  4.  
  5. <% 
  6. Const L_BROWSE_TEXT="Browse"
  7. Const L_FILE_TEXT="File"
  8. Const L_URL_TEXT="URL"
  9. Const L_DEFAULT_TEXT="Default"
  10. %>
  11.  
  12. <% if Request.Querystring("text") <> "" then %>
  13. <HTML>
  14. <BODY BGCOLOR="#FFFFFF" LEFTMARGIN=0 TOPMARGIN=0>
  15. <FONT SIZE=1 FACE='Helv,ARIAL'>
  16.     <%= Request.Querystring("text") %>
  17. </FONT>
  18. </BODY>
  19. </HTML>
  20. <% else %>
  21.  
  22.     
  23.     <HTML>
  24.     <HEAD>
  25.         <TITLE></TITLE>
  26.     
  27.         <SCRIPT LANGUAGE="JavaScript">
  28.         
  29.         function chgStatus(indexnum){
  30.             parent.head.document.hiddenform.index.value=indexnum
  31.             self.location.href="iierrls.asp"            
  32.         }
  33.             
  34.         function SetUpdated(){
  35.             reload=false;
  36.             top.title.Global.updated="true";
  37.             i=parent.head.document.hiddenform.index.value
  38.     
  39.             if (document.listform.editMe.selectedIndex==0){
  40.                 reload=true;
  41.                 parent.head.cachedList[i].outType="";
  42.                 parent.head.cachedList[i].msgPath=parent.head.cachedList[i].msgDefault;
  43.             }
  44.             else{
  45.                 if (parent.head.cachedList[i].outType==""){    
  46.                     reload=true;
  47.                 }
  48.                 else{
  49.                     document.listform.msgPath.value="";
  50.     
  51.                 }            
  52.                 parent.head.cachedList[i].msgPath="";
  53.     
  54.                 
  55.                 if(document.listform.editMe.selectedIndex==1){
  56.                     parent.head.cachedList[i].outType="FILE";                
  57.                 }
  58.                 else{
  59.                     parent.head.cachedList[i].outType="URL";            
  60.                 }
  61.             }
  62.             parent.head.cachedList[i].updated=true;
  63.             if (reload){
  64.                 chgStatus(i);
  65.             }
  66.         }
  67.         
  68.         function SetPath(){
  69.             top.title.Global.updated="true";
  70.             i=parent.head.document.hiddenform.index.value
  71.             parent.head.cachedList[i].msgPath=document.listform.msgPath.value;
  72.             
  73.             if (parent.head.cachedList[i].outType=="FILE"){    
  74.                 chkPath(document.listform.msgPath);
  75.             }        
  76.         }
  77.         
  78.         function chkPath(pathCntrl){
  79.             if (pathCntrl.value != ""){
  80.                 top.connect.location.href = "iichkpath.asp?path=" + escape(pathCntrl.value) + "&ptype=1";            
  81.             }
  82.         }
  83.         
  84.         function pathBrowser(){
  85.             JSBrowser=new BrowserObj(document.listform.msgPath,POP,TFILE,<%= Session("FONTSIZE") %>);
  86.         }    
  87.         
  88.         function displayVal(dispstr, altstr){
  89.             if (dispstr == ""){
  90.                 dispstr = altstr;
  91.             }
  92.             return dispstr;
  93.         }
  94.         
  95.         function writeCol(colspan,w,str){
  96.                 var writestr = "<TD";
  97.                 if (colspan != ""){
  98.                     writestr += " COLSPAN = " + colspan;
  99.                 }
  100.                 if (w != ""){
  101.                     writestr += " WIDTH = " + w;
  102.                 }        
  103.                 <% if Session("IsIE") then %>
  104.                 writestr += " STYLE = 'font-face: Helv; font-size: 8pt;'";
  105.                 <% end if %>
  106.         
  107.                 writestr += "><FONT SIZE = 1 FACE = 'Helv,ARIAL'>" + str + "</FONT></TD>";
  108.         
  109.                 return writestr;    
  110.         }    
  111.         
  112.         </SCRIPT>
  113.         
  114.  
  115.         <SCRIPT SRC="JSBrowser/JSBrowser.js">
  116.         </SCRIPT>    
  117.         
  118.     </HEAD>
  119.     
  120.     <BODY BGCOLOR="#FFFFFF" LEFTMARGIN=0 TOPMARGIN=0>
  121.     
  122.     <FORM NAME="listform">
  123.     
  124.     
  125.     
  126.     <SCRIPT LANGUAGE="JavaScript">
  127.         editOK=false;
  128.         sel=eval(parent.head.document.hiddenform.index.value);
  129.     
  130.         writestr = "<TABLE BORDER=0 CELLPADDING=2 CELLSPACING=0>";
  131.         for (var i=0;i < parent.head.cachedList.length; i++) {
  132.     
  133.             iconstr = "<IMG border=0 SRC='"
  134.             if (parent.head.cachedList[i].outType=="FILE"){
  135.                 iconstr += "images/file.gif' ";
  136.             }
  137.             else{
  138.                 if (parent.head.cachedList[i].outType=="URL"){
  139.                     iconstr += "images/url.gif' ";        
  140.                 }
  141.                 else{
  142.                     iconstr += "images/space.gif' ";                        
  143.                 }
  144.             }    
  145.             iconstr += "WIDTH=13 HSPACE = 3 ALIGN=top>";
  146.             
  147.             if (parent.head.document.hiddenform.index.value !=i) {        
  148.                 writestr += "<TR>"
  149.                 writestr += writeCol(1,85,"<A HREF='javascript:chgStatus("+i+");'>" + iconstr + parent.head.cachedList[i].errcode + "</A>");        
  150.     
  151.                 if (parent.head.cachedList[i].outType=="FILE"){
  152.                     etype = "<%= L_FILE_TEXT %>";
  153.                 }
  154.                 else{
  155.                     if (parent.head.cachedList[i].outType=="URL"){
  156.                         etype = "<%= L_URL_TEXT %>";
  157.                     }
  158.                     else{
  159.                         etype = "<%= L_DEFAULT_TEXT %>";
  160.                     }
  161.                 }
  162.                 
  163.                 writestr += writeCol(1,70,etype);
  164.                 writestr += writeCol(1,300,parent.head.cachedList[i].msgPath);        
  165.                 writestr += "</TR>";
  166.             }
  167.             else{
  168.     
  169.                 writestr += "<TR BGCOLOR=#DDDDDD>"
  170.                 writestr += writeCol(1,85,"<A HREF='javascript:chgStatus("+i+");'>" + iconstr + parent.head.cachedList[i].errcode + "</A>");        
  171.                 
  172.                 sel = "<SELECT NAME='editMe' onChange='SetUpdated();'>";
  173.                 editOK=true;    
  174.                 if (parent.head.cachedList[i].outType=="FILE"){
  175.                     options = "<OPTION><%= L_DEFAULT_TEXT %>"    
  176.                     options += "<OPTION SELECTED><%= L_FILE_TEXT %>"
  177.                     if (parent.head.cachedList[i].types !=1){
  178.                         options += "<OPTION><%= L_URL_TEXT %>"
  179.                     }
  180.                 }
  181.                 else{
  182.                     if (parent.head.cachedList[i].outType=="URL"){
  183.                         options = "<OPTION><%= L_DEFAULT_TEXT %>"
  184.                         options += "<OPTION><%= L_FILE_TEXT %>"
  185.                         options += "<OPTION SELECTED><%= L_URL_TEXT %>"
  186.                     }
  187.                     else{
  188.                         options = "<OPTION SELECTED><%= L_DEFAULT_TEXT %>"
  189.                         options += "<OPTION><%= L_FILE_TEXT %>"
  190.                         if (parent.head.cachedList[i].types !=1){                
  191.                             options += "<OPTION><%= L_URL_TEXT %>"
  192.                         }
  193.                     }
  194.                 }            
  195.                 writestr += writeCol(1,70,sel + options + "</SELECT>");
  196.                 
  197.                 if (parent.head.cachedList[i].outType != ""){        
  198.                     if (parent.head.cachedList[i].outType=="FILE"){
  199.                         writestr += writeCol(1,300,"<INPUT NAME='msgPath' VALUE='"+parent.head.cachedList[i].msgPath +"' SIZE=35 onBlur='SetPath();'>  <% if Session("canBrowse") then %><A HREF='javascript:pathBrowser();'><IMG SRC='images/browse.gif' BORDER=0></A><% end if %>");
  200.                     }
  201.                     else{            
  202.                         writestr += writeCol(1,300,"<INPUT NAME='msgPath' VALUE='"+parent.head.cachedList[i].msgPath +"' SIZE=35 onBlur='SetPath();'>");
  203.                     }
  204.                 }
  205.                 else{
  206.                     writestr += writeCol(1,300,parent.head.cachedList[i].msgPath);
  207.                 }
  208.     
  209.                 writestr += "</TR>"
  210.             }
  211.         }
  212.         writestr += "</TABLE>";
  213.         document.write(writestr);            
  214.     
  215.     </SCRIPT>
  216.     
  217.     <P> 
  218.     <P> 
  219.     </FORM>
  220.     
  221.     <SCRIPT LANGUAGE="JavaScript">
  222.  
  223.         if (editOK){
  224.         document.listform.editMe.focus();
  225.         }
  226.  
  227.     </SCRIPT>
  228.     
  229.     </BODY>
  230.     </HTML>
  231. <% end if %>