Build your Website news automatic Publishing System four

Source: Internet
Author: User
Tags reserved microsoft frontpage
After processing the program, redirect delete.asp This ASP file, to refresh the news database display, then each submitted a news material, we can immediately see the implementation of the results are successful.
The following is the contents of the delete.asp file.
% @language = "VBScript"%
《%
Response.buffer=true
Response.expires=0

%》
"The!--#include virtual="/news/data/data.inc "
《%

Set rs = Server.CreateObject ("ADODB.") Recordset ")
Sql= "SELECT * from Data order by News_class asc,news_id Desc"
' Rs. pagesize=100
Rs.Open sql,conn,3,2


%》
"HTML"

"Head"
"Meta http-equiv=" Content-type "content=" text/html; charset=gb2312 ""
Information stored in the "title" News Database "/title"
Meta name= "generator" content= "Microsoft FrontPage 3.0"
"Style type=" Text/css "
《!--
. lh22px {font-size:12px;line-height:22px;font-family: Song body}
a {Text-decoration:none}
Body {line-height:18px;font-size:9pt;font-family: XXFarEastFont-Arial}
TD {Line-height:18px;font-size:9pt;font-family: Song body}
a:hover {color: #FF0000; Text-decoration:none}
--》
"/style"
Meta name= "Microsoft Border" content= "None"
"/head"

"Body"

"Form method=" POST "action=" delete.asp "
"Table border=" 0 "width=" 750 "cellpadding=" 0 "
"TR"
TD width= "750" bgcolor= "#EBEBEB" colspan= "2" "Div align=" Center "" Center "" p "" Font
Size= "3" "strong" information stored in the news database "/strong" "/font" "/td"
"/TR"
《%
Do as not rs.eof
%》
TR align= "Center"
"TD width=" 112 "bgcolor=" #EBEBEB "is deleted:"%if rs ("News_delete") =-1 then% "
"Input type=" checkbox "Name=" "%=rs (" news_id ")%"
Value= "On"
"%else%"
"Input type=" checkbox "Name=" "%=rs (" news_id ")%"
Value= "Off"
"%end if%"
"/td"
TD width= "638" bgcolor= "#FAFAFA" align= "left" "%if rs (" News_class ") =1 then%"
"Font color=red" market situation "/font"
"%end if%"
"%if rs (" News_class ") =2 then%"
"Font color=red" it News "/font"
"%end if%"
"%if rs (" News_class ") =3 then%"
"Font color=red" Guangzhou market "/font"
"%end if%"
"%if rs (" News_class ") =4 then%"
"Font color=red" reserved "/font"
"%end if%"
"%if rs (" News_class ") =5 then%"
"Font color=red" reserved "/font"
"%end if%"
"%=rs" ("News_title")% "/td"
"/TR"
《%
Rs.movenext
Loop
%》
TR align= "Center"
TD width= "100%" colspan= "2" bgcolor= "#EBEBEB" "Center" "p" "input
Type= "Submit" value= "submitted" name= "B1" "Input type=" reset "
Value= "Clear" name= "B2" "/td"
"/TR"
"/table"
"/form"
"/body"
"/html"
《%

If Request.ServerVariables ("request_method") = "POST" Then

If not Rs.bof then
Rs.movefirst
End If
Do as not Rs.eof&nbs



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.