您现在的位置: 军旅同心-旅游自驾-军旅文学 >> 读书赏析 >> 学习园地 >> 电脑网络 >> 技术文章 >> 正文
支持oicq头像的留言簿(二)
作者:采集员 文章来源:来源于网络 点击数: 更新时间:2005-9-10 14:36:37
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="image/logo.gif" width="243" height="60" alt="医学导航网" border="0"></a></td>
    <td height="62" width="66%">  
      <div align="center"><img src="image/note.gif" width="410" height="60"><img src="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>  
      &gt; <a href="index.php" class="white12">留言簿</a>  
      &gt; 添加留言</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%">&nbsp;</td>
            <td rowspan="2" width="46%">选择一个自己喜欢的头像:<br>
              <img src="image/face/icon1.gif" width="32" height="32">  
              <input type="radio" name="face" value="1" checked>
              <img src="image/face/icon2.gif" width="32" height="32">  
              <input type="radio" name="face" value="2">
              <img src="image/face/icon3.gif" width="32" height="32">  
              <input type="radio" name="face" value="3">
              <img src="image/face/icon4.gif" width="32" height="32">  
              <input type="radio" name="face" value="4">
              <img src="image/face/icon5.gif" width="32" height="32">  
              <input type="radio" name="face" value="5">
              <img src="image/face/icon6.gif" width="32" height="32">  
              <input type="radio" name="face" value="6">
              <img src="image/face/icon7.gif" width="32" height="32">  
              <input type="radio" name="face" value="7">
              <img src="image/face/icon8.gif" width="32" height="32">  
              <input type="radio" name="face" value="8">
              <img src="image/face/icon9.gif" width="32" height="32">  
              <input type="radio" name="face" value="9">
              <img src="image/face/icon10.gif" width="32" height="32">  
              <input type="radio" name="face" value="10">
              <img src="image/face/icon11.gif" width="32" height="32">  
              <input type="radio" name="face" value="11">
              <img src="image/face/icon12.gif" width="32" height="32">  
              <input type="radio" name="face" value="12">
              <img src="image/face/icon13.gif" width="32" height="32">  
              <input type="radio" name="face" value="13">
              <img src="image/face/icon14.gif" width="32" height="32">  
              <input type="radio" name="face" value="14">
              <img src="image/face/icon15.gif" width="32" height="32">  
              <input type="radio" name="face" value="15">
              <img src="image/face/icon16.gif" width="32" height="32">  
        &nb

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


更多
免责声明:作品版权归所属媒体与作者所有!!本站刊载此文不代表同意其说法或描述,仅为提供更多信息。如果您认为我们侵犯了您的版权,请告知!本站立即删除。有异议请联系我们。
文章录入:烟灰缸    责任编辑:烟灰缸 
网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)
| 设为首页 | 加入收藏 | 联系站长 | 友情链接 | 网站地图 | 版权申明 | 网站公告 | 管理登录 |