一直想开发一个功能比较齐全又能容易欠套到其他设计的文章管理系统,
我现在已经开发出了一个半成品,有兴趣可以来看看,
http://ucasp.net/corporation/admin/admin_index.asp
http://ucasp.net
用户名:test
密码:testtest
下面是部分代码:
function Votes(CID)'''投票列表
    if CacheIsEmpty("vCreateVotes"&CID) then 
        CreateVotesCache(CID)
    
end if    
    Votes
=RCache("vCreateVotes"&CID)
end function

function Notes(CID,Width,Height)'''公告列表
    if CacheIsEmpty("vCreateNotes"&CID) then 
        CreateNotesCache CID,Width,Height 
    
end if    
    Notes
=RCache("vCreateNotes"&CID)
end function


Function CreateVotes(CID)
if CID="" then C_ID=0 else C_ID=CID
  vSql
="select distinct T_Num,T_Type FROM VOTES where C_ID="&C_ID&""
  Set vT_Num=Server.CreateObject("ADODB.Recordset")
  vT_Num.open vSql,conn,
1,1
  
for i=1 to vT_Num.Recordcount
  
Set Rs=Server.CreateObject("ADODB.Recordset")
  Sql
="Select * from Votes where T_Num='"&vT_Num("T_Num")&"' and  IsOpen=1 and C_ID="&C_ID&" order by  R_Order desc"
  Rs.open Sql,conn,1,1
          vCreateVotes
=vCreateVotes&"<table width=""100%"" height=""63"" border=""0"" cellpadding=""0"" cellspacing=""0"">"
          vCreateVotes=vCreateVotes&"<form name=""formVotes"&vT_Num("T_Num")&""" method=""post"" action=""votes.asp"" target=""Votes"">"
                vCreateVotes=vCreateVotes&"<tr>"
                  vCreateVotes=vCreateVotes&"<td colspan=""2"" height=""22"">"&vT_Num("T_Type")&"<input name=""T_Num"" type=""hidden"" id=""T_Num"" value="""&vT_Num("T_Num")&"""></td>"
                vCreateVotes=vCreateVotes&"</tr>"
                for j=1 to Rs.Recordcount
                vCreateVotes
=vCreateVotes&"<tr>"
                  vCreateVotes=vCreateVotes&"<td width=""24"" height=""22""><input type=""radio"" name=""Vote"" value="""&Rs("ID")&"""></td>"
                  vCreateVotes=vCreateVotes&"<td height=""22"">"&Rs("Header")&"</td>"
                vCreateVotes=vCreateVotes&"</tr>"
                Rs.movenext
            
next
            vCreateVotes
=vCreateVotes&"<tr>"
             vCreateVotes=vCreateVotes&" <td colspan=""2""><div align=""center"">"
                vCreateVotes=vCreateVotes&"<input type=""reset"" name=""Submit"" value=""重置"" class=""VoteInput"">"
                vCreateVotes=vCreateVotes&"&nbsp; "
                vCreateVotes=vCreateVotes&"<input type=""button"" name=""Submit"" value=""提交"" class=""VoteInput"" onClick=""openwin('about:blank','Votes','width=400,height=240');formVotes"&vT_Num("T_Num")&".submit();"">"
              vCreateVotes=vCreateVotes&"</div></td>"
            vCreateVotes=vCreateVotes&"</tr>"
            vCreateVotes=vCreateVotes&"</form>"
          vCreateVotes=vCreateVotes&"</table>"
    vT_Num.movenext
    
next
    
         CreateVotes
=vCreateVotes
End function
function CreateVotesCache(CID)''IsPagesize=0 ,表示无分页,否则就是pagesize分页大小
    vCreateVotesCache=CreateVotes(CID)
    Cache 
"vCreateVotes"&CID,vCreateVotesCache
end function

Function CreateNotes(CID,Width,Height)
    
Set Rs=Server.CreateObject("ADODB.Recordset")
    sql
="Select * from S_Win where C_ID="&CID&" and  Oropen=1 and model=2 order by ID desc"
    Rs.open sql,conn,1,1
    Rcount
=Rs.Recordcount
    vCreateNotes
="<div id=""NotesDiv"">"
    vCreateNotes=vCreateNotes&"<table width="""&Width&""" border=""0"" cellspacing=""0"" cellpadding=""0""><tr><td style=""cursor:move "" onMouseOver=""NotesDiv.state='stop'"" onMouseOut=""NotesDiv.direction='up'; NotesDiv.state='scroll'"">"
    for i = 1 to Rcount
        vCreateNotes
=vCreateNotes&Rs("Title")&"<br>"
        vCreateNotes=vCreateNotes&Replace(Replace(Rs("Contents")," ","&nbsp;"),chr(10),"<br>")&"<br>"&Rs("T_Date")
        vCreateNotes
=vCreateNotes&"<hr>"
        Rs.movenext
    
next
    vCreateNotes
=vCreateNotes&"</td></tr></table>"
    vCreateNotes=vCreateNotes&"</div>"
    if Rcount>0 then
        vCreateNotes
=vCreateNotes&"<script language=""JScript"" src=""Inc/Notes.js""></script>"&chr(10)
        vCreateNotes
=vCreateNotes&"<script language=""JScript"">"&chr(10)
        vCreateNotes
=vCreateNotes&"window.onload = new Function(""scroll(document.all['NotesDiv'], " & Width & ""& height & ",'up','vertical','1',50)"")"&chr(10)
        vCreateNotes
=vCreateNotes&"</script>"&chr(10)
    
end if
    vCreateNotes
=vCreateNotes&"<span style=""font-family: Webdings;cursor:hand"" onclick=""NotesDiv.direction='up'; NotesDiv.state='scroll'"">5</span><span style=""font-family: Webdings;cursor:hand"" onclick=""NotesDiv.direction='down'; NotesDiv.state='scroll'"">6</span>"
    CreateNotes=vCreateNotes
End Function

function CreateNotesCache(CID,Width,Height)
    vCreateNotesCache
=CreateNotes(CID,Width,Height)
    Cache 
"vCreateNotes"&CID,vCreateNotesCache
end function
Function CreateClass(CID,PageUrl)
 
Set Rs=Server.CreateObject("ADODB.Recordset")
 Sql
="Select * from Tb_class where C_ID="&CID
 Rs.open Sql,conn,
1,1
End function

Function isRequest(Num)
if Num<>"" then
    
if not isNumeric(Num) then
        Response.Write(
"非法请求!")
        Response.
End()
    
end if
end if
End Function