ÉÏÒ»´ÎÎÒÃÇÑо¿ÁËguest.phpÎļþ.¾ßÌaµÄÎÊÌa»¹ÒªÇo¶ÁÕßÅoÓÑ×Ô¼ºÉiÈeµÄȥʵ¼u,¶øÇÒÐeÒªÒ»Ð(C)¹¤¾ßÊeÀ´Ñ§Ï°,Èç¹uÄuÒ»µaphpµÄ֪ʶ¶¼Ã»ÓÐ,±ÊÕßiÈ°Äu¾Í²»ÒªÏeÏ¿´ÁË,±ÊÕßûÓÐÌ«¶aµÄʱ¼aºÍƪuÈ¥Öð¾a̽¾¿Ò»¸ophpÎļþµÄÓÃ;ºÍÒaÒa.ºÃµÄ,½ÓÏÂÀ´ÎÒÃÇÀ´×÷edit.phpÕa¸oÎļþ.
-----------
//edit.php
<?
if ($Submit)
{
if ($SavePassword=="on")
{setcookie("TxtPassword","$TxtPassword",time()+30243600);}
else
{setcookie("TxtPassword");}
}
?>
function save($record)
{
global $TxtContent,$TxtEmail,$TxtHomepage,$TxtEmail,$TxtName,$TxtFrom,$TxtReply,$REMOTE_ADDR,$guestfile;
$content=file($guestfile,"r");
$space = " ";
$time = date(YÄemÔÂdÈÕHСʱi*Ö);
$ip=$REMOTE_ADDR;
$TxtReply=StripSlashes($TxtReply);
$TxtContent=StripSlashes($TxtContent);
$TxtContent=htmlspecialchars($TxtContent);
$TxtContent=check_strlen_long($TxtContent);
$TxtContent=nl2br($TxtContent);
$Wcontent = "
$content=file($guestfile,"r");
$message=$content[$record-1];
$long=strlen($message);
$txtcontent=readvalue('<!--content>','<!--endcontent>');
$txtname=readvalue('<!--name>','<!--endname>');
$txtfrom=readvalue('<!--from>','<!--endfrom>');
$txtemail=readvalue('<!--email>','<!--endemail>');
$txthomepage=readvalue('<!--homepage>','<!--endhomepage>');
$txtcontent=strip_tags($txtcontent);
$tags="<!--reply>";
$txtreply=strstr($message,$tags);
$txtreply=ereg_replace(""",""",$txtreply);
if ($Submit)
{
if ($TxtPassword==$managepwd)
{
if ($TxtName!="" and $TxtContent!="")
{
save($record);
echo "";
exit;
}else {$errorm="ÁoÑÔÈËÐÕÃuºÍÄÚÈݱØÌi!!";}
}
else {$errorm="ÃÜÂe´iÎo,Ö»ÓйÜÀiÔ±ÓÐȨÐÞ¸Ä!!";}
}
?>