Tutorials to .com

Tutorials to .com » Asp » Skills » Build your web site automated publishing systems in the world news

Build your web site automated publishing systems in the world news

Print View , by: iSee ,Total views: 16 ,Word Count: 2979 ,Date: Wed, 26 Aug 2009 Time: 4:00 AM

Updated daily news content on the webmaster who is a very complicated matter, first, to collect a large number of news information, you must also produce a large number of web pages, every day, large and small international news, national news, IT news be Zhengou you tired. The most deadly thing, which is to manage the news can not be loose and can not query, not on-line dynamic changing it, press emphasis on timeliness, when you prepare and upload web pages to the server when Hou, I am afraid you have someone else had already taken a step to news reports came out. Really a thankless job for the present, our online environment, online news, dynamically generated news page for news add a search to find function is essential.
Then, using asp technology on how to achieve dynamic press release system? Systematic approach to the news in general, there are two, one is to input the news content is automatically generated html file directly from the program, such as by date and press to do ID No. htm file's name, we often can see some major news stations to such treatment. While another is to save the data directly to the news to the database, when the user read the news. The transfer of data from the database, dynamically generated pages.
The difference between the two kinds of treatment? The first display of speed and the negative on the server what it is the lightest. For large traffic sites, speed is life, the website is too slow, and who go to Liu cable does? The latter approach in dealing with simple than to teach. Maintenance is also easy, there is a knot that is what the two pairs, because only the application database can easily handle inquiries in order to guide the reader to the corresponding news page, an integrated method of the above can be said each has its advantages, we are now focuses on the use of database, dynamic pages that way.

From the processing point of view, is to provide a management information page (you can add and remove the daily news, including press photos, titles, etc.), and then to call the pages that display information processing. Test filter to the news pages need to plug into different styles, so can not use a fixed-format pages to display headlines. They should be made part of a home that can be inserted, then you can call the different styles of the page news. As the following script statement

"Script language =" JavaScript "src =" HTTP / / xxx.com.cn / special / Linux / lnews / autoup.asp ""
"/ Script"
Finally, there is one to read the details of the news pages. In general, that is, a complete online news release process is essentially constituted by the four major program addnew.asp (used to press the data saved to the database) delete.asp (used to deal with the removal news)
autoup.asp (for dealing with this headline show, which is part of inserting the home page) read.asp (dynamically generated news details)
Attached to help them deal with some of there set_disp.asp (for dealing with the number of news on the home page display, etc.)
Of course, the essential thing is a news database.

(A) to build a database analysis of the information constitutes an element of each press, mainly by news headlines, news content, pictures, addresses, connection address, press the release time of the composition. In the time to build the database. Taking into account processing needs, we must add the news ID number to facilitate identification. Moreover, then click the statistics can be added in order to understand the reader interested right content. access database is a very suitable for use in the development stage period of transition, database, so. We construct the following a news database (data.mdb)
Table data
news_id long number news_class text news categories news_class_name text news category name news_title text of news headline news_head logic is Home Show news_comment comment the news content news_year text news month of the year news_month text news news_day text news content news_time text updated news_delete logic remove signs

According to the above requirements are completed the table, when we tested the stability, you can put information inside the database into a SQL server. Well, take it down this step, we have to do with the management of a news page, in order to facilitate the layout and management, we have adopted a framework surface to make the following pages. Webadmin.htm framework of the main document.

"Html"

"Head"
"Meta http-equiv =" Content-Type "content =" text / html; charset = gb2312 ""
"Title" Press Release system Management Page "/ title"
"Meta name =" GENERATOR "content =" Microsoft FrontPage 3.0 ""
"/ Head"

"Frameset framespacing =" 0 "rows =" *, 14% ""
"Frame name =" main "target =" footnotes "src =" webadmin.asp "scrolling =" auto ""
"Frame name =" footnotes "src =" delete.asp "scrolling =" auto ""
"Noframes"
"Body"
"P" This page uses frames, but your browser doesn't support them. "/ P"
"/ Body"
"/ Noframes"
"/ Frameset"
"/ Html"


The surface contains the files are webadmin.asp this file. It provides input mainly by the daily news updates interface, the code is as follows.
"Html"

"Head"
"Meta http-equiv =" Content-Type "content =" text / html; charset = gb2312 ""
"Style TYPE =" text / CSS ""
"! --
. lh22px (font-size: 12px; line-height: 22px; font-family: Arial)
a (text-decoration: none)
body (line-height: 18px; font-size: 9pt; font-family: Arial)
td (line-height: 18px; font-size: 9pt; font-family: Arial)
a: hover (color: # FF0000; text-decoration: none)
- "
"/ Style"
"Base target =" footnotes ""
"Title" Press Release System Management Page "/ title"
"/ Head"

"Body topmargin =" 8 "leftmargin =" 8 ""

"P align =" center "" "font face =" italics _GB2312 "size =" 6 "color =" # FF0000 "" "strong" News Management System WEB page "/ strong" "/ font" "/ p"
"Div align =" center "" "center"

"Table border =" 0 "width =" 100% "cellspacing =" 0 "cellpadding =" 0 ""
"Tr"
"Td width =" 100% "" "form method =" POST "action =" addnew.asp ""
"Table border =" 0 "width =" 100% "height =" 126 "cellpadding =" 0 ""
"Tr"
"Td width =" 100% "height =" 9 "colspan =" 2 "bgcolor =" # E7E7E7 "" "div align =" center "" "center" "p" "font
size = "3" "" strong "to add a daily news content" / strong "" / font "" / td "
"/ Tr"
"Tr align =" center ""
"Td width =" 15% "height =" 8 "bgcolor =" # E7E7E7 "" "div align =" left "" "p" News Title: (must be) "/ td"
"Td width =" 85% "height =" 8 "bgcolor =" # F9F9F9 "" "div align =" left "" "p" "input type =" text "
name = "title" size = "73" "" / td "
"/ Tr"
"Tr align =" center ""
"Td width =" 15% "height =" 34 "bgcolor =" # E7E7E7 "valign =" top "" "div align =" left "" "p" news content: (must be) "/ td"
"Td width =" 85% "height =" 34 "bgcolor =" # F9F9F9 "" "div align =" left "" "p" "textarea rows =" 13 "
name = "comment" cols = "72" "" / textarea "" / td "
"/ Tr"
"Tr align =" center ""
"Td width =" 15% "height =" 17 "bgcolor =" # E7E7E7 "" "div align =" left "" "p" Picture Connection Address: "/ td"
"Td width =" 85% "height =" 17 "bgcolor =" # F9F9F9 "" "div align =" left "" "p" "input type =" text "
name = "pic" size = "73" "" / td "
"/ Tr"
"Tr align =" center ""
"Td width =" 15% "height =" 17 "bgcolor =" # E7E7E7 "" "div align =" left "" "p" Press Type: (must be) "/ td"
"Td width =" 85% "height =" 17 "bgcolor =" # F9F9F9 "" "div align =" left "" "p" "select
name = "class_name" size = "1" value =""%= session ( "class_name ")%"""
"Option value =" the market situation, "the" market situation "/ option"
"Option value =" IT News "" IT News "/ option"
"Option value =" Guangzhou market, "" Guangzhou market, "/ option"
"Option value =" reservation "" reservations "/ option"
"Option value =" reservation "" reservations "/ option"
"/ Select" "/ td"
"/ Tr"
"Tr align =" center ""
"Td width =" 15% "height =" 17 "bgcolor =" # E7E7E7 "" "div align =" left "" "p" is home: "/ td"
"Td width =" 85% "height =" 17 "bgcolor =" # F9F9F9 "" "div align =" left "" "p" "input type =" checkbox "
name = "head" value = "YES" "" / td "
"/ Tr"
"Tr align =" center ""
"Td width =" 100% "height =" 16 "colspan =" 2 "bgcolor =" # E7E7E7 "" "div align =" center "" "center" "p" "input
type = "submit" value = "submit" name = "B1" "" input type = "reset"
value = "Clear" name = "B2" "" / td "
"/ Tr"
"/ Table"
"/ Form"
"/ Td"
"/ Tr"
"/ Table"
"/ Center" "/ div" "div align =" center "" "center"

"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 shows the number of set "/ td"
"/ Tr"
"Tr"
"Td width =" 20% "" "div align =" center "" "center" "p" in 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" reservations "/ td"
"Td width =" 20% "" "div align =" center "" "center" "p" reservations "/ 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 = "submit" 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: namely, the connection is displayed in home page title, so can not be omitted. "/ Td"
"/ Tr"
"Tr"
"Td width =" 740 "" News Content: In order to click on the title link displayed after the window opened by the news content is also not allowed to be omitted. "/ Td"
"/ Tr"
"Tr"
"Td width =" 740 "" News Photos: News contains a picture, please copy the image address to connect this to display the picture "/ td"
"/ Tr"
"Tr"
"Td width =" 740 "" News Type: Select news in a different column display the location of "/ td"
"/ Tr"
"Tr"
"Td width =" 740 "" whether the home: If the home needs a comprehensive press kit including images, please check the "/ td"
"/ Tr"
"Tr"
"Td width =" 740 "" "p align =" center "" "a href =" index.asp "target =" _parent "" Back to News Home "/ a" "/ td"
"/ Tr"
"/ Table"
"/ Center" "/ div"
"/ Body"
"/ Html"

Well, in the next section, "added the daily news content" will show you how data are processed in news, please click the above steps to establish a good programming environment.


ASP skills Articles


Can't Find What You're Looking For?


Rating: Not yet rated

Comments

No comments posted.