---------
//dele.php<html>

<head>
<title>刪除留言</title>
<style>
<!--
A:link {text-decoration: none ; color:0000ff}
A:visited {text-decoration: none; col " /> 国产a级午夜毛片,99久久久免费精品国产,神马电影我不卡国语版

天天躁日日躁狠狠躁AV麻豆-天天躁人人躁人人躁狂躁-天天澡夜夜澡人人澡-天天影视香色欲综合网-国产成人女人在线视频观看-国产成人女人视频在线观看

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

這一節我們將dele.php和sys.php放上來.
---------
//dele.php<html>

<head>
<title>刪除留言</title>
<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:10pt}
TH {FONT-SIZE:10 pt}
TD {FONT-SIZE: 10pt}
-->
</style>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<?

require("sys.php");
if ($Submit)
{

if ($password<>$managepwd)
  {$errorm="<font color=red>密碼錯誤</font>.無權操作..";}

else  
{
$content=file($guestfile);
$message=$content[$record-1];
$count=count($content);
if ($dele=="delreply")
     {
     $replylen=strlen(strstr($message,"<!--reply>"));
     $long=strlen($message);
     $len=$long-$replylen;
     $message=substr($message,0,$len);
     }
     else
     {$message="";}
//writefile
$fp=fopen($guestfile,"w");
for ($i=0;$i<$count;$i++)
  {
  if ($i==($record-1)){$content[$i]=$message;}
  fputs($fp,$content[$i],strlen($content[$i]));
  }//end for
fclose($fp);
echo "<meta http-equiv=Refresh content="1;url=guest.php">";
exit;
}
}// end ifSubmit
$content=file($guestfile);
$message=$content[$record-1];
$found=ereg("<!--reply>",$message);
?>
<body bgcolor="#FFFFFF" background="back.gif">
<? include("head.htm"); ?>
<table width="68%" border="1" cellpadding="5" align="center" cellspacing="0" bordercolor="#F2F2F2">
<form action=dele.php method=post>
<?
  if ($errorm)
  {
echo "<tr>";  
echo "<td height=27>$errorm</td>";
echo "</tr>";
  }
?>
  <? echo $message ?>
    <tr align="center">  
      <td height="37" bgcolor="#f0f0f0">  
        <?
     if ($found)
     {
     echo "<input type=radio name=dele value=delall>";
     echo "全部刪除 ";
     echo "<input type=radio name=dele value=delreply checked>";
     echo "僅刪除回復";
     }
     ?>
        <font color="#000000">管理密碼</font>  
        <input type="password" name="password" size="10">
      <input type=hidden name=record value=<? echo "$record";?>>
        <input type="submit" name="Submit" value="我要刪除了">
      </td>
  </tr>
  </form>
</table>
<? include("bottom.htm"); ?>
</body>
</html>

------
//sys.php
<title>zihanonline</title><?


$managepwd='zihanonline';
$guestfile="guest.txt";

function check_strlen_long($txt)
{

$count=0;
$arrtemp=$txt;
$len=strlen($txt);
$txt=$txt.'            ';
for ($i=0;$i<$len;$i++)
{

if (ord($txt[$i])<128)
  { $count=$count+1;}
  if (ord($txt[$i])==10 or ord($txt[$i])==32)
  {$count=0;}
  if ($count>=70)  
  {
    for ($j=$i;$j<$len;$j++)
    {
    $txt[$j+1]=$arrtemp[$j];
    }
  $txt[$i]="n";
  $len=$len+1;
  $txt[$len]=$arrtemp[$len-1];
  $count=0;
  $arrtemp=$txt;
  }//end if count
}
  $txt=trim($txt);
  return $txt;
}//end function


function encode ($txt)
{
$txt=strip_tags($txt);
$txt=htmlspecialchars($txt);
$message=StripSlashes($txt);
return $message;
}

function ubb($txt)
{

}
?>
<body bgcolor="#FFFFFF" background="back.gif">
----------
注意sys.php中的" $managepwd='zihanonline' "一欄中等號后的是留言本的管理密碼號,此時是默認的zihanonline.您可以修改為自己的號碼.
未完待續...

php技術一個php作的文本留言本的例子(四),轉載需保留來源!

鄭重聲明:本文版權歸原作者所有,轉載文章僅為傳播更多信息之目的,如作者信息標記有誤,請第一時間聯系我們修改或刪除,多謝。

主站蜘蛛池模板: 失禁 调教 刺激 哭喊男男 | 欲香欲色天天天综合和网 | 国产精品毛片在线视频 | 97在线播放 | 国产Av影片麻豆精品传媒 | 韩日美无码精品无码 | 法国剧丝袜情版h级在线电影 | 国产精品久久欧美一区 | 亚洲国产精品无码中文在线 | 欧美日韩另类在线观看视频 | 在线免费观看亚洲视频 | gogo免费在线观看 | 人妻超级精品碰碰在线97视频 | 亚洲精品在线播放视频 | 脱女学小内内摸出水网站免费 | 色婷婷激情AV精品影院 | 我的年轻漂亮继坶三级 | yellow视频免费观看高清在线 | 9420高清免费观看在线大全 | 人人听力网mp3下载 人人舔人人爱 | 国产精品亚欧美一区二区三区 | 最近中文字幕在线中文视频 | 亚洲日韩中文字幕区 | 国产成人国产在线观看入口 | 国产欧美亚洲综合第一页 | 中文无码熟妇人妻AV在线 | 主播蜜汁丝袜精品自拍 | 特级aa 毛片免费观看 | 91精品国产入口 | 99国产电影 | 嫩草伊人久久精品少妇AV网站 | 麻豆免费观看高清完整视频在线 | 熟女人妻水多爽中文字幕 | 日本妈妈xxxx| 日韩特黄特色大片免费视频 | 久久久免费热线精品频 | 午夜福利试看120秒体验区 | 精品亚洲国产成AV人片传媒 | jizz69女士第一次 | 91极品蜜桃臀在线播放 | 国产亚洲精品久久久999蜜臀 |