Page 1/3 of source code (2) of a php Forum program imitating oso

Source: Internet
Author: User

Procedure 2: addforum. php
<Html>
<Head>
<Link rel = "STYLESHEET" type = "text/css" href = "fp_zhangcg.css">
<Meta http-equiv = "Content-Type" content = "text/html; charset = gb2312">
<Meta name = "Microsoft Theme" content = "none">
<Meta name = "Microsoft Border" content = "none">
<Title> Publish information </title>
</Head>
<Body bgcolor = "# C0C0C0" background = "backcolor.gif">
<SCRIPT language = JavaScript>
<! --
Var submitcount = 0;
Function checkSubmit (){
If (submitcount = 0)
{
Submitcount ++;
Return true;
}
Else {
If (submitcount> 0 ){
Alert ("the post has been submitted successfully. Do not post it again! Couldn't submit the form twice, please. "); return false;
}
}
}
Function check_com (){
If (document. form. username. value. length = 0 ){
Submitcount --;
Alert ("Enter your online name! NPlease input your user name .");
Return false;
}
If (document. form. forumtitle. value. length = 0 ){
Submitcount --;
Alert ("the topic cannot be blank! NYou must supply a subject .");
Return false;
}
If (document. form. forumcontent. value. length = 0 ){
Submitcount --;
Alert ("add content cannot be blank! NYou must supply a message .");
Return false;
}
Return true;
}
// -->
</SCRIPT>
<?
Include ("c: mydbheader. inc ");
?>
<?
If (empty ($ theme_id )){
$ Theme_id = 0;
}
?>
<Table width = "750" border = "0">
<Tr>
<?
If ($ theme_id = 0 ){
Print '<td class = "text"> current location: homepage -- Forum </td> ';
}
Else
{
Print '<td class = "text"> current location: homepage -- Forum -- reply to post </td> ';
}
?>
<Td> </td>
</Tr>
</Table>
<?
Print '<form action = "readforum. php? Readflag = 0 "';
Print 'method = post name = form onsubmit = "return check_com ()"> ';
?>
<Table width = "750" border = "0">
<Tr>
& Lt; td width = "131" class = "text" & gt;
<Div align = "right"> <span class = "text"> <span class = "text"> your big name </span>: </span> </div>
</Td>
& Lt; td width = "609" & gt;
<Input type = "text" name = "username" size = "80" value = "" maxlength = "12">
<Font color = "# ff0000"> * </font> </td>
</Tr>
<Tr>
& Lt; td width = "131" class = "text" & gt;
<Div align = "right"> E_mail: </div>
</Td>
& Lt; td width = "609" & gt;
<Input type = "text" name = "useremail" size = "80">
</Td>
</Tr>
<Tr>
& Lt; td width = "131" class = "text" & gt;
<Div align = "right"> your homepage: </div>
</Td>
& Lt; td width = "609" & gt;
<P>
<Input type = "text" name = "userhttp" size = "80" value = "http: //">
</P>
</Td>
</Tr>
<Tr>
& Lt; td width = "131" class = "text" & gt;
<?
If ($ theme_id = 0 ){
Print '<div align = "right"> post title: </div> ';
Print '</td> <td width = "609" type = "codeph" text = "/codeph"> ';

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.