# 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>发新贴子</title>
<link rel="stylesheet" type="text/css" href="css/index.css">
</head>
<body bgcolor="#666666">
<?php include "ad.php";?><br>
<hr noshade width="80%" size="1">
<table width="80%" border="1" cellspacing="0" cellpadding="0" align="center" bordercolorlight="#686898" bordercolordark="#FFFFFF">
<tr align="center" valign="top" bgcolor="#666699">
<td><font size="3" color="#336699"><b><font color="#CCFFFF">发 贴 子</font></b></font><br>
</td>
</tr>
<tr bgcolor="#ffffef">
<td>(您<b>必须注册</b>以后才能发表新主题,不然您只能查看主题。<br>
如果您还未注册,请<a href="apply.php" target="_blank"><font color="#FF0000">点击这里</font></a>转到注册页)</td>
</tr>
<tr bgcolor="#e8eee0">
<td><br>
您的贴子将被发表在<b><?php echo $sql_row[chinesename];?></b>版块 </td>
</tr>
</table>
<br>
<form method="post" action="read.php">
<table width="98%" border="1" cellspacing="0" cellpadding="0" align="center" bordercolorlight="#336699" bordercolordark="#FFFFFF" bgcolor="#666699">
<tr>
<td width="89" bgcolor="#acc0fa" align="right">用户名:</td>
<td width="224">
<input type="text" name="name" style="font-size: 9pt; background-color: #FFFFFF; color: #3366FF; border: 1 solid #000000" value="<?php echo $jl_forum[name];?>" size="17" maxlength="16">
<font color="#FF0000">* </font> </td>
<td width="63" bgcolor="#acc0fa" align="right">密码:</td>
<td width="160">
<input type="password" name="password" size="10" maxlength="16" style="font-size: 9pt; background-color: #FFFFFF; color: #FF0000; border: 1 solid #000000">
<font color="#FF0000">*</font> <font color="#FF0000"> </font> </td>
</tr>
<tr>
<td colspan="4"><font color="#FFFFFF">主题:</font>
<input type="text" name="title" size="50" maxlength="50" style="font-size: 9pt; background-color: #FFFFFF; color: ##3366FF; border: 1 solid #000000">
<font color="#FF0000">* </font></td>
</tr>
<tr>
<td colspan="4"> <font color="#FFFFFF">内容:</font><br>
<textarea name="cont" cols="70" rows="12" wrap="VIRTUAL"></textarea>
<br>
<input type="button" name="Submit2" value="取消" onclick="window.close()">
<input type="submit" name="add" value="提交">
<input type="checkbox" name="qm" value="qm" checked>
<font color="#FFFFFF">使用签名</font>
<input type="hidden" name="board" value="<?php echo $board;?>">
</td>
</tr>
</table>
</form>
<?php include "footer.php";?><br>
</body>
</html>
# query.php
<?php
require("func.php");
$sql="select * from boardinfo";
$sql_result=mysql_query($sql);
?>
<html>
<head>
<title>main</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="css/page.css">
</head>
<body bgcolor="#FFFFFF" background="image/bg.gif">
<table width="90%" border="1" cellspacing="0" cellpadding="0" align="center" bordercolorlight="#FFCC99" bordercolordark="#FFCC99">
<tr bgcolor="#CCFF99">
<td>
<div align="center"><b>论坛贴子查询</b></div>
</td>
</tr>
<tr align="center">
<td>
<form method="post" action="query_list.php">
在
<select name="board">
<option selected>请选择版面</option>
<?php
while($sql_row=mysql_fetch_array($sql_result)){
?>
<option value="<?php echo $sql_row[name];?>"><?php echo $sql_row[chinesename];?></option>
<?php
}
?>
</select>
中查询<br>
<input type="text" name="query_str" size="40" maxlength="40">
<br>
<input type="submit" name="title" value="按主题查询">
<input type="submit" name="cont" value="按内容查询">
<input type="submit" name="writer" value="按作者查询">
</form>
</td>
</tr>
<tr bgcolor="#CCFF99">
<td>
<div align="center"><b>论坛信息</b></div>
</td>
</tr>
<tr>
<td>
<?php include "info.php";?>
</td>
</tr>
</table>
</body>
</html>
# query_list.php
<?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);
?>
<html>
<head>
<titl
[1] [2] [3] [4] 下一页