Build your Website news automatic release system six (paste)

Source: Internet
Author: User
By customizing this code, you can create a Web page display format that matches your requirements.
Add, delete, show all finished, the last one, is the details of the news show.
When the user clicks on the headline, he opens the Disp.asp file and uses the Get method to pass the arguments through, and we look at the disp.asp file contents.

% @language = "VBScript"%
"The!--#include virtual="/news/data/data.inc "
《%
Set rs = Server.CreateObject ("ADODB.") Recordset ")
Sql= "SELECT * from Data where CSTR (news_id) = '" &cstr (Request.QueryString ("news_id")) & "'"
Rs.Open sql,conn,3,2
%》
"HTML"

"Head"
"Meta http-equiv=" Content-type "content=" text/html; charset=gb2312 ""
"title" "/title"
"/head"

"Body topmargin=" 8 "leftmargin=" 8 "
"Div align=" Center "center"

"Table border=" 0 "width=" cellpadding= "0" cellspacing= "0"
"TR"
"TD width=" "100%" "/td"
"/TR"
"TR"
"TD width=" 100% "bgcolor=" "#E6E6E6" "Table border=" 0 "width=" 100% "cellpadding=" 0 "
"TR"
"TD width=" 100% "bgcolor=" "#D2E8FF" "p align=" center "" B ""%=rs ("News_title")% ""/b ""/td "
"/TR"
"TR"
"TD width=" 100% "bgcolor=" "#FBFDFF" "Table border=" 0 "width=" 100% "cellpadding=" 0 "
"TR"
"TD Width=" 100% "" P align= "right" (Update: "%=rs (" news_year)% "-"%=rs ("News_month")% "%=rs (" News_day ")%"%=rs ("" News_time ") ("/td ")
"/TR"
"TR"
"TD Width=" 100% "" p align= "center" "%
If RS ("News_pic") "" "Then
% "img src=" "%=rs (" news_pic ")%" "
End If
% "/td"
"/TR"
"TR"
"TD Width=" 100% "" Div align= "Center" "Center" "Table border=" 0 "width=" 90% "cellpadding=" 0 "
"TR"
"TD Width=" 100% ""%=rs ("news_comment")%
"/td"
"/TR"
"/table"
"/center" "/div" "/td"
"/TR"
"/table"
"/td"
"/TR"
"TR"
TD width= "100%" bgcolor= "#D2E8FF" "p align=" center "" A Href= "Javascript:window.close ()" Closes the window "/td"
"/TR"
"/table"
"/td"
"/TR"
"TR"
"TD width=" "100%" "/td"
"/TR"
"TR"
"TD width=" "100%" "/td"
"/TR"
"/table"
"/center" "/div" "/A"
"/body"
"/html"

So far, the press release system has been able to put into use, try, is not very convenient, it is easy to add the daily news content. The next section. We will add (title/full text) search function to the press release system, make it more perfect



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.