日韩天天综合网_野战两个奶头被亲到高潮_亚洲日韩欧美精品综合_av女人天堂污污污_视频一区**字幕无弹窗_国产亚洲欧美小视频_国内性爱精品在线免费视频_国产一级电影在线播放_日韩欧美内地福利_亚洲一二三不卡片区

生成的靜態(tài)頁(yè)面調(diào)用自己寫(xiě)的動(dòng)態(tài)插件的方法及一個(gè)簡(jiǎn)單示例_風(fēng)訊Cms教程

編輯Tag賺U幣
教程Tag:暫無(wú)Tag,歡迎添加,賺取U幣!

很多朋友都在問(wèn)風(fēng)訊中如何調(diào)用一些比較個(gè)性的東西,因?yàn)槭庆o態(tài)的頁(yè)面,沒(méi)辦法直接執(zhí)行asp
所以今天我抽空寫(xiě)了一個(gè)簡(jiǎn)單的例子,有愛(ài)好的朋友可以看一下。希望會(huì)對(duì)大家有所幫助。
這個(gè)例子的功能是可以在首頁(yè)調(diào)用網(wǎng)站注冊(cè)的會(huì)員資料。
在風(fēng)訊根目錄下新建一asp文件:member,asp,文件代碼如下:


<!--#include file="Inc/Cls_DB.asp" -->
<!--#include file="Inc/Const.asp" -->
<!--#include file="Inc/Function.asp" -->(插入風(fēng)訊的常量設(shè)置文件,如數(shù)據(jù)庫(kù)路徑和連接都在這幾個(gè)文件里)
<%
'*******************code by chenwfy***********2006-04-25*********************************
'功能說(shuō)明:調(diào)用最新會(huì)員資料
'************************************************************************************************
(注釋?zhuān)?/FONT>

Set DBC = New DataBaseClass
Set Conn = DBC.OpenConnection()
Set DBC = Nothing

(建立數(shù)據(jù)庫(kù)連接,好象是吧,不大懂,嘿嘿。

'==========================================================================
'設(shè)置調(diào)用會(huì)員數(shù)量
dim Getnum
Getnum = 10
'==========================================================================
(定義一個(gè)變量,設(shè)置調(diào)用會(huì)員資料的數(shù)量)

dim tempobj,tempsql
tempsql = "select top "& Getnum &" id,MemName,***,loginnum from FS_Members order by id desc"
set tempobj = conn.execute(tempsql)
(查詢(xún)數(shù)據(jù)庫(kù),取得對(duì)應(yīng)的資料)

if not tempobj.eof then
do while not tempobj.eof
dim memid,memname,mem***,true***,memloginnum
memid = tempobj("id")
memname = tempobj("memname")
mem*** = tempobj("***")
memloginnum = tempobj("loginnum")
if mem*** = "0" then
true*** = "<font color=""red"">女</font>"
else
true*** = "<font color=""bule"">男<font>"
end if
(重點(diǎn)在下面這里,呵呵,輸出document.write后的內(nèi)容并循環(huán),這樣才可以用js調(diào)用
Response.write "document.write('<table width=""220"" border=""0"" cellpadding=""0"" cellspacing=""0"">"&"<tr>"&"<td width=""120"" height=""20"" align=""center"" valign=""middle"">"&"<a href=memtext.asp?id="& memid &" title=""點(diǎn)擊查看此會(huì)員的具體資料"" target=""_blank"">"& memname &"</a>"&"</td>"&"<td width=""50"" height=""20"" align=""center"" valign=""middle"">"& true*** &"</td>"&"<td width=""50"" height=""20"" align=""center"" valign=""middle"">"& memloginnum &"</td>"&"</tr>"&"</table>');"
tempobj.movenext
loop
else
response.Write"暫時(shí)還沒(méi)有會(huì)員哦"
end if

tempobj.close
set tempobj = nothing
set conn = nothing (關(guān)閉數(shù)據(jù)庫(kù)連接)
%>

查看更多 風(fēng)訊cms教程  風(fēng)訊cms模板

共2頁(yè)上一頁(yè)12下一頁(yè)
來(lái)源:模板無(wú)憂(yōu)//所屬分類(lèi):風(fēng)訊Cms教程/更新時(shí)間:2006-06-19
相關(guān)風(fēng)訊Cms教程