国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 開發設計 > 正文

挑戰最棒的留言本的源碼(二)

2019-11-18 21:26:57
字體:
來源:轉載
供稿:網友
post.php 文件
<?php
     require('config.php');
?>


<?php


$nikename=$arr_request['nikename'];

if (strlen($nikename)==0)
{
   echo "<center>";

   echo "<h2><font color=red>錯誤信息!</font></h2>";
   echo "對不起,<font color=red>呢稱</font>必須填寫!!! 請重填!<br>";
   echo "<hr></hr>";
   echo "免費留言本由<a href=http://little.oso.com.cn>小熊</a>提供技術支持";
   echo "</center>";
   exit ;

}

$date_now=date('Y/m/d H:i:s');
$ip_address=getenv("REMOTE_ADDR");
$messageold=$arr_request['message'];
//$pattern="/n/";
//$replacement="<br>";

  $message=computer_message($messageold,$hang_zifu_number);

$subjectold=$arr_request['subject'];
if (strlen($subjectold)>$hang_zifu_number)

  $subject=computer_message($subjectold,$hang_zifu_number);
else
  $subject=$subjectold;

$str_sql=" insert into $table_name  
(nikename,subject,date_created,ip_address,message,email_address,zhuye_address,oicq)
values
( '$nikename',
  '$subject',
  '$date_now',
  '$ip_address',
  '$message',
  '".$arr_request['email_address']."',
  '".$arr_request['zhuye_address']."',
  '".$arr_request['oicq']."'

)";

$result=MySQL_db_query($db_name,$str_sql,$id_link);

if (! $result){
       affy_error_exit('SQL Insert Execution has failed.');
   }
   
else  

  {


        echo "<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">";
        echo "<HTML><HEAD><TITLE>發表文章</TITLE>";
        echo "<META content="text/html; charset=gb2312" http-equiv=Content-Type>";
        echo "<meta HTTP-EQUIV="REFRESH" CONTENT="2;URL=display.php">";
        echo "</head><body topmargin="0"><br>";
        echo "<ul>謝謝你發表留言,將自動顯示留言內容";
        echo "&nbsp;<br>";
        echo "<a href=display.php>如果你的瀏覽器沒有自動的返回到留言簿首頁,?
                請點這里返回.";
        echo "</a></ul>";


        exit;  

   
  }
?>

index.html 文件

<html>
<center>

<title>謝謝你的留言!</title>
<h1><font color=blue>我的留言本</font></h1>
<font color=navy>首先感謝你的留言,你的每一句話我都會仔細閱讀!!!</font>

  <form action="post.php" method="post">
  <table>
  <tr>
   <td><font color=teal>呢稱:</font><font color=red>(不能為空)</font></td><td>    
    <input type="text" name="nikename" value=""></td>
  </tr>
   
   
  <tr>
   <td>OICQ號碼:</td><td>  
      
    <input type="text" name="oicq" value=""></td>
  </tr>
  <tr>
   <td>e-mail: </td><td>      
    <input type="text" name="email_address" value="" size="30"></td>
  </tr>
  <tr>
   <td>個人主頁:</td><td>  
    <input type="text" name="zhuye_address" value="http://" size="40"></td>
  </tr>
  <tr><td>
    主題:</td><td>  
    <input type="text" name="subject" size="40" ></td>
  </tr>
  <tr><td>
    內容:</td><td> </td>
  </tr>
  <tr><td colspan="2">
    <textarea name="message" cols="60" rows="8"></textarea></td>
  </tr>
  <tr>
    <td>
      <input type="submit" value="完成留言">
    </td>
    <td>
      <input type="reset" value="重新來過">
    </td>
  </tr>
  </table>
  </form>
   <p>
<a href=display.php>查看留言</a>
<hr></hr>
免費留言本由<a href="http://little.oso.com.cn" >小熊</a>提供技術支持

</center>

</html>

display.inc文件!!!


<tr bgcolor=>
<td>
<a href=mailto:<?php echo $record->email_address ?> >
<font color="blue" size=4><strong><?php echo $record->nikename ?></strong></font>
</a>
</td>
<td><font color="navy">留言時間:<?php echo $record->date_created ?></font></td>

<td>來自:

<?php
$ip_address=ip_question($record->ip_address);
echo $ip_address;   
?>

</td>
</tr>
<tr bgcolor=>
<th colspan=3 align=left>主題:<font color=teal><?php echo $record->subject ?></font></th>

</tr>

<tr><th colspan=3 align=left><font color="#416AAF">
<?php echo $record->message ?></font></th>
</tr>


<?php  

if ($record->huifu_biaozi)  
   {  
     ?>
      <tr><th colspan=3 align=left><font color="red"><br><br>版主回復:</font><font color="navy">
      <?php echo $record->huifu ?></font></th>
      </tr>
    <?php

   }

?>  



<tr>
<th colspan=3 align=left><br>
<a href=mailto:<?php echo $record->email_address ?> >
<img src=image/mail.gif  
alt="<?php echo $record->nikename ?>的e-mail地址是:<?php echo $record->email_address ?> "  
border="0" width="15" length="15">郵件</a>
<a href=<?php echo $record->zhuye_address ?>><img src=image/home.gif  
alt="<?php echo $record->nikename ?>的主頁地址是:<?php echo $record->zhuye_address ?> "  
border="0"  
width="14" length="14" >主頁</a>
<img src=image/oicq.gif border="0" alt="<?php echo $record->nikename?>的OICQ是:
<?php echo $record->oicq ?>"  
width="14" length="14" >OICQ</a>

<a href=action.php?action=delete&key_liuyan=<?php echo $record->key_liuyan ?>><img src=image/del.gif border="0" width="12" length="12" alt="只有版主才有刪除的權限哦!">刪除</a>
<a href=action.php?action=huifu&key_liuyan=<?php echo $record->key_liuyan ?> ><img src=image/replay.gif border="0" width="14" length="14" alt="不好意思,現在暫時只有版主才能回復">回復</a>


</th></tr>

<tr>
<td colspan="3"><hr SIZE ="1"></td>
</tr>  


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 芮城县| 普洱| 禹城市| 灵石县| 东光县| 延长县| 兴隆县| 延边| 丹江口市| 温宿县| 聂拉木县| 嘉定区| 张掖市| 大安市| 桃园市| 霞浦县| 同德县| 库伦旗| 孙吴县| 新兴县| 札达县| 遂平县| 慈利县| 西吉县| 清新县| 如东县| 彰化市| 前郭尔| 藁城市| 红安县| 香港| 雷山县| 班戈县| 海晏县| 临西县| 彝良县| 丰县| 揭阳市| 万山特区| 阳谷县| 永昌县|