📄 adminlink.jsp
字号:
<%@ page contentType="text/html; charset=GBK" %>
<%@ include file="../../lybbs/jsp/common/include/taglibs.jsp" %>
<html:html>
<head>
<title><lybbs:blog key="blogName"/></title>
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<link rel="bookmark" href="favicon.ico" type="image/x-icon">
<%@ include file="../../lybbs/jsp/common/include/header.jsp" %>
<style type="text/css">
.titletd {
FONT-WEIGHT: bold; FONT-SIZE: 16px; COLOR: #282828
}
.titletable {
BORDER-RIGHT: #333333 1px dashed; BORDER-TOP: #333333 1px dashed; FILTER: Alpha(Opacity=65); BORDER-LEFT: #333333 1px dashed; BORDER-BOTTOM: #333333 1px dashed; BACKGROUND-COLOR: #ffffff
}
</style>
<SCRIPT language="JavaScript">
function copy(){
window.clipboardData.setData("Text", '<bean:write name="blogBean" property="url" scope="request"/>');
alert("地址已经保存到剪贴板");
}
function changeLink(idx,id) {
document.myform.link.value=eval('link'+idx).value;
document.myform.name.value=eval('name'+idx).value;
document.myform.description.value=eval('description'+idx).value;
if(document.myform.link.value=='') {
alert("链接不能为空!");
return false;
}
else if(document.myform.name.value=='') {
alert("链接名不能为空!");
return false;
}
else if(document.myform.link.value.length>80){
alert("链接不能超过80个字符!");
return false;
}
else if(document.myform.name.value.length>40){
alert("链接名不能超过40个字符!");
return false;
}
else if(document.myform.description.value.length>100){
alert("描述不能超过100个字符!");
return false;
}
else {
document.myform.linkID.value=id;
document.myform.action="blog_adminLink.do?action=edit";
document.myform.submit();
}
}
function showInput(idx) {
eval('linktxt'+idx).style.display="none";
eval('nametxt'+idx).style.display="none";
eval('descriptiontxt'+idx).style.display="none";
eval('linkinput'+idx).style.display="inline";
eval('nameinput'+idx).style.display="inline";
eval('descriptioninput'+idx).style.display="inline";
}
function hideInput(idx) {
eval('linktxt'+idx).style.display="inline";
eval('nametxt'+idx).style.display="inline";
eval('descriptiontxt'+idx).style.display="inline";
eval('linkinput'+idx).style.display="none";
eval('nameinput'+idx).style.display="none";
eval('descriptioninput'+idx).style.display="none";
}
function showNewLinkInput() {
document.all.newLinkBnt.style.display="none";
document.all.newLinkInput.style.display="inline";
}
function hideNewLinkInput() {
document.all.newLinkBnt.style.display="inline";
document.all.newLinkInput.style.display="none";
}
function newLink() {
if(document.myform.link.value=='') {
alert("链接不能为空!");
return false;
}
else if(document.myform.name.value=='') {
alert("链接名不能为空!");
return false;
}
else if(document.myform.link.value.length>80){
alert("链接不能超过80个字符!");
return false;
}
else if(document.myform.name.value.length>40){
alert("链接名不能超过40个字符!");
return false;
}
else if(document.myform.description.value.length>100){
alert("描述不能超过100个字符!");
return false;
}
else {
document.myform.action="blog_adminLink.do?action=new";
document.myform.submit();
}
}
function doDelete(id){
if(confirm('确定要删除此链接吗?')) {
document.myform.linkID.value=id;
document.myform.action="blog_adminLink.do?action=delete";
document.myform.submit();
}
}
</SCRIPT>
</head>
<body topmargin=0 leftmargin=0>
<TABLE class=tableCommonStyle cellSpacing=1 cellPadding=3 border=0 align=center>
<TR>
<TD class=noBgStyle id=blogTitleBg background="<bean:write name="blogBean" property="bgpic" scope="request"/>">
<TABLE width=100% cellSpacing=0 cellPadding=0 border=0>
<TBODY>
<TR>
<TD height=94>
<TABLE cellSpacing=0 cellPadding=0 width=100% border=0>
<TBODY>
<TR>
<TD align=right width=170> </TD>
<TD>
<table class="titletable" height=35 cellSpacing=1 cellPadding=5 bgColor=#000000 border=0>
<tr>
<td class="titletd"><bean:write name="blogBean" property="title" scope="request"/></td>
</tr>
</table>
</TD>
</TR>
</TBODY>
</TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=100% border=0>
<TBODY>
<TR>
<TD vAlign=bottom align=right width=520 height=31>
<table class="titletable" height=18 cellSpacing=1 cellPadding=5 bgColor=#000000 border=0>
<tr>
<td>
<A href="<bean:write name="blogBean" property="url" scope="request"/>" target=_blank><bean:write name="blogBean" property="url" scope="request"/></A>
</td>
</tr>
</table>
</TD>
<TD vAlign=bottom width=20> </TD>
<TD vAlign=bottom class="blogtitle">
<table class="titletable" height=18 cellSpacing=1 cellPadding=5 bgColor=#000000 border=0>
<tr>
<td>
<LABEL style="CURSOR: hand" onclick=copy()>复制</LABEL>
</td>
</tr>
</table>
</TD>
</TR>
</TBODY>
</TABLE>
</TD>
</TR>
</TBODY>
</TABLE>
</TD>
</TR>
<tr>
<td class=menuStyle height=22>
<table width=100% cellpadding=0 cellspacing=0 border=0>
<tr>
<td align=left>
<lybbs:typeUserHeaderTag forumID="0"/>
</td>
<td align=right>
<lybbs:web key="returnHomeLink"/>
</td>
</tr>
</table>
</td>
</tr>
</table>
<br>
<table class=tableCommonStyle cellpadding=3 cellspacing=1 border=0 align=center>
<tr>
<td class=catStyle valign=middle align=center colspan=2><b>博客管理中心</b></td>
</tr>
<tr>
<td valign=top align="center" class=forumColorOne width=150>
<lybbs:blog key="adminLeft"/>
</td>
<td class=forumColorTwo valign=top>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="1">
<tr>
<td height="30"><b>友情链接</b></td>
<td> </td>
</tr>
<tr>
<td height="1" valign="bottom" background="lyblog/images/line_01.gif" colspan=2></td>
</tr>
</table>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="5"></td>
</tr>
</table>
<table width="98%" border="1" align="center" cellpadding="5" cellspacing="0" borderColorLight=#C8C8DD borderColorDark=#FFFFFF>
<form name="myform" method="post">
<input type="hidden" name="linkID" value="">
<tr>
<td colspan="4" valign="top" bgcolor="#F5F5FA">
<span id="newLinkBnt">
<input name="title" type="button" value="添加链接" onClick="showNewLinkInput()">
</span>
<span id="newLinkInput" style="display:none">
请输入新的链接名:<input type="text" name="name" value=""><br>
请输入新的链接:<input type="text" name="link" value=""><br>
请输入新的链接描述:<input type="text" name="description" value=""><br>
<input type="button" name="bntNewLink" value="提交" onClick="newLink()">
<input type="button" name="bntHideNewLink" value="取消" onClick="hideNewLinkInput()">
</span>
</td>
</tr>
</form>
<tr>
<td align="center" bgcolor="#F5F5FA">链接名</td>
<td align="center" bgcolor="#F5F5FA">链接</td>
<td align="center" bgcolor="#F5F5FA">链接描述</td>
<td width="15%" align="center" bgcolor="#F5F5FA">操作</td>
</tr>
<logic:iterate id="element" name="listBean" indexId="index" scope="request">
<tr>
<td bgcolor="#F5F5FA">
<span id="nametxt<%=index%>"><bean:write name="element" property="name"/></span>
<span id="nameinput<%=index%>" style="display:none">
<input type="text" id="name<%=index%>" name="name<%=index%>" value="<bean:write name="element" property="name"/>">
</span>
</td>
<td bgcolor="#F5F5FA">
<span id="linktxt<%=index%>"><bean:write name="element" property="link"/></span>
<span id="linkinput<%=index%>" style="display:none">
<input type="text" id="link<%=index%>" name="link<%=index%>" value="<bean:write name="element" property="link"/>">
</span>
</td>
<td bgcolor="#F5F5FA">
<span id="descriptiontxt<%=index%>"><bean:write name="element" property="description"/></span>
<span id="descriptioninput<%=index%>" style="display:none">
<input type="text" id="description<%=index%>" name="description<%=index%>" value="<bean:write name="element" property="description"/>">
<input type="button" name="submit<%=index%>" value="提交" onClick="changeLink('<%=index%>','<bean:write name="element" property="linkID"/>')">
<input type="button" name="cancel<%=index%>" value="取消" onClick="hideInput('<%=index%>')">
</span>
</td>
<td align="center" bgcolor="#F5F5FA">
<img src="lyblog/images/icon_modify.gif" width="13" height="14"> <a href="javascript:showInput('<%=index%>')">修改</a> | <img src="lyblog/images/icon_del.gif" width="13" height="13"> <a href="javascript:doDelete('<bean:write name="element" property="linkID"/>')">删除</a>
</td>
</tr>
</logic:iterate>
</table>
</td>
</tr>
</table>
<lybbs:web key="foot"/>
</body>
</html:html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -