• 4262阅读
  • 0回复

【原创】Lotus中,一个完整的计算邮箱空间的代理程序 [复制链接]

上一主题 下一主题
离线fanyu
 
只看楼主 正序阅读 楼主  发表于: 2005-09-21
用了三天的时间,终于搞定了,特拿出来与大家分享一下,也能让没见过LotusDomino的朋友了解一下。
Sub Initialize
     Print"<HEAD>"
     Print"<link rel='stylesheet' href='/InventStyle.css' type='text/css'"
     Print "</head>"
     Print "<BODY BACKGROUND='bg.gif'>"
     Dim size As Long
     Dim result As Double
     Dim showres As Integer
     size=0
     
     Dim session As New NotesSession
     Dim db As NotesDatabase
     Dim doc As NotesDocument
     Dim temp As NotesDocument
     Dim view As NotesView
     Set db=session.CurrentDataBase
     Set view=db.GetView("($All)")
     Set doc=view.getfirstdocument
     
     While Not(doc Is Nothing)
           size=size+doc.size      
           Set doc=view.getnextdocument(doc)
     Wend
     
     Set view=db.GetView("vMail_Todo")
     Set doc=view.getfirstdocument
     
     While Not(doc Is Nothing)
           size=size+doc.size      
           Set doc=view.getnextdocument(doc)
     Wend
     
     Set view=db.GetView("vMail_ToDoedByAll")
     Set doc=view.getfirstdocument
     
     While Not(doc Is Nothing)
           size=size+doc.size      
           Set doc=view.getnextdocument(doc)
     Wend
     
     result=Round(size/1024/1024,2)
     Print "<br>"
     Print "<div align=center><font size=2>已用空间是"+Str$(result)+" M</div><br>"
     showres=Round(result,0)
     Print "<div align=center>空间使用了"+Str$(Round(showres/100*100,0))+"%(限额100M)</div>"
     Print "<br></font>"
     'showres=100
     Print" <div align=center><table border='1'cellspacing='0' cellpadding='1' bordercolor='#C69E94'><tr><td width=100><IMG height=10 src='bar1.gif' width="+Str$(showres)+"></td></tr></table></div>"
     Print "<body>"
End Sub
快速回复
限100 字节
 
上一个 下一个