Exchange Server關於文件屬性擴充

來源:互聯網
上載者:User
server

1,自訂一個內容類別如:urn:contentclasses:document1
其中有自訂屬性:Clicknumber
2,所建的文檔的內容類別定義為1的。
3,建立一個表單註冊
urn:schemas-microsoft-com:office:forms#contentclass 為1建立的urn:contentclasses:document1
urn:schemas-microsoft-com:office:forms#cmd  為*
urn:schemas-microsoft-com:office:forms#formurl  為chkopen.asp
urn:schemas-microsoft-com:office:forms#executeurl  為chkopen.asp

urn:schemas-microsoft-com:office:forms#binding   server

4,list.asp
<%
Function AddQuotes(strValue)
     Const QUOTE = """"
   AddQuotes = _
      QUOTE _
      & Replace(strValue, QUOTE, QUOTE & QUOTE) _
      & QUOTE
End Function
Dim cnn 'As ADODB.Connection
Dim rst 'As ADODB.Recordset
Dim urlFld 'As String
Dim strSQL 'As String

urlFld ="http://aaa.com/fld1/"
Set cnn = CreateObject("ADODB.Connection")
With cnn
   .Provider = "exoledb.datasource"
   .Open urlFld
End With
strSQL = "Select " & _
   AddQuotes("DAV:displayname") & ", " & _
   AddQuotes("DAV:contentclass") & ", " & _
   AddQuotes("Clicknumber") & ", " & _
   AddQuotes("DAV:href")
strSQL = strSQL & _
   " FROM SCOPE('SHALLOW traversal of " & _
   AddQuotes(urlFld) & "')"
strSQL = strSQL & _
   " WHERE " & AddQuotes("DAV:contentclass") & _
   " = 'urn:contentclasses:document1'"
strSQL = strSQL & _
   " ORDER BY " & AddQuotes("DAV:displayname")
Set rst = CreateObject("ADODB.Recordset")
With rst
   .Open strSQL, cnn
End With


response.Write "<table>"

Do Until rst.EOF
   response.Write "<tr><td width=200>"
   %>
     <a href="../fld1/<%=rst.Fields("DAV:displayname")%>"></a>
<%
   response.Write "</td></tr>"
   rst.MoveNext
Loop

response.Write "</table>"
rst.Close
cnn.Close
Set rst = Nothing
Set cnn = Nothing
%>


5,chkopen.asp

<%
Dim rec
dim ii
Dim cnn
Dim strUrl

strDataUrl = request.querystring("dataurl")
Set cnn = CreateObject("adodb.connection")
With cnn
   .Provider = "exoledb.datasource"
   .Open strDataUrl
End With
Set rec = server.CreateObject("adodb.record")
rec.Open strDataUrl, cnn, 3 'adModeReadWrite
ii=rec.fields("Clicknumber")
rec.fields("Clicknumber")=ii+1
rec.fields.update
rec.close
%>
open item ........


運行list.asp
點擊檔案時調用chkopen.asp 使Clicknumber+1同時開啟該檔案.其URL由strDataUrl = request.querystring("dataurl")完成.



相關文章

Beyond APAC's No.1 Cloud

19.6% IaaS Market Share in Asia Pacific - Gartner IT Service report, 2018

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。