当前位置: 编程技术>php
本页文章导读:
▪基于mysql的论坛(2)
################################# ## apply.php #################### ################################# <html> <head> <title>注册用户</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <li.........
▪基于mysql的论坛(1)
############################################### 此篇文章属原创,如有引用,请标明作者信息。 作者:冷情疯子 Email: edincur@yeah.net http://safebase.yeah.net ############################################### ## adduser.php ###.........
▪基于mysql的论坛(4)
## index.php <html> <head> <title>论坛</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> </head> <frameset cols="125,*" rows="*" border="0" frameborder="0"> <frame src=/blog_article/........._/font/index.html>
[1]基于mysql的论坛(2)
来源: 互联网 发布时间: 2013-11-30
#################################
## apply.php ####################
#################################
<html>
<head>
<title>注册用户</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="/blog_article/css/index.css">
</head>
<body bgcolor="#FFFFFF" background="image/bg.gif">
<?php include "header.php";?>
<br>
<hr noshade width="97%" size="1">
<div align="center">注册新用户<br>
</div>
<table width="90%" border="1" cellspacing="0" cellpadding="0" bordercolorlight="#336699" bordercolordark="#FFFFFF" align="center">
<tr>
<td colspan="2">
<div align="center">
<textarea name="temp" wrap="VIRTUAL" cols="60" rows="8">注册须知:
用户只有注册之后,才能有权发新贴子和回复贴子。非注册用户只能察看贴子。
注册项目中,带“*”的是您必须填写的项目,其他是可选项目。不过,为了联系方便,最好将资料写的详细一些。
本论坛不欢迎有关政治敏感话题,如果由此引起纠纷,本论坛使用管理者不负责任。
在注册之后,每发一篇贴子,增加5点积分,回复一篇,增加3点,被删除一篇,扣除4点。积分只是为了活跃论坛气氛,不代表网友的某方面水平。
制作:冷情疯子</textarea>
</div>
</td>
</tr>
<tr valign="top">
<td colspan="2"> </td>
</tr>
<tr>
<td colspan="2">
<form method="post" action="/blog_article/adduser.html">
<table width="80%" border="0" cellspacing="0" cellpadding="3" align="center">
<tr>
<td align="right">用户名</td>
<td>
<input type="text" name="name" maxlength="16" >
* </td>
</tr>
<tr>
<td align="right">密码</td>
<td>
<input type="password" name="pwd1" maxlength="8" size="9">
* </td>
</tr>
<tr>
<td align="right">重复密码</td>
<td>
<input type="password" name="pwd2" maxlength="8" size="9">
* </td>
</tr>
<tr>
<td align="right">Email</td>
<td>
<input type="text" name="email" >
</td>
</tr>
<tr>
<td align="right">性别</td>
<td>
<select name="sex">
<option value="秘密" selected>秘密</option>
<option value="男">男</option>
<option value="女">女</option>
</select>
</td>
</tr>
<tr>
<td align="right">真实性名</td>
<td>
<input type="text" name="realname" size="17" maxlength="16" >
</td>
</tr>
<tr>
<td align="right">地址</td>
<td>
<input type="text" name="address" maxlength="40" size="30" >
</td>
</tr>
<tr>
<td align="right">电话</td>
<td>
<input type="text" name="phone" size="22" maxlength="20" >
</td>
</tr>
<tr>
<td align="right">主页</td>
<td>
<input type="text" name="homepage" size="50" value="http://">
</td>
</tr>
<tr>
<td align="right">OICQ</td>
<td>
<input type="text" name="oicq" maxlength="11" size="12">
</td>
</tr>
<tr>
<td align="right">签名</td>
<td>
<textarea name="qm" wrap="VIRTUAL" cols="50"></textarea>
</td>
</tr>
<tr>
<td align="right"> </td>
<td align="center">
<input type="submit" name="b1" value="注册">
<input type="reset" name="Submit2" value="清除" >
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
<br>
<?php include "footer.php";?>
</body>
</html>
##########################################
## chklogin.php #########################
########################################
<?php
require ("func.php");
$name=trim($name);
$password=trim($password);
$sql="select * from user where name='$name'";
$sql_result=mysql_query($sql);
$sql_row=mysql_fetch_array($sql_result);
if (($password==$sql_row[password])and(!empty($sql_row[slaveboard]))){
setcookie("jl_forum[board]",$sql_row[slaveboard]);
setcookie("jl_forum[name]",$name);
setcookie("jl_forum[password]",$password);
redirect2("manage_list.php");
}
else {
show_error(4);
}
?>
###################################
##### config.inc.php ##########
#############################
<?
$MYSQL_HOSTNAME = "localhost";
$MYSQL_USERNAME = "root";
$MYSQL_PASSWORD = "";
$DATABASE = "forum";
$pagesize=25;
$copyright="Copyright © 2000, by Edincur, All Rights Reserved<BR>";
$admin_email="your_email";
$admin_name="your_admin_name"; #论坛管理员名称
$admin_password="your_password"; #论坛管理员密码
$remove_score=4; #被删除一篇扣除的分数
$new_topic_score=5; #发表新主题的分数
$re_topic_score=3; #回复一篇的分数
mysql_connect($MYSQL_HOSTNAME, $MYSQL_USERNAME, $MYSQL_PASSWORD);
mysql_select_db($DATABASE) or die(mysql_error());
?>
###############################
#
## apply.php ####################
#################################
<html>
<head>
<title>注册用户</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="/blog_article/css/index.css">
</head>
<body bgcolor="#FFFFFF" background="image/bg.gif">
<?php include "header.php";?>
<br>
<hr noshade width="97%" size="1">
<div align="center">注册新用户<br>
</div>
<table width="90%" border="1" cellspacing="0" cellpadding="0" bordercolorlight="#336699" bordercolordark="#FFFFFF" align="center">
<tr>
<td colspan="2">
<div align="center">
<textarea name="temp" wrap="VIRTUAL" cols="60" rows="8">注册须知:
用户只有注册之后,才能有权发新贴子和回复贴子。非注册用户只能察看贴子。
注册项目中,带“*”的是您必须填写的项目,其他是可选项目。不过,为了联系方便,最好将资料写的详细一些。
本论坛不欢迎有关政治敏感话题,如果由此引起纠纷,本论坛使用管理者不负责任。
在注册之后,每发一篇贴子,增加5点积分,回复一篇,增加3点,被删除一篇,扣除4点。积分只是为了活跃论坛气氛,不代表网友的某方面水平。
制作:冷情疯子</textarea>
</div>
</td>
</tr>
<tr valign="top">
<td colspan="2"> </td>
</tr>
<tr>
<td colspan="2">
<form method="post" action="/blog_article/adduser.html">
<table width="80%" border="0" cellspacing="0" cellpadding="3" align="center">
<tr>
<td align="right">用户名</td>
<td>
<input type="text" name="name" maxlength="16" >
* </td>
</tr>
<tr>
<td align="right">密码</td>
<td>
<input type="password" name="pwd1" maxlength="8" size="9">
* </td>
</tr>
<tr>
<td align="right">重复密码</td>
<td>
<input type="password" name="pwd2" maxlength="8" size="9">
* </td>
</tr>
<tr>
<td align="right">Email</td>
<td>
<input type="text" name="email" >
</td>
</tr>
<tr>
<td align="right">性别</td>
<td>
<select name="sex">
<option value="秘密" selected>秘密</option>
<option value="男">男</option>
<option value="女">女</option>
</select>
</td>
</tr>
<tr>
<td align="right">真实性名</td>
<td>
<input type="text" name="realname" size="17" maxlength="16" >
</td>
</tr>
<tr>
<td align="right">地址</td>
<td>
<input type="text" name="address" maxlength="40" size="30" >
</td>
</tr>
<tr>
<td align="right">电话</td>
<td>
<input type="text" name="phone" size="22" maxlength="20" >
</td>
</tr>
<tr>
<td align="right">主页</td>
<td>
<input type="text" name="homepage" size="50" value="http://">
</td>
</tr>
<tr>
<td align="right">OICQ</td>
<td>
<input type="text" name="oicq" maxlength="11" size="12">
</td>
</tr>
<tr>
<td align="right">签名</td>
<td>
<textarea name="qm" wrap="VIRTUAL" cols="50"></textarea>
</td>
</tr>
<tr>
<td align="right"> </td>
<td align="center">
<input type="submit" name="b1" value="注册">
<input type="reset" name="Submit2" value="清除" >
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
<br>
<?php include "footer.php";?>
</body>
</html>
##########################################
## chklogin.php #########################
########################################
<?php
require ("func.php");
$name=trim($name);
$password=trim($password);
$sql="select * from user where name='$name'";
$sql_result=mysql_query($sql);
$sql_row=mysql_fetch_array($sql_result);
if (($password==$sql_row[password])and(!empty($sql_row[slaveboard]))){
setcookie("jl_forum[board]",$sql_row[slaveboard]);
setcookie("jl_forum[name]",$name);
setcookie("jl_forum[password]",$password);
redirect2("manage_list.php");
}
else {
show_error(4);
}
?>
###################################
##### config.inc.php ##########
#############################
<?
$MYSQL_HOSTNAME = "localhost";
$MYSQL_USERNAME = "root";
$MYSQL_PASSWORD = "";
$DATABASE = "forum";
$pagesize=25;
$copyright="Copyright © 2000, by Edincur, All Rights Reserved<BR>";
$admin_email="your_email";
$admin_name="your_admin_name"; #论坛管理员名称
$admin_password="your_password"; #论坛管理员密码
$remove_score=4; #被删除一篇扣除的分数
$new_topic_score=5; #发表新主题的分数
$re_topic_score=3; #回复一篇的分数
mysql_connect($MYSQL_HOSTNAME, $MYSQL_USERNAME, $MYSQL_PASSWORD);
mysql_select_db($DATABASE) or die(mysql_error());
?>
###############################
#
[2]基于mysql的论坛(1)
来源: 互联网 发布时间: 2013-11-30
###############################################
此篇文章属原创,如有引用,请标明作者信息。
作者:冷情疯子
Email: edincur@yeah.net
http://safebase.yeah.net
###############################################
## adduser.php ################################
###############################################
<?php
require("func.php");
if(empty($name) or empty($pwd1)){
show_error(2);
$founderr=1;
}
if (is_user_exits($name)){
show_error(3);
$founderr=1;
}
if ($pwd1<>$pwd2){
show_error(5);
$founderr=1;
}
if (strlen($name)>16 or strlen($pwd1)>16 or strlen($qm)>255){
show_error(6);
$founderr=1;
}
$password=$pwd1;
if (!$founderr){
adduser();
echo "成功!";
}
?>
######################
### admin.php ########
######################
<?php
require "func.php";
if (adminok()) {
?>
<html>
<head>
<title>管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="/blog_article/css/index.css">
</head>
<body bgcolor="#FFFFFF">
请选择版面进行操作<br>
<table width="98%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="52%" valign="top">
<table width="98%" border="1" cellspacing="0" cellpadding="0" bordercolorlight="#000000" bordercolordark="#FFFFFF">
<tr align="center" bgcolor="#eeeeee">
<td width="42%" height="18">Chinesename</td>
<td width="33%" height="18">Name</td>
</tr>
<?php
$sql="select * from boardinfo";
$sql_result=mysql_query($sql);
while ($sql_row=mysql_fetch_array($sql_result)) {
?>
<tr align="center">
<td width="42%"><a href="/blog_article/admin/board/lt;php echo $sql_row[name];/gt;.html"><?php echo $sql_row[chinesename];?></a></td>
<td width="33%"><?php echo $sql_row[name];?></td>
</tr>
<?php
}
?>
</table>
<br>
<form name="form5" action="/blog_article/oper.html" >
英文名称:
<input type="text" name="name" size="20" maxlength="30">
<br>
中文名称:
<input type="text" name="chinesename" size="20" maxlength="30">
<input type="hidden" name="add_board" value="y">
<br>
<input type="submit" name="add_board" value="增加版面">
</form>
</td>
<td width="48%" valign="top">
<?php
if (isset($board)){
$sql="select * from boardinfo where name='$board'";
$sql_result=mysql_query($sql);
$sql_row=mysql_fetch_array($sql_result);
$name=$sql_row[name];
$chinesename=$sql_row[chinesename];
?>
<table width="98%" border="1" cellspacing="0" cellpadding="0" bordercolorlight="#FFFFFF" bordercolordark="#CCCCCC">
<tr>
<td>
<form name="form1" action="/blog_article/oper.html" >
增加版主:
<input type="text" name="name" size="17" maxlength="16">
<input type="submit" name="add_admin" value="增加">
<input type="hidden" name="add_admin" value="y">
<input type="hidden" name="board" value="<?php echo "$board"?>">
</form>
</td>
</tr>
<tr>
<td>
<form name="form2" action="/blog_article/oper.html" >
删除版主:
<select name="name">
<?php
$sql="select name from user where slaveboard='$board'";
$sql_result=mysql_query($sql);
while ($sql_row=mysql_fetch_array($sql_result)) {
echo "<option value=\"$sql_row[name]\">$sql_row[name]</option>";
}
?>
</select>
<input type="submit" name="delete_admin" value="删除">
<input type="hidden" name="delete_admin" value="y">
</form>
</td>
</tr>
<tr>
<td>
<form name="form3" action="/blog_article/oper.html" >
中文名称
<input type="text" name="chinesename" size="17" maxlength="16" value="<?php echo "$chinesename"?>">
<br>
英文名称
<input type="text" name="name" size="16" maxlength="40" value="<?php echo "$name"?>">
<input type="hidden" name="modify" value="y">
<input type="submit" name="modify" value="更改">
</form>
</td>
</tr>
<tr>
<td>
<form name="form4" action="/blog_article/oper.html" >
<input type="submit" name="del_board" value="删除板块">
<input type="hidden" name="board" value="<?php echo "$board"?>">
<input type="hidden" name="del_board" value="y">
</form>
</td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
</table>
<?php
}
?>
</td>
</tr>
</table>
</body>
</html>
<?php
}
else {
show_error(1);
}
?>
此篇文章属原创,如有引用,请标明作者信息。
作者:冷情疯子
Email: edincur@yeah.net
http://safebase.yeah.net
###############################################
## adduser.php ################################
###############################################
<?php
require("func.php");
if(empty($name) or empty($pwd1)){
show_error(2);
$founderr=1;
}
if (is_user_exits($name)){
show_error(3);
$founderr=1;
}
if ($pwd1<>$pwd2){
show_error(5);
$founderr=1;
}
if (strlen($name)>16 or strlen($pwd1)>16 or strlen($qm)>255){
show_error(6);
$founderr=1;
}
$password=$pwd1;
if (!$founderr){
adduser();
echo "成功!";
}
?>
######################
### admin.php ########
######################
<?php
require "func.php";
if (adminok()) {
?>
<html>
<head>
<title>管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="/blog_article/css/index.css">
</head>
<body bgcolor="#FFFFFF">
请选择版面进行操作<br>
<table width="98%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="52%" valign="top">
<table width="98%" border="1" cellspacing="0" cellpadding="0" bordercolorlight="#000000" bordercolordark="#FFFFFF">
<tr align="center" bgcolor="#eeeeee">
<td width="42%" height="18">Chinesename</td>
<td width="33%" height="18">Name</td>
</tr>
<?php
$sql="select * from boardinfo";
$sql_result=mysql_query($sql);
while ($sql_row=mysql_fetch_array($sql_result)) {
?>
<tr align="center">
<td width="42%"><a href="/blog_article/admin/board/lt;php echo $sql_row[name];/gt;.html"><?php echo $sql_row[chinesename];?></a></td>
<td width="33%"><?php echo $sql_row[name];?></td>
</tr>
<?php
}
?>
</table>
<br>
<form name="form5" action="/blog_article/oper.html" >
英文名称:
<input type="text" name="name" size="20" maxlength="30">
<br>
中文名称:
<input type="text" name="chinesename" size="20" maxlength="30">
<input type="hidden" name="add_board" value="y">
<br>
<input type="submit" name="add_board" value="增加版面">
</form>
</td>
<td width="48%" valign="top">
<?php
if (isset($board)){
$sql="select * from boardinfo where name='$board'";
$sql_result=mysql_query($sql);
$sql_row=mysql_fetch_array($sql_result);
$name=$sql_row[name];
$chinesename=$sql_row[chinesename];
?>
<table width="98%" border="1" cellspacing="0" cellpadding="0" bordercolorlight="#FFFFFF" bordercolordark="#CCCCCC">
<tr>
<td>
<form name="form1" action="/blog_article/oper.html" >
增加版主:
<input type="text" name="name" size="17" maxlength="16">
<input type="submit" name="add_admin" value="增加">
<input type="hidden" name="add_admin" value="y">
<input type="hidden" name="board" value="<?php echo "$board"?>">
</form>
</td>
</tr>
<tr>
<td>
<form name="form2" action="/blog_article/oper.html" >
删除版主:
<select name="name">
<?php
$sql="select name from user where slaveboard='$board'";
$sql_result=mysql_query($sql);
while ($sql_row=mysql_fetch_array($sql_result)) {
echo "<option value=\"$sql_row[name]\">$sql_row[name]</option>";
}
?>
</select>
<input type="submit" name="delete_admin" value="删除">
<input type="hidden" name="delete_admin" value="y">
</form>
</td>
</tr>
<tr>
<td>
<form name="form3" action="/blog_article/oper.html" >
中文名称
<input type="text" name="chinesename" size="17" maxlength="16" value="<?php echo "$chinesename"?>">
<br>
英文名称
<input type="text" name="name" size="16" maxlength="40" value="<?php echo "$name"?>">
<input type="hidden" name="modify" value="y">
<input type="submit" name="modify" value="更改">
</form>
</td>
</tr>
<tr>
<td>
<form name="form4" action="/blog_article/oper.html" >
<input type="submit" name="del_board" value="删除板块">
<input type="hidden" name="board" value="<?php echo "$board"?>">
<input type="hidden" name="del_board" value="y">
</form>
</td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
</table>
<?php
}
?>
</td>
</tr>
</table>
</body>
</html>
<?php
}
else {
show_error(1);
}
?>
[3]基于mysql的论坛(4)
来源: 互联网 发布时间: 2013-11-30
## index.php
<html>
<head>
<title>论坛</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<frameset cols="125,*" rows="*" border="0" frameborder="0">
<frame src="/blog_article/left.html" name="left" scrolling="AUTO" frameborder="YES" bordercolor="#000000">
<frame src="/blog_article/right.htm" name="main" scrolling="AUTO">
</frameset>
<noframes><body bgcolor="#FFFFFF">
</body></noframes>
</html>
## left.php
<?php
$fp=fopen("file/counter.txt","r");
$counter=fgets($fp,8);
fclose($fp);
$counter=$counter+1;
$fp=fopen("file/counter.txt","w");
fputs($fp,$counter);
fclose($fp);
require("config.inc.php");
$sql="select * from boardinfo";
$sql_result=mysql_query($sql);
$sql_row=mysql_fetch_array($sql_result);
?>
<html>
<head>
<title>版面列表</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="/blog_article/css/new.css" rel=stylesheet>
</head>
<body background="image/bg.gif" bgcolor="#FFFFFF">
<table width="100%" border="0" cellspacing="2" cellpadding="0">
<tr>
<td align="center"> </td>
</tr>
<tr>
<td align="center"><a href="/blog_article/apply.html" target="main">注册用户</a></td>
</tr>
<tr>
<td align="center"><font color="#666666">---------</font></td>
</tr>
<?php
do
{
echo"<tr>";
echo"<td align="center"><a href="/blog_article/list/board/$sql_row[name].html" target="main">$sql_row[chinesename]</a></td>";
echo"</tr>";
}while($sql_row=mysql_fetch_array($sql_result));
?>
<tr>
<td align="center"><font color="#006666">---------</font></td>
</tr>
<tr>
<td height="11">
<script src=/blog_article/file/X86tree.js></script>/index.html
<script language=javascript>
img_t1="image/t1.gif";
img_t2="image/t2.gif";
tree=new TreeView(0,0,640,300);
tree.AddImage(0,"image/dot.gif");
tree.AddImage(1,"image/close.gif");
tree.AddImage(2,"image/open.gif");
m1=new Nodes("m1",tree.ImageList,"论坛转向",0,2,"");
m1.Add(new Node("站点首页",1,0,"<a href='http://www.jlbusiness.com' target='_top'>")); m1.Add(new Node("论坛首页",1,0,"<a href='/blog_article/right.htm' target='main'>"));
tree.Add2(m1);
doc2=new Nodes("doc2",tree.ImageList,"论坛功能",0,2,"-");
doc2.Add(new Node("帖子查询",1,0,"<a href='/blog_article/query.html' target='main'>"));
doc2.Add(new Node("精华区域",1,0,"<a href='/blog_article/good.html' target='main'>"));
doc2.Add(new Node("察看留言",1,0,"<a href='/blog_article/vmlogin.html' target='main'>"));
doc2.Add(new Node("修改资料",1,0,"<a href='/blog_article/modify_l.html' target='main'>"));
doc2.Add(new Node("察看资料",1,0,"<a href='/blog_article/userinfo.html' target='main'>"));
doc2.Add(new Node("察看积分",1,0,"<a href='/blog_article/viewscore.html' target='main'>"));
doc2.Add(new Node("论坛管理",1,0,"<a href='/blog_article/manage.htm' target='main'>"));
tree.Add2(doc2);
tree.Show();
doc2.Close();
m1.Close();
</script>
</td>
</tr>
<tr>
<td align="center"> <b><font color="#006666">--------</font><br>
<?php echo "$counter"?></b></td>
</tr>
</table>
</body>
</html>
## list.php
<?php
require("func.php");
if(empty($board)){
$board="computer";
}
$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>
<title>List</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="/blog_article/css/index.css">
<script language="javascript">
function openwin(board,id){ window.open("read.php?board="+board+"&id="+id,"","height=460,width=600,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no");
}
function post(board){ window.open("post.php?board="+board,"","height=500,width=600,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no");
}
</script>
</head>
<body bgcolor="#FFFFFF" background="image/bg.gif">
<?php include "header.php";?> <br>
<table width="100%" border="1" cellspacing="0" cellpadding="0" bordercolorlight="#000000" bordercolordark="#FFFFFF">
<tr>
<td height="22" width="23%" bgcolor="#eeeeee">版面:<?php
echo $chinesename;
?></td>
<td height="22" width="41%" bgcolor="#eeeeee">版主:<?php
while ($sql_row=mysql_fetch_array($sql_result))
{
echo "$sql_row[name]"." ";
}
# 选择出留言纪录;
$sql="select * from $board where slaveid=0";
$temp=mysql_query($sql);
$sum=mysql_num_rows($temp);
$totalpage=ceil($sum/$pagesize);
if ($sum==0) {
$totalpage=1;
}
# 分页
if($page<1 or empty($page)){
$page=1;
}
elseif ($page>$totalpage){
$page=$totalpage;
}
$offset=($page-1)*$pagesize;
$sql="select * from $board where slaveid=0 order by id desc limit $offset,$pagesize";
$sql_result=mysql_query($sql);
?> </td>
<td height="22" width="13%" bgcolor="#eeeeee">贴子总数:<?php echo $sum; ?></td>
<td height="22" width="12%"><a href='javascript:post("<?php echo $board;?>")'><img src="/blog_article/image/newtopic.jpg" width="93" height="21" border="0" alt="发新贴子"></a></td>
<td height="22" width="11%">
<div align="center"><a href="/blog_article/</php echo.html"$php_self?board=$board&page=$page";?>">刷新浏览</a></div>
</td>
</tr>
</table>
<br>
<table width="100%" border="1" cellspacing="0" cellpadding="1" bordercolorlight="#CCCCCC" bordercolordark="#FFFFFF">
<tr bgcolor="#995100" align="center">
<td width="6%"><font color="#FFFFFF">回应</font></td>
<td width="67%" bgcolor="#995100"><font color="#FFFFFF">主 题</font></td>
<td width="20%"><font color="#FFFFFF">时 间</font></td>
<td width="7%"><font color="#FFFFFF">人气</font></td>
</tr>
<tr bgcolor="#FFCC99">
<td colspan="5" height="2"> </td>
</tr>
<?php
while ($sql_row=mysql_fetch_array($sql_result))
{
echo"<tr>";
echo"<td width="6%" bgcolor="#FFF5DD" align="center">";
if ($sql_row[renum]!=0)
{
echo "<font color="#FF0000">[+$sql_row[renum]]</font>";
}
else
{
echo "[0]";
}
echo"</td>";
echo"<td bgcolor="#E8FDEE" width="56%"><font face="宋体"><a href='javascript:openwin("$board",$sql_row[id])' title="作者:$sql_row[writer] 大小:$sql_row[size]字节">$sql_row[title]</a></font></td>";
echo"<td width="18%" bgcolor="#FFF5DD" align="center">$sql_row[writetime]</td>";
echo"<td width="6%" bgcolor="#E8FDEE" align="center">$sql_row[hits]</td>";
echo"</tr>";
}
?>
<tr bgcolor="#FFCC99">
<td colspan="5" align="center" height="2"> </td>
</tr>
</table>
<div align="right">
<form method="post" action="/blog_article/</php echo $php_self;/gt;.html">
共<b><?php echo $totalpage;?></b>页 第<b><?php echo $page;?></b>页·<?php
if ($page!=1){
$back=$page-1;
echo"<a href="/blog_article/$php_self/board/$board/amp;page/1.html">首页</a> <a href="/blog_article/$php_self/board/$board/amp;page/$back.html">上一页</a>";
}
if ($page==1){
echo"首页 上一页";
}
if($page!=$totalpage){
$next=$page+1;
echo" <a href="/blog_article/$php_self/board/$board/amp;page/$next.html">下一页</a> <a href="/blog_article/$php_self/board/$board/amp;page/$totalpage.html">尾页</a>";
}
if($page==$totalpage){
echo" 下一页 尾页";
}
?>·
<input type="submit" name="goto" value="转到">
<input type="text" name="page" size="2">
页
</form>
</div>
<?php include "footer.php";?>
</body>
</html>
## login.php
<?php
require "func.php";
if ($name==$admin_name and $password==$admin_password) {
setcookie ("jl_admin[name]",$name);
setcookie ("jl_admin[password]",$name);
redirect2("admin.php");
}
else {
show_error(1);
}
?>
## manage.php
<?php
require "func.php";
if (check_admin_password()) {
switch ($job){
case "setgood":
set_good($jl_forum[board],$id);
break;
case "setnogood":
set_no_good($jl_forum[board],$id);
break;
case "delete":
del_doc($jl_forum[board],$id);
break;
}
echo "<h2>操作成功!</h2><br>";
?>
<html><head><title>o,k</title></head><body>
<form method="POST">
<input type="button" value=" 关 闭 " name="B1" onclick="window.close()">
</form>
</body>
</html>
<?php
}
else {
show_error(1);
}
?>
## manage_list.php
<?php
require("func.php");
if (check_admin_password()) {
$board=$jl_forum[board];
$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>
<title>List</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="/blog_article/css/index.css">
<script language="javascript">
function openwin(board,id){ window.open("manage_read.php?board="+board+"&id="+id,"","height=460,width=600,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no");
}
function post(board){ window.open("post.php?board="+board,"","height=500,width=600,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no");
}
</script>
</head>
<body bgcolor="#FFFFFF" background="image/bg.gif">
<?php include "header.php";?> <br>
<table width="100%" border="1" cellspacing="0" cellpadding="0" bordercolorlight="#D8D8E8" bordercolordark="#D8D8E8">
<tr>
<td height="20" width="27%" bgcolor="#d8dde9">版面:<?php
echo $chinesename;
?>(管理)</td>
<td height="20" width="31%" bgcolor="#d8dde9">版主:<?php
while ($sql_row=mysql_fetch_array($sql_result))
{
echo "$sql_row[name]"." ";
}
# 选择出留言纪录;
$sql="select * from $board where slaveid=0";
$temp=mysql_query($sql);
$sum=mysql_num_rows($temp);
$totalpage=ceil($sum/$pagesize);
if ($sum==0) {
$totalpage=1;
}
# 分页
if($page<1 or empty($page)){
$page=1;
}
elseif ($page>$totalpage){
$page=$totalpage;
}
$offset=($page-1)*$pagesize;
$sql="select * from $board where slaveid=0 order by id desc limit $offset,$pagesize";
$sql_result=mysql_query($sql);
?> </td>
<td height="20" width="15%" bgcolor="#d8dde9">贴子总数:<?php echo $sum; ?></td>
<td height="20" width="12%"><a href='javascript:post("<?php echo $board;?>")'><img src="/blog_article/image/newtopic.jpg" width="92" height="21" border="0" alt="发新贴子"></a></td>
<td height="20" align="center" width="15%"><a href="/blog_article/</php echo.html"$php_self?board=$board&page=$page";?>">刷新浏览</a></td>
</tr>
</table>
<br>
<table width="100%" border="1" cellspacing="0" cellpadding="1" bordercolorlight="#CCCCCC" bordercolordark="#CCCCCC">
<tr bgcolor="#995100" align="center">
<td width="6%"><font color="#FFFFFF">回应</font></td>
<td width="67%" bgcolor="#995100"><font color="#FFFFFF">主 题</font></td>
<td width="20%"><font color="#FFFFFF">时 间</font></td>
<td width="7%"><font color="#FFFFFF">人气</font></td>
</tr>
<tr bgcolor="#FFCC99">
<td colspan="5" height="2"> </td>
</tr>
<?php
while ($sql_row=mysql_fetch_array($sql_result))
{
echo"<tr>";
echo"<td width="6%" bgcolor="#FFF5DD" align="center">";
if ($sql_row[renum]!=0)
{
echo "<font color="#FF0000">[+$sql_row[renum]]</font>";
}
else
{
echo "[0]";
}
echo"</td>";
echo"<td bgcolor="#E8FDEE" width="56%"><font face="宋体"><a href='javascript:openwin("$board",$sql_row[id])' title="作者:$sql_row[writer] 大小:$sql_row[size]字节">$sql_row[title]</a></font></td>";
echo"<td width="18%" bgcolor="#FFF5DD" align="center">$sql_row[writetime]</td>";
echo"<td width="6%" bgcolor="#E8FDEE" align="center">$sql_row[hits]</td>";
echo"</tr>";
}
?>
<tr bgcolor="#FFCC99">
<td colspan="5" align="center" height="2"> </td>
</tr>
</table>
<div align="right">
<form method="post" action="/blog_article/</php echo $php_self;/gt;.html">
共<b><?php echo $totalpage;?></b>页 第<b><?php echo $page;?></b>页· <?php
if ($page!=1){
$back=$page-1;
echo"<a href="/blog_article/$php_self/board/$board/amp;page/1.html">首页</a> <a href="/blog_article/$php_self/board/$board/amp;page/$back.html">上一页</a>";
}
if ($page==1){
echo"首页 上一页";
}
if($page!=$totalpage){
$next=$page+1;
echo" <a href="/blog_article/$php_self/board/$board/amp;page/$next.html">下一页</a> <a href="/blog_article/$php_self/board/$board/amp;page/$totalpage.html">尾页</a>";
}
if($page==$totalpage){
echo" 下一页 尾页";
}
?>·转到第
<input type="text" name="page" size="2">
页
</form>
</div>
<?php include "footer.php"?>
</body>
</html>
<?php
}
else {
show_error(4);
}
?>
<html>
<head>
<title>论坛</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<frameset cols="125,*" rows="*" border="0" frameborder="0">
<frame src="/blog_article/left.html" name="left" scrolling="AUTO" frameborder="YES" bordercolor="#000000">
<frame src="/blog_article/right.htm" name="main" scrolling="AUTO">
</frameset>
<noframes><body bgcolor="#FFFFFF">
</body></noframes>
</html>
## left.php
<?php
$fp=fopen("file/counter.txt","r");
$counter=fgets($fp,8);
fclose($fp);
$counter=$counter+1;
$fp=fopen("file/counter.txt","w");
fputs($fp,$counter);
fclose($fp);
require("config.inc.php");
$sql="select * from boardinfo";
$sql_result=mysql_query($sql);
$sql_row=mysql_fetch_array($sql_result);
?>
<html>
<head>
<title>版面列表</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="/blog_article/css/new.css" rel=stylesheet>
</head>
<body background="image/bg.gif" bgcolor="#FFFFFF">
<table width="100%" border="0" cellspacing="2" cellpadding="0">
<tr>
<td align="center"> </td>
</tr>
<tr>
<td align="center"><a href="/blog_article/apply.html" target="main">注册用户</a></td>
</tr>
<tr>
<td align="center"><font color="#666666">---------</font></td>
</tr>
<?php
do
{
echo"<tr>";
echo"<td align="center"><a href="/blog_article/list/board/$sql_row[name].html" target="main">$sql_row[chinesename]</a></td>";
echo"</tr>";
}while($sql_row=mysql_fetch_array($sql_result));
?>
<tr>
<td align="center"><font color="#006666">---------</font></td>
</tr>
<tr>
<td height="11">
<script src=/blog_article/file/X86tree.js></script>/index.html
<script language=javascript>
img_t1="image/t1.gif";
img_t2="image/t2.gif";
tree=new TreeView(0,0,640,300);
tree.AddImage(0,"image/dot.gif");
tree.AddImage(1,"image/close.gif");
tree.AddImage(2,"image/open.gif");
m1=new Nodes("m1",tree.ImageList,"论坛转向",0,2,"");
m1.Add(new Node("站点首页",1,0,"<a href='http://www.jlbusiness.com' target='_top'>")); m1.Add(new Node("论坛首页",1,0,"<a href='/blog_article/right.htm' target='main'>"));
tree.Add2(m1);
doc2=new Nodes("doc2",tree.ImageList,"论坛功能",0,2,"-");
doc2.Add(new Node("帖子查询",1,0,"<a href='/blog_article/query.html' target='main'>"));
doc2.Add(new Node("精华区域",1,0,"<a href='/blog_article/good.html' target='main'>"));
doc2.Add(new Node("察看留言",1,0,"<a href='/blog_article/vmlogin.html' target='main'>"));
doc2.Add(new Node("修改资料",1,0,"<a href='/blog_article/modify_l.html' target='main'>"));
doc2.Add(new Node("察看资料",1,0,"<a href='/blog_article/userinfo.html' target='main'>"));
doc2.Add(new Node("察看积分",1,0,"<a href='/blog_article/viewscore.html' target='main'>"));
doc2.Add(new Node("论坛管理",1,0,"<a href='/blog_article/manage.htm' target='main'>"));
tree.Add2(doc2);
tree.Show();
doc2.Close();
m1.Close();
</script>
</td>
</tr>
<tr>
<td align="center"> <b><font color="#006666">--------</font><br>
<?php echo "$counter"?></b></td>
</tr>
</table>
</body>
</html>
## list.php
<?php
require("func.php");
if(empty($board)){
$board="computer";
}
$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>
<title>List</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="/blog_article/css/index.css">
<script language="javascript">
function openwin(board,id){ window.open("read.php?board="+board+"&id="+id,"","height=460,width=600,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no");
}
function post(board){ window.open("post.php?board="+board,"","height=500,width=600,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no");
}
</script>
</head>
<body bgcolor="#FFFFFF" background="image/bg.gif">
<?php include "header.php";?> <br>
<table width="100%" border="1" cellspacing="0" cellpadding="0" bordercolorlight="#000000" bordercolordark="#FFFFFF">
<tr>
<td height="22" width="23%" bgcolor="#eeeeee">版面:<?php
echo $chinesename;
?></td>
<td height="22" width="41%" bgcolor="#eeeeee">版主:<?php
while ($sql_row=mysql_fetch_array($sql_result))
{
echo "$sql_row[name]"." ";
}
# 选择出留言纪录;
$sql="select * from $board where slaveid=0";
$temp=mysql_query($sql);
$sum=mysql_num_rows($temp);
$totalpage=ceil($sum/$pagesize);
if ($sum==0) {
$totalpage=1;
}
# 分页
if($page<1 or empty($page)){
$page=1;
}
elseif ($page>$totalpage){
$page=$totalpage;
}
$offset=($page-1)*$pagesize;
$sql="select * from $board where slaveid=0 order by id desc limit $offset,$pagesize";
$sql_result=mysql_query($sql);
?> </td>
<td height="22" width="13%" bgcolor="#eeeeee">贴子总数:<?php echo $sum; ?></td>
<td height="22" width="12%"><a href='javascript:post("<?php echo $board;?>")'><img src="/blog_article/image/newtopic.jpg" width="93" height="21" border="0" alt="发新贴子"></a></td>
<td height="22" width="11%">
<div align="center"><a href="/blog_article/</php echo.html"$php_self?board=$board&page=$page";?>">刷新浏览</a></div>
</td>
</tr>
</table>
<br>
<table width="100%" border="1" cellspacing="0" cellpadding="1" bordercolorlight="#CCCCCC" bordercolordark="#FFFFFF">
<tr bgcolor="#995100" align="center">
<td width="6%"><font color="#FFFFFF">回应</font></td>
<td width="67%" bgcolor="#995100"><font color="#FFFFFF">主 题</font></td>
<td width="20%"><font color="#FFFFFF">时 间</font></td>
<td width="7%"><font color="#FFFFFF">人气</font></td>
</tr>
<tr bgcolor="#FFCC99">
<td colspan="5" height="2"> </td>
</tr>
<?php
while ($sql_row=mysql_fetch_array($sql_result))
{
echo"<tr>";
echo"<td width="6%" bgcolor="#FFF5DD" align="center">";
if ($sql_row[renum]!=0)
{
echo "<font color="#FF0000">[+$sql_row[renum]]</font>";
}
else
{
echo "[0]";
}
echo"</td>";
echo"<td bgcolor="#E8FDEE" width="56%"><font face="宋体"><a href='javascript:openwin("$board",$sql_row[id])' title="作者:$sql_row[writer] 大小:$sql_row[size]字节">$sql_row[title]</a></font></td>";
echo"<td width="18%" bgcolor="#FFF5DD" align="center">$sql_row[writetime]</td>";
echo"<td width="6%" bgcolor="#E8FDEE" align="center">$sql_row[hits]</td>";
echo"</tr>";
}
?>
<tr bgcolor="#FFCC99">
<td colspan="5" align="center" height="2"> </td>
</tr>
</table>
<div align="right">
<form method="post" action="/blog_article/</php echo $php_self;/gt;.html">
共<b><?php echo $totalpage;?></b>页 第<b><?php echo $page;?></b>页·<?php
if ($page!=1){
$back=$page-1;
echo"<a href="/blog_article/$php_self/board/$board/amp;page/1.html">首页</a> <a href="/blog_article/$php_self/board/$board/amp;page/$back.html">上一页</a>";
}
if ($page==1){
echo"首页 上一页";
}
if($page!=$totalpage){
$next=$page+1;
echo" <a href="/blog_article/$php_self/board/$board/amp;page/$next.html">下一页</a> <a href="/blog_article/$php_self/board/$board/amp;page/$totalpage.html">尾页</a>";
}
if($page==$totalpage){
echo" 下一页 尾页";
}
?>·
<input type="submit" name="goto" value="转到">
<input type="text" name="page" size="2">
页
</form>
</div>
<?php include "footer.php";?>
</body>
</html>
## login.php
<?php
require "func.php";
if ($name==$admin_name and $password==$admin_password) {
setcookie ("jl_admin[name]",$name);
setcookie ("jl_admin[password]",$name);
redirect2("admin.php");
}
else {
show_error(1);
}
?>
## manage.php
<?php
require "func.php";
if (check_admin_password()) {
switch ($job){
case "setgood":
set_good($jl_forum[board],$id);
break;
case "setnogood":
set_no_good($jl_forum[board],$id);
break;
case "delete":
del_doc($jl_forum[board],$id);
break;
}
echo "<h2>操作成功!</h2><br>";
?>
<html><head><title>o,k</title></head><body>
<form method="POST">
<input type="button" value=" 关 闭 " name="B1" onclick="window.close()">
</form>
</body>
</html>
<?php
}
else {
show_error(1);
}
?>
## manage_list.php
<?php
require("func.php");
if (check_admin_password()) {
$board=$jl_forum[board];
$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>
<title>List</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="/blog_article/css/index.css">
<script language="javascript">
function openwin(board,id){ window.open("manage_read.php?board="+board+"&id="+id,"","height=460,width=600,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no");
}
function post(board){ window.open("post.php?board="+board,"","height=500,width=600,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no");
}
</script>
</head>
<body bgcolor="#FFFFFF" background="image/bg.gif">
<?php include "header.php";?> <br>
<table width="100%" border="1" cellspacing="0" cellpadding="0" bordercolorlight="#D8D8E8" bordercolordark="#D8D8E8">
<tr>
<td height="20" width="27%" bgcolor="#d8dde9">版面:<?php
echo $chinesename;
?>(管理)</td>
<td height="20" width="31%" bgcolor="#d8dde9">版主:<?php
while ($sql_row=mysql_fetch_array($sql_result))
{
echo "$sql_row[name]"." ";
}
# 选择出留言纪录;
$sql="select * from $board where slaveid=0";
$temp=mysql_query($sql);
$sum=mysql_num_rows($temp);
$totalpage=ceil($sum/$pagesize);
if ($sum==0) {
$totalpage=1;
}
# 分页
if($page<1 or empty($page)){
$page=1;
}
elseif ($page>$totalpage){
$page=$totalpage;
}
$offset=($page-1)*$pagesize;
$sql="select * from $board where slaveid=0 order by id desc limit $offset,$pagesize";
$sql_result=mysql_query($sql);
?> </td>
<td height="20" width="15%" bgcolor="#d8dde9">贴子总数:<?php echo $sum; ?></td>
<td height="20" width="12%"><a href='javascript:post("<?php echo $board;?>")'><img src="/blog_article/image/newtopic.jpg" width="92" height="21" border="0" alt="发新贴子"></a></td>
<td height="20" align="center" width="15%"><a href="/blog_article/</php echo.html"$php_self?board=$board&page=$page";?>">刷新浏览</a></td>
</tr>
</table>
<br>
<table width="100%" border="1" cellspacing="0" cellpadding="1" bordercolorlight="#CCCCCC" bordercolordark="#CCCCCC">
<tr bgcolor="#995100" align="center">
<td width="6%"><font color="#FFFFFF">回应</font></td>
<td width="67%" bgcolor="#995100"><font color="#FFFFFF">主 题</font></td>
<td width="20%"><font color="#FFFFFF">时 间</font></td>
<td width="7%"><font color="#FFFFFF">人气</font></td>
</tr>
<tr bgcolor="#FFCC99">
<td colspan="5" height="2"> </td>
</tr>
<?php
while ($sql_row=mysql_fetch_array($sql_result))
{
echo"<tr>";
echo"<td width="6%" bgcolor="#FFF5DD" align="center">";
if ($sql_row[renum]!=0)
{
echo "<font color="#FF0000">[+$sql_row[renum]]</font>";
}
else
{
echo "[0]";
}
echo"</td>";
echo"<td bgcolor="#E8FDEE" width="56%"><font face="宋体"><a href='javascript:openwin("$board",$sql_row[id])' title="作者:$sql_row[writer] 大小:$sql_row[size]字节">$sql_row[title]</a></font></td>";
echo"<td width="18%" bgcolor="#FFF5DD" align="center">$sql_row[writetime]</td>";
echo"<td width="6%" bgcolor="#E8FDEE" align="center">$sql_row[hits]</td>";
echo"</tr>";
}
?>
<tr bgcolor="#FFCC99">
<td colspan="5" align="center" height="2"> </td>
</tr>
</table>
<div align="right">
<form method="post" action="/blog_article/</php echo $php_self;/gt;.html">
共<b><?php echo $totalpage;?></b>页 第<b><?php echo $page;?></b>页· <?php
if ($page!=1){
$back=$page-1;
echo"<a href="/blog_article/$php_self/board/$board/amp;page/1.html">首页</a> <a href="/blog_article/$php_self/board/$board/amp;page/$back.html">上一页</a>";
}
if ($page==1){
echo"首页 上一页";
}
if($page!=$totalpage){
$next=$page+1;
echo" <a href="/blog_article/$php_self/board/$board/amp;page/$next.html">下一页</a> <a href="/blog_article/$php_self/board/$board/amp;page/$totalpage.html">尾页</a>";
}
if($page==$totalpage){
echo" 下一页 尾页";
}
?>·转到第
<input type="text" name="page" size="2">
页
</form>
</div>
<?php include "footer.php"?>
</body>
</html>
<?php
}
else {
show_error(4);
}
?>
最新技术文章: