📄 leaveword.jsp
字号:
<%@ page language="java" pageEncoding="gb2312"%>
<%@ page import="java.util.*" %>
<%@ page import="com.guestbook.sys.*" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%
if( SysUtil.IPBaned(request.getRemoteAddr().toString() )){
out.println( "你的ip被禁用,请与"+ SysInfo.getInstance().getDynamicParameter().get( "masterInfo/mail" ).toString() +"联系" );
return;
}
Hashtable dynamicParameter = ( Hashtable)request.getAttribute( "dynamicParameter" );
%>
<html>
<head>
<meta name="Author" content="BlueSailor">
<title>发表留言--<%=dynamicParameter.get( "guestBookName" )%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<%@ include file="style.jsp" %>
</head>
<body onkeydown="if(event.keyCode==13 && event.ctrlKey)document.forms[0].submit()" >
<%@ include file="top.jsp" %>
<script language="javascript">
function checkSubmit( form )
{
if( form.guestname.value == "" )
{
alert( "你的姓名必须填写!" );
form.guestname.focus();
return false;
}
if( form.guestcontent.value == "" )
{
alert( "留言内容必须填写!" );
form.guestcontent.focus();
return false;
}
if( form.guestcontent.value.length > <%=dynamicParameter.get( "leaveWordLength" )%> )
{
alert( "留言内容过程,不能大于<%=dynamicParameter.get( "leaveWordLength" )%>个字节!" );
form.guestcontent.focus();
return false;
}
return true;
}
</script>
<html:form action="/leaveWordSave" method="post" onsubmit="return checkSubmit(this)">
<table cellspacing=0 border=1 width=650 style="border-collapse: collapse" cellpadding="0" height="310" align="center" bordercolor="<%=dynamicParameter.get( "styleInfo/bordercolor" )%>">
<tr>
<td height=21 colspan="2" class="addfont"><div align="center">发表留言(有<font color="#FF0000">*</font>号的必填)</div></td>
</tr>
<tr>
<td width="217" height="21" class="addfont"><div align="right">(版主请用管理中的ID)你的姓名:
</div></td>
<td width="427" height="21" class="bodytableleft">
<html:text property="guestname" maxlength="10" size="20" onfocus="this.select()" onmouseover="this.focus()"></html:text>
<font color="#FF0000">*</font> </td>
</tr>
<tr>
<td width="217" height="21" class="addfont"> <div align="right">来自哪里:
</div></td>
<td width="427" height="21" class="bodytableleft">
<html:text property="comefrom" size="20" onfocus="this.select()" onmouseover="this.focus()"></html:text>
</td>
</tr>
<tr>
<td width="217" height="21" class="addfont"> <div align="right">主页地址:
</div></td>
<td width="427" height="21" class="bodytableleft">
<html:text property="homepage" size="20" value="http://" onfocus="this.select()" onmouseover="this.focus()"></html:text>
</td>
</tr>
<tr>
<td width="217" height="21" class="addfont"> <div align="right">Email地址: </div></td>
<td width="427" height="21" class="bodytableleft">
<html:text property="email" size="20" onfocus="this.select()" onmouseover="this.focus()"></html:text>
</td>
</tr>
<tr>
<td width="217" height="22" class="addfont"><div align="right">QQ号码:
</div></td>
<td width="427" height="22" class="bodytableleft">
<html:text property="oicq" maxlength="15" size="20" ></html:text>
</td>
</tr>
<%
if( Boolean.parseBoolean( dynamicParameter.get( "facePic" ).toString() ) )
{
%>
<tr>
<td width="217" height="22" class="addfont"> <div align="right">选择表情: </div>
</div></td>
<td width="427" height="22" valign="middle" class="bodytableleft"> <img src="images/p1.gif" width="15" height="15" onclick="guestcontent.value+='[img]/images/p1.gif[/img]';" style="CURSOR:hand" >
<img src="images/p2.gif" width="15" height="15" onclick="guestcontent.value+='[img]/images/p2.gif[/img]';" style="CURSOR:hand" >
<img src="images/p3.gif" width="15" height="15" onclick="guestcontent.value+='[img]/images/p3.gif[/img]';" style="CURSOR:hand" >
<img src="images/p4.gif" width="15" height="24" onclick="guestcontent.value+='[img]/images/p4.gif[/img]';" style="CURSOR:hand" >
<img src="images/p5.gif" width="15" height="15" onclick="guestcontent.value+='[img]/images/p5.gif[/img]';" style="CURSOR:hand" >
<img src="images/p6.gif" width="15" height="15" onclick="guestcontent.value+='[img]/images/p6.gif[/img]';" style="CURSOR:hand" >
<img src="images/p7.gif" width="15" height="15" onclick="guestcontent.value+='[img]/images/p7.gif[/img]';" style="CURSOR:hand" >
<img src="images/p8.gif" width="15" height="15" onclick="guestcontent.value+='[img]images/p8.gif[/img]';" style="CURSOR:hand" >
<img border="0" src="images/p9.gif" onclick="guestcontent.value+='[img]/images/p9.gif[/img]';" style="CURSOR:hand" >
<img border="0" src="images/p10.gif" onclick="guestcontent.value+='[img]/images/p10.gif[/img]';" style="CURSOR:hand" >
<img border="0" src="images/p11.gif" onclick="guestcontent.value+='[img]/images/p11.gif[/img]';" style="CURSOR:hand" >
<img border="0" src="images/p12.gif" onclick="guestcontent.value+='[img]/images/p12.gif[/img]';" style="CURSOR:hand" >
<img border="0" src="images/p13.gif" onclick="guestcontent.value+='[img]/images/p13.gif[/img]';" style="CURSOR:hand" ></td>
</tr>
<%
}
if( Boolean.parseBoolean( dynamicParameter.get( "secretly" ).toString() ) )
{
%>
<tr>
<td width="217" height="22" class="addfont"><div align="right">悄悄话:
</div></td>
<td width="427" height="22" class="bodytableleft">
<html:select property="secretly">
<html:option value="0">否</html:option>
<html:option value="1">是</html:option>
</html:select>
</td>
</tr>
<%
}
%>
<tr>
<td width="217" height="11" class="addfont"> <div align="right">选择头像:
</div></td>
<td width="427" height="11" class="bodytableleft"> <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><div id="imgBox"></div>
<html:hidden property="face" />
<script language="JavaScript" src="/js/head.js" type="text/JavaScript"></script>
</td>
</tr>
</table></td>
</tr>
<%
if( Boolean.parseBoolean( dynamicParameter.get( "ubbPic" ).toString() ) )
{
%>
<tr>
<td width="217" height="22" class="addfont"><div align="right">Ubb标签:
</div></td>
<td width="427" height="22" class="bodytableleft"> <script src=/js/code.js></script>
<img onclick=bold() align=absmiddle src="pic/icon_editor_bold.gif" width="22" height="22" alt="粗体" border="0"
><img onclick=italicize() align=absmiddle src="pic/icon_editor_italicize.gif" width="23" height="22" alt="斜体" border="0"
><img onclick=underline() align=absmiddle src="pic/icon_editor_underline.gif" width="23" height="22" alt="下划线" border="0"
><img onclick=hyperlink() align=absmiddle src="pic/icon_editor_url.gif" width="22" height="22" alt="超级连接" border="0"
><img onclick=image() align=absmiddle src="pic/icon_editor_image.gif" width="23" height="22" alt="图片" border="0"
><img onclick=showcode() align=absmiddle src="pic/icon_editor_code.gif" width="22" height="22" alt="编号" border="0"
><img onclick=quote() align=absmiddle src="pic/icon_editor_quote.gif" width="23" height="22" alt="引用" border="0"
><img onclick=list() align=absmiddle src="pic/icon_editor_list.gif" width="23" height="22" alt="目录" border="0"
>
</td>
</tr>
<%
}
%>
<tr>
<td width="217" height="95" class="addfont"><div align="right">留言内容:(*)
<br>
UBB:开启 <br>
最大留言字节数:<%=dynamicParameter.get( "leaveWordLength" )%><br>
<br>
</div></td>
<td width="427" height="95" class="bodytableleft">
<html:textarea property="guestcontent" cols="47" rows="8"
onfocus="this.select()" onmouseover="this.focus()"></html:textarea>
<font color="#FF0000">*</font> </td>
</tr>
<tr class="addfont">
<td height=22 colspan="2" align=center> <input type="submit" name="Submit3" value="提交" class=noBorder>
(Ctrl+Enter提交) <html:link action="index">查看留言</html:link></td>
</tr>
</table>
</html:form> <br>
<%@ include file="bottom.jsp" %>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -