📄 index.jsp
字号:
<%@ taglib uri="WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="WEB-INF/struts-template.tld" prefix="template" %>
<%@ taglib uri="WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="WEB-INF/strong.tld" prefix="Strong" %>
<%@ page contentType="text/html; charset=UTF-8" session="false" %>
<%
response.addHeader("Cache-Control", "max-age=30");
%>
<Strong:Init isCheck="true" />
<html:html>
<head>
<title><bean:write name="init" property="guestbookuser" />的留言簿 -- Strong D NET 留言簿 Build.2004.06.14 Powered by Strong</title>
<link href="mycss.css" rel="stylesheet" type="text/css">
<script src="myfun.js"></script>
<script>
function set_em(num){
document.postMsgActionForm.contant.value+='[em'+num+']';
}
function strong(op){
var strchoice='';
for(var i=0;i<document.delMsgActionForm.selcheck.length;i++){
if (document.delMsgActionForm.selcheck[i].checked){
strchoice=strchoice+document.delMsgActionForm.selcheck[i].value+",";
}
}
if (!document.delMsgActionForm.selcheck.length) {
if (document.delMsgActionForm.selcheck.checked) {
strchoice=document.delMsgActionForm.selcheck.value+",";
}
}
strchoice=strchoice.substring(0,strchoice.length-1);
document.delMsgActionForm.id.value=strchoice;
document.delMsgActionForm.op.value=op;
if(document.delMsgActionForm.id.value==''){
alert("plz select msg which you want to delete!");
}else{
if(confirm('really deltet the msg which you selected?')){
document.delMsgActionForm.submit();
}
}
}
</script>
</head>
<body>
<html:errors />
<table width="500" border="0" align="center" cellpadding="0" cellspacing="0">
<html:form action="/postMsgAction.do" method="post" onsubmit="return ckForm('title','','R','contant','','R','visiter','','R')">
<tr>
<td><table width="100%" border="0" cellspacing="2" cellpadding="2">
<tr>
<td colspan="3" align="center"><bean:write name="init" property="guestbookuser" />的留言簿<br></td>
</tr>
<tr>
<td width="13%" height="18">標題: </td>
<td width="28%"><html:text styleClass="a" maxlength="40" title="標題" property="title" size="20"/></td>
<td width="59%" rowspan="9" valign="top"><html:textarea cols="40" styleClass="a" rows="13" title="留言內容" property="contant"></html:textarea></td>
</tr>
<tr>
<td>用戶名:</td>
<td><html:text styleClass="a" maxlength="20" title="用戶名" property="visiter" size="20"/></td>
</tr>
<tr>
<td>ICQ:</td>
<td><html:text styleClass="a" maxlength="20" title="icq號碼" property="icq" size="20"/></td>
</tr>
<tr>
<td>MSN:</td>
<td><html:text styleClass="a" maxlength="40" title="msn messeger" property="msn" size="20"/></td>
</tr>
<tr>
<td>Yahoo:</td>
<td><html:text styleClass="a" maxlength="40" title="yahoo messeger" property="yahoo" size="20"/></td>
</tr>
<tr>
<td>Email:</td>
<td><html:text styleClass="a" maxlength="40" title="郵箱" property="email" size="20"/></td>
</tr>
<tr>
<td>website:</td>
<td><html:text styleClass="a" maxlength="60" title="個人主頁" property="website" size="20"/></td>
</tr>
<tr>
<td colspan="3" align="center"><br>
<script>
for(i=1;i<=35;i++){
document.write ('<a href=\"javascript:set_em('+i+')\"><img src=\"images/'+i+'.gif\" width=\"20\" height=\"20\" border=\"0\"></a>');
if(i%17==0)
document.write('<br>');
}
</script></td>
</tr>
<tr>
<td colspan="3"> </td>
</tr>
<tr>
<td colspan="3" align="center"><input type="hidden" value='<bean:write name="init" property="guestbookuser" />' name="username" /><html:submit styleClass="a" value="Submit"/></td>
</tr>
</table></td>
</tr></html:form>
</table>
<br>
<center><a href="reg.jsp">即刻申請</a>
<logic:notPresent name="username"><a href="login.jsp">登陸管理</a></logic:notPresent >
<logic:present name="username"><a href='logoutAction.do?name=<bean:write name="init" property="guestbookuser" />'>退出管理</a></logic:present ></center>
<center>
<p style="margin-top: 1px; margin-bottom: 1px; word-spacing: 1px" align="center"> </p>
<p style="margin-top: 1px; margin-bottom: 1px; word-spacing: 1px" align="center"><b>=.="</b>----------------------------------------<b>=.="</b></p>
<p style="margin-top: 1px; margin-bottom: 1px; word-spacing: 1px" align="center"> </p>
<table class="aaa" cellspacing="3" cellpadding="0" width="300" bgcolor="#e0d2bc" border="0">
<tr>
<td width="100%" align="center">
<table class="aaaa" height="99%" cellspacing="0" cellpadding="0" width="99%" border="0">
<tr>
<td align="middle" width="100%"><font color="#936a59" size="1"> </font><img height="9" src="images/x2_2.gif" width="10"
border="0">^^HTTP://WWW.STRONGD.NET^^<img height="9" src="images/x2_2.gif" width="10" border="0"><font color="#936a59" size="2"><b><!--s--></b></font></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="0" cellpadding="0" width="210" border="0">
<tr>
<td width="50%"><img height="25" src="images/hr.gif" width="16" border="0"></td>
<td width="50%"><p align="right"><img height="25" src="images/hl.gif" width="16" border="0"></p></td>
</tr>
</table>
<Strong:ShowArray tableName="guestbook" name="guestbook" max="10" orderBy="id desc" />
<html:form action="/delMsgAction.do" method="post" >
<logic:present name="guestbook" >
<logic:iterate id="row" name="guestbook" >
<table class="bbb" cellspacing="3" cellpadding="0" width="480" border="0">
<tr>
<td width="100%">
<table class="bbbb" height="99%" cellspacing="0" cellpadding="0" width="99%" border="0">
<tr>
<td width="100%">
<table cellspacing="1" width="501" border="0">
<tr>
<td width="82%" colspan="3" bgcolor="#e0d2bc"><logic:present name="username"><input type="checkbox" name="selcheck" value="<bean:write name="row" property="id" />" ></logic:present ><bean:write name="row" property="title" /></td>
<td align="right" width="18%" bgcolor="#e0d2bc"><bean:write name="row" property="cr_date" format="yyy-MM-dd" /></td>
</tr>
<tr>
<td colspan="4">   <bean:write name="row" property="contant" filter="false"/><td>
</tr>
<tr>
<td width="100%" bgcolor="#e0d2bc" colspan="4">
<a href='mailto:<bean:write name="row" property="email" />'><bean:write name="row" property="name" /></a>
<logic:present name="row" property="website"><a href='<bean:write name="row" property="website" />'><img src="images/home.gif" border="0" alt='<bean:write name="row" property="website" />'></a></logic:present >
<logic:present name="row" property="icq"><img src="images/icq.gif" border="0" alt='<bean:write name="row" property="icq" />'></logic:present >
<logic:present name="row" property="yahoo"><img src="images/yahoo.gif" border="0" alt='<bean:write name="row" property="yahoo" />'></logic:present >
<logic:present name="row" property="msn"><img src="images/msn.gif" border="0" alt='<bean:write name="row" property="msn" />'></logic:present >
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<br>
</logic:iterate>
</logic:present>
<center><Strong:ShowPage /></center>
<input type="hidden" name="id" value=""><input type="hidden" name="op" value="del">
<logic:present name="username">
<input type="button" name="delbtn" onclick="javascript:strong()" value="刪除所選擇的留言">
</logic:present >
</html:form>
</center>
<br>
<bean:write name="init" property="copyright" filter="false" />
</body>
</html:html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -