Super Message This production example <1> Ah Yu

Source: Internet
Author: User
Tags modify administrator password
Did a few years of web pages, everywhere message thousands, used a variety of messages in the thousands. Unfortunately, my favorite message is very small (55555), slowly I can not bear the speed, ugly interface Let me upset, the icon is more disgusting, so I decided to write a own super message this, Ah Yu midnight up, Midnight Oil tonight fighting, busy all day, finally. My "Super Message Ben 1.0" appears, it is very fast. Because it's basically HTML, and there's no redundant code, the icons are all based on my own and my "that" drawn, but also can modify the color scheme at any time, oh, do not dare to enjoy, quickly wrote to you, wrong place, don't forget to www.zydn.net to scold Ah, Ayu there waiting for your critique.

OK, I'll tell you how to do it in detail. (The first time to write a tutorial, still do not know how to start)
To facilitate management, this is a database based message this program, first look at my library structure, (ACCESS 2000)
There are three tables in the library, the first ly is used to leave messages, there are 12 fields .... (now, I don't want to change it.)
1 Name 2 Sex 3 address 4 content (Memo) 5 Time (DateTime) 6th (date time) 7 mood 8ID (automatic number) 9URL ten urlname one EMAIL 12 face,
The second table color is used to store the color scheme with 3 fields 1 Name 2 ID (AutoNumber) 3 scheme
The 31st table PAS is used to put the administrator password, but the security of this program is not fully considered, friends have to modify their own.

First make a form, used to input our message, Save as file name: Index1.htm code as follows, you copy him all in Fontpage to stick out.
****************************

<title> Message Book-Fill in Message </title><body bgcolor= "#DEEEFE" >
<div><center>
<table border= "0" width= "over" height= "270" bgcolor= "#FCFFE6" style= "border:1 solid #000080" >
<tr> <td width= "100%" height= "> <p align=" center "><font size=" 5 "color=" #0000FF "><b> Ah Yu's Super message book </b></font></td>
&LT;/TR&GT;&LT;TR&GT;&LT;TD width= "100%" height= "187" >
<form method= "POST" action= "savely.asp" >
<p align= "Left" > Name: <input type= "text" Name= "XM" size= ">**"
Sex: <select size= "1" name= "XB" >
<option selected> Male </option>
<option> Women </option>
</select></p>
<p align= "Left" > From: <input type= "text" name= "LZ" size= ">"
Email:<input type= "text" name= "EMA" size= "Notoginseng" ></p>
<p align= "left" > site name: <input type= "text" name= "Urname" size= ">"
URL: <input type= "text" name= "Urla" size= "Notoginseng" ></p>
<p align= "Left" > Present mood: <input type= "Radio" value= "Laughing" checked Name= "XQ" > Laughing
<input type= "Radio" name= "XQ" value= "Happy" > Happy <input type= "Radio" name= "XQ" value= "calm" > Calm
<input type= "Radio" name= "XQ" value= "melancholy" > Melancholy <input type= "Radio" name= "XQ" value= "Pain" > Pain
<input type= "Radio" name= "XQ" value= "rage" > Rage </p>
<p align= "left" > Message content: <font size= "2" > (not more than 200 Chinese characters) **</font></p>
<p align= "center" ><textarea rows= "5" name= "LR" cols= "></textarea></p>"
<p align= "center" ><input type= "Submit" value= "written" Name= "B1" ><input type= "reset" value= "re-write" name= "B2" ></p>
</form> <p align= "center" ><a href= "disp.asp" > Return </a></td>
</tr> <tr> <td width= "100%" height= "" > </td> </tr><tr> <td width= "100%" height = ">" </td> </tr> </table> </center></div> </body> *************************
And then write a program to add our content to the database, I will not write out, so, this article will be very long, you just go to WWW.ZYDN.NET to the next one to come on, the filename is savely.asp
Note the following statements:

Abcc=len (LR)
Sclr= ""
Absn=1
Do While ABSN&LT;ABCC
Alsa1=mid (lr,absn,1)
If ASC (ALSA1) =13 then alsa1= "<br>"
If alsa1= "<" then alsa1= "<"
If alsa1= ">" then alsa1= ">"
Sclr=sclr+alsa1
Absn=absn+1
Loop
Lr=sclr

This is used to determine if there is a hypertext code in the user input, whether there is a carriage return, and the super file "" "" "to" < "" > ", the Return (line change) to" <br> ", a little play, this procedure can do a lot of things, such as which friends have a better way to tell me. After saving content, use Response.Redirect "DISP." ASP "To display the contents of the library.
Okay, and then put the database on the back of a message book? At the beginning I also think so, but I found that to read the database, ASP files to be ASP.DLL, the speed is very slow which can also call the Super message book!! Ah Yu struggled to think a whole .... I don't know how long. (Want to think about sleeping), wake up, the Epiphany, the database of the Dongdong read out, and then write the FileSystemObject as HTML not on the line? Reading HTML can be much faster than reading a database, ah. Say dry, so disp.asp this document come out

Here's what disp.asp is all about.
<!--#include file= "Color.inc"-->
<%
Set CONN=SERVER.CR



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.