Viewing File: /usr/local/cpanel/base/frontend/jupiter/mail/showq.html.tt
[%
SET CPANEL.CPVAR.dprefix = "../";
SET is_webmail = ExpVar.expand('$appname') == "webmail" ? 1 : 0;
IF is_webmail && !FORM.item('account');
SET FORM.account = CPANEL.authuser;
END;
SET logdate = RAW_FORM.logdate;
IF !logdate.defined || logdate == '' || !logdate.search('^\d+$');
SET logdate = CPANEL.now();
END;
SET errors = [];
IF CPANEL.CPDATA.item('DEMO');
errors.push( locale.maketext("This feature is disabled in demo mode.") );
ELSIF is_webmail && FORM.item('account') != CPANEL.authuser;
errors.push( locale.maketext("You are not allowed to view the queue for the user “[output,class,_1,status]”.", FORM.account) );
ELSIF !FORM.account.defined || FORM.account == '';
errors.push( locale.maketext('The “[_1]” argument is required.', 'account'));
ELSE;
IF( FORM.field.defined && FORM.value.defined );
SET api_args = {
email => FORM.account,
date => logdate,
'api.filter_column' => FORM.field,
'api.filter_type' => 'contains',
'api.filter_term' => FORM.value,
};
ELSE;
SET api_args = {
email => FORM.account,
date => logdate,
};
END;
SET boxtrapper_queue = execute("BoxTrapper", "list_queued_messages", api_args);
IF !boxtrapper_queue.status;
SET errors = boxtrapper_queue.errors;
ELSE;
SET messages = boxtrapper_queue.data;
END;
END;
%]
[% js_code = PROCESS js_block %]
[% WRAPPER '_assets/master.html.tt'
app_key = 'boxtrapper'
page_js = js_code
embed_stylesheets = ['mail/boxtrapper.css']
embed_scripts = ['js2/mail/showq.js']
%]
<div class="body-content">
[% IF errors.size() > 0;
FOREACH error IN errors %]
<div class="alert alert-danger" role="alert">
<span class='glyphicon glyphicon-remove-sign' aria-hidden="true"></span>
<div class='alert-message'>
<strong class="alert-title">
[% locale.maketext('Error:') %]
</strong>
<span class="alert-body">
<span id="error-[% loop.index() %]">
[% error.html() %]
</span>
</span>
</div>
</div>
[% END;
ELSE;
FOREACH message IN messages;
IF message.error.defined() %]
<div class="alert alert-warning" role="alert">
<span class='glyphicon glyphicon-remove-sign' aria-hidden="true"></span>
<div class='alert-message'>
<strong class="alert-title">
[% locale.maketext('Warning:') %]
</strong>
<span class="alert-body">
<span id="warn-some-records-unavailable">
[% locale.maketext('Some records are not accessible due to corruption, file permissions, or ownership issues. Your hosting provider can view more details in the error log.') %]
</span>
</span>
</div>
</div>
[% LAST;
END;
END %]
<div class="section" id="newSearchSection">
<h2 id="lgndSearch">[% locale.maketext("New Search:") %]</h2>
<form name="queuesearch" action="showq.html" method="post">
<input type="hidden" name="account" value="[% FORM.account %]" />
<input type="hidden" name="mydate" value="[% FORM.logdate %]" />
<div class="form-group">
<label id="lblSearch" for="field">
[% locale.maketext("Search In:") %]
</label>
<div class="row">
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
<select name="field" id="field" class="form-control">
<option value="from"[% FORM.field == 'from' ? ' selected' : '' %]>[% locale.maketext("Sender") %]</option>
<option value="subject"[% FORM.field == 'subject' ? ' selected' : '' %]>[% locale.maketext("Subject") %]</option>
<option value="body"[% FORM.field == 'body' ? ' selected' : '' %]>[% locale.maketext("Body") %]</option>
</select>
</div>
</div>
</div>
<div class="form-group">
<label id="lblSearchString" for="string">
[% locale.maketext("For search string:") %]
</label>
<div class="row">
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
<input type="text" class="form-control" name="value" id="string" value="[% FORM.value %]" />
</div>
</div>
</div>
<div class="form-group">
<input type="submit" value="[% locale.maketext("Submit") %]" class="btn btn-primary" id="btnSubmitSearch" />
</div>
</form>
</div>
<div class="section" id="dateScroll">
<h2 id="hdrQueue">[% locale.maketext("[asis,BoxTrapper] queue for the account “[output,strong,_1]”.", FORM.account) %]</h2>
<form action="showq.html" method="post">
<button class="btn btn-link" id="lnkReturnToCurrentDate" name="account" value="[% FORM.item('account') %]">[% locale.maketext("Return to current date.") %]</button>
</form>
[% IF !FORM.name && !FORM.value %]
<table class="table">
[%
SET script_url = 'showq.html';
SET current_day = logdate;
SET previous_day = current_day - 86400;
SET next_day = current_day + 86400;
%]
<tr>
<td class="previous-date">
[% IF previous_day >= 0 %]
<form action="[% script_url %]" method="post">
<input type="hidden" name="bxaction" value="" />
<input type="hidden" name="account" value="[% FORM.account %]" />
<input type="hidden" name="logdate" value="[% previous_day %]" />
<button id="previous-date" type="submit" class="btn btn-link pull-left">
<< [% locale.local_datetime(previous_day) %]
</button>
</form>
[% ELSE %]
N/A
[% END %]
</td>
<td class="current-date">
[% IF current_day >= 0 %]
<span id="current-date">[% locale.local_datetime(current_day) %]</span>
[% ELSE %]
N/A
[% END %]
</td>
<td class="next-date">
[% IF next_day >= 0 %]
<form action="[% script_url %]" method="post">
<input type="hidden" name="bxaction" value="" />
<input type="hidden" name="account" value="[% FORM.account %]" />
<input type="hidden" name="logdate" value="[% next_day %]" />
<button id="next-date" type="submit" class="btn btn-link pull-right">
[% locale.local_datetime(next_day) %] >>
</button>
</form>
[% ELSE %]
N/A
[% END %]
</td>
</tr>
</table>
[% END %]
<form name="input" action="multimsgaction.html" method="post">
<input type="hidden"
name="origin"
id="hidOrigin"
value="showmq" />
<input type="hidden"
name="account"
value="[% FORM.item('account') %]" />
<input type="hidden"
name="logdate"
id="hidMyDate"
value="[% FORM.item('logdate') %]" />
<input type="hidden"
name="field"
id="hidFilter"
value="[% FORM.item('field') %]" />
<input type="hidden"
name="value"
id="hidValue"
value="[% FORM.item('value') %]" />
<table class="sortable table table-striped responsive-table" id="bxq">
<thead>
<tr>
<th class="sorttable_nosort">
<input id="bxq_top_check"
onclick="selectBoxes(this,'bxq')"
type="checkbox"
name="select"
value="" />
</th>
<th>[% locale.maketext("From") %]</th>
<th>[% locale.maketext("Subject") %]</th>
<th>[% locale.maketext("Time") %]</th>
</tr>
</thead>
<tbody>
[% SET some_visible = 0;
FOREACH message IN messages;
IF message.error.defined();
has_errors = 1;
END;
NEXT IF message.error.defined();
SET some_visible = 1;
SET bg = loop.index() % 2 ? 1 : 2;
SET script = "showmsg.html";
SET url = script _ '?account=' _ FORM.account _ '&q=' _ message.queuefile.html() _ '&bxaction=&logdate=' _ FORM.logdate _ '&field=' _ FORM.field _ '&value=' _ FORM.value;
%]
<tr class="tdshade[%bg%]">
<td width="5%">
<input type="checkbox"
name="queuefile-[% loop.index() %]"
value="[% message.queuefile.html() %]">
</td>
<td class="truncate" truncate="25" width="15%">
<a href="[% url %]">
[% message.from.html() %]
</a>
</td>
<td style="word-wrap: break-word;">
<a href="[% url %]">
[% IF message.subject %]
[% message.subject.html() %]
[% ELSE %]
([% locale.maketext('No Subject') %])
[% END %]
</a>
</td>
<td width="15%">
<a href="[% url %]">
[% locale.local_datetime(message.time, 'datetime_format_medium') %]
</a>
</td>
</tr>
[% END %]
[% IF !some_visible %]
<tr class="tdshade2">
<td colspan="4" id="no-match">
[% locale.maketext('No records matched the selected criteria.') %]
</td>
</tr>
[% END %]
</tbody>
</table>
<div class="form-group">
<div class="radio">
<label id="lblDelete">
<input type="radio" id="rdoDelete" name="action" value="delete" />
[% locale.maketext("Delete") %]
</label>
</div>
</div>
<div class="form-group">
<div class="radio">
<label id="lblWhiteList">
<input type="radio" id="rdoWhiteList" name="action" checked value="deliver,whitelist" />
[% locale.maketext("Whitelist and Deliver") %]
</label>
</div>
</div>
<div class="form-group">
<input type="submit" class="btn btn-primary" id="btnSubmitMulitMsg" value="[% locale.maketext("Submit") %]" />
</div>
</form>
</div>
[% END %]
[% INCLUDE _assets/return_link.html.tt return_location='manage.html' post='1' formdata=FORM return_link_text=locale.maketext('Go Back to BoxTrapper Configuration') %]
</div>
[% END %]
[% BLOCK js_block %]
<script type="text/javascript">
var checkflag = 0;
function check(field) {
if (checkflag == 0) {
for (i = 0; i < field.length; i++) {
field[i].checked = 1;
}
checkflag = 1;
return "Uncheck All";
}
else {
for (i = 0; i < field.length; i++) {
field[i].checked = 0;
}
checkflag = 0;
return "Check All";
}
}
</script>
[% END %]
Back to Directory
File Manager