·建站首页 ·钻石 ·繁體
您的位置: 中国建站之家 -> 网站开发设计 -> PHP教程 -> 支持oicq头像的留言簿(二)

支持oicq头像的留言簿(二)

作者:未知  来源:转载  发布时间:2005-7-30 20:51:34  发布人:acx

addnote.php
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<TITLE>添加留言</TITLE>
<style type="text/css">
<!--
.white12 {  font-size: 12pt; color: #FFFFFF; text-decoration: none}
-->
</style>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<table width="98%" border="0" cellspacing="0" cellpadding="0" height="61">
  <tr>  
    <td height="62" width="34%"><a href="http://www.medguider.com"><img src="http://www.7880.com/Info/image/logo.gif" width="243" height="60" alt="医学导航网" border="0"></a></td>
    <td height="62" width="66%">  
      <div align="center"><img src="http://www.7880.com/Info/image/note.gif" width="410" height="60"><img src="http://www.7880.com/Info/image/y1.gif" width="60" height="60"></div>
    </td>
  </tr>
</table>
<?php
include ("config.php");
if ($submit){
$time=date("Y年m月d日 H:i:s A");
$ip=$REMOTE_ADDR;//留言人ip地址
$name=trim($name);
$email=trim($email);
$title=strip_tags($top);
$nnote=nl2br(strip_tags($content));//先去掉html标记,再将换行符转成 <br>。
if (!$name||!$email||!$title||!$nnote){           //检查是否填写完整
      echo "对不起,您必须填所有内容!<BR>"."<a href='javascript:history.back()'>返回</a>";
      exit; }elseif(!ereg('^[-!#$%&'*+./0-9=?A-Z^_`a-z{|}~]+'.'@'.'[-!#$%&'*+\/0-9=?A-Z^_`a-z{|}~]+.'.'[-!#$%&'*+\./0-9=?A-Z^_`a-z{|}~]+$',$email)  //email合法性验证
       ){
       echo "email不合法!<BR>"."<a href='javascript:history.back()'>返回</a>";
       exit;
             }
   //写入数据库
$sql="INSERT INTO notebook (name,email,time,face,ip,title,nnote) VALUES ('$name','$email','$time','$face','$ip','$title','$nnote')";
$result = mysql_query($sql,$db);
mysql_close($db);
echo "留言成功!";
}
?>
<table width="99%" border="1" cellspacing="0" cellpadding="0" align="center" bordercolor="#3366FF">
  <tr bgcolor="#3366FF">  
    <td width="81%" class="white12" height="26"><a href="../index.php" class="white12">首页</a>  
      > <a href="index.php" class="white12">留言簿</a>  
      > 添加留言</td>
    <td width="19%" class="white12" height="26"><a href='index.php' class="white12">查看留言</a>  
    </td>
  </tr>
  <tr>  
    <td colspan="2">
      <form name="form1" method="post" action="addnote.php">
        <table width="99%" border="0" cellspacing="0" cellpadding="0">
          <tr>  
            <td width="54%"> </td>
            <td rowspan="2" width="46%">选择一个自己喜欢的头像:<br>
              <img src="http://www.7880.com/Info/image/face/icon1.gif" width="32" height="32">  
              <input type="radio" name="face" value="1" checked>
              <img src="http://www.7880.com/Info/image/face/icon2.gif" width="32" height="32">  
              <input type="radio" name="face" value="2">
              <img src="http://www.7880.com/Info/image/face/icon3.gif" width="32" height="32">  
              <input type="radio" name="face" value="3">
              <img src="http://www.7880.com/Info/image/face/icon4.gif" width="32" height="32">  
              <input type="radio" name="face" value="4">
              <img src="http://www.7880.com/Info/image/face/icon5.gif" width="32" height="32">  
              <input type="radio" name="face" value="5">
              <img src="http://www.7880.com/Info/image/face/icon6.gif" width="32" height="32">  
              <input type="radio" name="face" value="6">
              <img src="http://www.7880.com/Info/image/face/icon7.gif" width="32" height="32">  
              <input type="radio" name="face" value="7">
              <img src="http://www.7880.com/Info/image/face/icon8.gif" width="32" height="32">  
              <input type="radio" name="face" value="8">
              <img src="http://www.7880.com/Info/image/face/icon9.gif" width="32" height="32">  
              <input type="radio" name="face" value="9">
              <img src="http://www.7880.com/Info/image/face/icon10.gif" width="32" height="32">  
              <input type="radio" name="face" value="10">
              <img src="http://www.7880.com/Info/image/face/icon11.gif" width="32" height="32">  
              <input type="radio" name="face" value="11">
              <img src="http://www.7880.com/Info/image/face/icon12.gif" width="32" height="32">  
              <input type="radio" name="face" value="12">
              <img src="http://www.7880.com/Info/image/face/icon13.gif" width="32" height="32">  
              <input type="radio" name="face" value="13">
              <img src="http://www.7880.com/Info/image/face/icon14.gif" width="32" height="32">  
              <input type="radio" name="face" value="14">
              <img src="http://www.7880.com/Info/image/face/icon15.gif" width="32" height="32">  
              <input type="radio" name="face" value="15">
              <img src="http://www.7880.com/Info/image/face/icon16.gif" width="32" height="32">  
              <input type="radio" name="face" value="16">
              <img src="http://www.7880.com/Info/image/face/icon17.gif" width="32" height="32">  
              <input type="radio" name="face" value="17">
              <img src="http://www.7880.com/Info/image/face/icon18.gif" width="32" height="32">  
              <input type="radio" name="face" value="18">
              <img src="http://www.7880.com/Info/image/face/icon19.gif" width="32" height="32">  
              <input type="radio" name="face" value="19">
              <img src="http://www.7880.com/Info/image/face/icon20.gif" width="32" height="32">  
              <input type="radio" name="face" value="20">
              <img src="http://www.7880.com/Info/image/face/icon21.gif" width="32" height="32">  
              <input type="radio" name="face" value="21">
              <img src="http://www.7880.com/Info/image/face/icon22.gif" width="32" height="32">  
              <input type="radio" name="face" value="22">
              <img src="http://www.7880.com/Info/image/face/icon23.gif" width="32" height="32">  
              <input type="radio" name="face" value="23">
              <img src="http://www.7880.com/Info/image/face/icon24.gif" width="32" height="32">  
              <input type="radio" name="face" value="24">
              <img src="http:

[1] [2] [3]  下一页

将本文收藏到QQ书签与更多好友分享