国产成人精品久久免费动漫-国产成人精品天堂-国产成人精品区在线观看-国产成人精品日本-a级毛片无码免费真人-a级毛片毛片免费观看久潮喷

您的位置:首頁技術文章
文章詳情頁

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

瀏覽:39日期:2024-01-06 18:57:41
這一節我們將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
主站蜘蛛池模板: 日韩黄在线观看免费视频 | 狠狠色噜狠狠狠狠色综合久 | 国产欧美成人免费观看视频 | 日韩欧美一区二区三区不卡视频 | 日韩三级中文 | 国产在线精品香蕉综合网一区 | 男女免费爽爽爽在线视频 | 免费观看亚洲 | 欧美亚洲国产成人精品 | 精品视频在线观看一区二区三区 | 久久免费视频8 | 日韩国产午夜一区二区三区 | 成人三级在线播放线观看 | 国产大片中文字幕在线观看 | 国产人成免费视频 | 亚洲午夜精品一级在线播放放 | 亚洲厕拍 | 久草视频免费 | 亚洲风情第一页 | 久草影视在线观看 | 亚洲一区二区三区精品视频 | 国产三级a三级三级三级 | 毛片成人 | 国产精品午夜免费观看网站 | 欧美激情亚洲色图 | 亚洲欧美专区精品久久 | 欧美日韩黄色 | 久草免费资源站 | 久久国产免费观看精品3 | 亚洲综合精品一二三区在线 | 免费五级在线观看日本片 | 国产精品二区三区 | 色婷婷激婷婷深爱五月老司机 | 色樱桃影院亚洲精品影院 | 女人被男人躁得好爽免费文 | 中文字幕在线乱码不卡区区 | 精品亚洲永久免费精品 | 欧美性视频xxxxxxxx | 亚洲国产欧美日韩精品一区二区三区 | 精品国产一区二区三区不卡蜜臂 | 99精品视频在线视频免费观看 |