home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 2000 March / VPR0003B.ISO / i386 / iibkuphd.asp < prev    next >
Text File  |  1999-10-14  |  6KB  |  263 lines

  1. <%@ LANGUAGE=VBScript %>
  2. <% Option Explicit %>
  3. <% Response.Expires = 0 %>
  4.  
  5. <% if Session("FONTSIZE") = "" then %>
  6.     <!--#include file="iito.inc"-->
  7. <% else %>
  8.  
  9. <% 
  10. Const L_PREVBACKUPS_TEXT = "以前のバックアップ"
  11. Const L_BACKUPNAME_TEXT = "名前"
  12. Const L_BACKUPDATE_TEXT = "日付"
  13. Const L_NUM_TEXT = "#"
  14. Const L_SAMPLEBACKUP_TEXT = "MyBackup"
  15. Const L_GETNAME_TEXT = "バックアップした構成の名前"
  16. Const L_SELECTITEM_TEXT = "削除するバックアップを選択してください。"
  17.  
  18. On Error Resume Next
  19.  
  20.  
  21. function heading(width,thestring)
  22.     Dim i
  23.     width=width - len(thestring)
  24.     for i=width to 0 step -1
  25.         thestring=thestring & " "
  26.     Next
  27.     heading=thestring
  28. end function
  29. %>
  30.  
  31. <HTML>
  32. <HEAD>
  33.     <TITLE></TITLE>
  34. </HEAD>
  35.  
  36. <BODY BGCOLOR="#CCCCCC" LINK="#000000" VLINK="#000000" TOPMARGIN=10 TEXT="#000000" onLoad="setList();loadHelp();">
  37. <FORM NAME="userform">
  38.  
  39. <TABLE WIDTH=490 BORDER=0>
  40.     <TR>
  41.         <TD COLSPAN=3 STYLE="font-size:10pt;">
  42.             <FONT SIZE=2>
  43.                 <%= L_PREVBACKUPS_TEXT %>
  44.                 <BR> 
  45.             </FONT>
  46.         </TD>
  47.     </TR>
  48. </TABLE>
  49.  
  50. <TABLE BORDER=1 BORDERCOLORDARK="#CCCCCC" BORDERCOLORLIGHT="#CCCCCC" CELLSPACING=0 CELLPADDING=2>
  51. <TR>
  52. <TD BORDERCOLOR="#CCCCCC" BORDERCOLORDARK="#FFFFFF" BORDERCOLORLIGHT="#000000" STYLE="font-size:10pt;"><FONT SIZE=2>
  53.     <A HREF="javascript:sortList('blocation','str');">
  54.     <% if Session("FONTSIZE")="LARGE" then %>
  55.         <%= heading(31,L_BACKUPNAME_TEXT) %>
  56.     <% else %>
  57.         <%= heading(31,L_BACKUPNAME_TEXT) %>    
  58.     <% end if %>
  59.     </A>
  60.     </FONT>
  61. </TD>
  62. <TD BORDERCOLOR="#CCCCCC" BORDERCOLORDARK="#FFFFFF" BORDERCOLORLIGHT="#000000" STYLE="font-size:10pt;"><FONT SIZE=2>
  63.     <A HREF="javascript:sortList('bversion','str');">
  64.     <% if Session("FONTSIZE")="LARGE" then %>
  65.         <%= heading(1,L_NUM_TEXT) %>
  66.     <% else %>
  67.         <%= heading(1,L_NUM_TEXT) %>    
  68.     <% end if %>
  69.     </A>
  70.     </FONT>
  71. </TD>
  72. <TD  BORDERCOLOR="#CCCCCC" BORDERCOLORDARK="#FFFFFF" BORDERCOLORLIGHT="#000000" STYLE="font-size:10pt;"><FONT SIZE=2>
  73.     <A HREF="javascript:sortList('bdate','str');">
  74.     <% if Session("FONTSIZE")="LARGE" then %>
  75.         <%= heading(36,L_BACKUPDATE_TEXT) %>
  76.     <% else %>
  77.         <%= heading(36,L_BACKUPDATE_TEXT) %>    
  78.     <% end if %>        
  79.     </A>
  80.     </FONT>
  81. </TD>
  82. </TR>
  83. </TABLE>
  84.  
  85. </FORM>
  86.  
  87. <FORM name="hiddenform">
  88.     <INPUT TYPE="hidden" NAME="index" VALUE=-1>
  89. </FORM>
  90. </BODY>
  91. <SCRIPT LANGUAGE="JavaScript">
  92.  
  93.     function loadHelp(){
  94.         top.title.Global.helpFileName="iipx_1";
  95.     }
  96.  
  97.     function setList(){
  98.         parent.list.location.href="iibkupls.asp?text=Loading...";
  99.         top.hlist.location.href = "iibkupset.asp";
  100.     }
  101.  
  102.     function loadList(){
  103.         parent.list.location.href="iibkupls.asp";
  104.     }
  105.  
  106.     function addItem(){
  107.         i=cachedList.length
  108.         blocation = prompt("<%= L_GETNAME_TEXT %>","<%= L_SAMPLEBACKUP_TEXT %>");
  109.         
  110.             if ((blocation != "") && (blocation != null)){    
  111.                 top.hlist.location.href = "iiaction.asp?a=Backup&bkupName=" + escape(blocation);        
  112.                 listFunc.id =i;
  113.         }
  114.  
  115.     }
  116.  
  117.     function delItem(){
  118.         if (listFunc.id  >= 0){
  119.             i=eval(listFunc.id );            
  120.             blocation = escape(cachedList[i].blocation);
  121.             bversion = escape(cachedList[i].bversion);        
  122.             top.hlist.location.href = "iiaction.asp?a=BackupRmv&bkupName=" + blocation + "&bkupVer=" + bversion;        
  123.         }
  124.         else{
  125.             alert("<%= L_SELECTITEM_TEXT %>");
  126.         }
  127.  
  128.     }
  129.     function setLastSel(id){
  130.         for (var i=0; i < cachedList.length; i++) {
  131.             if (cachedList[i].id == id){
  132.                 listFunc.id = i;
  133.                 return;
  134.             }
  135.         }
  136.         
  137.     }
  138.     
  139.     function sortList(sortby,sorttype)
  140.         {
  141.         i=eval(listFunc.id);
  142.  
  143.         if (i != -1)
  144.         {
  145.             lastsel = cachedList[i].id;
  146.         }
  147.         
  148.         if (sortby != listFunc.sortby)
  149.             {
  150.             listFunc.sortby = sortby;
  151.             listFunc.sortAsc = true;
  152.             }
  153.         else
  154.             {
  155.             listFunc.sortAsc = !listFunc.sortAsc;
  156.             }
  157.  
  158.         if (sorttype == "str")
  159.             {
  160.             cachedList.sort(sortOrder);
  161.             }
  162.         else
  163.             { 
  164.             cachedList.sort(numOrder);
  165.             }
  166.                         
  167.         if (!listFunc.sortAsc)
  168.             {
  169.             cachedList.reverse();
  170.             }
  171.             
  172.         if (i != -1)
  173.         {
  174.             setLastSel(lastsel);            
  175.         }
  176.         loadList();
  177.         }
  178.  
  179.     function sortOrder(a,b)
  180.         {
  181.         if (a[listFunc.sortby] < b[listFunc.sortby])
  182.             {
  183.             return -1;
  184.             }
  185.         else
  186.             {
  187.             if (a[listFunc.sortby] > b[listFunc.sortby])
  188.                 {
  189.                 return 1;
  190.                 }
  191.             else
  192.                 {
  193.                 return 0;
  194.                 }
  195.             }
  196.         }
  197.  
  198.  
  199.     function buildListForm(){
  200.         numrows=0;
  201.         for (var i=0; i < cachedList.length; i++) {
  202.             numrows=numrows + 1;
  203.         }
  204.         qstr="numrows="+numrows;
  205.         qstr=qstr+"&cols=ServerBindings&cols=SecureBindings"
  206.  
  207.         top.hlist.location.href="iihdn.asp?"+qstr;
  208.         <% 'the list values will be grabbed by the hiddenlistform script... %>
  209.     }
  210.  
  211.     function SetListVals(){
  212.  
  213.     }
  214.     
  215.  
  216.     function SetLocale(datestr){
  217.  
  218.         thisdate = new Date(datestr);
  219.         thisyear = thisdate.getFullYear();
  220.         if (thisyear < 1980) {
  221.             thisdate.setFullYear(thisyear + 100);
  222.         }
  223.         tzdiff=thisdate.getTimezoneOffset()
  224.         hrsdiff=parseInt(tzdiff/60)
  225.         mindiff=tzdiff%(hrsdiff*60)
  226.         thisdate.setHours(thisdate.getHours() - hrsdiff);
  227.         thisdate.setMinutes(thisdate.getMinutes() - mindiff);
  228.     
  229.         return thisdate.toLocaleString(); 
  230.     }    
  231.  
  232.     function listFuncs(){
  233.         this.id = -1;
  234.         this.addItem=addItem;
  235.         this.delItem=delItem;
  236.         this.loadList=loadList;
  237.         this.writeList=buildListForm;
  238.         this.SetListVals=SetListVals;
  239.         this.mainframe = top.opener.top;        
  240.     }
  241.  
  242.     function listObj(i,d,l,v){
  243.         this.id = i;
  244.         this.blocation=l;
  245.         this.bversion=v;        
  246.         var tempdate = new Date();
  247.         tempdate.setTime(d);
  248.         this.bdate = tempdate.toLocaleString();
  249.         this.deleted=false;
  250.         this.newitem=false;
  251.         this.updated=false;
  252.     }
  253.  
  254.     cachedList=new Array()
  255.  
  256.     listFunc=new listFuncs();
  257.  
  258. </SCRIPT>
  259.  
  260. </HTML>
  261.  
  262. <% end if %>
  263.