📄 sipark-log-summary.jsp
字号:
</tr>
<tr valign="top">
<td><fmt:message key="archive.search.daterange.start" /></td>
<td>
<input type="text" id="startDate" name="startDate" size="13"
value="<%= startDate != null ? startDate :
LocaleUtils.getLocalizedString("archive.search.daterange.any", "sip")%>" class="textfield"/><br/>
<span class="jive-description"><fmt:message key="archive.search.daterange.format" /></span>
</td>
<td>
<img src="images/icon_calendarpicker.gif" vspace="3" id="startDateTrigger">
</td>
</tr>
<tr valign="top">
<td><fmt:message key="archive.search.daterange.end" /></td>
<td>
<input type="text" id="endDate" name="endDate" size="13"
value="<%= endDate != null ? endDate :
LocaleUtils.getLocalizedString("archive.search.daterange.any", "sip") %>" class="textfield"/><br/>
<span class="jive-description"><fmt:message key="archive.search.daterange.format" /></span>
</td>
<td>
<img src="images/icon_calendarpicker.gif" vspace="3" id="endDateTrigger">
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<input type="hidden" name="submit" value="true">
<input type="submit" name="get" value="<fmt:message key="call.summary.filter"/>">
</form>
<%
if (filter != null) {
// Get the user manager
int logCount = CallLogDAO.getLogCount(filter);
// paginator vars
int numPages = (int) Math.ceil((double) logCount / (double) range);
int curPage = (start / range) + 1;
StringBuffer sb = new StringBuffer();
if (username != null)
sb.append("&username=").append(URLEncoder.encode(username, "utf-8"));
if (numa != null)
sb.append("&numa=").append(URLEncoder.encode(numa, "utf-8"));
if (numb != null)
sb.append("&numb=").append(URLEncoder.encode(numb, "utf-8"));
if (type != null)
sb.append("&type=").append(URLEncoder.encode(type, "utf-8"));
if (startDate != null)
sb.append("&startDate=").append(URLEncoder.encode(startDate, "utf-8"));
if (endDate != null)
sb.append("&endDate=").append(URLEncoder.encode(endDate, "utf-8"));
String urlParams = sb.toString();
%>
<p>
<fmt:message key="call.summary.total_calls"/>
:
<b><%= LocaleUtils.getLocalizedNumber(logCount) %>
</b> --
<% if (numPages > 1) { %>
<fmt:message key="global.showing"/>
<%= LocaleUtils.getLocalizedNumber(start + 1) %>-<%= LocaleUtils
.getLocalizedNumber(start + range) %>
<% } %>
-<fmt:message key="call.summary.calls_per_page"/>:
<select size="1"
onchange="location.href='sipark-log-summary.jsp?submit=true&start=0<%= urlParams %>&range=' + this.options[this.selectedIndex].value;">
<% for (int i = 0; i < RANGE_PRESETS.length; i++) { %>
<option value="<%= RANGE_PRESETS[i] %>"
<%= (RANGE_PRESETS[i] == range ? "selected" : "") %>><%= RANGE_PRESETS[i] %>
</option>
<% } %>
</select>
</p>
<% if (numPages > 1) { %>
<p>
<fmt:message key="global.pages"/>
:
[
<% int num = 15 + curPage;
int s = curPage - 1;
if (s > 5) {
s -= 5;
}
if (s < 5) {
s = 0;
}
if (s > 2) {
%>
<a href="sipark-log-summary.jsp?submit=true&start=0&range=<%= range %><%= urlParams %>">1</a> ...
<%
}
int i;
for (i = s; i < numPages && i < num; i++) {
String sep = ((i + 1) < numPages) ? " " : "";
boolean isCurrent = (i + 1) == curPage;
%>
<a href="sipark-log-summary.jsp?submit=true&start=<%= (i*range) %>&range=<%= range %><%= urlParams %>"
class="<%= ((isCurrent) ? "jive-current" : "") %>"
><%= (i + 1) %>
</a><%= sep %>
<% } %>
<% if (i < numPages) { %>
... <a
href="sipark-log-summary.jsp?submit=true&start=<%= ((numPages-1)*range) %>&range=<%= range %>"><%= numPages %><%= urlParams %>
</a>
<% } %>
]
</p>
<% } %>
<div class="jive-table">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<thead>
<tr>
<th> </th>
<th nowrap><fmt:message key="call.summary.time"/></th>
<th nowrap><fmt:message key="call.summary.username"/></th>
<th nowrap><fmt:message key="call.summary.from"/></th>
<th nowrap><fmt:message key="call.summary.destination"/></th>
<th nowrap><fmt:message key="call.summary.duration"/></th>
<th nowrap><fmt:message key="call.summary.type"/></th>
</tr>
</thead>
<tbody>
<% // Print the list of users
Collection<CallLog> calls = CallLogDAO.getCalls(filter, start, range);
if (calls.isEmpty()) {
%>
<tr>
<td align="center" colspan="7">
<fmt:message key="call.summary.no-entries"/>
</td>
</tr>
<%
}
int i = start;
for (CallLog call : calls) {
i++;
%>
<tr class="jive-<%= (((i%2)==0) ? "even" : "odd") %>">
<td width="1%">
<%= i %>
</td>
<td width="30%">
<%=JiveGlobals.formatDateTime(new Date(call.getDateTime()))%>
</td>
<td width="10%" align="center" valign="middle">
<%=call.getUsername()%>
</td>
<td width="20%" align="left">
<%=call.getNumA()%>
</td>
<td width="20%" align="left">
<%=call.getNumB()%>
</td>
<td width="5%" align="left">
<%=call.getDuration()%>
</td>
<td width="5%" align="left">
<%=call.getType()%>
</td>
</tr>
<%
}
%>
</tbody>
</table>
</div>
<% if (numPages > 1) { %>
<p>
<fmt:message key="global.pages"/>
:
[
<% int num = 15 + curPage;
int s = curPage - 1;
if (s > 5) {
s -= 5;
}
if (s < 5) {
s = 0;
}
if (s > 2) {
%>
<a href="sipark-log-summary.jsp?submit=true&start=0&range=<%= range %><%= urlParams %>">1</a> ...
<%
}
for (i = s; i < numPages && i < num; i++) {
String sep = ((i + 1) < numPages) ? " " : "";
boolean isCurrent = (i + 1) == curPage;
%>
<a href="sipark-log-summary.jsp?submit=true&start=<%= (i*range) %>&range=<%= range %><%= urlParams %>"
class="<%= ((isCurrent) ? "jive-current" : "") %>"
><%= (i + 1) %>
</a><%= sep %>
<% } %>
<% if (i < numPages) { %>
... <a
href="sipark-log-summary.jsp?submit=true&start=<%= ((numPages-1)*range) %>&range=<%= range %>"><%= numPages %><%= urlParams %>
</a>
<% } %>
]
</p>
<% } } %>
<script type="text/javascript">
grayOut(jid.startDate);
grayOut(jid.endDate);
function catcalc(cal) {
var endDateField = $('endDate');
var startDateField = $('startDate');
var endTime = new Date(endDateField.value);
var startTime = new Date(startDateField.value);
if(endTime.getTime() < startTime.getTime()){
alert("<fmt:message key="archive.search.daterange.error" />");
startDateField.value = "<fmt:message key="archive.search.daterange.any" />";
}
}
Calendar.setup(
{
inputField : "startDate", // ID of the input field
ifFormat : "%m/%d/%y", // the date format
button : "startDateTrigger", // ID of the button
onUpdate : catcalc
});
Calendar.setup(
{
inputField : "endDate", // ID of the input field
ifFormat : "%m/%d/%y", // the date format
button : "endDateTrigger", // ID of the button
onUpdate : catcalc
});
</script>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -