batch_topic_m.jsp
来自「一个用java编写的功能强大的OA系统」· JSP 代码 · 共 956 行 · 第 1/3 页
JSP
956 行
}
out.println("<script language='javascript'>");
out.println("var threadTypeArr = new Array("+len+");");
for(int j = 0; j < len; j++){
out.println("var threadType = new Array(3);");
out.println("threadType[0] = '"+ threadTypeArr[j][0] + "';");
out.println("threadType[1] = '"+ threadTypeArr[j][1] + "';");
out.println("threadType[2] = '"+ threadTypeArr[j][2] + "';");
out.println("threadTypeArr[" + j + "] = threadType;");
}
out.println("</script>");
%>
</select>
所在论坛:
<input type="text" name="txtBoardName" style="border:0px; color:#000000; background:transparent; font:bold 12px; height:15px" readonly/>
<input type="hidden" name="hBoardCode"/>
<script>
form1.threadType.value = "<%=threadType%>"
if(form1.threadType.value == ""){
form1.txtBoardName.value = "";
form1.hBoardCode.value = "";
}else{
for(var i = 0; i < threadTypeArr.length; i++){
if(form1.threadType.value == threadTypeArr[i][0]){
form1.txtBoardName.value = threadTypeArr[i][1];
form1.hBoardCode.value = threadTypeArr[i][2];
break;
}
}
}
</script>
</td>
</tr>
<tr>
<td width="45%" height="26" bgcolor="#FFFBFF"> 被浏览次数小于:</td>
<td width="55%" height="26" bgcolor="#FFFBFF"> <input type="text" name="hitLess" value="<%=hitLess%>"/></td>
</tr>
<tr>
<td width="45%" height="26" bgcolor="#FFFBFF"> 被浏览次数大于:</td>
<td width="55%" height="26" bgcolor="#FFFBFF"> <input type="text" name="hitMore" value="<%=hitMore%>"/></td>
</tr>
<tr>
<td width="45%" height="26" bgcolor="#FFFBFF"> 被回复次数小于:</td>
<td width="55%" height="26" bgcolor="#FFFBFF"> <input type="text" name="recountLess" value="<%=recountLess%>"/></td>
</tr>
<tr>
<td width="45%" height="26" bgcolor="#FFFBFF"> 被回复次数大于:</td>
<td width="55%" height="26" bgcolor="#FFFBFF"> <input type="text" name="recountMore" value="<%=recountMore%>"/></td>
</tr>
<tr>
<td width="45%" height="26" bgcolor="#FFFBFF"> 多少天内无新回复:</td>
<td width="55%" height="26" bgcolor="#FFFBFF"> <input type="text" name="reDate" value="<%=sReDate%>"/></td>
</tr>
<tr>
<td width="45%" height="26" bgcolor="#FFFBFF"> 是否包含置顶帖:</td>
<td width="55%" height="26" bgcolor="#FFFBFF">
<input type="radio" name="msgLevel" value="0" checked/>
无限制
<input type="radio" name="msgLevel" value="1" />
包含且仅包含
<input type="radio" name="msgLevel" value="2" />
不包含 </td>
</tr>
<tr>
<td width="45%" height="22" bgcolor="#FFFBFF"> 是否包含精华帖:</td>
<td width="55%" height="22" bgcolor="#FFFBFF"><input type="radio" name="isElite" value="0" checked/>
无限制
<input type="radio" name="isElite" value="1" />
包含且仅包含
<input type="radio" name="isElite" value="2" />
不包含 </td>
</tr>
<tr>
<td width="45%" height="22" bgcolor="#FFFBFF"> 是否包含附件:</td>
<td width="55%" height="22" bgcolor="#FFFBFF"><input type="radio" name="attach" value="0" checked/>
无限制
<input type="radio" name="attach" value="1" />
包含且仅包含
<input type="radio" name="attach" value="2" />
不包含 </td>
</tr>
</tbody>
</table>
<br>
<table width="86%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center"><input type=submit value="提交"></td>
</tr>
</table>
<br></td>
</tr>
</form>
</table>
<br>
<br>
<br>
<table width="98%" border='0' align="center" cellpadding='0' cellspacing='0' class="frame_gray">
<tr>
<td height=20 align="left" class="thead">符合条件的主题数</td>
</tr>
<tr>
<td valign="top"><br><table width="86%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#999999" class="tableframe_gray">
<tr>
<td height="24" colspan="2" bgcolor="#EFEBDE"> 符合条件的主题数</td>
</tr>
<tr>
<td width="36%" height="26" bgcolor="#FFFBFF"> <input type="radio" name="operation" value="moveBoard" />批量移动到论坛</td>
<td width="64%" height="26" bgcolor="#FFFBFF">
<select name="selToBoard">
<%
vt = dlcm.getChildren();
ir = vt.iterator();
while (ir.hasNext()) {
Leaf leaf = (Leaf) ir.next();
String parentCode = leaf.getCode();
%>
<optgroup style="BACKGROUND-COLOR: #f8f8f8" label="╋ <%=leaf.getName()%>">
<%
LeafChildrenCacheMgr dl = new LeafChildrenCacheMgr(parentCode);
java.util.Vector v = dl.getChildren();
Iterator ir1 = v.iterator();
while (ir1.hasNext()) {
Leaf lf = (Leaf) ir1.next();
%>
<option value="<%=lf.getCode()%>"> ├『<%=lf.getName()%>』</option>
<%
}
%>
</optgroup>
<%
}
%>
</select>
</td>
</tr>
<tr>
<td width="36%" height="26" bgcolor="#FFFBFF"> <input type="radio" name="operation" value="moveThreadType" />
批量移动到分类</td>
<td width="64%" height="26" bgcolor="#FFFBFF">
<select name="selToThreadType" onChange="toThreadTypeChange()">
<%
ThreadTypeDb tottdb = new ThreadTypeDb();
String toBoardCode = "", toBoardName = "";
vt = tottdb.list();
ir = vt.iterator();
i = 0;
len = vt.size();
String toThreadTypeArr[][] = new String[len][3];
while (ir.hasNext()) {
tottdb = (ThreadTypeDb) ir.next();
toBoardCode = tottdb.getBoardCode();
Leaf lf = new Leaf(toBoardCode);
toThreadTypeArr[i][0] = Integer.toString(tottdb.getId());
toThreadTypeArr[i][1] = lf.getName();
toThreadTypeArr[i][2] = toBoardCode;
%>
<option value="<%=tottdb.getId()%>"><%=tottdb.getName()%></option>
<%
i++;
}
out.println("<script language='javascript'>");
out.println("var toThreadTypeArr = new Array("+len+");");
for(int j = 0; j < len; j++){
out.println("var toThreadType = new Array(3);");
out.println("toThreadType[0] = '"+ toThreadTypeArr[j][0] + "';");
out.println("toThreadType[1] = '"+ toThreadTypeArr[j][1] + "';");
out.println("toThreadType[2] = '"+ toThreadTypeArr[j][2] + "';");
out.println("toThreadTypeArr[" + j + "] = toThreadType;");
}
out.println("</script>");
%>
</select>
所在论坛:
<input type="text" name="txtToBoardName" style="border:0px; color:#000000; background:transparent; font:bold 12px; height:15px" readonly/>
<input type="hidden" name="hToBoardCode" />
<script>
if(selToThreadType.value == ""){
txtToBoardName.value = "";
hToBoardCode.value ="";
}else{
for(var i = 0; i < toThreadTypeArr.length; i++){
if(selToThreadType.value == toThreadTypeArr[i][0]){
txtToBoardName.value = toThreadTypeArr[i][1];
hToBoardCode.value = toThreadTypeArr[i][2];
break;
}
}
}
</script>
</td>
</tr>
<tr>
<td width="36%" height="26" bgcolor="#FFFBFF"> <input type="radio" name="operation" value="delTopic" />
批量删除</td>
<td width="64%" height="26" bgcolor="#FFFBFF">
<input type="checkbox" name="checkbox3" value="checkbox" />
删帖不减用户发帖数和积分 </td>
</tr>
<tr>
<td width="36%" height="26" bgcolor="#FFFBFF"> <input type="radio" name="operation" value="msgLevel" />
批量置顶</td>
<td width="64%" height="26" bgcolor="#FFFBFF">
<input type="radio" name="setMsgLevel" value="levelTopBoard" />
版块置顶
<input type="radio" name="setMsgLevel" value="levelTopForum" />
论坛置顶</td>
</tr>
<tr>
<td width="36%" height="26" bgcolor="#FFFBFF"> <input type="radio" name="operation" value="elite" />
批量设置精华</td>
<td width="64%" height="26" bgcolor="#FFFBFF"> </td>
</tr>
<tr>
<td height="26" bgcolor="#FFFBFF"> <input type="radio" name="operation" value="delAttach" />
删除主题中的附件</td>
<td height="26" bgcolor="#FFFBFF" align="right"> </td>
</tr>
</table>
<br>
</td>
</tr>
</table>
<br>
<table width="98%" border='0' align="center" cellpadding='0' cellspacing='0' class="frame_gray" id="list">
<tr>
<td height=20 align="left" class="thead">符合条件的主题列表:</td>
</tr>
<tr>
<td valign="top"><br>
<%
String op = ParamUtil.get(request, "op");
String sql = "", condition = "",querystr = "";
if(op.equals("search")){
sql = "select id from sq_thread";
if(!selboard.trim().equals("allboard")){
condition += "boardcode=" + StrUtil.sqlstr(selboard);
}
if(!nick.trim().equals("")){
if(!condition.equals(""))
condition += " and ";
UserDb ud = new UserDb();
String[] nickAry = StrUtil.split(nick, ",");
String strNick = "";
if (nickAry!=null) {
int length = nickAry.length;
for (int j=0; j<length; j++) {
strNick += ud.getNicksLike(nickAry[j]);
if(j < length - 1)
strNick += ",";
}
}
condition += "name in (" + strNick + ")";
}
if(!title.trim().equals("")){
if(!condition.equals(""))
condition += " and ";
condition += "replyid=-1 and title like " + StrUtil.sqlstr("%"+title+"%");
sql = "select id from sq_message";
}
if(!sBeginDate.trim().equals("") && !sEndDate.trim().equals("")){
if(!condition.equals(""))
condition += " and ";
java.util.Date beginDate = DateUtil.parse(sBeginDate, "yyyy-MM-dd");
java.util.Date endDate = DateUtil.parse(sEndDate, "yyyy-MM-dd");
long lBeginDate = beginDate.getTime();
long lEndDate = endDate.getTime() + 24*60*60*1000;
condition += "lydate>=" + lBeginDate + " and lydate<" + lEndDate;
}else{
if(!sBeginDate.trim().equals("")){
if(!condition.equals(""))
condition += " and ";
java.util.Date beginDate = DateUtil.parse(sBeginDate, "yyyy-MM-dd");
long lBeginDate = beginDate.getTime();
condition += "lydate>=" + lBeginDate;
}else{
if(!sEndDate.trim().equals("")){
if(!condition.equals(""))
condition += " and ";
java.util.Date endDate = DateUtil.parse(sEndDate, "yyyy-MM-dd");
long lEndDate = endDate.getTime() + 24*60*60*1000;
condition += "lydate<" + lEndDate;
}
}
}
if(!threadType.trim().equals("")){
if(!condition.equals(""))
condition += " and ";
condition += "boardcode=" + StrUtil.sqlstr(selBoardCode) + " and thread_type in (" + threadType + ")";
}
if(StrUtil.isNumeric(hitLess)){
if(!condition.equals(""))
condition += " and ";
condition += "hit<" + hitLess;
}
if(StrUtil.isNumeric(hitMore)){
if(!condition.equals(""))
condition += " and ";
condition += "hit>" + hitMore;
}
if(StrUtil.isNumeric(recountLess)){
if(!condition.equals(""))
condition += " and ";
condition += "id in (select id from sq_message where replyid = -1 and recount<" + recountLess + ")";
}
if(StrUtil.isNumeric(recountMore)){
if(!condition.equals(""))
condition += " and ";
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?