?? detail.php
字號:
<?
if( ($action == "reply") && ($name != "") && ($subject != "") && ($body != "") )
{
chdir("$id/$fileid");
while( file_exists("reply.tmp"))
{
$pppp ++;
}
fclose(fopen("reply.tmp","w"));
for($i=1;$i<999999;$i++)
{
if(!file_exists($filename."_".$i))
{
break;
}
}
fclose(fopen($filename."_".$i,"w"));
unlink("reply.tmp");
$handle = fopen($filename."_".$i,"w");
$name = ereg_replace("<","<",$name);
$name = ereg_replace(">",">",$name);
if( strlen($name) > 20 )
{
$name = substr($name,0,20);
}
$email = ereg_replace("<","<",$email);
$email = ereg_replace(">",">",$email);
if( strlen($email) > 50 )
{
$email = substr($email,0,50);
}
$subject = ereg_replace("<","<",$subject);
$subject = ereg_replace(">",">",$subject);
if( strlen($subject) > 50 )
{
$subject = substr($subject,0,50);
}
$body = ereg_replace("<","<",$body);
$body = ereg_replace(">",">",$body);
$body = ereg_replace("\r\n","<br>",$body);
if( strlen($body) > 500 )
{
$body = substr($body,0,500);
}
fputs($handle,"$name||bbs||$email||bbs||$subject||bbs||$body||bbs||".date("Y年m月d日 H:i"));
fclose($handle);
chdir("../..");
?>
<script language="javascript">
self.location="show.php?id=<?print($id);?>&&name=<?print($fileid);?>&showdetail=yes"
</script>
<?
}
else
{
$message = file("$id/$fileid/$filename");
$msg = split("\|\|bbs\|\|",$message[0],99);
?>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="../default.css">
</head>
<body bgcolor="#FFFFFF" leftmargin="5" topmargin="5">
<center>
<table width="500" border="1" cellspacing="0" cellpadding="2" bgcolor="f0f0f0" bordercolorlight="e0e0e0" bordercolordark="ffffff">
<tr bgcolor="99cc99">
<td colspan="2" align="center">察看留言</td>
</tr>
<tr>
<td width="100" align="center">姓名</td>
<td width="400"><? print($msg[0]); ?></td>
</tr>
<tr>
<td width="100" align="center">郵箱</td>
<td width="400"><? print($msg[1]); ?></td>
</tr>
<tr>
<td width="100" align="center">主題</td>
<td width="400"><? print($msg[2]); ?></td>
</tr> <tr>
<td width="100" align="center">內(nèi)容</td>
<td width="400"> </td>
</tr>
<tr>
<td colspan="2"><? print(stripslashes($msg[3])); ?> </td>
</tr>
<tr>
<td colspan="2" align="center"> </td>
</tr>
</table>
<p> </p><table width="500" border="0" cellspacing="0" cellpadding="2">
<form method=post action=detail.php?action=reply&&id=<?print($id);?>&fileid=<?print($fileid)?>>
<input type=hidden name=filename value=<? print($filename); ?> >
<tr bgcolor="99cc99" align="center">
<td colspan="2">回復(fù)留言</td>
</tr>
<tr>
<td width="100" align="center">姓名</td>
<td width="400">
<input type="text" name="name" size="20" maxlength="20">
<font color="#FF0000">*</font> </td>
</tr>
<tr>
<td width="100" align="center">郵箱</td>
<td width="400">
<input type="text" name="email" size="50" maxlength="50">
</td>
</tr>
<tr>
<td width="100" align="center">主題</td>
<td width="400">
<input type="text" name="subject" size="50" maxlength="100">
<font color="#FF0000">*</font> </td>
</tr>
<tr>
<td width="100" align="center">內(nèi)容</td>
<td width="400"> <font color="#FF0000">*</font></td>
</tr>
<tr>
<td colspan="2" align="center">
<textarea name="body" cols="70" rows="10"></textarea>
</td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="submit" name="Submit2" value="發(fā)送">
<input type="reset" name="reset" value="重填">
</td>
</tr>
</form>
</table>
</center>
</body>
</html>
<?
}
?>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -