📄 sipark-log-summary.jsp
字号:
<%@ page import="org.jivesoftware.openfire.sip.calllog.CallLog,
org.jivesoftware.openfire.sip.calllog.CallLogDAO"
%>
<%@ page import="java.util.Collection" %>
<%@ page import="java.util.Date" %>
<%@ page import="java.text.SimpleDateFormat" %>
<%@ page import="org.jivesoftware.util.*" %>
<%@ page import="java.text.DateFormat" %>
<%@ page import="java.net.URLEncoder" %>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt" %>
<%!
final int DEFAULT_RANGE = 15;
final int[] RANGE_PRESETS = {15, 25, 50, 75, 100};
%>
<jsp:useBean id="webManager" class="org.jivesoftware.util.WebManager"/>
<% webManager.init(request, response, session, application, out); %>
<html>
<head>
<title><fmt:message key="call.summary.title" /></title>
<meta name="pageID" content="sipark-log-summary"/>
<script src="/js/prototype.js" type="text/javascript"></script>
<script src="/js/scriptaculous.js" type="text/javascript"></script>
<script type="text/javascript" language="javascript" src="/js/tooltips/domLib.js"></script>
<script type="text/javascript" language="javascript" src="/js/tooltips/domTT.js"></script>
<style type="text/css">@import url( /js/jscalendar/calendar-win2k-cold-1.css );</style>
<script type="text/javascript" src="/js/jscalendar/calendar.js"></script>
<script type="text/javascript" src="/js/jscalendar/i18n.jsp"></script>
<script type="text/javascript" src="/js/jscalendar/calendar-setup.js"></script>
<style type="text/css">
.jive-current {
font-weight: bold;
text-decoration: none;
}
.stat {
margin: 0px 0px 8px 0px;
border: 1px solid #cccccc;
-moz-border-radius: 3px;
}
.stat td table {
margin: 5px 10px 5px 10px;
}
.stat div.verticalrule {
display: block;
width: 1px;
height: 110px;
background-color: #cccccc;
overflow: hidden;
margin-left: 3px;
margin-right: 3px;
}
</style>
<script type="text/javascript">
function hover(oRow) {
oRow.style.background = "#A6CAF0";
oRow.style.cursor = "pointer";
}
function noHover(oRow) {
oRow.style.background = "white";
}
function submitFormAgain(start, range){
document.f.start.value = start;
document.f.range.value = range;
document.f.parseRange.value = "true";
document.f.submit();
}
</script>
<style type="text/css">
.stat {
margin: 0px 0px 8px 0px;
border: 1px solid #cccccc;
-moz-border-radius: 3px;
}
.stat td table {
margin: 5px 10px 5px 10px;
}
.stat div.verticalrule {
display: block;
width: 1px;
height: 110px;
background-color: #cccccc;
overflow: hidden;
margin-left: 3px;
margin-right: 3px;
}
.content {
border-color: #bbb;
border-style: solid;
border-width: 0px 0px 1px 0px;
}
/* Default DOM Tooltip Style */
div.domTT {
border: 1px solid #bbb;
background-color: #FFFBE2;
font-family: Arial, Helvetica sans-serif;
font-size: 9px;
padding: 5px;
}
div.domTT .caption {
font-family: serif;
font-size: 12px;
font-weight: bold;
padding: 1px 2px;
color: #FFFFFF;
}
div.domTT .contents {
font-size: 12px;
font-family: sans-serif;
padding: 3px 2px;
}
.textfield {
font-size: 11px;
font-family: Verdana, Arial, sans-serif;
height: 20px;
background: #efefef;
}
#searchResults h3 {
font-size: 14px;
padding: 0px;
margin: 0px 0px 2px 0px;
color: #104573;
}
#searchResults p.resultDescription {
margin: 0px 0px 12px 0px;
}
</style>
<script type="text/javascript">
function grayOut(ele) {
if (ele.value == 'Any') {
ele.style.backgroundColor = "#FFFBE2";
}
else {
ele.style.backgroundColor = "#ffffff";
}
}
</script>
<script type="text/javascript" src="/js/behaviour.js"></script>
</head>
<body>
<% // Get parameters
int start = ParamUtils.getIntParameter(request, "start", 0);
int range = ParamUtils.getIntParameter(request, "range", webManager.getRowsPerPage("user-summary", DEFAULT_RANGE));
String username = ParamUtils.getParameter(request, "username");
String numa = ParamUtils.getParameter(request, "numa");
String numb = ParamUtils.getParameter(request, "numb");
String type = ParamUtils.getParameter(request, "type");
String startDate = request.getParameter("startDate");
String endDate = request.getParameter("endDate");
String filter = null;
if (request.getParameter("submit") != null) {
Date fromDate = null;
Date uptoDate = null;
String anyText = LocaleUtils.getLocalizedString("archive.settings.any", "sip");
if (anyText.equals(startDate)) {
startDate = null;
}
if (anyText.equals(endDate)) {
endDate = null;
}
if (startDate != null && startDate.length() > 0) {
DateFormat formatter = new SimpleDateFormat("MM/dd/yy");
try {
fromDate = formatter.parse(startDate);
}
catch (Exception e) {
// TODO: mark as an error in the JSP instead of logging..
Log.error(e);
}
}
if (endDate != null && endDate.length() > 0) {
DateFormat formatter = new SimpleDateFormat("MM/dd/yy");
try {
Date date = formatter.parse(endDate);
// The user has chosen an end date and expects that any conversation
// that falls on that day will be included in the search results. For
// example, say the user choose 6/17/2006 as an end date. If a conversation
// occurs at 5:33 PM that day, it should be included in the results. In
// order to make this possible, we need to make the end date one millisecond
// before the next day starts.
uptoDate = new Date(date.getTime() + JiveConstants.DAY - 1);
}
catch (Exception e) {
// TODO: mark as an error in the JSP instead of logging..
Log.error(e);
}
}
filter = CallLogDAO.createSQLFilter(username, numa, numb, type, fromDate, uptoDate);
}
if (request.getParameter("range") != null) {
webManager.setRowsPerPage("user-summary", range);
}
%>
<form name="jid" action="sipark-log-summary.jsp" method="post">
<div>
<table class="stat">
<tr valign="top">
<td>
<table cellpadding="3" cellspacing="0" border="0" width="100%">
<tbody>
<tr>
<td align="left" width="150"><fmt:message key="call.summary.username" />: 
</td>
<td align="left">
<input type="text" size="20" maxlength="100" name="username" value="<%= username != null ? username : ""%>">
</td>
</tr>
<tr>
<td align="left" width="150"><fmt:message key="call.summary.from"/>: 
</td>
<td align="left">
<input type="text" size="20" maxlength="100" name="numa" value="<%= numa != null ? numa : ""%>">
</td>
</tr>
<tr>
<td align="left" width="150"><fmt:message key="call.summary.destination"/>: 
</td>
<td align="left">
<input type="text" size="20" maxlength="100" name="numb" value="<%= numb != null ? numb : ""%>">
</td>
</tr>
<tr>
<td align="left" width="150"><fmt:message key="call.summary.type"/>: 
</td>
<td align="left">
<select name="type" size="1">
<option value="all" <%= "all".equals(type) || type == null ? "selected" : ""%>><fmt:message key="call.type.all"/>
<option value="received" <%= "received".equals(type)? "selected" : ""%>><fmt:message key="call.type.received"/>
<option value="loss" <%= "missed".equals(type)? "selected" : ""%>><fmt:message key="call.type.missed"/>
<option value="dialed" <%= "dialed".equals(type)? "selected" : ""%>><fmt:message key="call.type.dialed"/>
</select>
</td>
</tr>
</tbody>
</table>
</td>
<td width="0" height="100%" valign="middle">
<div class="verticalrule"></div>
</td>
<td>
<table>
<tr>
<td colspan="3">
<img src="images/icon_daterange.gif" align="absmiddle" alt="" style="margin: 0px 4px 0px 2px;"/>
<b><fmt:message key="archive.search.daterange" /></b>
<a onmouseover="domTT_activate(this, event, 'content',
'<fmt:message key="archive.search.daterange.tooltip"/>',
'trail', true, 'direction', 'northeast', 'width', '220');"><img src="images/icon_help_14x14.gif" vspace="2" align="texttop"/></a>
</td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -