<%if request.Cookies("username")="" then
response.Write ("<script language=javascript>alert('请先注册!!!');window.navigate('zc.asp');</script>")
end if%>
<!--#include file="conn.asp"-->
<!--#include file="Convert.asp"-->
<%if request("d")="add" then
nr=request.Form("nr")
subjectid=session("subjectid")
replytime=now
username=request.Cookies("username")
set rs=server.CreateObject("adodb.recordset")
sql="select * from discussion where (discussionid is null)"
rs.open sql,conn,1,3
rs.addnew
rs("answer")=username
rs("subjectid")=subjectid
rs("detail")=Convert(nr)
rs("replytime")=replytime
rs.update
response.Write ("<script language=javascript>alert('谢谢留言');window.navigate('lyb.asp');</script>")
end if
conn.close
set conn=nothing
%>
<html>
<head>
<title>★回复留言★</title>
<meta http-equiv="content-type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="css/STYLE.CSS">
<script language="javascript">
<!--
String.prototype.Trim = function()
{
return this.replace(/(^\s*)|(\s*$)/g, "");
}
function Jude(TheForm)
{
if(TheForm.zt.value.Trim()==""){
alert("主题必须填写!!!\n\n\n\n广告\n\n钻木牌打火机用了就知道.\n\n钻木牌打火机用了就知道. \n\n钻木牌打火机用了就知道.");
TheForm.zt.focus();
return (false);
}
if(TheForm.nr.value.Trim()==""){
alert("内容必须填写!!!\n\n飝宏家庭影院--成功者的选择.");
TheForm.nr.focus();
return(false);
}
}
-->
</script>
<script language="javascript">
<!--
function showimage(){document.images.tus.src="face/"+document.form.p1.options[document.form.p1.selectedIndex].value+""+document.form.p2.options[document.form.p2.selectedIndex].value+".gif";}
-->
</script>
<style type="text/css">
<!--
.style10 {font-size: 24px}
.style13 {font-size: 16pt; font-weight: bold; }
.style15 {color: #00FFFF; font-size: 16px;}
-->
</style>
<script language="javascript">
var lastcount=0;
var maxvalue=800;
function countstrbyte(message,total,used,remain){//字节统计
var bytecount=0;
var strvalue=message.value;
var strlength=message.value.length;
var marvalue=total.value;
if (lastcount!=strlength){//在此判断,减少循环次数
for(i=0;i<strlength;i++){
bytecount=(strvalue.charCodeAt(i)<=256)?bytecount+1:bytecount+2;
if (bytecount>maxvalue){
message.value=strvalue.substring(0,i);
alert("留言内容最多不能超过800个字节!\n注意:一个汉字为两个字符.\n如果是黑客攻击非常欢迎,你攻击我修复大家一起进步^-^");
bytecount=maxvalue;
break;
}
}
used.value=bytecount;
remain.value=maxvalue-bytecount;
lastcount=strlength;
}
}
</script>
</head>
<body class="bg" background="img/bg.jpg">
<center class="style9 style10">回复留言</center>
<br>
<span class="style15"><a href="lyb.asp"><font color="#0033FF">返回主题页面>>></font></a></span>
<center><hr noshade>
</center><br>
<center>
<form action="hfly.asp?d=add" method="post" name="form" onSubmit="return Jude(this);">
<table align="center" width="500" cellpadding="0" cellspacing="0" border="1" bordercolor="#000000">
<tr>
<td width="100" height="20" align="right" class="style13" >主题:</td>
<td colspan="2"><input type="text" size="35" class="text" value=<%=session("zt")%> name="zt" onFocus="this.className='textedit';this.select();" readonly> <span class="style2">★</span></td>
</tr>
<tr>
<td width="100" height="60" align="right" class="style13">图片:</td>
<td>
<select name="p1" size="1" onChange="showimage()" style="color: #0000FF; border: 1px dotted #9999FF; background-color: #C8C8FF">
<option value="m" selected>男</option>
<option value="w" >女</option>
</select> 表 情:<select name="p2" size="1" onChange="showimage()" style="color: #0000FF; border: 1px dotted #9999FF; background-color: #C8C8FF">
<option value="01">酷像01</option>
<option value="02">酷像02</option>
<option value="03">酷像03</option>
<option selected value="04">酷像04</option>
<option value="05">酷像05</option>
<option value="06">酷像06</option>
<option value="07">酷像07</option>
<option value="08">酷像08</option>
<option value="09">酷像09</option>
<option value="10">酷像10</option>
<option value="11">酷像11</option>
<option value="12">酷像12</option>
<option value="13">酷像13</option>
<option value="14">酷像14</option>
<option value="15">酷像15</option>
<option value="16">酷像16</option>
<option value="17">酷像17</option>
<option value="18">酷像18</option>
<option value="19">酷像19</option>
<option value="20">酷像20</option>
<option value="21">酷像21</option>
<option value="22">酷像22</option>
<option value="23">酷像23</option>
<option value="24">酷像24</option>
</select>
<td width="20%" align="center"><img name="tus" height="100%" src="face/m04.gif" alt="请选择上面的“性别”和“表情”更换头像" align="left"></td>
</tr>
<tr>
<td valign="top">
<div align="center" class="style13"><strong>内 容:
</strong></div></td>
<td colspan="2" valign="top"><textarea cols="55" rows="10" name="nr" class="text" onFocus="this.className='textedit';this.select();"
onKeyDown="countstrbyte(this.form.nr,this.form.total,this.form.used,this.form.remain);"
onKeyUp="countstrbyte(this.form.nr,this.form.total,this.form.used,this.form.remain);"></textarea></td>
</tr>
<tr>
<td align="center" colspan="3"><input type="submit" value="发 表" class="buttonface"> <span class="style2">★★★</span>
<input type="reset" value="重 置" class="buttonface"></td>
</tr>
</table>
<br>
<center>
最多允许输入<input name="total" type="text" disabled id="total" value="800" size="4" class="text" onFocus="this.className='textedit';this.select();">个字节
以用<input name="used" type="text" disabled id="used" value="0" size="4" class="text" onFocus="this.className='textedit';this.select();">个字节
剩余<input name="remain" type="text" disabled id="remain" value="800" size="4" class="text" onFocus="this.className='textedit';this.select();">个字节
<span class="style2"><strong>一个汉字两个字节</strong></span>
</center>
</form>
</center>
<!--#include file="down.html"-->
</body>
</html>
response.Write ("<script language=javascript>alert('请先注册!!!');window.navigate('zc.asp');</script>")
end if%>
<!--#include file="conn.asp"-->
<!--#include file="Convert.asp"-->
<%if request("d")="add" then
nr=request.Form("nr")
subjectid=session("subjectid")
replytime=now
username=request.Cookies("username")
set rs=server.CreateObject("adodb.recordset")
sql="select * from discussion where (discussionid is null)"
rs.open sql,conn,1,3
rs.addnew
rs("answer")=username
rs("subjectid")=subjectid
rs("detail")=Convert(nr)
rs("replytime")=replytime
rs.update
response.Write ("<script language=javascript>alert('谢谢留言');window.navigate('lyb.asp');</script>")
end if
conn.close
set conn=nothing
%>
<html>
<head>
<title>★回复留言★</title>
<meta http-equiv="content-type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="css/STYLE.CSS">
<script language="javascript">
<!--
String.prototype.Trim = function()
{
return this.replace(/(^\s*)|(\s*$)/g, "");
}
function Jude(TheForm)
{
if(TheForm.zt.value.Trim()==""){
alert("主题必须填写!!!\n\n\n\n广告\n\n钻木牌打火机用了就知道.\n\n钻木牌打火机用了就知道. \n\n钻木牌打火机用了就知道.");
TheForm.zt.focus();
return (false);
}
if(TheForm.nr.value.Trim()==""){
alert("内容必须填写!!!\n\n飝宏家庭影院--成功者的选择.");
TheForm.nr.focus();
return(false);
}
}
-->
</script>
<script language="javascript">
<!--
function showimage(){document.images.tus.src="face/"+document.form.p1.options[document.form.p1.selectedIndex].value+""+document.form.p2.options[document.form.p2.selectedIndex].value+".gif";}
-->
</script>
<style type="text/css">
<!--
.style10 {font-size: 24px}
.style13 {font-size: 16pt; font-weight: bold; }
.style15 {color: #00FFFF; font-size: 16px;}
-->
</style>
<script language="javascript">
var lastcount=0;
var maxvalue=800;
function countstrbyte(message,total,used,remain){//字节统计
var bytecount=0;
var strvalue=message.value;
var strlength=message.value.length;
var marvalue=total.value;
if (lastcount!=strlength){//在此判断,减少循环次数
for(i=0;i<strlength;i++){
bytecount=(strvalue.charCodeAt(i)<=256)?bytecount+1:bytecount+2;
if (bytecount>maxvalue){
message.value=strvalue.substring(0,i);
alert("留言内容最多不能超过800个字节!\n注意:一个汉字为两个字符.\n如果是黑客攻击非常欢迎,你攻击我修复大家一起进步^-^");
bytecount=maxvalue;
break;
}
}
used.value=bytecount;
remain.value=maxvalue-bytecount;
lastcount=strlength;
}
}
</script>
</head>
<body class="bg" background="img/bg.jpg">
<center class="style9 style10">回复留言</center>
<br>
<span class="style15"><a href="lyb.asp"><font color="#0033FF">返回主题页面>>></font></a></span>
<center><hr noshade>
</center><br>
<center>
<form action="hfly.asp?d=add" method="post" name="form" onSubmit="return Jude(this);">
<table align="center" width="500" cellpadding="0" cellspacing="0" border="1" bordercolor="#000000">
<tr>
<td width="100" height="20" align="right" class="style13" >主题:</td>
<td colspan="2"><input type="text" size="35" class="text" value=<%=session("zt")%> name="zt" onFocus="this.className='textedit';this.select();" readonly> <span class="style2">★</span></td>
</tr>
<tr>
<td width="100" height="60" align="right" class="style13">图片:</td>
<td>
<select name="p1" size="1" onChange="showimage()" style="color: #0000FF; border: 1px dotted #9999FF; background-color: #C8C8FF">
<option value="m" selected>男</option>
<option value="w" >女</option>
</select> 表 情:<select name="p2" size="1" onChange="showimage()" style="color: #0000FF; border: 1px dotted #9999FF; background-color: #C8C8FF">
<option value="01">酷像01</option>
<option value="02">酷像02</option>
<option value="03">酷像03</option>
<option selected value="04">酷像04</option>
<option value="05">酷像05</option>
<option value="06">酷像06</option>
<option value="07">酷像07</option>
<option value="08">酷像08</option>
<option value="09">酷像09</option>
<option value="10">酷像10</option>
<option value="11">酷像11</option>
<option value="12">酷像12</option>
<option value="13">酷像13</option>
<option value="14">酷像14</option>
<option value="15">酷像15</option>
<option value="16">酷像16</option>
<option value="17">酷像17</option>
<option value="18">酷像18</option>
<option value="19">酷像19</option>
<option value="20">酷像20</option>
<option value="21">酷像21</option>
<option value="22">酷像22</option>
<option value="23">酷像23</option>
<option value="24">酷像24</option>
</select>
<td width="20%" align="center"><img name="tus" height="100%" src="face/m04.gif" alt="请选择上面的“性别”和“表情”更换头像" align="left"></td>
</tr>
<tr>
<td valign="top">
<div align="center" class="style13"><strong>内 容:
</strong></div></td>
<td colspan="2" valign="top"><textarea cols="55" rows="10" name="nr" class="text" onFocus="this.className='textedit';this.select();"
onKeyDown="countstrbyte(this.form.nr,this.form.total,this.form.used,this.form.remain);"
onKeyUp="countstrbyte(this.form.nr,this.form.total,this.form.used,this.form.remain);"></textarea></td>
</tr>
<tr>
<td align="center" colspan="3"><input type="submit" value="发 表" class="buttonface"> <span class="style2">★★★</span>
<input type="reset" value="重 置" class="buttonface"></td>
</tr>
</table>
<br>
<center>
最多允许输入<input name="total" type="text" disabled id="total" value="800" size="4" class="text" onFocus="this.className='textedit';this.select();">个字节
以用<input name="used" type="text" disabled id="used" value="0" size="4" class="text" onFocus="this.className='textedit';this.select();">个字节
剩余<input name="remain" type="text" disabled id="remain" value="800" size="4" class="text" onFocus="this.className='textedit';this.select();">个字节
<span class="style2"><strong>一个汉字两个字节</strong></span>
</center>
</form>
</center>
<!--#include file="down.html"-->
</body>
</html>
浙公网安备 33010602011771号