Post. php file
<? Php
Require ('config. php ');
?>
<? Php
$ Nikename = $ arr_request ['nikename'];
If (strlen ($ nikename) = 0)
{
Echo "<center> ";
Echo "Echo "sorry, <font color = red> it is required </font> !!! Please fill in again! <Br> ";
Echo "Echo "Free message book provided by <a href = http://little.oso.com.cn> cubs </a> technical support ";
Echo "</center> ";
Exit;
}
$ Date_now = date ('y/m/d H: I: s ');
$ Ip_address = getenv ("REMOTE_ADDR ");
$ Messageold = $ arr_request ['message'];
// $ Pattern = "/n /";
// $ Replacement = "<br> ";
$ Message = computer_message ($ messageold, $ hang_zifu_number );
$ Subjectold = $ arr_request ['subobject'];
If (strlen ($ subjectold)> $ hang_zifu_number)
$ Subject = computer_message ($ subjectold, $ hang_zifu_number );
Else
$ Subject = $ subjectold;
$ Str_ SQL = "insert into $ table_name
(Nikename, subject, date_created, ip_address, message, email_address, zhuye_address, oicq)
Values
('$ Nikename ',
'$ Subobject ',
'$ Date_now ',
'$ Ip_address ',
'$ Message ',
'". $ Arr_request ['email _ address']."',
'". $ Arr_request ['zhuye _ address']."',
'". $ Arr_request ['oicq']."'
)";
$ Result = mysql_db_query ($ db_name, $ str_ SQL, $ id_link );
If (! $ Result ){
Affy_error_exit ('SQL Insert Execution has failed .');
}
Else
{
Echo "<! Doctype html public "-// W3C // dtd html 4.0 Transitional // EN"> ";
Echo "<HTML> <HEAD> <TITLE> post </TITLE> ";
Echo "<META content =" text/html; charset = gb2312 "http-equiv = Content-Type> ";
Echo "<meta HTTP-EQUIV =" REFRESH "CONTENT =" 2; URL = display. php "> ";
Echo "Echo "<ul> Thank you for posting your message. The message content will be displayed automatically ";
Echo "<br> ";
Echo "<a href = display. php> If your browser does not automatically return to the homepage of the message book ,?
Click here to return .";
Echo "</a> </ul> ";
Exit;
}
?>
Index.html File
<Html>
<Center>
<Title> thank you for your message! </Title>
<H1> <font color = blue> my message book </font> <Font color = navy> first of all, thank you for your message. I will read every sentence carefully !!! </Font>
<Form action = "post. php" method = "post">
<Table>
<Tr>
<Td> <font color = teal> </font> <font color = red> (cannot be blank) </font> </td> <td>
<Input type = "text" name = "nikename" value = "> </td>
</Tr>
<Tr>
<Td> OICQ number: </td> <td>
<Input type = "text" name = "oicq" value = ""> </td>
</Tr>
<Tr>
<Td> Email: </td> <td>
<Input type = "text" name = "email_address" value = "" size = "30"> </td>
</Tr>
<Tr>
<Td> personal homepage: </td> <td>
<Input type = "text" name = "zhuye_address" value = "http: //" size = "40"> </td>
</Tr>
<Tr> <td>
Topic: </td> <td>
<Input type = "text" name = "subject" size = "40"> </td>
</Tr>
<Tr> <td>
Content: </td>
</Tr>
<Tr> <td colspan = "2">
<Textarea name = "message" cols = "60" rows = "8"> </textarea> </td>
</Tr>
<Tr>
<Td>
<Input type = "submit" value = "Complete Message">
</Td>
<Td>
<Input type = "reset" value = "coming again">
</Td>
</Tr>
</Table>
</Form>
<P>
<A href = display. php> View message </a>
<Hr> Free message book provided by <a href = "http://little.oso.com.cn"> cubs </a> Technical Support
</Center>
</Html>
Display. inc file !!!
<Tr bgcolor =>
<Td>
<A href = mailto: <? Php echo $ record-> email_address?> >
<Font color = "blue" size = 4> <strong> <? Php echo $ record-> nikename?> </Strong> </font>
</A>
</Td>
<Td> <font color = "navy"> message time: <? Php echo $ record-> date_created?> </Font> </td>
<Td> from:
<? Php
$ Ip_address = ip_question ($ record-> ip_address );
Echo $ ip_address;
?>
</Td>
</Tr>
<Tr bgcolor =>
<Th colspan = 3 align = left> topic: <font color = teal> <? Php echo $ record-> subject?> </Font> </th>
</Tr>
<Tr> <th colspan = 3 align = left> <font color = "# 416AAF">
<? Php echo $ record-> message?> </Font> </th>
</Tr>
<? Php
If ($ record-> huifu_biaozi)
{
?>
<Tr> <th colspan = 3 align = left> <font color = "red"> <br> moderator reply: </font> <font color = "navy">
<? Php echo $ record-> huifu?> </Font> </th>
</Tr>
<? Php
}
?>
<Tr>
<Th colspan = 3 align = left> <br>
<A href = mailto: <? Php echo $ record-> email_address?> >
Alt = "<? Php echo $ record-> nikename?> The email address of is: <? Php echo $ record-> email_address?> "
Border = "0" width = "15" length = "15"> email </a>
<A href = <? Php echo $ record-> zhuye_address?> Alt = "<? Php echo $ record-> nikename?> The home page address is: <? Php echo $ record-> zhuye_address?> "
Border = "0"
Width = "14" length = "14"> homepage </a>
nikename?> The OICQ of is:
<? Php echo $ record-> oicq?> "
Width = "14" length = "14"> OICQ </a>
<A href = action. php? Action = delete & key_liuyan = <? Php echo $ record-> key_liuyan?> Delete </a>
<A href = action. php? Action = huifu & key_liuyan = <? Php echo $ record-> key_liuyan?> > reply </a>
</Th> </tr>
<Tr>
<Td colspan = "3"> </Tr>