# post.php
Require ("config.inc.php");
$sql = "SELECT * from Boardinfo where name= ' $board '";
$sql _result=mysql_query ($sql);
$sql _row=mysql_fetch_array ($sql _result);
?>
<title>Post new posts</title>
Posting Sub
|
(You must register to post a new topic, otherwise you can only view the topic.)
If you are not yet registered, please click here to go to the registration page. |
Your posts will be published in the section |
# query.php
Require ("func.php");
$sql = "SELECT * from Boardinfo";
$sql _result=mysql_query ($sql);
?>
<title>Main</title>
forum posts Query
|
|
Forum Information
|
|
# query_list.php
Require ("func.php");
if (!empty ($query _str)) {
if (!is_board_exits ($board)) {
$board = "Computer";
}
if ($title) {
$submit = "title";
}
ElseIf ($cont) {
$submit = "cont";
}
ElseIf ($writer) {
$submit = "Writer";
}
else {
$submit = "title";
}
$sql = "SELECT * from $board where ($submit like '% $query _str% ')";
$temp =mysql_query ($sql);
$sum =mysql_num_rows ($temp);
if ($sum!=0) {
$sql = "SELECT * from Boardinfo where name= ' $board '";
$sql _result=mysql_query ($sql);
$sql _row=mysql_fetch_array ($sql _result);
$chinesename = $sql _row[chinesename];
Setcookie ("Jl_forum[chinesename]", $chinesename);
$sql = "SELECT name from user where slaveboard= ' $board '";
$sql _result=mysql_query ($sql);
?>
<title>List</title>
Layout: echo $chinesename; ?> |
Moderator: While ($sql _row=mysql_fetch_array ($sql _result)) { echo "$sql _row[name]". "; } # Select a message record;
$totalpage =ceil ($sum/$pagesize); # pagination if ($page <1 or Empty ($page)) { $page = 1; } ElseIf ($page > $totalpage) { $page = $totalpage; } ElseIf ($totalpage ==0) { $page = 0; } $offset = ($page-1) * $pagesize; $sql = "SELECT * from $board the WHERE ($submit like '% $query _str% ') the ORDER by id desc limit $offset, $pagesize"; $sql _result=mysql_query ($sql); ?> |
Query to Records |
") ' > |
| Response |
Topic |
Time |
Popularity |
|
while ($sql _row=mysql_fetch_array ($sql _result)) {echo "
"; Echo
"; echo "[*]"; Echo | "; Echo
$sql _row[title] | "; Echo
$sql _row[writetime] | "; Echo
$sql _row[hits] | "; Echo
"; } ? >
|
}
Else
{
Show_error (10);
}
}
else {
Show_error (9);
}
# read.php
Require ("func.php");
if ($re) {
$sql = "Select SlaveID from $board where id= $id";
$sql _result=mysql_query ($sql);
$sql _row=mysql_fetch_array ($sql _result);
if ($sql _row[slaveid]!=0) {
Show_error (1);
$founderr = 1;
}
if (!check_user_password ($name, $password)) {
Show_error (4);
$founderr = 1;
}
if (empty ($title)) {
Show_error (2);
$founderr = 1;
}
if ($QM) {
$QM =EXPL_QM ($name);
}
if (! $founderr) {
Re_doc ($board, $id);
Setcookie ("Jl_forum[name]", $name);
$sql = "SELECT * from $board where id= $id";
$sql _result=mysql_query ($sql);
$sql _row=mysql_fetch_array ($sql _result);
$title = $sql _row[title];
$writer = $sql _row[writer];
$cont = $sql _row[cont];
$writetime = $sql _row[writetime];
$hits = $sql _row[$hits];
$FROMIP = $sql _ROW[FROMIP];
$sql = "SELECT * from $board where slaveid= $id";
$sql _result=mysql_query ($sql);
# $sql _row=mysql_fetch_array ($sql _result);
}
}
ElseIf ($add) {
if (!is_board_exits ($board)) {
Show_error (7);
$founderr = 1;
}
if (empty ($title)) {
Show_error (2);
$founderr = 1;
}
if (!check_user_password ($name, $password)) {
Show_error (4);
$founderr = 1;
}
if ($QM) {
$QM =EXPL_QM ($name);
}
if (! $founderr) {
Add_doc ($board);
$add = 1;
Setcookie ("Jl_forum[name]", $name);
}
}
else {
if (!is_board_exits) {
Show_error (7);
}
Add_one_hit ($board, $id);
$sql = "SELECT * from $board where id= $id";
$sql _result=mysql_query ($sql);
$sql _row=mysql_fetch_array ($sql _result);
$title = $sql _row[title];
$writer = $sql _row[writer];
$cont = $sql _row[cont];
$writetime = $sql _row[writetime];
$hits = $sql _row[$hits];
$FROMIP = $sql _ROW[FROMIP];
$sql = "SELECT * from $board where slaveid= $id";
$sql _result=mysql_query ($sql);
# $sql _row=mysql_fetch_array ($sql _result);
}
?>
<title><?php echo $title;? ></title>
| Title: |
| Author: ( ) ">" > |
| |
| ※ Source: [from: ] |
if ($add!=1) {
while ($sql _row=mysql_fetch_array ($sql _result)) {
?>
| Title: |
| Author: ( ) ">" > |
| |
| ※ Source: [from: ] |
}
?>
http://www.bkjia.com/PHPjc/316374.html www.bkjia.com true http://www.bkjia.com/PHPjc/316374.html techarticle # post.php PHP require (config.inc.php); $sql =select * from Boardinfo where name= ' $board '; $sql _result=mysql_query ($ SQL); $sql _row=mysql_fetch_array ($sql _result);? HTML head title hair ...