基于mysql的论坛(2)

<script type="text/javascript"><!-- google_ad_client = "pub-2947489232296736"; /* 728x15, 创建于 08-4-23MSDN */ google_ad_slot = "3624277373"; google_ad_width = 728; google_ad_height = 15; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script>
<script type="text/javascript"><!-- google_ad_client = "pub-2947489232296736"; /* 160x600, 创建于 08-4-23MSDN */ google_ad_slot = "4367022601"; google_ad_width = 160; google_ad_height = 600; //--> </script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script>
#################################
## apply.php ####################
#################################
<html>
<head>
<title>注册用户</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="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">&nbsp; </td>
    </tr>
    <tr>
      <td colspan="2">
        <form method="post" action="adduser.php">
          <table width="80%" border="0" cellspacing="0" cellpadding="3" align="center">
            <tr>
              <td align="right">用户名</td>
              <td>
                <input type="text" name="name" maxlength="16" style="font-size: 9pt; background-color: #FFFFFF; color: #FF0000; border: 1 solid #000000">
                * </td>
            </tr>
            <tr>
              <td align="right">密码</td>
              <td>
                <input type="password" name="pwd1" maxlength="8" style="font-size: 9pt; background-color: #FFFFFF; color: #FF0000; border: 1 solid #000000" size="9">
                * </td>
            </tr>
            <tr>
              <td align="right">重复密码</td>
              <td>
                <input type="password" name="pwd2" maxlength="8" style="font-size: 9pt; background-color: #FFFFFF; color: #FF0000; border: 1 solid #000000" size="9">
                * </td>
            </tr>
            <tr>
              <td align="right">Email</td>
              <td>
                <input type="text" name="email" style="font-size: 9pt; background-color: #FFFFFF; color: #FF0000; border: 1 solid #000000">
                 </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" style="font-size: 9pt; background-color: #FFFFFF; color: #FF0000; border: 1 solid #000000">
              </td>
            </tr>
            <tr>
              <td align="right">地址</td>
              <td>
                <input type="text" name="address" maxlength="40" size="30" style="font-size: 9pt; background-color: #FFFFFF; color: #FF0000; border: 1 solid #000000">
              </td>
            </tr>
            <tr>
              <td align="right">电话</td>
              <td>
                <input type="text" name="phone" size="22" maxlength="20" style="font-size: 9pt; background-color: #FFFFFF; color: #FF0000; border: 1 solid #000000">
              </td>
            </tr>
            <tr>
              <td align="right">主页</td>
              <td>
                <input type="text" name="homepage" style="font-size: 9pt; background-color: #FFFFFF; color: #FF0000; border: 1 solid #000000" size="50" value="http://">
              </td>
            </tr>
            <tr>
              <td align="right">OICQ</td>
              <td>
                <input type="text" name="oicq" maxlength="11" style="font-size: 9pt; background-color: #FFFFFF; color: #FF0000; border: 1 solid #000000" size="12">
              </td>
            </tr>
            <tr>
              <td align="right">签名</td>
              <td>
                <textarea name="qm" wrap="VIRTUAL" cols="50"></textarea>
              </td>
            </tr>
            <tr>
              <td align="right">&nbsp; </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 &copy; 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());

?>
###############################
#  <script type="text/javascript"><!-- google_ad_client = "pub-2947489232296736"; /* 728x15, 创建于 08-4-23MSDN */ google_ad_slot = "3624277373"; google_ad_width = 728; google_ad_height = 15; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script>
<script type="text/javascript"><!-- google_ad_client = "pub-2947489232296736"; /* 160x600, 创建于 08-4-23MSDN */ google_ad_slot = "4367022601"; google_ad_width = 160; google_ad_height = 600; //--> </script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script>
阅读更多
个人分类: 网络技术
想对作者说点什么? 我来说一句

PHP+mysql功能实现BBS基本功能

2016年07月11日 18.74MB 下载

基于php的论坛系统

2010年03月25日 715KB 下载

mysql+java(MVC)+bbs论坛完整实例

2010年06月03日 1.38MB 下载

bbs项目源码(java+mysql)

2010年06月23日 3.91MB 下载

BBS系统-基于JSP、ECLIPSE、MYSQL

2011年12月05日 745KB 下载

基于PHP+MYSQL+Apache的论坛管理系统

2014年04月12日 1.71MB 下载

没有更多推荐了,返回首页

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭