⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 admin_change.asp

📁 一个asp写的论坛源代码,论坛所需要的功能都有
💻 ASP
📖 第 1 页 / 共 4 页
字号:
	If Request.form("deleteid")="" Then
		newid=Split(Replace(Request.Form("newid")," ",""),",")
		For i=0 To Ubound(newid)
			team.Execute("Update ["&Isforum&"AdvList] set Dois="&Cid(Request.Form("availablenew"&i+1))&",Sorts="&CID(Request.Form("displayordernew"&i+1))&",Titles='"&Replace(Request.Form("titlenew"&i+1),"'","")&"' Where ID="&newid(i))
		Next
	End if
	Cache.DelCache("ForumAdvsLoad")
	team.SaveLog ("广告设置完成")
	SuccessMsg " 广告设置完成  ,请等待系统自动返回到 <a href=Admin_Change.asp?action=adv>广告设置</a> 页面 。<meta http-equiv=refresh content=3;url=Admin_Change.asp?action=adv>。 " 
End Sub

Sub adv %>
<br>
<body Style="background-color:#8C8C8C" text="#000000" leftmargin="10" topmargin="10">
<table cellspacing="1" cellpadding="4" width="95%" align="center" class="a2">
  <tr class="a1">
    <td>技巧提示</td>
  </tr>
  <tr class="a4">
    <td><br>
      <ul>
        <li>广告的类型决定广告所在的位置。</li>
      </ul></td>
  </tr>
</table>
<BR>
<table cellspacing="1" cellpadding="4" width="95%" align="center" class="a2">
  <tr>
    <td colspan="2" class="a1">添加广告</td>
  </tr>
  <tr>
    <td colspan="2" class="a4">
	  <input type="button" value="头部横幅广告" onClick="window.location='?action=advadd&type=headerbanner';">
      &nbsp;
      <input type="button" value="尾部横幅广告" onClick="window.location='?action=advadd&type=footerbanner';">
      &nbsp;
      <input type="button" value="页内文字广告" onClick="window.location='?action=advadd&type=text';">
      &nbsp;
      <input type="button" value="帖内广告" onClick="window.location='?action=advadd&type=thread';">
      &nbsp;
      <input type="button" value="漂浮广告" onClick="window.location='?action=advadd&type=float';">
      &nbsp;
      <input type="button" value="对联广告" onClick="window.location='?action=advadd&type=couplebanner';">
	  &nbsp;
      <input type="button" value="公告位广告" onClick="window.location='?action=advadd&type=affbanner';"></td>
  </tr>
</table>
<BR>
<form method="post" action="?action=advok">
  <table cellspacing="1" cellpadding="4" width="95%" align="center" class="a2">
    <tr align="center" class="a1">
      <td width="48"><input type="checkbox" name="chkall" class="a1" onClick="checkall(this.form,'delete')">
        删?</td>
      <td width="5%">可用</td>
      <td width="8%">显示顺序</td>
      <td width="15%">标题</td>
      <td width="20%">类型</td>
      <td width="15%">起始时间</td>
      <td width="15%">终止时间</td>
      <td width="15%">投放范围</td>
      <td width="6%">编辑</td>
    </tr>
    <%
	dim Rs,i,tmp
	i = 0
	Set Rs=team.execute("Select ID,Dois,Sorts,Titles,Types,StarTime,StopTime,Boards From ["&Isforum&"AdvList] Order By Sorts Desc")
	Do While Not Rs.Eof
		i = i+1
		Select Case RS(4)
			Case 1
				tmp = "头部横幅广告"
			Case 2
				tmp = "尾部横幅广告"
			Case 3
				tmp = "页内文字广告"
			Case 4
				tmp = "帖内广告"
			Case 5
				tmp = "漂浮广告"
			Case 6
				tmp = "对联广告"
			Case 7
				tmp = "公告栏广告"
		End Select				
	%>
    <tr align="center" class="a4">
      <input type="hidden" name="newid" value="<%=RS(0)%>">
      <td><input type="checkbox" name="deleteid" value="<%=RS(0)%>"></td>
      <td><input type="checkbox" name="availablenew<%=i%>" value="1" <%If Rs(1)=1 Then%>checked<%End if%>></td>
      <td><input type="text" size="2" name="displayordernew<%=i%>" value="<%=RS(2)%>"></td>
      <td><input type="text" size="15" name="titlenew<%=i%>" value="<%=RS(3)%>"></td>
      <td><%=tmp%></td>
      <td><%=IIF(RS(5)&""="","无限制",RS(5))%></td>
      <td><%=IIF(RS(6)&""="","无限制",RS(6))%></td>
      <td>
	  <%if Rs(7) = "all" Then 
			Echo "全部" 
		ElseIf Rs(7) = "index" Then 
			Echo "首页" 
		Else 
			Echo RS(7) 
		End if %></td>
      <td><a href="?action=advedit&uid=<%=RS(0)%>">[详情]</a></td>
    </tr>
    <%   Rs.Movenext
	Loop
	Rs.Close:Set RS=Nothing
	%>
  </table>
  <br>
  <center>
    <input type="submit" name="forumlinksubmit" value="提 交">
  </center>
</form>
<%
End Sub

Sub forumlinksok
	Dim ho,newid,i
	for each ho in request.form("deleteid")
		team.execute("Delete from ["&Isforum&"Link] Where ID="&ho)
	next
	If Request.form("deleteid")="" Then
		newid=Split(Replace(Request.Form("newid")," ",""),",")
		For i=0 To Ubound(newid)
			team.Execute("Update ["&Isforum&"Link] set Name='"&Replace(Request.Form("name"&i+1),"'","")&"',Url='"&Replace(Request.Form("url"&i+1),"'","")&"',Intro='"&Replace(Request.Form("note"&i+1),"'","")&"',SetTops="&Cid(Request.Form("displayorder"&i+1))&",logo='"&Replace(Request.Form("logo"&i+1),"'","")&"' Where ID="&newid(i))
		Next
		If Request.Form("newname")<>"" and Request.Form("newurl")<>"" Then
			team.execute("insert into ["&Isforum&"Link] (Name,Url,Intro,SetTops,logo) values ('"&Replace(Request.Form("newname"),"'","")&"','"&Replace(Request.Form("newurl"),"'","")&"','"&Replace(Request.Form("newnote"),"'","")&"',"&CID(Request.Form("newdisplayorder"))&",'"&Replace(Request.Form("newlogo"),"'","")&"') ")
		End if
	End If
	Cache.DelCache("Superlink")
	team.SaveLog ("友情链接设置")
	SuccessMsg " 友情链接设置完成 ,请等待系统自动返回到 <a href=Admin_Change.asp?action=forumlinks>友情链接</a> 页面 。<meta http-equiv=refresh content=3;url=Admin_Change.asp?action=forumlinks>。 "
End Sub

Sub forumlinks %>
<br>
<body Style="background-color:#8C8C8C" text="#000000" leftmargin="10" topmargin="10">
<table cellspacing="1" cellpadding="4" width="95%" align="center" class="a2">
  <tr class="a1">
    <td>技巧提示</td>
  </tr>
  <tr class="a4">
    <td><br>
      <ul>
        <li>如果您不想在首页显示联盟论坛,请把已有各项删除即可。</li>
      </ul>
      <ul>
        <li>未填写文字说明的项目将以紧凑型显示。</li>
      </ul>
      <ul>
        <li>未填写logo 地址的项目将以文字排列显示。</li>
      </ul>
      <ul>
        <li>论坛 URL请以 http:// 开始,不然将出现链接无法访问的情况。</li>
      </ul></td>
  </tr>
</table>
<br>
<form method="post" action="?action=forumlinksok">
  <table cellspacing="1" cellpadding="4" width="95%" align="center" class="a2">
    <tr class="a1">
      <td colspan="6">友情链接编辑</td>
    </tr>
    <tr align="center" class="a3">
      <td><input type="checkbox" name="chkall" onClick="checkall(this.form)">
        删?</td>
      <td>显示顺序</td>
      <td>论坛名称</td>
      <td>论坛 URL</td>
      <td>文字说明</td>
      <td>logo 地址(可选)</td>
    </tr>
    <%Dim Rs,i
	i=0
	Set Rs=team.execute("Select ID,Name,Url,Intro,SetTops,logo From ["&Isforum&"Link] Order By SetTops Desc")
	Do While Not Rs.Eof
		i= i+1
	%>
    <tr bgcolor="#FFFFFF" align="center">
      <td bgcolor="#F8F8F8"><Input Name="newid" type="hidden" value="<%=RS(0)%>">
        <input type="checkbox" name="deleteid" value="<%=RS(0)%>"></td>
      <td bgcolor="#FFFFFF"><input type="text" size="3" name="displayorder<%=i%>" value="<%=RS(4)%>"></td>
      <td bgcolor="#F8F8F8"><input type="text" size="15" name="name<%=i%>" value="<%=RS(1)%>"></td>
      <td bgcolor="#FFFFFF"><input type="text" size="15" name="url<%=i%>" value="<%=RS(2)%>"></td>
      <td bgcolor="#F8F8F8"><input type="text" size="15" name="note<%=i%>" value="<%=RS(3)%>"></td>
      <td bgcolor="#FFFFFF"><input type="text" size="15" name="logo<%=i%>" value="<%=RS(5)%>"></td>
    </tr>
    <%
		Rs.Movenext
	Loop
	Rs.close:Set Rs=Nothing
	%>
    <tr>
      <td colspan="6" class="a4" height="5"></td>
    </tr>
    <tr bgcolor="#F8F8F8" align="center">
      <td>新增:</td>
      <td><input type="text" size="3"	name="newdisplayorder"></td>
      <td><input type="text" size="15" name="newname"></td>
      <td><input type="text" size="15" name="newurl"></td>
      <td><input type="text" size="15" name="newnote"></td>
      <td><input type="text" size="15" name="newlogo"></td>
    </tr>
  </table>
  <br>
  <center>
    <input type="submit" name="forumlinksubmit" value="提 交">
  </center>
</form>
<%
End Sub


Sub newsannouncements
	Dim newsubject,newcss,newendtime,newmessage
	Newsubject = HtmlEncode(Trim(Request.Form("newsubject")))
	Newmessage = team.checkStr(Trim(Request.Form("newmessage")))
	If Newsubject &""="" Then 
		SuccessMsg "公告标题不能为空。"
	ElseIf Newmessage &""="" Then 
		SuccessMsg "公告内容不能为空。"	
	Else
		If Trim(Request.Form("newendtime"))<>"" Then
			If Not Isdate(Trim(Request.Form("newendtime"))) Then
				SuccessMsg "过期时间的格式不正确,请输入适当的日期格式。"
			End If
		End if
		If Request("edit") = 1 Then
			team.execute(" Update ["&Isforum&"Affiche] Set Affichetitle='"&Newsubject&"',Affichecontent='"&Newmessage&"',Afficheman='"&TK_UserName&"',Afficheinfo='"&Replace(Trim(Request.Form("newcss")),"'","")&"',Lifetime='"&Trim(Request.Form("newendtime"))&"',Affichetime="&SqlNowString&" Where ID="&UID)
			Cache.DelCache("BBsAffiche")
			SuccessMsg "公告编辑完成,请等待系统自动返回到 <a href=Admin_Change.asp?action=announcements>论坛公告</a> 页面 。<meta http-equiv=refresh content=3;url=Admin_Change.asp?action=announcements>。"	
		Else
			team.execute("insert into ["&Isforum&"Affiche] (Affichetitle,Affichecontent,Afficheman,Afficheinfo,Lifetime,Affichetime) values ('"&Newsubject&"','"&Newmessage&"','"&TK_UserName&"','"&Replace(Trim(Request.Form("newcss")),"'","")&"','"&Trim(Request.Form("newendtime"))&"',"&SqlNowString&") ")
			Cache.DelCache("BBsAffiche")
			SuccessMsg "新的公告发布完成,请等待系统自动返回到 <a href=Admin_Change.asp?action=announcements>论坛公告</a> 页面 。<meta http-equiv=refresh content=3;url=Admin_Change.asp?action=announcements>。"	
		End If
	End If
	team.SaveLog ("公告设置")
End Sub

Sub announcementsok
	Dim ho
	If request.form("deleteid") = "" Then
		SuccessMsg " 请选定需要删除的公告 "
	Else
		for each ho in request.form("deleteid")
			team.execute("Delete from ["&Isforum&"Affiche] Where ID="&ho)
		next
	End If
	Cache.DelCache("BBsAffiche")
	team.SaveLog ("公告删除")
	SuccessMsg " 公告删除完成,请等待系统自动返回到 <a href=Admin_Change.asp?action=announcements>论坛公告</a> 页面 。<meta http-equiv=refresh content=3;url=Admin_Change.asp?action=announcements>。"
End sub

Sub  announcements
%>
<body Style="background-color:#8C8C8C" text="#000000" leftmargin="10" topmargin="10">
<br>
<table cellspacing="1" cellpadding="4" width="95%" align="center" class="a2">
  <tr class="a1">
    <td>技巧提示</td>
  </tr>
  <tr class="a4">
    <td><br>
      <ul>
        <li>点击公告的标题,即可对公告进行编辑。
        <li>CSS效果 :font-weight: bold; 粗体文字。color: #FF0000; 文字颜色 。
      </ul></td>
  </tr>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -