六月婷婷综合激情-六月婷婷综合-六月婷婷在线观看-六月婷婷在线-亚洲黄色在线网站-亚洲黄色在线观看网站

明輝手游網中心:是一個免費提供流行視頻軟件教程、在線學習分享的學習平臺!

一個php作的文本留言本的例子(3)

[摘要]上兩節我針對guest.php和edit.php作了講述.需要注意的是php和html的區別: php通常是-->(1)<? echo("zihanonline");?> (2)<? php e...
上兩節我針對guest.php和edit.php作了講述.需要注意的是php和html的區別:
php通常是-->(1)<? echo("zihanonline");?>
            (2)<? php
                  echo("zihanonline");
               ?>
            (3)<script laanguage="php">
                echo("zihanonline");
               </script>
            (4)<% echo("zihanonline");%>
等4種方式.不要混淆.
下面我們來研究信息管理:manage.php代碼.
-----------
//manage.php<html>

<head>
<title>留言管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style>
<!--
A:link {text-decoration: none ; color:0000ff}
A:visited {text-decoration: none; color:004080}
A:active {text-decoration: none}
A:hover {text-decoration: underline; color:ff0000}
BODY {FONT-SIZE: 9p}
TH {FONT-SIZE: 9pt}
TD {FONT-SIZE: 9pt}
-->
</style>

</head>

<body bgcolor="#FFFFFF" background="back.gif">
<?
include('head.htm');
include("sys.php");
if ($password!=$managepwd and $dispflag)
  {


  echo "<meta http-equiv=Refresh content=5;url=guest.php>";
  echo "<center>";
  echo "<font color=red>密碼錯誤!無法刪除留言!</font>";
  echo "<p>程序將在3秒返回</p>";
  echo "<p> <a href=http://zihanonline.longcity.net>子漢在線</a>斑竹維護管理。</p>";
  echo "<br>";
  echo "</center>";

  exit;
  }

?>
<table width="445" border="0" align="center" bgcolor="#CCCCCC">
  <form method="post" action="manage.php">
    <?
   if ($dispflag=="show")
   {
  $content = file($guestfile);
  $count =count($content);
  $text="";
     for ($h=$count;$h>0;$h--)
         {
          $text=$text.'<tr><td>刪除第'.$h."條留言:<input type=checkbox name=check$h value=$h></td></tr>nn";
          $text=$text.$content[$h-1];
          }
    echo "$text";
    }
  ?>  
    <input type=hidden name=password value=<? echo $password ?>>
    <?
  if ($submit)
  {
  if ($password!=$managepwd)
  {
  echo "<meta http-equiv=Refresh content=5;url=guest.php>";
  echo "<center>";
  echo "<font color=red>密碼錯誤!無法刪除留言!</font>";
  echo "<p>程序將在3秒返回</p>";
  echo "<p> <a href=http://zihanonline.longcity.net>子漢在線</a>斑竹維護管理。</p>";
  echo "<br>";
  echo "</center>";

  exit;
  }
   
  if ($password==$managepwd)
  {
  $guest_content=file($guestfile);
  $count=count($guest_content);
  for ($j=1;$j<=$count;$j++)
   {
   $del_rec_num="check".$j;
   $del_num=$$del_rec_num;
   //echo "$del_num:$del_num";
   $guest_content[$del_num-1]="";
   }

  $fp=fopen($guestfile,"w");
  for ($i=0;$i<=$count-1;$i++)
  {
  if ($guest_content[$i]!="")
   {
   fputs($fp,$guest_content[$i],strlen($guest_content[$i]));
   }
  }
  fclose($fp);
  echo "<meta http-equiv=Refresh content=5;url=guest.php>";
  echo "<center>";
  echo "<p><font color=red>留言已正確刪除</font></p>";
  echo "<p>程序將在3秒返回</p>";
  echo "<p> <a href=http://zihanonline.longcity.net>子漢在線</a>斑竹維護管理。</p>";
  echo "<br>";
  echo "</center>";
  exit;
  }
  }
  ?>  
    <tr>  
      <td bgcolor="#f0f0f0">  
        <p align=center>  
          <input type=submit value=刪除 name=submit>
          &nbsp;&nbsp;&nbsp;&nbsp;  
          <input type=reset value=重寫 name=reset>
      </td>
    <tr>  
  </form>
</table>
<?include('bottom.htm');?>
</body>
</html>
------------
未完待續...




主站蜘蛛池模板: 五月亭亭激情五月 | 在线香蕉| 午夜激爽毛片在线看 | 一二三四社区在线高清3 | 色噜噜狠狠色综合网图区 | 影音先锋国产资源 | 日韩黄色三级 | 天天躁日日躁狠狠躁视频下载播二 | 天天看天天干 | 天天干天天舔天天射 | 欧洲毛片真人 | 婷婷色爱区综合五月激情韩国 | 色干网 | 在线欧美视频 | 中文字幕欧美日韩 | 欧美丝袜办公室精品 | 我要操影院 | 青娱乐自拍 | 亚洲天堂男人的天堂 | 亚洲视频在线看 | 伊人网2021 | 综合网 色天使 | 天天射天天怕 | 色久网站| 日日摸夜夜添夜夜爽免费视频 | 色综合h| 日韩精品永久免费播放平台 | 三级黄色片在线免费观看 | 日本噜噜影院 | 日韩欧美精品在线 | 亚洲 国产精品 日韩 | 手机看片国产免费永久 | 亚洲图欧美 | 视频一区日韩 | 欧美丝袜一区二区三区 | 天天干天天操天天爱 | 午夜免费体验 | 色天使久久综合网天天 | 欧美视频日韩专区午夜 | 亚洲伊人久久大香线蕉综合图片 | 亚洲国产高清视频 |