(i) Building a news database
Analyze the elements that make up each piece of news, mainly by news headlines, news content, picture address, connection address, news release time. And when you build the database. For processing needs, the ID number of the news must be added for identification. In addition, click Statistics can be added in order to understand what the reader is interested in.
An Access database is an over time database that is ideal for use in the development phase, so. We construct a news database (Data.mdb) as follows
Table Data
NEWS_ID Long News Number
Category of News_class text News
News_class_name Text News category name
Title of News_title Text News
News_head Logic whether home display
The content of News_comment Comment News
Year of news_year Text news
month of News_month text news
Content of News_day Text news
News_time Text Update time
News_delete Logic Delete Flag
This table is built according to the above requirements, and when we are tested and stabilized, the news database can be transferred to SQL Server. Well, take this step down, we'll do a news management page, for layout and management convenience, we use the framework structure to make the following page. Webadmin.htm the main file for the framework.
"Table border=" 0 "width=" 750 "cellpadding=" 0 "
"TR"
"TD width=" "740" "/td"
"/TR"
"TR"
"TD width=" 740 "" Form method= "POST" action= "set_disp.asp"
"Table border=" 0 "width=" 100% "cellpadding=" 0 "
"TR"
"TD width=" 100% "bgcolor=" "#E7E7E7" colspan= "5" "div
align= "Center" "Center" "P" Home news show bar number set "/td"
"/TR"
"TR"
"TD Width=" 20% "" Div align= "Center" "Center" "p" Guangzhou market
"/td"
"TD Width=" 20% "" Div align= "Center" "Center" "p" market situation
"/td"
"TD Width=" 20% "" Div align= "Center" "Center" "p" it News
"/td"
"TD Width=" 20% "" Div align= "Center" "Center" "p" reserved "/td"
"TD Width=" 20% "" Div align= "Center" "Center" "p" reserved "/td"
"/TR"
"TR"
"TD Width=" 20% "" Div align= "Center" "Center" p "" input
Type= "text" name= "disp_1" size= "10"
Value= "%=application (" disp_1 ")%" "/td"
"TD Width=" 20% "" Div align= "Center" "Center" p "" input
Type= "text" name= "disp_2" size= "10"
Value= "%=application (" disp_2 ")%" "/td"
"TD Width=" 20% "" Div align= "Center" "Center" p "" input
Type= "text" name= "Disp_3" size= "10"
Value= "%=application (" disp_3 ")%" "/td"
"TD Width=" 20% "" Div align= "Center" "Center" p "" input
Type= "text" name= "Disp_4" size= "10"
Value= "%=application (" disp_4 ")%" "/td"
"TD Width=" 20% "" Div align= "Center" "Center" p "" input
Type= "text" name= "Disp_5" size= "10"
Value= "%=application (" disp_5 ")%" "/td"
"/TR"
"TR"
"TD width=" 100% "bgcolor=" "#E7E7E7" colspan= "5" "div
align= "center", "center" p "" input
Type= "Submit" value= "submitted" name= "B1" "input
Type= "Reset"
Value= "Clear" name= "B2" "/td"
"/TR"
"/table"
"/form"
"/td"
"/TR"
"TR"
"TD width=" "740" "/td"
"/TR"
"TR"
"TD width=" 740 "" "Font color=" #FF0000 "notes"/font "news title: That is, for display in the home page of the connection title, therefore can not be omitted. "/td"
"/TR"
"TR"
"TD width=" 740 "news content: In order to click on the title connected to the window opened the display of news content, also do not allow omitted. "/td"
"/TR"
"TR"
"TD width=" 740 "News Picture: News contains pictures, please copy the picture address connection to this, in order to display the picture"/td "
"/TR"
"TR"
"TD width=" 740 "News type: Select the position of news in different columns
"/td"
"/TR"
"TR"
"TD Width=" 740 "Whether the home page: such as the first page of the comprehensive news package need to include pictures, please check this
"/td"
"/TR"
"TR"
"TD width=" 740 "" p align= "center" "A href=" index.asp "
target= "_parent" back to the News home "/A" "/td"
"/TR"
"/table"
"/center" "/div"
"/body"
"/html"
OK, the next section, "Add Daily news content" will tell you how to process the news data, please
Follow the steps to establish the above programming environment.
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.