📄 search.jsp
字号:
<%@ page language="java" contentType="text/html;charset=UTF-8" %><%@ include file="../inc/common.jsp" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>${basic.name}后台管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<club:html type="css" />
<style>.tabform th{width:200px;}label{font-weight:normal}</style>
<script type="text/javascript" src="../scripts/common.js"></script>
<script type="text/javascript">
var iv;
var i = 0;
function IndexUtils(index){
i = 0;
clearInterval(iv);
iv = setInterval("process()",3000);
var params = "act=searchIndex";
params += "&create="+ c.o("create").checked;
params += "&index="+index;
params += "&user="+c.o("user").checked;
params += "&topic="+c.o("topic").checked;
params += "&r="+new Date().getTime();
myxmlhttp = CreateXmlHttpReq(xmlHttpHandler);
XmlHttpPOST(myxmlhttp, "admin.do",params);
}
function xmlHttpHandler(){
if (myxmlhttp.readyState !=4 ) {
return;
}
var html = myxmlhttp.responseText;
clearInterval(iv);
}
function pxmlHttpHandler(){
if (myxmlhttp.readyState !=4 ) {
return;
}
var text = myxmlhttp.responseText;
var rs = text.parseJSON();
c.setHtml("userProgress",(rs["userProgress"]*100)+"%");
c.setHtml("topicProgress",(rs["topicProgress"]*100)+"%");
var s = rs["state"];
if(s==1){
c.setHtml("state","<font class=\"red\">执行中...</font>");
}
else if(s==2){
c.setHtml("state","任务完成");
i++;
if(i>5){clearInterval(iv);}
}
else if(s==0){
c.setHtml("state","任务停止");
i++;
if(i>5){clearInterval(iv);}
}
}
function process(){
var params = "act=indexState";
params += "&r="+new Date().getTime();
myxmlhttp = CreateXmlHttpReq(pxmlHttpHandler);
XmlHttpGET(myxmlhttp, "admin.do?"+params);
}
</script>
</head>
<body>
<div id="wrap">
<div class="sitemap"><ul><li>您的位置:</li><li>后台管理>></li><li><h3>全文搜索管理</h3></li></ul></div><%
NoAllowedCharJsp noAllowedCharJsp = new NoAllowedCharJsp(request,response);
com.yeqiangwei.club.controller.form.NoAllowedCharForm noAllowedCharForm = noAllowedCharJsp.getNoAllowedCharForm();
%><%@ include file="../inc/msgHint.jsp" %>
<div class="sidebar gform">
<table class="tabform">
<tbody>
<tr>
<th scope="row">任务状态:</th>
<td><span id="state"></span></td>
</tr>
<tr>
<th scope="row">完成进度id:</th>
<td>用户索引进度:<span id="userProgress"></span><br/>文章索引进度:<span id="topicProgress"></span></td>
</tr>
<tr>
<th scope="row">索引创建类型:</th>
<td class="lab">
<input type="checkbox" name="create" id="create" value="true" /><label for="create">完全创建</label>
</td>
</tr>
<tr>
<th scope="row">索引创建类别:</th>
<td class="lab">
<input type="checkbox" name="user" id="user" value="true"/><label for="user">用户索引</label>
<input type="checkbox" name="topic" id="topic" value="true"/><label for="topic">文章索引</label>
</td>
</tr>
<tr>
<th scope="row"></th>
<td class="t_end">
<input type="button" name="qwSubmit" id="qwSubmit" value="创建索引" onclick="IndexUtils('building');c.p('qwSubmit',true);"/>
<input type="button" name="qwSubmit_" id="qwSubmit_" value="停止创建索引" onclick="IndexUtils('stop');c.p('qwSubmit_',true);"/>
</td>
</tr>
</tbody>
</table>
<script type="text/javascript">
process();
iv = setInterval("process()",3000);
</script>
</div>
</body>
</html>
<!-- Powered by www.YeQiangWei.com -->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -