亚洲精品久久久中文字幕-亚洲精品久久片久久-亚洲精品久久青草-亚洲精品久久婷婷爱久久婷婷-亚洲精品久久午夜香蕉

您的位置:首頁技術(shù)文章
文章詳情頁

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

瀏覽:33日期:2024-01-06 18:57:41
這一節(jié)我們將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>.無權(quán)操作..";} 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 "僅刪除回復(fù)";;;;} ;;;;;?> <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' "一欄中等號后的是留言本的管理密碼號,此時是默認(rèn)的zihanonline.您可以修改為自己的號碼. 未完待續(xù)...
標(biāo)簽: PHP
主站蜘蛛池模板: 国产精品日韩欧美 | 欧美一区二区三区免费播放 | 日韩欧美一级大片 | 日韩中文字幕精品免费一区 | 日韩在线观看第一页 | 成人啪啪免费视频 | 丁香亚洲综合五月天婷婷 | 香蕉成人啪国产精品视频综合网 | 97超视频在线观看 | 国内精品久久久久影院嫩草 | 九一视频污| 尤物国产在线 | 久久国产香蕉一区精品 | 国产情侣真实露脸在线 | 日本高清视频色视频kk266 | 亚洲第一综合网站 | 精品福利国产 | 久久国产精品1区2区3区网页 | 亚洲 欧美 91 | 亚洲人在线视频 | 人久热欧美在线观看量量 | 丁香六月婷婷精品免费观看 | 国产大量情侣高清视频 | 在线a久青草视频在线观看g | 国产永久免费高清在线观看视频 | 亚洲人与牲动交xxxxbbbb | 狠狠色狠狠色综合婷婷tag | 成 人 黄 色 全 集 | 国产亚洲人成网站观看 | 手机在线观看精品国产片 | 又爽又黄又无遮挡的激情视频免费 | 成人国产激情福利久久精品 | 伊人成人在线观看 | 黄色精品 | 亚欧洲精品在线视频免费观看 | 特级毛片aaaa免费观看 | 久久精品国产一区 | 精品香蕉视频 | 一级二级三级黄色片 | 亚洲18岁禁止 | 亚洲国产剧情 |