topic_batch_m.jsp
来自「一个用java编写的功能强大的OA系统」· JSP 代码 · 共 948 行 · 第 1/3 页
JSP
948 行
threadTypeArr[i][0] = Integer.toString(ttdb.getId());
threadTypeArr[i][1] = lf.getName();
threadTypeArr[i][2] = boardCode;
%>
<option value="<%=ttdb.getId()%>"><%=ttdb.getName()%></option>
<%
i++;
}
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>
<lt:Label res="res.label.forum.topic_batch_m" key="board"/>:
<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"> <lt:Label res="res.label.forum.topic_batch_m" key="hit_less"/></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"> <lt:Label res="res.label.forum.topic_batch_m" key="hit_more"/></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"> <lt:Label res="res.label.forum.topic_batch_m" key="recount_less"/></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"> <lt:Label res="res.label.forum.topic_batch_m" key="recount_more"/></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"> <lt:Label res="res.label.forum.topic_batch_m" key="redate"/></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"> <lt:Label res="res.label.forum.topic_batch_m" key="msg_level"/></td>
<td width="55%" height="26" bgcolor="#FFFBFF">
<input type="radio" name="msgLevel" value="0" <%if(msgLevel.equals("0") || msgLevel.equals("")) out.print("checked");%>/>
<lt:Label res="res.label.forum.topic_batch_m" key="unlimited"/>
<input type="radio" name="msgLevel" value="1" <%if(msgLevel.equals("1")) out.print("checked");%>/>
<lt:Label res="res.label.forum.topic_batch_m" key="not_include"/>
</td>
</tr>
<tr>
<td width="45%" height="22" bgcolor="#FFFBFF"> <lt:Label res="res.label.forum.topic_batch_m" key="is_elite"/></td>
<td width="55%" height="22" bgcolor="#FFFBFF"><input type="radio" name="isElite" value="0" <%if(isElite.equals("0") || isElite.equals("")) out.print("checked");%>/>
<lt:Label res="res.label.forum.topic_batch_m" key="unlimited"/>
<input type="radio" name="isElite" value="1" <%if(isElite.equals("1")) out.print("checked");%>/>
<lt:Label res="res.label.forum.topic_batch_m" key="not_include"/> </td>
</tr>
<tr>
<td width="45%" height="22" bgcolor="#FFFBFF"> <lt:Label res="res.label.forum.topic_batch_m" key="attach"/></td>
<td width="55%" height="22" bgcolor="#FFFBFF"><input type="radio" name="attach" value="0" <%if(attach.equals("0") || attach.equals("")) out.print("checked");%>/>
<lt:Label res="res.label.forum.topic_batch_m" key="unlimited"/>
<input type="radio" name="attach" value="1" <%if(attach.equals("1")) out.print("checked");%>/>
<lt:Label res="res.label.forum.topic_batch_m" key="not_include"/> </td>
</tr>
</tbody>
</table>
<br>
<table width="86%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center"><INPUT type=submit value=<lt:Label res="res.label.forum.search" key="begin_search"/>></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"><lt:Label res="res.label.forum.topic_batch_m" key="tally_title"/></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"> <lt:Label res="res.label.forum.topic_batch_m" key="tally_title"/></td>
</tr>
<tr>
<td width="36%" height="26" bgcolor="#FFFBFF"> <input type="radio" name="operation" value="moveBoard" /><lt:Label res="res.label.forum.topic_batch_m" key="batch_move_board"/></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" />
<lt:Label res="res.label.forum.topic_batch_m" key="batch_move_thread_type"/></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>
<lt:Label res="res.label.forum.topic_batch_m" key="board"/>:
<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" />
<lt:Label res="res.label.forum.topic_batch_m" key="batch_del"/></td>
<td width="64%" height="26" bgcolor="#FFFBFF"></td>
</tr>
<tr>
<td width="36%" height="26" bgcolor="#FFFBFF"> <input type="radio" name="operation" value="msgLevel" />
<lt:Label res="res.label.forum.topic_batch_m" key="batch_level"/> </td>
<td width="64%" height="26" bgcolor="#FFFBFF">
<input type="radio" name="setMsgLevel" value="levelTopBoard" />
<lt:Label res="res.label.forum.topic_batch_m" key="batch_board_level"/>
<input type="radio" name="setMsgLevel" value="levelTopForum" />
<lt:Label res="res.label.forum.topic_batch_m" key="batch_forum_level"/></td>
</tr>
<tr>
<td width="36%" height="26" bgcolor="#FFFBFF"> <input type="radio" name="operation" value="elite" />
<lt:Label res="res.label.forum.topic_batch_m" key="batch_elite"/></td>
<td width="64%" height="26" bgcolor="#FFFBFF"> </td>
</tr>
<tr>
<td height="26" bgcolor="#FFFBFF"> <input type="radio" name="operation" value="delAttach" />
<lt:Label res="res.label.forum.topic_batch_m" key="batch_del_attach"/></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"><lt:Label res="res.label.forum.topic_batch_m" key="search_tally_topic"/>:</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 && ud.getNicksLike(nickAry[j]).equals(""))
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 += "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 + ")";
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?