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

📄 wm.sys_announce.asp

📁 网人分类信息5.0商业版。非常优秀的分类信息系统。比较少见。
💻 ASP
📖 第 1 页 / 共 2 页
字号:
		 WM_Tit = WRMPS.CheckStr(Request.Form("WM_Tit"),0)
         If WM_Tit = "" Or Len(WM_Tit) > 50 Then Call WRMPS.ErrView("·请输入不大于50字符的公告标题", 0): Exit Sub 
		 For i = 1 To Request.Form("Content").Count
           WM_Content = WM_Content & Request.Form("Content")(i)
         Next
         WM_Content = WRMPS.CheckStr(WM_Content, 4)
         If WM_Content = "" Then Call WRMPS.ErrView("·请输入公告内容", 0): Exit Sub
		 WM_Time = Request.Form("WM_Time")
         If IsDate(WM_Time) = False Or WM_Time = "" Then WM_Time = Now()
		 WM_Begin = WRMPS.CheckStr(Request.Form("WM_Begin"),0)
		 WM_End = WRMPS.CheckStr(Request.Form("WM_End"),0)
         If WM_Begin <> "" And WM_End <> "" Then
            If CDate(WM_End) <= CDate(WM_Begin) Then Call WRMPS.ErrView("·有效期限有错误", 0): Exit Sub
         End If
         If WM_Begin <> "" and IsDate(WM_Begin) Then WM_Begin = CDate(WM_Begin) Else WM_Begin = Null
         If WM_End <> "" and IsDate(WM_End) Then WM_End = CDate(WM_End) Else WM_End = Null
		 WM_ShowType = WRMPS.CheckStr(Request.Form("ShowType"),1)
         If WM_ShowType = "" Then WM_ShowType = 1
		 WM_Key = WRMPS.CheckStr(Request.Form("Key"),1)
	     TempID = WRMPS.CheckStr(Request.Form("TempID"), 1)
	     If TempID = "" Then TempID = 0

		 Rs.Open "Select WM_Tit,WM_Content,WM_User,WM_Time,WM_ShowType,WM_Sort,WM_Key,WM_BeginDate,WM_EndDate,WM_TempID From WM_Announce" ,Conn , 1,3
		 Rs.AddNew
		   Rs(0) = WM_Tit
		   Rs(1) = WM_Content
		   Rs(2) = Request.Cookies("Admin")("Admin")
		   Rs(3) = WM_Time
		   Rs(4) = WM_ShowType
		   Rs(5) = WM_Sort
		   Rs(6) = WM_Key
		   Rs(7) = WM_Begin
		   Rs(8) = WM_End
		   Rs(9) = TempID
		 Rs.Update
		 Rs.Close
		 Call WRMPS.ErrView("·添加公告成功<meta http-equiv=refresh content='1;URL=WM.Sys_Announce.asp'>",1)
		 
      Case "All"
         ID = WRMPS.CheckStr(Replace(Request("WM_ID"), " ", ""), 0)
         If ID <> "" Then
           ID = Split(ID, ",")
           For i = 0 To UBound(ID)
	         Select Case WRMPS.CheckStr(Request("SaveType"), 0)
			   Case "关闭"
                 Conn.Execute ("Update WM_Announce Set WM_Key=0 where WM_ID=" & ID(i) & "")
			   Case "显示"
                 Conn.Execute ("Update WM_Announce Set WM_Key=1 where WM_ID=" & ID(i) & "")
			   Case "全部"
                 Conn.Execute ("Update WM_Announce Set WM_ShowType=0 where WM_ID=" & ID(i) & "")
			   Case "平板"
                 Conn.Execute ("Update WM_Announce Set WM_ShowType=1 where WM_ID=" & ID(i) & "")
			   Case "弹出"
                 Conn.Execute ("Update WM_Announce Set WM_ShowType=2 where WM_ID=" & ID(i) & "")
			   Case "删除"
                 Conn.Execute ("Delete From WM_Announce where WM_ID=" & ID(i) & "")
			   Case "移动"
		         WM_Sort = WRMPS.CheckStr(Request.Form("WM_Sort"),1)
                 If WM_Sort = "" Then Call WRMPS.ErrView("·请选择目标频道", 0): Exit Sub 
                 Conn.Execute ("Update WM_Announce Set WM_Sort="&WM_Sort&" where WM_ID=" & ID(i) & "")
             End Select	   
           Next
         End If
		 Call WRMPS.ErrView("·公告"&WRMPS.CheckStr(Request("SaveType"), 0)&"成功<meta http-equiv=refresh content='1;URL=?SearchSort="&SearchSort&"&Page=" & Page & "'>",1)
		 
      Case "Del"
         ID = WRMPS.CheckStr(Replace(Request("ID"), " ", ""), 1)
         If ID <> "" Then Conn.Execute ("Delete From WM_Announce where WM_ID=" & ID & "")
		 Call WRMPS.ErrView("·公告删除成功<meta http-equiv=refresh content='1;URL=?SearchSort="&SearchSort&"&Page=" & Page & "'>",1)

      Case Else
       Content = Content & "<table width='100%' cellpadding=3 cellspacing=1 class=td1>" & vbCrLf
       Content = Content & "<form method='post' Action='?Action=All&SearchSort="&SearchSort&"'>" & vbCrLf
       Content = Content & "<tr Class=td4><td colspan=8><b>公告管理</b></td></tr>" & vbCrLf
       Content = Content & "<tr Align=center Class=td3><td width='4%'></td>" & vbCrLf
       Content = Content & "<td width=*>标题</td>" & vbCrLf
       Content = Content & "<td width='8%'>显示方式</td>" & vbCrLf
       Content = Content & "<td width='15%'>添加时间</td>" & vbCrLf
       Content = Content & "<td width='10%'>有效期限</td>" & vbCrLf
       Content = Content & "<td width='6%'>状态</td>" & vbCrLf
       Content = Content & "<td width='12%'>操作</td></tr>" & vbCrLf
       If SearchSort <> "" Then SQl = " Where WM_Sort = "&SearchSort Else SQl = ""
       Rs.Open "Select WM_ID,WM_Tit,WM_ShowType,WM_Time,WM_Key,WM_BeginDate,WM_EndDate From WM_Announce"&SQl&" Order By WM_ID Desc", Conn, 1, 1
       If Rs.EOF Then
         Content = Content & "<tr class=td2><td align=center colspan=7>没有内容</td></tr></table>" & vbCrLf
       Else
         ListNum = 16
         '分页的实现
         Rs.PageSize = ListNum
         Page = WRMPS.CheckStr(Request("Page"), 1)
         If Page = "" Or Page < 1 Then Page = 1
         Rs.AbsolutePage = Page
         i = 0
         Do While Not Rs.EOF And i < ListNum
         Content = Content & "<tr Class=td2 align='center'>" & vbCrLf
         Content = Content & "<td><input type='checkbox' name='WM_ID' value=" & Rs(0) & " style='border:0'></td>" & vbCrLf
         Content = Content & "<td align=left>"&Rs(1)&"</td>" & vbCrLf
         Content = Content & "<td>"&Replace(Replace(Replace(Rs(2),0,"全部"),1,"平板"),2,"弹出")&"</td>" & vbCrLf
         Content = Content & "<td>"&Rs(3)&"</td>" & vbCrLf
         Content = Content & "<td>"&Rs(5)&"<br>"&Rs(6)&"</td>" & vbCrLf
         Content = Content & "<td>"&Replace(Replace(Rs(4),0,"<font Class=font2>关闭</font>"),1,"显示")&"</td>" & vbCrLf
         Content = Content & "<td><a href=?Action=Edit&ID="&Rs(0)&"&SearchSort="&SearchSort&"&Page="&Page&">修改</a> | <a href=?Action=Del&ID="&Rs(0)&"&SearchSort="&SearchSort&"&Page="&Page&" onclick=""return confirm('确定删除?');"">删除</a></td>" & vbCrLf
         Content = Content & "</tr>" & vbCrLf
         Rs.MoveNext
         i = i + 1
         Loop
         URLParameter = ""
         Content = Content & "<tr class=td3><td colspan=2>" & GetAdminPageList(URLParameter, ListNum, Rs.RecordCount, Page) & "</td><td align=right colspan=5><input name='chkall' type='checkbox' id='chkall' value='select' onclick=""CheckAll(this.form)"" style='border:0'>全选 <input name='Page' type='hidden' value='" & Page & "'><select name='SaveType'><option value='关闭'>关闭</option><option value='显示'>显示</option><option value='全部'>平板+弹出</option><option value='平板'>平板显示</option><option value='弹出'>弹出显示</option><option value='删除'>删除</option><option value='移动'>移动到</option></select> "
		 Content = Content & "<select name='WM_Sort'>" & vbCrLf
         Content = Content & "<option value='-1'>共用公告</option>" & vbCrLf
		 Content = Content & "<option value='0' selected>网站首页公告</option>" & vbCrLf
		 Set Rso = Conn.Execute("Select WM_ID,WM_ChannelName From WM_Channel Where WM_Module > 0 Order By WM_OrderID")
		 Do While Not Rso.Eof
           Content = Content & "<option value='"&Rso(0)&"'>"&Rso(1)&"公告</option>" & vbCrLf
		 Rso.Movenext
		 Loop
		 Rso.Close
         Content = Content & "</select> <input type=submit name='submit' value='批量操作'>&nbsp;</td></tr></form>" & vbCrLf
         Content = Content & "</table>" & vbCrLf
       End If
       Rs.Close
    End Select
  Set Rso = Nothing
  Set Rs = Nothing
  Call DBConnEnd()
  Call ClassEnd()
  Response.Write Content
  Call GetBottom()
End Sub

%>

⌨️ 快捷键说明

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