色综合图-色综合图片-色综合图片二区150p-色综合图区-玖玖国产精品视频-玖玖香蕉视频

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

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

瀏覽:31日期: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' "一欄中等號后的是留言本的管理密碼號,此時是默認的zihanonline.您可以修改為自己的號碼. 未完待續(xù)...
標簽: PHP
主站蜘蛛池模板: 一国产一级淫片a免费播放口 | 欧美视频在线观看免费精品欧美视频 | 91精品日本久久久久久牛牛 | 精品国产网 | 国产精品情人露脸在线观看 | 成人一级毛片 | 久草手机在线播放 | 久草在线观看首页 | 亚洲成a v人片在线看片 | 亚洲欧美一区二区久久香蕉 | 欧美在线观看www | 成人在线精品视频 | 美女扒开腿被男人猛视频 | 欧美1| 女人张开腿让男人桶免费最新 | 一级一片免费看 | 国语精品视频在线观看不卡 | 久草手机在线观看视频 | 狠狠色综合久久婷婷 | 手机福利片 | 久久院线 | 亚洲综合一 | 99久久精品国产亚洲 | 美国全免费特一级毛片 | 日本一区二区三区四区公司 | 91久久综合九色综合欧美98 | 欧美成人性色区 | 一区二区三区四区国产精品 | 欧美日韩中文字幕在线视频 | 91香蕉成人免费高清网站 | 亚洲美女高清aⅴ视频免费 亚洲美女黄色片 | 99热久久国产综合精品久久国产 | 亚洲国产精品成人午夜在线观看 | 日韩在线二区全免费 | 欧美三级成版人版在线观看 | 成年人毛片网站 | 91在线免费观看网站 | 久久免费精品国产72精品剧情 | 91精品国产91热久久p | 久久精品国产在爱久久 | 亚洲成人福利在线 |