home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2007 April / PCpro_2007_04.ISO / files / dsl / NVinst.exe / Scripts / Scripter / HtmlNetPlaces.nvs < prev    next >
Encoding:
Text File  |  2007-02-10  |  6.2 KB  |  135 lines

  1. {
  2. HTML Network Places by Andrei Bandarovich
  3. Based on
  4. HTML report script by KillerR
  5. }
  6. {
  7. WebCenter NetPlaces helper script
  8. }
  9. const HTML_FILE='';//Path and name of result report file.
  10.                    //If empty default to nv_directory+\Scripts\HTTP\DefaultHost\HtmlNetPlaces\index.html';
  11.  
  12. var e,i1,i2:integer;
  13.     tabs:TStringList;
  14. procedure goreport;
  15. var honli,hli,fn,ts,ctime:string;
  16.     hst:tnvhost;
  17.     hon,i,f,flg:integer;
  18.     dtm:TDateTime;
  19. begin
  20. hon:=0;
  21. hst:=tnvhost.create;
  22. if length(HTML_FILE)=0 then fn:=nv_directory+'Scripts\HTTP\DefaultHost\HtmlPlaces\index.html'
  23.                        else fn:=HTML_FILE;
  24. CreateDirectory(ExtractFilePath(fn));
  25. f:=openfile(fn,11);
  26. dtm:=Now;
  27. tabs.clear;
  28.  
  29. writefile(f,'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">');
  30. writefile(f,'<html>');
  31. writefile(f,'<head>');
  32. writefile(f,'    <META http-equiv="Refresh" content="60">')
  33. writefile(f,'    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1251">');
  34. writefile(f,'    <META name="Content-Type" content="text/html; charset=windows-1251">');
  35. writefile(f,'    <title>╤σ≥σΓεσ εΩ≡≤µσφΦσ [4net-bsu]</title>');
  36. writefile(f,' ');
  37. writefile(f,'<STYLE>    body { Font-Family: Verdana,Arial,Helvetica;} A:VISITED { font-size:8pt; color:black; Text-Decoration:none;} A { font-size:8pt; color:black; Text-Decoration:none;} A:Hover { Text-Decoration:underline; Color:#ff9900 } .Font8tb { font-size:8pt; color:3F3D3D; font-weight : bold; } .Font8t { font-size:8pt; color:3F3D3D; } .pc_on { position: relative; width: 80px; height: 80px; float: left; padding-bottom : 5px; } </STYLE>');
  38. writefile(f,'</head>');
  39. writefile(f,'<body bottommargin="0" leftmargin="0" marginheight="0" marginwidth="0" rightmargin="0" topmargin="0">');
  40. writefile(f,'<table border="0" cellpadding="10" cellspacing="0" width="100%" bgcolor="#ffffff" height="100%">');
  41. writefile(f,'<tr valign="top">');
  42. writefile(f,'    <td bgcolor="BBBECE" width="225" valign="top" align="center">');
  43. writefile(f,'        <table width="213" cellpadding="0" cellspacing="0" border="0">');
  44. writefile(f,'            <tr valign="top">');
  45. writefile(f,'                <td width="213" height="23" valign="middle" background="cat_bkg.gif" class="Font8tb">   ═αΓΦπα÷Φ </td>');
  46. writefile(f,'            </tr>');
  47. writefile(f,'            <tr valign="top">');
  48. writefile(f,'                <td width="213" valign="top" bgcolor="F0F1F5">');
  49. writefile(f,'                    <table width="213" cellpadding="10" cellspacing="0" border="1" bordercolor="FFFFFF">');
  50. writefile(f,'                        <tr>');
  51. writefile(f,'                            <td class="Font8t">╫≥εß√ ταΘ≥Φ φα Ωε∞∩ⁿ■≥σ≡ Φ ∩≡ε±∞ε≥≡σ≥ⁿ ε≥Ω≡√≥√σ ≡σ±≤≡±√, φαµ∞Φ≥σ φα ΦΩεφΩ≤ ΦδΦ ≥σΩ±≥ ∩εΣ φσΘ εΣΦφ ≡ατ.</td>');
  52. writefile(f,'                        </tr>');
  53. writefile(f,'                    </table>');
  54. writefile(f,'                </td>');
  55. writefile(f,'            </tr>');
  56. writefile(f,'        </table><br>');
  57. writefile(f,'        <table width="213" cellpadding="0" cellspacing="0" border="0">');
  58. writefile(f,'            <tr valign="top">');
  59. writefile(f,'                <td width="213" height="23" valign="middle" background="cat_bkg.gif" class="Font8tb">   ╚φ⌠ε≡∞α÷Φ  ε ±Φ±≥σ∞σ</td>');
  60. writefile(f,'            </tr>');
  61. writefile(f,'            <tr valign="top">');
  62. writefile(f,'                <td width="213" valign="top" bgcolor="F0F1F5">');
  63. writefile(f,'                    <table width="213" cellpadding="10" cellspacing="0" border="1" bordercolor="FFFFFF">');
  64. writefile(f,'                        <tr>');
  65. writefile(f,'                            <td class="Font8t">╤Φ±≥σ∞α φαΓΦπα÷ΦΦ ∩ε ≡σ±≤≡±α∞ Ωε∞∩ⁿ■≥σ≡φεΘ ±σ≥Φ - ∩≡επ≡α∞∞φ√Θ Ωε∞∩δσΩ±, ∩ετΓεδ ■∙ΦΘ ≤δ≤≈°Φ≥ⁿ ±Ωε≡ε±≥ⁿ Φ ≤Σεß±≥Γε Φ±∩εδⁿτεΓαφΦ  ≡σ±≤≡±εΓ ±σ≥Φ. ┬═╚╠└═╚┼! ╧εΩα φσΩε≡≡σΩ≥φε εß≡αßα≥√Γα■≥±  εß≡α∙σφΦ  Ω Ωε∞∩ⁿ■≥σ≡α∞ Γ Opera Φ Mozilla. ─δ  ≡αßε≥√ ± ±σ≡ΓΦ±ε∞ Φ±∩εδⁿτ≤Θ≥σ Internet Explorer.<br><br>╥σΩ≤∙α  Γσ≡±Φ : 1.4</td>');
  66. writefile(f,'                        </tr>');
  67. writefile(f,'                    </table>');
  68. writefile(f,'                </td>');
  69. writefile(f,'            </tr>');
  70. writefile(f,'        </table>');
  71. writefile(f,'    </td>');
  72. writefile(f,'    <td width="100%" valign="top">');
  73.  
  74. hst.nextid:=0;
  75. repeat
  76. hst.gethost(hst.nextid,0);
  77. if(hst.id<>0)then
  78. begin
  79. flg:=strtoint(hst.getmetavar('flags'));
  80. ctime:=hst.getmetavar('ctime');
  81. if(flg and $1)=1 then
  82. begin
  83. if(hst.getmetavar('ison')='on')then hon:=hon+1;
  84. if(hst.getmetavar('ison')='on')then ts:='<div class="pc_on" align="center">' else ts:='';
  85. if(hst.getmetavar('ison')='on')then
  86.  begin
  87.  if(hst.hip='10.10.1.1') or (hst.hip='10.3.0.1') or (hst.hip='10.6.0.1')then
  88.   ts:=ts+'<img src="svon.gif" alt="" width="43" height="38" border="0"><br><font class="Font8t"><font color="#339900">'+hst.hname+'</font></font></div>'
  89.   else
  90.   ts:=ts+'<a title="╧σ≡σΘ≥Φ Ω ∩≡ε±∞ε≥≡≤ ε≥Ω≡√≥√⌡ ≡σ±≤≡±εΓ Ωε∞∩ⁿ■≥σ≡α" href="file://'+hst.hip+'/" target="_blank"><img src="pcon.gif" alt="" width="43" height="38" border="0"></a><br><a class="pc_link" title="╧σ≡σΘ≥Φ Ω ∩≡ε±∞ε≥≡≤ ε≥Ω≡√≥√⌡ ≡σ±≤≡±εΓ Ωε∞∩ⁿ■≥σ≡α" href="file://'+hst.hip+'" target="_blank">'+hst.hname+'</a></div>'
  91.  end else ts:=ts+'';
  92. tabs.add(hst.hname+'#'+ts);
  93. end;
  94. {
  95. if((flg and $400)<>0) or ((flg and $1000)<>0) then
  96.  begin
  97.  if(hst.getmetavar('ison')='on')then ts:='<TR bgcolor="#E8F0F5">' else ts:='<TR>';
  98.  ts:=ts+'<td width=200 class="Font8g"><a href="ftp://'+hst.hname+'" target="_blank">ftp://'+hst.hname+'</a></td>';
  99.  ts:=ts+'<td width=100 class="Font8g" align="center">'+hst.hip+'</td>';
  100.  ts:=ts+'</TR>';
  101.  tabs.add(hst.hname+'#'+ts);
  102.  end;}
  103. end;
  104. until hst.nextid=0;
  105. tabs.Sort;
  106. for i:=0 to tabs.count-1 do
  107.  begin
  108.  ts:=tabs.strings[i];
  109.  delete(ts,1,pos('#',ts));
  110.  writefile(f,ts);
  111.  end;
  112. honli:=inttostr(hon);
  113. hli:=inttostr(i);
  114. writefile(f,'    </td>');
  115. writefile(f,'</tr>');
  116. writefile(f,'</table>');
  117. writefile(f,'</body>');
  118. writefile(f,'</html>');
  119. closefile(f);
  120. hst.free;
  121. end;
  122.  
  123. begin
  124. tabs:=TStringList.Create;
  125. goreport;
  126. repeat
  127. e:=waitevent(i1,i2);
  128. if(e=NMNP_ACTION)then
  129. begin
  130. if((i1 and NVACTION_LIST)<>0) and (((i1 and NVACTION_RECHECK)<>0)or((i1 and NVACTION_GETFROMFILE)<>0)or((i1 and NVACTION_GETFROMNET)<>0)) then goreport;
  131. end;
  132. until e=0;
  133. tabs.Free;
  134. end.
  135.