📄 forumtag.java
字号:
}
if(type.equals("beagainst"))
{
StringBuffer sb = new StringBuffer();
if(!uc.isGuest())
{
Object value = RequestUtils.lookup(pageContext, name, null);
if(value != null)
{
Forum forum = (Forum)value;
sb.append("<a href='postDo");
sb.append(Constant.FILEPREFIX);
sb.append("?bid=");
sb.append(forum.getBoardID());
sb.append("&action=votno&id=");
sb.append(forum.getId().longValue());
sb.append("&mainid=");
sb.append(forum.getId2());
sb.append("&page=");
sb.append(page);
sb.append("&inpages=");
sb.append(inpages);
sb.append("'>");
if(img != null && img.length() > 0)
{
sb.append("<img alt='");
sb.append(Constant.MESSAGE.getMessage(request.getLocale(), "showdoc.beagainst"));
sb.append("' border='0' height='16' src='");
sb.append(img);
sb.append("' width=16>");
} else
{
sb.append("[");
sb.append(Constant.MESSAGE.getMessage(request.getLocale(), "showdoc.beagainst"));
sb.append("]");
}
sb.append("</a>");
ResponseUtils.write(pageContext, sb.toString());
return 0;
}
} else
{
if(img != null && img.length() > 0)
{
sb.append("<img alt='");
sb.append(Constant.MESSAGE.getMessage(request.getLocale(), "showdoc.beagainst"));
sb.append("' border='0' height='16' src='");
sb.append(img);
sb.append("' width=16>");
} else
{
sb.append("[");
sb.append(Constant.MESSAGE.getMessage(request.getLocale(), "showdoc.beagainst"));
sb.append("]");
}
ResponseUtils.write(pageContext, sb.toString());
return 0;
}
}
if(type.equals("note"))
{
StringBuffer sb = new StringBuffer();
if(!uc.isGuest())
{
Object value = RequestUtils.lookup(pageContext, name, null);
if(value != null)
{
Forum forum = (Forum)value;
sb.append("<a href='notedo");
sb.append(Constant.FILEPREFIX);
sb.append("?action=new&fname=");
sb.append(forum.getUserName());
sb.append("'>");
if(img != null && img.length() > 0)
{
sb.append("<img alt='");
sb.append(Constant.MESSAGE.getMessage(request.getLocale(), "showdoc.sendmsg"));
sb.append("' border='0' height='16' width='16' src='");
sb.append(img);
sb.append("'>");
} else
{
sb.append("[");
sb.append(Constant.MESSAGE.getMessage(request.getLocale(), "showdoc.sendmsg"));
sb.append("]");
}
sb.append("</a>");
ResponseUtils.write(pageContext, sb.toString());
return 0;
}
} else
{
if(img != null && img.length() > 0)
{
sb.append("<img alt='");
sb.append(Constant.MESSAGE.getMessage(request.getLocale(), "showdoc.sendmsg"));
sb.append("' border='0' height='16' width='16' src='");
sb.append(img);
sb.append("'>");
} else
{
sb.append("[");
sb.append(Constant.MESSAGE.getMessage(request.getLocale(), "showdoc.sendmsg"));
sb.append("]");
}
ResponseUtils.write(pageContext, sb.toString());
return 0;
}
}
if(type.equals("ip"))
{
StringBuffer sb = new StringBuffer();
sb.append("<img alt='");
sb.append(Constant.MESSAGE.getMessage(request.getLocale(), "showdoc.userip"));
sb.append(":");
if(uc.isSuperAdmin() || uc.isBmaster() || uc.isMainMaster() || uc.isAssiMaster() || uc.isHideMaster())
{
Object value = RequestUtils.lookup(pageContext, name, null);
if(value != null)
{
Forum forum = (Forum)value;
sb.append(forum.getIpAddress());
}
} else
{
sb.append(Constant.MESSAGE.getMessage(request.getLocale(), "showdoc.hiden"));
}
sb.append("' border='0' height='16' width='16' src='");
sb.append(img);
sb.append("'>");
ResponseUtils.write(pageContext, sb.toString());
return 0;
}
if(type.equals("dela"))
{
Object value = RequestUtils.lookup(pageContext, name, null);
if(value != null)
{
Forum forum = (Forum)value;
if(uc.isCanPostNotNeedExp() || forum.getCanNotRe() == 0 && forum.getUserID() == uc.getId())
{
StringBuffer sb = new StringBuffer();
sb.append("[");
sb.append("<a href='postDo");
sb.append(Constant.FILEPREFIX);
sb.append("?action=dela&id=");
sb.append(forum.getId().longValue());
sb.append("&bid=");
sb.append(forum.getBoardID());
sb.append("&page=");
sb.append(page);
sb.append("'>");
sb.append(Constant.MESSAGE.getMessage(request.getLocale(), "bbscs.del"));
sb.append("</a>]");
ResponseUtils.write(pageContext, sb.toString());
return 0;
}
}
}
if(type.equals("setelite") && uc.isCanPostNotNeedExp())
{
Object value = RequestUtils.lookup(pageContext, name, null);
if(value != null)
{
Forum forum = (Forum)value;
if(forum.getElite() == 0L)
{
StringBuffer sb = new StringBuffer();
sb.append("[");
sb.append("<a href='postDo");
sb.append(Constant.FILEPREFIX);
sb.append("?action=setelite&id=");
sb.append(forum.getId().longValue());
sb.append("&bid=");
sb.append(forum.getBoardID());
sb.append("&page=");
sb.append(page);
sb.append("&mainid=");
sb.append(forum.getId2());
sb.append("&userID=");
sb.append(forum.getUserID());
sb.append("&inpages=");
sb.append(inpages);
sb.append("'>");
sb.append(Constant.MESSAGE.getMessage(request.getLocale(), "showdoc.jrjh"));
sb.append("</a>]");
ResponseUtils.write(pageContext, sb.toString());
}
return 0;
}
}
if(type.equals("delfile") && uc.isCanPostNotNeedExp())
{
Object value = RequestUtils.lookup(pageContext, name, null);
if(value != null)
{
Forum forum = (Forum)value;
if(forum.getHavePic() != 0)
{
StringBuffer sb = new StringBuffer();
sb.append("[");
sb.append("<a href='postDo");
sb.append(Constant.FILEPREFIX);
sb.append("?action=delfile&id=");
sb.append(forum.getId().longValue());
sb.append("&bid=");
sb.append(forum.getBoardID());
sb.append("&page=");
sb.append(page);
sb.append("&mainid=");
sb.append(forum.getId2());
sb.append("&inpages=");
sb.append(inpages);
sb.append("'>");
sb.append(Constant.MESSAGE.getMessage(request.getLocale(), "showdoc.delpic"));
sb.append("</a>]");
ResponseUtils.write(pageContext, sb.toString());
}
return 0;
}
}
if(type.equals("mailsend") && !uc.isGuest())
{
Object value = RequestUtils.lookup(pageContext, name, null);
if(value != null)
{
Forum forum = (Forum)value;
StringBuffer sb = new StringBuffer();
sb.append("[");
sb.append("<a href='postDo");
sb.append(Constant.FILEPREFIX);
sb.append("?action=mailsend&id=");
sb.append(forum.getId().longValue());
sb.append("&bid=");
sb.append(forum.getBoardID());
sb.append("&page=");
sb.append(page);
sb.append("&mainid=");
sb.append(forum.getId2());
sb.append("&inpages=");
sb.append(inpages);
sb.append("'>");
sb.append(Constant.MESSAGE.getMessage(request.getLocale(), "showdoc.mailsend"));
sb.append("</a>]");
ResponseUtils.write(pageContext, sb.toString());
return 0;
}
}
if(type.equals("jubao") && !uc.isGuest())
{
Object value = RequestUtils.lookup(pageContext, name, null);
if(value != null)
{
Forum forum = (Forum)value;
StringBuffer sb = new StringBuffer();
sb.append("[");
sb.append("<a href='postDo");
sb.append(Constant.FILEPREFIX);
sb.append("?action=jubao&id=");
sb.append(forum.getId().longValue());
sb.append("&bid=");
sb.append(forum.getBoardID());
sb.append("&page=");
sb.append(page);
sb.append("&mainid=");
sb.append(forum.getId2());
sb.append("&inpages=");
sb.append(inpages);
sb.append("'>");
sb.append(Constant.MESSAGE.getMessage(request.getLocale(), "showdoc.jubao"));
sb.append("</a>]");
ResponseUtils.write(pageContext, sb.toString());
return 0;
}
}
if(type.equals("lock") && uc.isCanPostNotNeedExp())
{
Object value = RequestUtils.lookup(pageContext, name, null);
if(value != null)
{
Forum forum = (Forum)value;
if(forum.getIsNew() == 1)
{
StringBuffer sb = new StringBuffer();
sb.append("[");
sb.append("<a href='postDo");
sb.append(Constant.FILEPREFIX);
sb.append("?action=");
if(forum.getIsLock() == 0)
sb.append("lock");
else
sb.append("unlock");
sb.append("&id=");
sb.append(forum.getId().longValue());
sb.append("&bid=");
sb.append(forum.getBoardID());
sb.append("&page=");
sb.append(page);
sb.append("&mainid=");
sb.append(forum.getId2());
sb.append("&inpages=");
sb.append(inpages);
sb.append("'>");
if(forum.getIsLock() == 0)
sb.append(Constant.MESSAGE.getMessage(request.getLocale(), "showdoc.lockpost"));
else
sb.append(Constant.MESSAGE.getMessage(request.getLocale(), "showdoc.unlockpost"));
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -