51testing Software Testing Forum A concise multi-level forum

Source: Internet
Author: User
This forum used a total of less than 200 lines of code, execution speed quite fast. Running examples in: Http://www.hnpts.ha.cn/forum
MySQL Database: yxforum
+-------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-------+--------------+------+-----+---------+----------------+
| ID | Int (11) | | PRI | 0 | auto_increment |
| DT | datetime | YES | | NULL | |
| TP | varchar (255) | YES | | NULL | |
| CT | Text | YES | | NULL | |
| FL | Int (11) | YES | | NULL | |
| IP | varchar (20) | YES | | NULL | |
| Un | varchar (50) | YES | | NULL | |
| EM | varchar (60) | YES | | NULL | |
| num | Int (11) | YES | | NULL | |
+-------+--------------+------+-----+---------+----------------+
index.php:





mysql_select_db ("xxxx", $m);
?>
$HF _fl= $FL;
$q = "SELECT * from Yxforum where id=". $FL;
$MR =mysql_query ($q, $m);
$ra =mysql_fetch_row ($MR);
?>



?>


$lastid = $ra [4];
Print ("
". $ra [3]."
");
Print ("
follow the topic:");
}
$q = "SELECT * from Yxforum where fl=". $fl. "ORDER BY dt DESC";
if ($p = = "") $p = 0;
$MR =mysql_query ($q, $m);
$f =mysql_num_fields ($MR);
$ra =mysql_fetch_row ($MR);
$i = 0; $p 1= $p *15; /* Skip the line corresponding to the specified number of pages */
while ($i < $p 1)
{$i + +;
$ra =mysql_fetch_row ($MR);
if (! $ra) break;}

?>













$x [0]= "FFFFCC"; $x [1]= "deefff"; $i = 1; while ($RA)/* Displays the current theme */{$ys _c= $i% 2; Print (" "); $ra =mysql_fetch_row ($MR); $i + +; if ($i >15) break; }?>
Latest Response Time
The person who published
Theme
Number of responses
". $ra [1]);
Print ("
". $ra [6]." ");
Print ("
");
printf ("%s", $ra [0], $ra [2]);
Print ("
". $ra [8]);
Print ("







Self-Use Forum Program version 0.25 design tool: Php+mysql

Gu Qitzing Sword Making
Carefree Flying Fox Multimedia Workshop 2000



addnew.php:
mysql_select_db ("xxxxx", $m);
$ZW =ereg_replace ("<", "<", $ZW);
$ZW =ereg_replace (">", ">", $ZW);
$ZW =ereg_replace ("n", "
", $ZW);
$ZW =ereg_replace ("", "", $ZW);
$tt =ereg_replace ("<", "<", $TT);
$tt =ereg_replace (">", ">", $tt);
if ($nm = = "") $nm = "Unknown treasure";
if ($em = = "") {$nm. = "<--is a rookie without mail"; $em = "No";}
$err =strlen ($TT) *strlen ($ZW);
if ($err ==0)
$msg = "Don't be lazy!" Fill out the form and submit it no later. ";
else {$q = "insert into Yxforum (dt,tp,ct,fl,ip,un,em,num) values"
." (Now (), "". $tt. "," ". $zw.", ". $fl.", "". $REMOTE _addr. "", "". $nm. "", "". $em. "", "". ".", "". "," "."
mysql_query ($q, $m);
$q = "Select Num,fl from Yxforum where id=". $FL;
$FL _a= $FL;
do {$mr =mysql_query ($q, $m);
$ra =mysql_fetch_row ($MR);
$num = $ra [0]+1;
$q = "Update yxforum set Dt=now (), num=". $num. "Where id=". $FL;
$FL = $ra [1];
mysql_query ($q, $m);
$q = "Select Num,fl from Yxforum where id=". $FL;
} while ($fl >0);

$msg = "Your comments have been successfully submitted!" ";
}
?>





The system will automatically return after 3 seconds. If you cannot return or you are in a hurry, please press &p= > Here

The above describes the 51testing Software Testing Forum A concise multi-level forum, including the 51testing Software Testing forum content, I hope to be interested in PHP tutorial friends helpful.

  • 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.