📄 bokeadmin.asp
字号:
%>
<tr align=center>
<td class="<%=TableClass%>" height=24 align=left>
<%=Server.HtmlEncode(Rs("UserName"))%>(<%=Server.HtmlEncode(Rs("BokeName"))%>)
</td>
<td class="<%=TableClass%>" align=left>
<%=Server.HtmlEncode(Rs("KeyWord"))%>(<%=Server.HtmlEncode(Rs("nKeyWord"))%>)
</td>
<td class="<%=TableClass%>" align=left>
<a href="<%=Server.HtmlEncode(Rs("LinkUrl")&"")%>" target=_blank title="<%=Server.HtmlEncode(Rs("LinkTitle")&"")%>"><%=Server.HtmlEncode(Rs("LinkUrl")&"")%></a>
</td>
<td class="<%=TableClass%>" align=left>
<input type="checkbox" name="KeyID" value="<%=Rs("KeyID")%>">
<a href="?s=6&Action=Edit&KeyID=<%=Rs("KeyID")%>">编辑</a>
</td>
</tr>
<%
Page_Count = Page_Count + 1
Rs.MoveNext
Wend
Pcount=Rs.PageCount
%>
<tr><td colspan=3 class=td1 align=center>分页:
<%
Dim Searchstr
Searchstr = "?s=6&KeyWord=" & KeyWord
if currentpage > 4 then
response.write "<a href="""&Searchstr&"&page=1"">[1]</a> ..."
end if
if Pcount>currentpage+3 then
endpage=currentpage+3
else
endpage=Pcount
end if
for i=currentpage-3 to endpage
if not i<1 then
if i = clng(currentpage) then
response.write " <font color=red>["&i&"]</font>"
else
response.write " <a href="""&Searchstr&"&page="&i&""">["&i&"]</a>"
end if
end if
next
if currentpage+3 < Pcount then
response.write "... <a href="""&Searchstr&"&page="&Pcount&""">["&Pcount&"]</a>"
end if
%>
</td>
<td align=left class=td1>
<input type=submit name=submit value="删除" class="button">
</td>
</tr>
</FORM>
<%
End If
Rs.Close
Set Rs=Nothing
End If
%>
</table>
<%
End Sub
Sub Boke_UserCat()
Dim Rs,Sql,i,TableClass,KeyWord
Dim CurrentPage,Page_Count,Pcount
Dim TotalRec,EndPage
Dim KeyID
CurrentPage=Request("page")
If CurrentPage="" Or Not IsNumeric(CurrentPage) Then
CurrentPage=1
Else
CurrentPage=Clng(CurrentPage)
If Err Then
CurrentPage=1
Err.Clear
End If
End If
KeyWord = Dvbbs.CheckStr(Request("KeyWord"))
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align=center class="tableBorder">
<tr>
<th width="100%" colspan=6 height=25 align=left ID="TableTitleLink"> 博客系统用户栏目管理
</th>
</tr>
<tr>
<td class="td1" colspan=6 height=25>
<B>说明</B>:点击栏目名称进入该栏目文章列表
</td>
</tr>
<FORM METHOD=POST ACTION="?s=3">
<tr>
<td class="td1" colspan=6 height=25>
<B>搜索</B>:<input type="text" value="<%=KeyWord%>" name="KeyWord">
<input type=submit name=submit value="查询" class="button">
可根据用户名、博客名、栏目名、栏目说明等模糊查询
</td>
</tr>
</FORM>
<%
If Request("Action")="Edit" Then
If Request("ID") = "" Or Not IsNumeric(Request("ID")) Then
Manage_Err "非法的关键字参数","6","?s=3"
Exit Sub
End If
Set Rs = DvBoke.Execute("Select * From Dv_Boke_UserCat Where uCatID = " & Request("ID"))
If Rs.Eof And Rs.Bof Then
Manage_Err "非法的关键字参数","6","?s=3"
Rs.Close
Set Rs=Nothing
Exit Sub
End If
%>
<FORM METHOD=POST ACTION="?s=3&Action=SaveEdit">
<input type=hidden value="<%=Request("ID")%>" name="ID">
<tr align=center>
<td class="td2" height=24 colspan=6>
<B>编辑博客系统用户栏目</B>
</td>
</tr>
<tr>
<td class="td1" height=24 width="35%" align=right>
<B>栏目名称</B>:
</td>
<td class="td1" width="65%">
<input type="text" name="Title" size="50" value="<%=Server.HtmlEncode(Rs("uCatTitle"))%>">
</td>
</tr>
<tr>
<td class="td2" height=24 width="35%" align=right>
<B>栏目说明</B>:
</td>
<td class="td2" width="65%">
<textarea name="Note" cols="50" rows="5"><%=Server.HtmlEncode(Rs("uCatNote")&"")%></textarea>
</td>
</tr>
<tr align=center>
<td class="td1" height=24 colspan=6>
<input type=submit name=submit value="编辑用户博客栏目" class="button">
</td>
</tr>
</FORM>
<%
ElseIf Request("Action")="SaveEdit" Then
If Request("Title")="" Then
Manage_Err "请填写栏目的名称","6","?s=3"
Exit Sub
End If
If Request("ID") = "" Or Not IsNumeric(Request("ID")) Then
Manage_Err "非法的栏目参数","6","?s=3"
Exit Sub
End If
DvBoke.Execute("Update Dv_Boke_UserCat Set uCatTitle='"&Replace(Request("Title"),"'","''")&"',uCatNote='"&Replace(Request("Note"),"'","''")&"' Where uCatID = " & Request("ID"))
Manage_Suc "您成功编辑了博客栏目","6","?s=3"
ElseIf Request("Action")="Del" Then
KeyID = Request("ID")
If KeyID = "" Or Not IsNumeric(KeyID) Then
Manage_Err "非法的栏目ID","4","?s=3"
Exit Sub
End If
DvBoke.Execute("Delete From Dv_Boke_UserCat Where uCatID=" & KeyID)
Manage_Suc "您成功删除了用户博客栏目","6","?s=3"
Else
%>
<tr align=center>
<td class="bodytitle" height=24 align=left>
<B>用户</B>
</td>
<td class="bodytitle" align=left>
<B>栏目名称</B>
</td>
<td class="bodytitle" align=left>
<B>今日</B>
</td>
<td class="bodytitle" align=left>
<B>文章</B>
</td>
<td class="bodytitle" align=left>
<B>评论</B>
</td>
<td class="bodytitle" align=left>
<B>操作</B>
</td>
</tr>
<FORM METHOD=POST ACTION="?s=6&Action=Del">
<%
If KeyWord <> "" Then
Sql = "Select k.*,u.UserName,u.BokeName From Dv_Boke_UserCat k Inner Join Dv_Boke_User u On k.UserID=u.UserID Where u.UserName Like '%"&KeyWord&"%' Or u.BokeName Like '%"&KeyWord&"%' Or k.uCatTitle Like '%"&KeyWord&"%' Or k.uCatNote Like '%"&KeyWord&"%' Order By uCatID Desc"
Else
Sql = "Select k.*,u.UserName,u.BokeName From Dv_Boke_UserCat k Inner Join Dv_Boke_User u On k.UserID=u.UserID Order By uCatID Desc"
End If
If Not IsObject(Boke_Conn) Then Boke_ConnectionDatabase
Set Rs=Server.CreateObject("Adodb.RecordSet")
Rs.Open Sql,Boke_Conn,1,3
If Not (Rs.Eof And Rs.Bof) Then
Rs.PageSize = 30
Rs.AbsolutePage=CurrentPage
Page_Count=0
TotalRec=Rs.RecordCount
While (Not Rs.Eof) And (Not Page_Count = 30)
If TableClass = "td2" Then
TableClass="td1"
Else
TableClass="td2"
End If
%>
<tr align=center>
<td class="<%=TableClass%>" height=24 align=left>
<%=Server.HtmlEncode(Rs("UserName"))%>(<%=Server.HtmlEncode(Rs("BokeName"))%>)
</td>
<td class="<%=TableClass%>" align=left>
<%=Server.HtmlEncode(Rs("uCatTitle"))%>
</td>
<td class="<%=TableClass%>" align=left>
<%=Rs("TodayNum")%>
</td>
<td class="<%=TableClass%>" align=left>
<%=Rs("TopicNum")%>
</td>
<td class="<%=TableClass%>" align=left>
<%=Rs("PostNum")%>
</td>
<td class="<%=TableClass%>" align=left>
<a href="?s=3&Action=Edit&ID=<%=Rs("uCatID")%>">编辑</a> |
<%
If Rs("TopicNum") = 0 Then
%>
<a href=# onclick="alertreadme('删除将包括该栏目的所有信息,确定删除吗?','?s=3&Action=Del&ID=<%=Rs("uCatID")%>')">删除</a>
<%
Else
%>
<a href=# onclick="alertreadme('该分栏含有用户博客文章,必须先删除或移动栏目内的文章方能删除本分栏!','#')">删除</a>
<%
End If
%>
</td>
</tr>
<%
Page_Count = Page_Count + 1
Rs.MoveNext
Wend
Pcount=Rs.PageCount
%>
<tr><td colspan=6 class=td1 align=center>分页:
<%
Dim Searchstr
Searchstr = "?s=3&KeyWord=" & KeyWord
if currentpage > 4 then
response.write "<a href="""&Searchstr&"&page=1"">[1]</a> ..."
end if
if Pcount>currentpage+3 then
endpage=currentpage+3
else
endpage=Pcount
end if
for i=currentpage-3 to endpage
if not i<1 then
if i = clng(currentpage) then
response.write " <font color=red>["&i&"]</font>"
else
response.write " <a href="""&Searchstr&"&page="&i&""">["&i&"]</a>"
end if
end if
next
if currentpage+3 < Pcount then
response.write "... <a href="""&Searchstr&"&page="&Pcount&""">["&Pcount&"]</a>"
end if
%>
</td>
</tr>
</FORM>
<%
End If
Rs.Close
Set Rs=Nothing
End If
%>
</table>
<%
End Sub
Sub Boke_User()
Dim Rs,Sql,i,TableClass,KeyWord
Dim CurrentPage,Page_Count,Pcount
Dim TotalRec,EndPage
Dim ID,tRs
CurrentPage=Request("page")
If CurrentPage="" Or Not IsNumeric(CurrentPage) Then
CurrentPage=1
Else
CurrentPage=Clng(CurrentPage)
If Err Then
CurrentPage=1
Err.Clear
End If
End If
KeyWord = Dvbbs.CheckStr(Request("KeyWord"))
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align=center class="tableBorder">
<tr>
<th width="100%" colspan=6 height=25 align=left ID="TableTitleLink"> 博客系统用户管理
</th>
</tr>
<FORM METHOD=POST ACTION="?s=2">
<tr>
<td class="td1" colspan=6 height=25>
<B>搜索</B>:<input type="text" value="<%=KeyWord%>" name="KeyWord">
<input type=submit name=submit value="查询" class="button">
可根据用户名、博客名、标题、说明等模糊查询
</td>
</tr>
</FORM>
<%
If Request("Action")="Edit" Then
If Request("ID") = "" Or Not IsNumeric(Request("ID")) Then
Manage_Err "非法的用户参数","6","?s=2"
Exit Sub
End If
Set Rs=DvBoke.Execute("Select * From Dv_Boke_User Where UserID = " & Request("ID"))
%>
<tr>
<td class="td2" colspan=6 height=25>
<B>编辑博客用户资料</B> | <a href="<%=Dvbbs.CacheData(33,0)%>user.asp?action=modify&userid=<%=Request("ID")%>">点击编辑此用户论坛资料</a>
</td>
</tr>
<FORM METHOD=POST ACTION="?s=2&Action=SaveEdit">
<input type="hidden" name="ID" value="<%=Request("ID")%>">
<tr>
<td class="td1" height=25>
博客类别:
</td>
<td class="td1" colspan=5 height=25>
<Select Name="SysCatID" Size=1>
<%
Set tRs=DvBoke.Execute("Select * From Dv_Boke_SysCat Order By sCatID")
Do While Not tRs.Eof
Response.Write "<Option value="""&tRs("sCatID")&""""
If Rs("SysCatID")=tRs("sCatID") Then Response.Write " Selected"
Response.Write ">"&tRs("sCatTitle")&"</Option>"
tRs.MoveNext
Loop
tRs.Close
Set tRs=Nothing
%>
</Select>
</td>
</tr>
<tr>
<td class="td1" height=25>
使用模板:
</td>
<td class="td1" colspan=5 height=25>
<Select Name="SkinID" Size=1>
<%
Set tRs=DvBoke.Execute("Select * From Dv_Boke_Skins Order By s_ID")
Do While Not tRs.Eof
Response.Write "<Option value="""&tRs("s_ID")&""""
If Rs("SkinID")=tRs("s_ID") Then Response.Write " Selected"
Response.Write ">"&tRs("S_SkinName")&"</Option>"
tRs.MoveNext
Loop
tRs.Close
Set tRs=Nothing
%>
</Select>
</td>
</tr>
<tr>
<td class="td1" height=25 width="20%">
用户名:
</td>
<td class="td1" colspan=5 height=25>
<%=Rs("UserName")%>
</td>
</tr>
<tr>
<td class="td1" height=25>
博客名:
</td>
<td class="td1" colspan=5 height=25>
<input type=text name="BokeName" value="<%=Rs("BokeName")%>">
</td>
</tr>
<tr>
<td class="td1" height=25>
博客笔名:
</td>
<td class="td1" colspan=5 height=25>
<input type=text name="NickName" value="<%=Rs("NickName")%>">
</td>
</tr>
<tr>
<td class="td1" height=25>
博客密码:
</td>
<td class="td1" colspan=5 height=25>
<input type=text name="PassWord" value="">
如果不修改请留空
</td>
</tr>
<tr>
<td class="td1" height=25>
博客标题:
</td>
<td class="td1" colspan=5 height=25>
<input type=text name="BokeTitle" value="<%=Server.HtmlEncode(Rs("BokeTitle")&"")%>">
</td>
</tr>
<tr>
<td class="td1" height=25>
博客子标题:
</td>
<td class="td1" colspan=5 height=25>
<input type=text name="BokeChildTitle" value="<%=Server.HtmlEncode(Rs("BokeChildTitle")&"")%>">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -