webadmin 1.8.2

main
Casper 3 years ago
parent 3d18dc8d6a
commit b027916f9e

@ -11,6 +11,91 @@ function floodprotection_change() {
}
}
function make_sortable_table(table) {
if (table.rows.length >= 1) { // Ensure that the table at least contains a row for the headings
var headings = table.rows[0].getElementsByTagName("th");
for (var i = 0; i < headings.length; i++) {
// This function acts to scope the i variable, so we can pass it off
// as the column_index, otherwise column_index would just be the max
// value of i, every single time.
(function (i) {
var heading = headings[i];
if (!heading.classList.contains("ignore-sort")) {
heading.addEventListener("click", function () { // Bind a click event to the heading
sort_table(this, i, table, headings);
});
}
})(i);
}
}
}
function sort_table(clicked_column, column_index, table, headings) {
for (var i = 0; i < headings.length; i++) {
if (headings[i] != clicked_column) {
headings[i].classList.remove("sorted");
headings[i].classList.remove("reverse-sorted");
}
}
var reverse = false;
clicked_column.classList.toggle("reverse");
if (clicked_column.classList.contains("sorted")) {
reverse = true;
clicked_column.classList.remove("sorted");
clicked_column.classList.add("reverse-sorted");
} else {
clicked_column.classList.remove("reverse-sorted");
clicked_column.classList.add("sorted");
}
// This array will contain tuples in the form [(value, row)] where value
// is extracted from the column to be sorted by
var rows_and_sortable_value = [];
for (var i = 1, row; row = table.rows[i]; i++) {
for (var j = 0, col; col = row.cells[j]; j++) {
// If we're at the column index we want to sort by
if (j === column_index) {
var cell = row.getElementsByTagName("td")[j];
var value = cell.innerHTML;
rows_and_sortable_value.push([value, row]);
}
}
}
rows_and_sortable_value.sort(function (a, b) {
// If both values are integers, sort by that else as strings
if (isInt(a[0]) && isInt(b[0])) {
return a[0] - b[0];
} else {
return b[0].localeCompare(a[0]);
}
});
if (reverse) {
rows_and_sortable_value.reverse();
}
var parent = table.rows[1].parentNode;
for (var i = 0; i < rows_and_sortable_value.length; i++) {
// Remove the existing entry for the row from the table
parent.removeChild(rows_and_sortable_value[i][1]);
// Insert at the first position, before the first child
parent.insertBefore(rows_and_sortable_value[i][1], parent.firstChild);
}
}
function isInt(value) {
return !isNaN(value) && (function (x) {
return (x | 0) === x;
})(parseFloat(value))
}
function make_sortable() {
var tables = document.querySelectorAll("table.sortable");
for (var i = 0; i < tables.length; i++) {
make_sortable_table(tables[i]);
}
}
function serverlist_init($) {
function serialize() {
var text = "";
@ -19,7 +104,7 @@ function serverlist_init($) {
var port = $(".servers_row_port", $(this)).val();
var ssl = $(".servers_row_ssl", $(this)).is(":checked");
var pass = $(".servers_row_pass", $(this)).val();
if (host.length == 0) return;
if (host == undefined) return;
text += host;
text += " ";
if (ssl) text += "+";
@ -76,12 +161,9 @@ function serverlist_init($) {
$("#servers_plain").hide();
$("#servers_js").show();
})();
}
};
/* Broken. Work is in progress... Hang in there cowboy/girl...
function ctcpreplies_init($) {
function serialize() {
var text = "";
@ -104,13 +186,13 @@ function ctcpreplies_init($) {
}
row.append(
$("<td/>").append($("<input/>").val(request)
.addClass("ctcpreplies_row_request")
.addClass("form-control ctcpreplies_row_request")
.attr({"type":"text","list":"ctcpreplies_list"})),
$("<td/>").append($("<input/>").val(response)
.addClass("ctcpreplies_row_response")
.addClass("form-control ctcpreplies_row_response")
.attr({"type":"text","placeholder":"Empty value means this CTCP request will be ignored"})),
$("<td/>").append($("<button/>").val("X")
.attr({"type":"button"}).addClass("btn btn-default").click(delete_row))
$("<td/>").append($("<input/>").val("X")
.addClass("btn btn-danger").val("X").css({width: '40px'}).click(delete_row))
);
$("input", row).change(serialize);
$("#ctcpreplies_tbody").append(row);
@ -140,4 +222,3 @@ function ctcpreplies_init($) {
$("#ctcpreplies_js").show();
})();
}
*/

@ -0,0 +1,138 @@
function floodprotection_change() {
var protection = document.getElementById('floodprotection_checkbox');
var rate = document.getElementById('floodrate');
var burst = document.getElementById('floodburst');
if (protection.checked) {
rate.removeAttribute('disabled');
burst.removeAttribute('disabled');
} else {
rate.disabled = 'disabled';
burst.disabled = 'disabled';
}
}
function serverlist_init($) {
function serialize() {
var text = "";
$("#servers_tbody > tr").each(function() {
var host = $(".servers_row_host", $(this)).val();
var port = $(".servers_row_port", $(this)).val();
var ssl = $(".servers_row_ssl", $(this)).is(":checked");
var pass = $(".servers_row_pass", $(this)).val();
if (host == undefined) return;
text += host;
text += " ";
if (ssl) text += "+";
text += port;
text += " ";
text += pass;
text += "\n";
});
$("#servers_text").val(text);
}
function add_row(host, port, ssl, pass) {
var row = $("<tr/>");
function delete_row() {
row.remove();
serialize();
}
row.append(
$("<td/>").append($("<input/>").attr({"type":"text"})
.addClass("form-control servers_row_host").val(host)),
$("<td/>").append($("<input/>").attr({"type":"number"})
.addClass("form-control servers_row_port").val(port)),
$("<td/>").append($("<input/>").attr({"type":"checkbox"})
.addClass("servers_row_ssl").prop("checked", ssl)),
$("<td/>").append($("<input/>").attr({"type":"text"})
.addClass("form-control servers_row_pass").val(pass)),
$("<td/>").append($("<input/>").attr({"type":"button"})
.addClass("btn btn-danger").val("X").click(delete_row))
);
$("input", row).change(serialize);
$("#servers_tbody").append(row);
}
var servers_text = $("#servers_text").val();
// Parse it
$.each(servers_text.split("\n"), function(i, line) {
if (line.length == 0) return;
line = line.split(" ");
var host = line[0];
var port = line[1] || "6667";
var pass = line[2] || "";
var ssl;
if (port.match(/^\+/)) {
ssl = true;
port = port.substr(1);
} else {
ssl = false;
}
add_row(host, port, ssl, pass);
});
$("#servers_add").click(function() {
add_row("", 6697, true, "");
// Not serializing, because empty host doesn't emit anything anyway
});
$("#servers_plain").hide();
$("#servers_js").show();
};
function ctcpreplies_init($) {
function serialize() {
var text = "";
$("#ctcpreplies_tbody > tr").each(function() {
var request = $(".ctcpreplies_row_request", $(this)).val();
var response = $(".ctcpreplies_row_response", $(this)).val();
if (request.length == 0) return;
text += request;
text += " ";
text += response;
text += "\n";
});
$("#ctcpreplies_text").val(text);
}
function add_row(request, response) {
var row = $("<tr/>");
function delete_row() {
row.remove();
serialize();
}
row.append(
$("<td/>").append($("<input/>").attr({"type":"text"})
.addClass("form-control servers_row_host").val(host)),
$("<td/>").append($("<input/>").attr({"type":"number"})
.addClass("form-control servers_row_port").val(port)),
$("<td/>").append($("<input/>").attr({"type":"checkbox"})
.addClass("servers_row_ssl").prop("checked", ssl)),
$("<td/>").append($("<input/>").attr({"type":"button"})
.addClass("btn btn-danger").val("X").click(delete_row))
);
$("input", row).change(serialize);
$("#ctcpreplies_tbody").append(row);
}
(function() {
var replies_text = $("#ctcpreplies_text").val();
$.each(replies_text.split("\n"), function(i, line) {
if (line.length == 0) return;
var space = line.indexOf(" ");
var request;
var response;
if (space == -1) {
request = line;
response = "";
} else {
request = line.substr(0, space);
response = line.substr(space + 1);
}
add_row(request, response);
});
$("#ctcpreplies_add").click(function() {
add_row("", "");
});
$("#ctcpreplies_plain").hide();
$("#ctcpreplies_js").show();
})();
}

@ -1,3 +1,4 @@
<? I18N znc-webadmin ?>
<? INC Header.tmpl ?>
<form class="form-horizontal" role="form" action="<? IF Edit ?>editchan<? ELSE ?>addchan<? ENDIF ?>" method="post">
@ -14,8 +15,8 @@
<div class="panel with-nav-tabs panel-default">
<div class="panel-heading">
<ul class="nav nav-tabs">
<li class="active"><a href="#chaninfotab" data-toggle="tab">Channel Info</a></li>
<li><a href="#flagstab" data-toggle="tab">Flags</a></li>
<li class="active"><a href="#chaninfotab" data-toggle="tab"><? FORMAT "Channel Info" ?></a></li>
<li><a href="#flagstab" data-toggle="tab"><? FORMAT "Flags" ?></a></li>
<li><a href="#othermods" data-toggle="tab">More</a></li>
</ul>
</div>
@ -26,31 +27,31 @@
<div class="tab-pane fade in active" id="chaninfotab">
<? IF !Edit ?>
<div class="form-group">
<label for="inputlabelChanName" class="col-sm-2 control-label">Channel Name:</label>
<label for="inputlabelChanName" class="col-sm-2 control-label"><? FORMAT "Channel Name:" ?></label>
<div class="col-sm-10">
<input class="form-control" id="inputlabelChanName" type="text" name="name" value="" placeholder="The channel name.">
<input class="form-control" id="inputlabelChanName" type="text" name="name" value="" placeholder="<? FORMAT "The channel name." ?>">
</div>
</div>
<? ENDIF ?>
<div class="form-group">
<label for="inputlabelKey" class="col-sm-2 control-label">Key:</label>
<label for="inputlabelKey" class="col-sm-2 control-label"><? FORMAT "Key:" ?></label>
<div class="col-sm-10">
<input type="test" class="form-control" id="inputlabelKey" name="key" value="<? VAR Key ?>" placeholder="The password of the channel, if there is one.">
<input type="test" class="form-control" id="inputlabelKey" name="key" value="<? VAR Key ?>" placeholder="<? FORMAT "The password of the channel, if there is one." ?>">
</div>
</div>
<div class="form-group">
<label for="inputlabelBufferCount" class="col-sm-2 control-label">Buffer Count:</label>
<label for="inputlabelBufferCount" class="col-sm-2 control-label"><? FORMAT "Buffer Size:" ?></label>
<div class="col-sm-10">
<input class="form-control" id="inputlabelBufferCount" type="number" name="buffercount" value="<? VAR BufferCount ?>" size="10" min="0" placeholder="The buffer count.">
<input class="form-control" id="inputlabelBufferCount" type="number" name="buffercount" value="<? VAR BufferCount ?>" size="10" min="0" placeholder="<? FORMAT "The buffer count." ?>">
</div>
</div>
<div class="form-group">
<label for="inputDefaultModes" class="col-sm-2 control-label">Default Modes:</label>
<label for="inputDefaultModes" class="col-sm-2 control-label"><? FORMAT "Default Modes:" ?></label>
<div class="col-sm-10">
<input type="text" class="form-control" id="inputDefaultModes" name="defmodes" value="<? VAR DefModes ?>" size="10" placeholder="The default modes of the channel.">
<input type="text" class="form-control" id="inputDefaultModes" name="defmodes" value="<? VAR DefModes ?>" size="10" placeholder="<? FORMAT "The default modes of the channel." ?>">
</div>
</div>
</div> <!-- Channel Info -->
@ -68,7 +69,7 @@
<tbody>
<tr>
<td><div class="switch"><input type="checkbox" name="save" id="save" class="cmn-toggle cmn-toggle-round-flat" value="true"<? IF InConfig ?> checked="checked"<? ENDIF ?> /> <label for="save"></label> </div></td>
<td>Save to config</td>
<td><? FORMAT "Save to config" ?></td>
</tr>
<? LOOP OptionLoop ?>
<tr>
@ -85,7 +86,7 @@
<div class="tab-pane fade" id="othermods">
<? LOOP EmbeddedModuleLoop ?>
<? IF Embed ?>
<h3>Module <? VAR ModName ?></h3>
<h3><? FORMAT "Module {1}" ModName ?></h3>
<? INC *Embed ?>
<? ENDIF ?>
<? ENDLOOP ?>
@ -95,8 +96,8 @@
<div class="panel-footer text-right">
<input class="btn btn-danger" type="reset" value="Reset">
<input class="btn btn-success"type="submit" name="submit_return" value="<? IF Edit ?>Save<? ELSE ?>Add Channel<? ENDIF ?>" />
<input class="btn btn-default"type="submit" name="submit_continue" value="<? IF Edit ?>Save and continue<? ELSE ?>Save and continue<? ENDIF ?>" />
<input class="btn btn-success"type="submit" name="submit_return" value="<? IF Edit ?><? FORMAT "Save and return" ?><? ELSE ?><? FORMAT "Add Channel and return" ?><? ENDIF ?>" />
<input class="btn btn-default"type="submit" name="submit_continue" value="<? IF Edit ?><? FORMAT "Save and continue" ?><? ELSE ?><? FORMAT "Add Channel and continue" ?><? ENDIF ?>" />
</div>

@ -1,4 +1,6 @@
<? I18N znc-webadmin ?>
<? AddRow JSLoop HREF=/modfiles/global/webadmin/webadmin.js ?>
<? REM ?><? AddRow CSSLoop HREF=/modfiles/global/webadmin/webadmin.css ?><? ENDREM ?>
<? INC Header.tmpl ?>
<form class="form-horizontal" role="form" action="<? IF Edit ?>editnetwork<? ELSE ?>addnetwork<? ENDIF ?>" method="post">
@ -12,58 +14,65 @@
<div class="panel with-nav-tabs panel-default">
<div class="panel-heading">
<ul class="nav nav-tabs">
<li class="active"><a href="#netinfotab" data-toggle="tab">Network Info</a></li>
<li><a href="#floodprotab" data-toggle="tab">Flood Protection</a></li>
<li class="active"><a href="#netinfotab" data-toggle="tab"><? FORMAT "Network Info" ?></a></li>
<li><a href="#floodprotab" data-toggle="tab"><? FORMAT "Flood protection:" ?></a></li>
<li><a href="#charencodetab" data-toggle="tab">Character Encoding</a></li>
<li><a href="#channelstab" data-toggle="tab">Channels</a></li>
<li><a href="#modulestab" data-toggle="tab">Modules</a></li>
<li><a href="#channelstab" data-toggle="tab"><? FORMAT "Channels" ?></a></li>
<li><a href="#modulestab" data-toggle="tab"><? FORMAT "Modules" ?></a></li>
</ul>
</div>
<div class="panel-body">
<div class="tab-content">
<!-- Network Info -->
<div class="tab-pane fade in active" id="netinfotab">
<div class="alert alert-warning">To connect to this network from your IRC client, you can set the server password field as follows: <code><? VAR Username ?>/<? IF Edit ?><? VAR Name ?><? ELSE ?>&lt;network&gt;<? ENDIF ?>:&lt;password&gt;</code> or username field as <code><? VAR Username ?>/<? IF Edit ?><? VAR Name ?><? ELSE ?>&lt;network&gt;<? ENDIF ?></code></div>
<div class="alert alert-info">Nick, AltNick, Ident, RealName, BindHost can be left empty to use the value from the user.</div>
<? IF Edit ?>
<? SETBLOCK ClientConnectHint_Password ?><? VAR Username ?>/<? VAR Name ?>:<? FORMAT "&lt;password&gt;" ?><? ENDSETBLOCK ?>
<? SETBLOCK ClientConnectHint_Username ?><? VAR Username ?>/<? VAR Name ?><? ENDSETBLOCK ?>
<? ELSE ?>
<? SETBLOCK ClientConnectHint_Password ?><? VAR Username ?>/<? FORMAT "&lt;network&gt;" ?>:<? FORMAT "&lt;password&gt;" ?><? ENDSETBLOCK ?>
<? SETBLOCK ClientConnectHint_Username ?><? VAR Username ?>/<? FORMAT "&lt;network&gt;" ?><? ENDSETBLOCK ?>
<? ENDIF ?>
<div class="alert alert-warning"><? FORMAT "To connect to this network from your IRC client, you can set the server password field as <code>{1}</code> or username field as <code>{2}</code>" "ClientConnectHint_Password ESC=" "ClientConnectHint_Username ESC=" ?></div>
<div class="alert alert-info"><? FORMAT "Nick, AltNick, Ident, RealName, BindHost can be left empty to use the value from the user." ?></div>
<div class="form-group">
<label for="inputNetworkName" class="col-sm-2 control-label">Network Name:</label>
<label for="inputNetworkName" class="col-sm-2 control-label"><? FORMAT "Network Name:" ?></label>
<div class="col-sm-10">
<input type="text" class="form-control" id="inputNetworkName" name="name" value="<? VAR Name ?>" maxlength="20" placeholder="The name of the IRC network">
<input type="text" class="form-control" id="inputNetworkName" name="name" value="<? VAR Name ?>" maxlength="20" placeholder="<? FORMAT "The name of the IRC network." ?>">
</div>
</div>
<div class="form-group">
<label for="inputNickname" class="col-sm-2 control-label">Nickname:</label>
<label for="inputNickname" class="col-sm-2 control-label"><? FORMAT "Nickname:" ?></label>
<div class="col-sm-10">
<input type="text" class="form-control" id="inputNickname" name="nick" value="<? VAR Nick ?>" maxlength="30" placeholder="Your nickname on IRC.">
<input type="text" class="form-control" id="inputNickname" name="nick" value="<? VAR Nick ?>" maxlength="30" placeholder="<? FORMAT "Your nickname on IRC." ?>">
</div>
</div>
<div class="form-group">
<label for="inputAltNickname" class="col-sm-2 control-label">Alt. Nickname:</label>
<label for="inputAltNickname" class="col-sm-2 control-label"><? FORMAT "Alt. Nickname:" ?></label>
<div class="col-sm-10">
<input type="text" class="form-control" id="AltNickname" name="altnick" value="<? VAR AltNick ?>" maxlength="30" placeholder="Your secondary nickname, if the first is not available on IRC.">
<input type="text" class="form-control" id="AltNickname" name="altnick" value="<? VAR AltNick ?>" maxlength="30" placeholder="<? FORMAT "Your secondary nickname, if the first is not available on IRC." ?>">
</div>
</div>
<div class="form-group">
<label for="inputIdent" class="col-sm-2 control-label">Ident:</label>
<label for="inputIdent" class="col-sm-2 control-label"><? FORMAT "Ident:" ?></label>
<div class="col-sm-10">
<input type="text" class="form-control" id="inputIdent" name="ident" value="<? VAR Ident ?>" maxlength="30" placeholder="Your ident.">
<input type="text" class="form-control" id="inputIdent" name="ident" value="<? VAR Ident ?>" maxlength="30" placeholder="<? FORMAT "Your ident." ?>">
</div>
</div>
<div class="form-group">
<label for="inputRealname" class="col-sm-2 control-label">Realname:</label>
<label for="inputRealname" class="col-sm-2 control-label"><? FORMAT "Realname:" ?></label>
<div class="col-sm-10">
<input type="text" class="form-control" id="inputRealname" name="realname" value="<? VAR RealName ?>" maxlength="128" placeholder="Your real name.">
<input type="text" class="form-control" id="inputRealname" name="realname" value="<? VAR RealName ?>" maxlength="128" placeholder="<? FORMAT "Your real name." ?>">
</div>
</div>
<? IF BindHostEdit ?>
<div class="form-group">
<label for="inputBindHost" class="col-sm-2 control-label">BindHost:</label>
<label for="inputBindHost" class="col-sm-2 control-label"><? FORMAT "BindHost:" ?></label>
<div class="col-sm-10">
<? IF BindHostLoop ?>
<select class="form-control" name="bindhost">
@ -80,62 +89,84 @@
<? ENDIF ?>
<div class="form-group">
<label for="inputQuit" class="col-sm-2 control-label">Quit Message:</label>
<label for="inputQuit" class="col-sm-2 control-label"><? FORMAT "Quit Message:" ?></label>
<div class="col-sm-10">
<input type="text" class="form-control" id="inputQuit" name="quitmsg" value="<? VAR QuitMsg ?>" maxlength="256" placeholder="You may define a Message shown, when you quit IRC.">
<input type="text" class="form-control" id="inputQuit" name="quitmsg" value="<? VAR QuitMsg ?>" maxlength="256" placeholder="<? FORMAT "You may define a Message shown, when you quit IRC." ?>">
</div>
</div>
<div class="form-group">
<label for="inputActive" class="col-sm-2 control-label">Active:</label>
<label for="inputActive" class="col-sm-2 control-label"><? FORMAT "Active:" ?></label>
<div class="col-sm-10">
<div class="switch">
<input type="checkbox" value="1" name="doconnect" class="cmn-toggle cmn-toggle-round-flat" id="doconnect_checkbox"<? IF IRCConnectEnabled ?> checked="checked"<? ENDIF ?> />
<label for="doconnect_checkbox"></label>
<span class="help-block">Connect to IRC &amp; automatically re-connect</span>
<span class="help-block"><? FORMAT "Connect to IRC &amp; automatically re-connect" ?></span>
</div>
</div>
</div>
<div class="form-group" id="servers_plain">
<label for="inputServers" class="col-sm-2 control-label">Servers of this IRC network:</label>
<div class="form-group">
<label for="inputTrustAll" class="col-sm-2 control-label"><? FORMAT "Trust all certs:" ?></label>
<div class="col-sm-10">
<textarea class="form-control" name="servers" cols="70" rows="5" id="servers_text"><? LOOP ServerLoop ?><? VAR Server ?>
<? ENDLOOP ?></textarea>
<span class="help-block">One server per line, "host [[+]port] [password]", + means SSL</span>
<br/>
<div class="switch">
<input type="checkbox" value="1" name="trustallcerts" class="cmn-toggle cmn-toggle-round-flat" id="trustallcerts_checkbox"<? IF TrustAllCerts ?> checked="checked"<? ENDIF ?> />
<label for="trustallcerts_checkbox"></label>
<span class="help-block"><? FORMAT "Disable certificate validation (takes precedence over TrustPKI). INSECURE!" ?></span>
</div>
</div>
</div>
<div class="form-group" id="servers_js" style="display:none">
<label for="inputServers" class="col-sm-2 control-label">Servers of this IRC network:</label>
<div class="form-group">
<label for="inputTrustPKI" class="col-sm-2 control-label"><? FORMAT "Automatically detect trusted certificates (Trust the PKI):" ?></label>
<div class="col-sm-10">
<table class="table table-hover">
<thead>
<tr>
<th>Hostname</th>
<th>Port</th>
<th>SSL</th>
<th>Password</th>
<th/>
</tr>
</thead>
<tbody id="servers_tbody">
<tr>
</tr>
</tbody>
</table>
<button type="button" class="btn btn-default" value="Add" id="servers_add">Add New Server</button>
<div class="switch">
<input type="checkbox" value="1" name="trustpki" class="cmn-toggle cmn-toggle-round-flat" id="trustpki_checkbox"<? IF TrustPKI ?> checked="checked"<? ENDIF ?> />
<label for="trustpki_checkbox"></label>
<span class="help-block"><? FORMAT "When disabled, manually whitelist all server fingerprints, even if the certificate is valid" ?></span>
</div>
</div>
</div>
<script type="text/javascript">serverlist_init(jQuery);</script>
</div>
<div class="form-group" id="servers_plain">
<label for="inputServers" class="col-sm-2 control-label"><? FORMAT "Servers of this IRC network:" ?></label>
<div class="col-sm-10">
<textarea class="form-control" name="servers" cols="70" rows="5" id="servers_text"><? LOOP ServerLoop ?><? VAR Server ?>
<? ENDLOOP ?></textarea>
<span class="help-block"><? FORMAT "One server per line, “host [[+]port] [password]”, + means SSL" ?></span>
<br/>
</div>
</div>
<div class="form-group" id="servers_js" style="display:none">
<label for="inputServers" class="col-sm-2 control-label"><? FORMAT "Servers of this IRC network:" ?></label>
<div class="col-sm-10">
<table class="table table-hover">
<thead>
<tr>
<th><? FORMAT "Hostname" ?></th>
<th><? FORMAT "Port" ?></th>
<th><? FORMAT "SSL" ?></th>
<th><? FORMAT "Password" ?></th>
<th/>
</tr>
</thead>
<tbody id="servers_tbody">
<tr>
</tr>
</tbody>
</table>
<button type="button" class="btn btn-default" value="Add" id="servers_add">Add New Server</button>
</div>
</div>
<script type="text/javascript">serverlist_init(jQuery);</script>
<div class="form-group">
<label for="inputTrustedSSL" class="col-sm-2 control-label">Trusted SSL fingerprints of this IRC network:</label>
<label for="inputTrustedSSL" class="col-sm-2 control-label"><? FORMAT "SHA-256 fingerprints of trusted SSL certificates of this IRC network:" ?></label>
<div class="col-sm-10">
<textarea class="form-control" name="fingerprints" rows="3"><? LOOP TrustedFingerprints ?><? VAR FP ?>
<? ENDLOOP ?></textarea>
<span class="help-block">When these certificates are encountered, checks for hostname, expiration date, CA are skipped</span>
<span class="help-block"><? FORMAT "When these certificates are encountered, checks for hostname, expiration date, CA are skipped" ?></span>
</div>
</div>
</div> <!-- Network Info -->
@ -143,38 +174,41 @@
<!-- Flood Protection -->
<div class="tab-pane fade" id="floodprotab">
<div class="form-group">
<label for="inputFloodpro" class="col-sm-2 control-label">Flood protection:</label>
<label for="floodprotection" class="col-sm-2 control-label"><? FORMAT "Flood protection:" ?></label>
<div class="col-sm-10">
<div class="switch">
<input type="checkbox" name="floodprotection" id="floodprotection_checkbox" class="cmn-toggle cmn-toggle-round-flat" onchange="floodprotection_change();" <? IF FloodProtection ?>checked="checked"<? ENDIF ?> />
<label for="floodprotection_checkbox"></label>
<span class="help-block">You might enable the flood protection. This prevents `excess flood' errors, which occur, when your IRC bot is command flooded or spammed. After changing this, reconnect ZNC to server</span>
<span class="help-block"><? FORMAT "You might enable the flood protection. This prevents “excess flood” errors, which occur, when your IRC bot is command flooded or spammed. After changing this, reconnect ZNC to server." ?></span>
</div>
</div>
</div>
<div class="form-group">
<label for="inputFloodproRate" class="col-sm-2 control-label">Flood protection rate:</label>
<label for="floodprorate" class="col-sm-2 control-label"><? FORMAT "Flood protection rate:" ?></label>
<div class="col-sm-10">
<input class="form-control" type="number" name="floodrate" min="0.3" step="0.05" id="floodrate" placeholder="The number of seconds per line." <? IF FloodProtection ?> value="<? VAR FloodRate ?>" <? ELSE ?> value="1.00" disabled="disabled" <? ENDIF ?> />
<span class="help-block">The number of seconds per line. After changing this, reconnect ZNC to server</span>
<input class="form-control" type="number" name="floodrate" min="0.3" step="0.05" id="floodrate" placeholder="<? FORMAT "The number of seconds per line. After changing this, reconnect ZNC to server." ?>" <? IF FloodProtection ?> value="<? VAR FloodRate ?>" <? ELSE ?> value="1.00" disabled="disabled" <? ENDIF ?> />
<? FORMAT "{1} seconds per line" "FloodInputField_Rate ESC=" ?>
<span class="help-block"><? FORMAT "The number of seconds per line. After changing this, reconnect ZNC to server." ?></span>
</div>
</div>
<div class="form-group">
<label for="inputFloodproBurst" class="col-sm-2 control-label">Flood protection burst:</label>
<label for="floodproburst" class="col-sm-2 control-label"><? FORMAT "Flood protection burst:" ?></label>
<div class="col-sm-10">
<input type="number" class="form-control" name="floodburst" min="1" id="inputFloodproBurst floodburst" <? IF FloodProtection ?> value="<? VAR FloodBurst ?>" <? ELSE ?> value="4" disabled="disabled" <? ENDIF ?> />
<span class="help-block">Defines the number of lines, which can be sent immediately. After changing this, reconnect ZNC to server</span>
<input type="number" class="form-control" name="floodburst" min="1" id="floodburst" <? IF FloodProtection ?> value="<? VAR FloodBurst ?>" <? ELSE ?> value="4" disabled="disabled" <? ENDIF ?> />
<? FORMAT "{1} lines can be sent immediately" "FloodInputField_Burst ESC=" ?>
<span class="help-block"><? FORMAT "Defines the number of lines, which can be sent immediately. After changing this, reconnect ZNC to server." ?></span>
</div>
</div>
<div class="form-group">
<label for="inputChanjoindelay" class="col-sm-2 control-label">Channel join delay:</label>
<label for="joindelay" class="col-sm-2 control-label"><? FORMAT "Channel join delay:" ?></label>
<div class="col-sm-10">
<input type="number" class="form-control" name="joindelay" min="0" id="inputChanjoindelay joindelay" value="<? VAR JoinDelay ?>" />
<span class="help-block">Defines the delay in seconds, until channels are joined after getting connected</span>
<input type="number" class="form-control" name="joindelay" min="0" id="joindelay" value="<? VAR JoinDelay ?>" />
<? FORMAT "{1} seconds" "ChannelJoinDelayInputField ESC=" ?>
<span class="help-block"><? FORMAT "Defines the delay in seconds, until channels are joined after getting connected." ?></span>
</div>
</div>
@ -185,9 +219,10 @@
<!-- Server Encoding -->
<div class="tab-pane fade" id="charencodetab">
<div class="form-group">
<label for="inputChanencode" class="col-sm-2 control-label">Server encoding:</label>
<label for="inputChanencode" class="col-sm-2 control-label"><? FORMAT "Server encoding:" ?></label>
<div class="col-sm-10">
<? INC encoding_settings.tmpl ?>
<span class="help-block"><? FORMAT "Character encoding used between ZNC and IRC server." ?></span>
</div>
</div>
</div> <!-- Server Encoding -->
@ -195,21 +230,21 @@
<!-- Channels -->
<div class="tab-pane fade" id="channelstab">
<? IF !Edit ?>
<span class="info">You will be able to add + modify channels here after you created the network.</span><br />
<span class="info"><? FORMAT "You will be able to add + modify channels here after you created the network." ?></span><br />
<? ELSE ?>
<table class="table table-bordered table-hover table-striped">
<thead>
<tr>
<td><a href="addchan?user=<? VAR Username ESC=URL ?>&amp;network=<? VAR Name ESC=URL ?>" class="btn btn-primary btn-xs">Add</a></td>
<td><a href="<? VAR ModPath TOP ?>addchan?user=<? VAR Username ESC=URL ?>&amp;network=<? VAR Name ESC=URL ?>" class="btn btn-primary btn-xs"><? FORMAT "Add" ?></a></td>
<? IF ChannelLoop ?>
<td>Save</td>
<td>Name</td>
<td>CurModes</td>
<td>DefModes</td>
<td>BufferCount</td>
<td>Options</td>
<th><? FORMAT "Save" ?></th>
<th><? FORMAT "Name" ?></th>
<th><? FORMAT "CurModes" ?></th>
<th><? FORMAT "DefModes" ?></th>
<th><? FORMAT "BufferSize" ?></th>
<th><? FORMAT "Options" ?></th>
<? ELSE ?>
<td>&lt;- Add a channel (opens in same page)</td>
<td><? FORMAT "← Add a channel (opens in same page)" ?></td>
<? ENDIF ?>
</tr>
</thead>
@ -217,7 +252,9 @@
<? LOOP ChannelLoop SORTASC=Name ?>
<tr>
<td>
<input type="hidden" name="channel" value="<? VAR Name ?>" /> <a href="editchan?user=<? VAR Username ESC=URL ?>&amp;network=<? VAR Network ESC=URL ?>&amp;name=<? VAR Name ESC=URL ?>" class="btn btn-warning btn-xs">Edit</a> <a href="delchan?user=<? VAR Username ESC=URL ?>&amp;network=<? VAR Network ESC=URL ?>&amp;name=<? VAR Name ESC=URL ?>" class="btn btn-danger btn-xs">Del</a>
<input type="hidden" name="channel" value="<? VAR Name ?>" />
<a href="<? VAR ModPath TOP ?>editchan?user=<? VAR Username ESC=URL ?>&amp;network=<? VAR Network ESC=URL ?>&amp;name=<? VAR Name ESC=URL ?>" class="btn btn-warning btn-xs"><? FORMAT "Edit" ?></a>
<a href="<? VAR ModPath TOP ?>delchan?user=<? VAR Username ESC=URL ?>&amp;network=<? VAR Network ESC=URL ?>&amp;name=<? VAR Name ESC=URL ?>" class="btn btn-danger btn-xs"><? FORMAT "Del" ?></a>
</td>
<td class="text-center">
<div class="switch">
@ -243,12 +280,12 @@
<table class="table table-bordered table-hover table-striped">
<thead>
<tr>
<td>Status</td>
<td>Name</td>
<td>Arguments</td>
<td>Description</td>
<td>Global</td>
<td>Networks</td>
<th><? FORMAT "Status" ?></th>
<th><? FORMAT "Name" ?></th>
<th><? FORMAT "Arguments" ?></th>
<th><? FORMAT "Description" ?></th>
<th><? FORMAT "Loaded globally" ?></th>
<th><? FORMAT "Loaded by user" ?></th>
</tr>
</thead>
<tbody>
@ -299,7 +336,7 @@
<div class="tab-pane fade" id="othermods">
<? LOOP EmbeddedModuleLoop ?>
<? IF Embed ?>
<h3>Module <? VAR ModName ?></h3>
<h3><? FORMAT "Module {1}" ModName ?></h3>
<? INC *Embed ?>
<? ENDIF ?>
<? ENDLOOP ?>
@ -309,8 +346,8 @@
<div class="panel-footer text-right">
<input class="btn btn-danger" type="reset" value="Reset">
<input class="btn btn-success" type="submit" name="submit_return" value="<? IF Edit ?>Save<? ELSE ?>Save Network<? ENDIF ?>" />
<input class="btn btn-default" type="submit" name="submit_continue" value="<? IF Edit ?>Save and continue<? ELSE ?>Save and continue<? ENDIF ?>" />
<input class="btn btn-success" type="submit" name="submit_return" value="<? IF Edit ?><? FORMAT "Save and return" ?><? ELSE ?><? FORMAT "Add Network and return" ?><? ENDIF ?>" />
<input class="btn btn-default" type="submit" name="submit_continue" value="<? IF Edit ?><? FORMAT "Save and continue" ?><? ELSE ?><? FORMAT "Add Network and continue" ?><? ENDIF ?>" />
</div>
</div>

@ -1,29 +1,35 @@
<? I18N znc-webadmin ?>
<? AddRow JSLoop HREF=/modfiles/global/webadmin/webadmin.js ?>
<? AddRow CSSLoop HREF=/modfiles/global/webadmin/webadmin.css ?>
<? INC Header.tmpl ?>
<form class="form-horizontal" action="<? IF Edit ?>edituser<? ELSE ?>adduser<? ENDIF ?>" method="post">
<form class="form-horizontal" action="<? VAR ModPath TOP ?><? IF Edit ?>edituser?user=<? VAR Username ?><? ELSE ?>adduser<? ENDIF ?>" method="post">
<? INC _csrf_check.tmpl ?>
<input type="hidden" name="submitted" value="1" />
<input name="userdummy" type="text" style="display: none"/>
<input name="passworddummy" type="password" style="display: none"/>
<div class="container col-md-10 col-md-offset-1">
<div class="panel with-nav-tabs panel-default">
<div class="panel-heading">
<ul class="nav nav-tabs">
<li class="active"><a href="#authtab" data-toggle="tab">Authentication</a></li>
<li><a href="#ircinformationtab" data-toggle="tab">IRC Information</a></li>
<li class="hidden-xs"><a href="#networkstab" data-toggle="tab">Networks</a></li>
<li class="hidden-xs"><a href="#modulestab" data-toggle="tab">Modules</a></li>
<li class="hidden-xs hidden-sm"><a href="#defaultsettingstab" data-toggle="tab">Default Settings</a></li>
<li class="hidden-xs hidden-sm"><a href="#flagstab" data-toggle="tab">Flags</a></li>
<li class="hidden-xs hidden-sm"><a href="#zncbehavetab" data-toggle="tab">ZNC Behavior</a></li>
<li class="hidden-xs hidden-sm"><a href="#othermodtab" data-toggle="tab">Other Modules</a></li>
<li class="active"><a href="#authtab" data-toggle="tab"><? FORMAT "Authentication" ?></a></li>
<li><a href="#ircinformationtab" data-toggle="tab"><? FORMAT "IRC Information" ?></a></li>
<li class="hidden-xs"><a href="#networkstab" data-toggle="tab"><? FORMAT "Networks" ?></a></li>
<li class="hidden-xs"><a href="#modulestab" data-toggle="tab"><? FORMAT "Modules" ?></a></li>
<li class="hidden-xs hidden-sm"><a href="#channelstab" data-toggle="tab"><? FORMAT "Channels" ?></a></li>
<li class="hidden-xs hidden-sm"><a href="#queriestab" data-toggle="tab"><? FORMAT "Queries" ?></a></li>
<li class="hidden-xs hidden-sm"><a href="#flagstab" data-toggle="tab"><? FORMAT "Flags" ?></a></li>
<li class="hidden-xs hidden-sm"><a href="#zncbehavetab" data-toggle="tab"><? FORMAT "ZNC Behavior" ?></a></li>
<li class="dropdown hidden-lg hidden-md">
<a href="#" data-toggle="dropdown">More <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li class="hidden-sm"><a href="#networkstab" data-toggle="tab">Networks</a></li>
<li class="hidden-sm"><a href="#modulestab" data-toggle="tab">Modules</a></li>
<li><a href="#defaultsettingstab" data-toggle="tab">Default Settings</a></li>
<li><a href="#flagstab" data-toggle="tab">Flags</a></li>
<li><a href="#zncbehavetab" data-toggle="tab">ZNC Behavior</a></li>
<li><a href="#othermodtab" data-toggle="tab">Other Modules</a></li>
<li class="hidden-sm"><a href="#networkstab" data-toggle="tab"><? FORMAT "Networks" ?></a></li>
<li class="hidden-sm"><a href="#modulestab" data-toggle="tab"><? FORMAT "Modules" ?></a></li>
<li><a href="#channelsstab" data-toggle="tab"><? FORMAT "Channels" ?></a></li>
<li><a href="#queriesstab" data-toggle="tab"><? FORMAT "Queries" ?></a></li>
<li><a href="#flagstab" data-toggle="tab"><? FORMAT "Flags" ?></a></li>
<li><a href="#zncbehavetab" data-toggle="tab"><? FORMAT "ZNC Behavior" ?></a></li>
</ul>
</li>
</ul>
@ -36,7 +42,7 @@
<div class="form-group">
<label for="inputUsername" class="col-sm-2 control-label">Username:</label>
<label for="inputUsername" class="col-sm-2 control-label"><? FORMAT "Username:" ?></label>
<div class="col-sm-10">
<? IF Clone ?>
<input type="hidden" class="form-control" id="inputUsername" name="clone" value="<? VAR CloneUsername ?>" autocomplete="off" />
@ -46,31 +52,37 @@
<input type="hidden" class="form-control" id="inputUsername" name="user" value="<? VAR Username ?>" autocomplete="off" />
<input type="text" class="form-control" id="inputUsername" name="newuser" value="<? VAR Username ?>" disabled="disabled" />
<? ELSE ?>
<input type="text" class="form-control" id="inputUsername" name="user" value="<? VAR Username ?>" placeholder="Enter a username" autocomplete="off" />
<input type="text" class="form-control" id="inputUsername" name="user" value="<? VAR Username ?>" placeholder="<? FORMAT "Please enter a username." ?>" autocomplete="off" />
<? ENDIF ?>
</div>
</div>
<div class="form-group">
<label for="inputPassword" class="col-sm-2 control-label">Password:</label>
<label for="inputPassword" class="col-sm-2 control-label"><? FORMAT "Password:" ?></label>
<div class="col-sm-10">
<input type="password" class="form-control" id="inputPassword" name="password" placeholder="Enter a secure password" autocomplete="off">
<input type="password" class="form-control" id="inputPassword" name="password" placeholder="<? FORMAT "Please enter a password." ?>" autocomplete="off">
</div>
</div>
<div class="form-group">
<label for="inputPassword2" class="col-sm-2 control-label">Confirm Password:</label>
<label for="inputPassword2" class="col-sm-2 control-label"><? FORMAT "Confirm password:" ?></label>
<div class="col-sm-10">
<input type="password" class="form-control" id="inputPassword2" name="password2" placeholder="Re-type the password">
<input type="password" class="form-control" id="inputPassword2" name="password2" placeholder="<? FORMAT "Please re-type the above password." ?>">
</div>
</div>
<div class="form-group">
<label for="authonlyviamodule" class="col-sm-2 control-label"><? FORMAT "Auth Only Via Module:" ?></label>
<div class="col-sm-10">
<input type="checkbox" class="cmn-toggle cmn-toggle-round-flat" id="authonlyviamodule" name="authonlyviamodule" placeholder="<? FORMAT "Allow user authentication by external modules only, disabling built-in password authentication." ?>"<? IF AuthOnlyViaModule ?> checked="checked"<? ENDIF ?><? IF !ImAdmin ?> disabled="disabled"<? ENDIF ?> /> </div>
</div>
<div class="form-group">
<label for="inputAllowedIP" class="col-sm-2 control-label">Allowed IPs:</label>
<label for="inputAllowedIP" class="col-sm-2 control-label"><? FORMAT "Allowed IPs:" ?></label>
<div class="col-sm-10">
<textarea class="form-control class="form-control" data-provide="markdown" id="inputAllowedIP" name="allowedips" cols="70" rows="5"><? LOOP AllowedHostLoop ?><? VAR Host ?><? ENDLOOP ?></textarea>
<div class="alert alert-info help-block">Leave empty to allow connections from all IPs. Otherwise, one entry per line, wildcards * and ? are available.</div>
<textarea class="form-control class="form-control" data-provide="markdown" id="inputAllowedIP" name="allowedips" cols="70" rows="5"><? LOOP AllowedHostLoop ?><? VAR Host ?>
<? ENDLOOP ?></textarea>
<div class="alert alert-info help-block"><? FORMAT "Leave empty to allow connections from all IPs.<br/>Otherwise, one entry per line, wildcards * and ? are available." ?></div>
</div>
</div>
</div><!-- Authentication -->
@ -78,47 +90,47 @@
<!-- IRC Information -->
<div class="tab-pane fade" id="ircinformationtab">
<? IF !Edit ?>
<div class="alert alert-info">Nick, AltNick, Ident, RealName and QuitMsg can be left empty to use default values.</div>
<div class="alert alert-info"><? FORMAT "Nick, AltNick, Ident, RealName and QuitMsg can be left empty to use default values." ?></div>
<? ENDIF ?>
<div class="form-group">
<label for="inputNickname" class="col-sm-2 control-label">Nickname:</label>
<label for="inputNickname" class="col-sm-2 control-label"><? FORMAT "Nickname:" ?></label>
<div class="col-sm-10">
<input type="text" class="form-control" id="inputNickname" name="nick" value="<? VAR Nick ?>" maxlength="30" placeholder="This will be your nickname on IRC.">
<input type="text" class="form-control" id="inputNickname" name="nick" value="<? VAR Nick ?>" maxlength="30" placeholder="<? FORMAT "Your nickname on IRC." ?>">
</div>
</div>
<div class="form-group">
<label for="inputaltNickname" class="col-sm-2 control-label">Alt. Nickname</label>
<label for="inputaltNickname" class="col-sm-2 control-label"><? FORMAT "Alt. Nickname:" ?></label>
<div class="col-sm-10">
<input type="text" class="form-control" id="inputaltNickname" name="altnick" value="<? VAR AltNick ?>" maxlength="128" placeholder="If the nickname above is not available anymore, then this will be your nickname on IRC.">
<input type="text" class="form-control" id="inputaltNickname" name="altnick" value="<? VAR AltNick ?>" maxlength="128" placeholder="<? FORMAT "Your secondary nickname, if the first is not available on IRC." ?>">
</div>
</div>
<div class="form-group">
<label for="inputIdent" class="col-sm-2 control-label">Ident:</label>
<label for="inputIdent" class="col-sm-2 control-label"><? FORMAT "Ident:" ?></label>
<div class="col-sm-10">
<input type="text" class="form-control" id="inputIdent" name="ident" value="<? VAR Ident ?>" maxlength="128" placeholder="The Ident identifies you as one specific user of your host.">
<input type="text" class="form-control" id="inputIdent" name="ident" value="<? VAR Ident ?>" maxlength="128" placeholder="<? FORMAT "The Ident is sent to server as username." ?>">
</div>
</div>
<div class="form-group">
<label for="inputStatusPrefix" class="col-sm-2 control-label">StatusPrefix:</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="inputStatusPrefix" name="statusprefix" value="<? VAR StatusPrefix ?>" maxlength="5" placeholder="This defines the prefix for the status and module queries.">
<label for="inputStatusPrefix" class="col-sm-2 control-label"><? FORMAT "Status Prefix:" ?></label>
<div class="col-sm-10">
<input type="text" class="form-control" id="inputStatusPrefix" name="statusprefix" value="<? VAR StatusPrefix ?>" maxlength="5" placeholder="<? FORMAT "The prefix for the status and module queries." ?>">
</div>
</div>
</div>
<div class="form-group">
<label for="inputRealname" class="col-sm-2 control-label">Realname:</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="inputRealname" name="realname" value="<? VAR RealName ?>" maxlength="256" placeholder="The real name of the user.">
<div class="form-group">
<label for="inputRealname" class="col-sm-2 control-label"><? FORMAT "Realname:" ?></label>
<div class="col-sm-10">
<input type="text" class="form-control" id="inputRealname" name="realname" value="<? VAR RealName ?>" maxlength="256" placeholder="<? FORMAT "Your real name." ?>">
</div>
</div>
</div>
<? IF BindHostEdit ?>
<div class="form-group">
<label for="inputBindHost" class="col-sm-2 control-label">BindHost:</label>
<label for="inputBindHost" class="col-sm-2 control-label"><? FORMAT "BindHost:" ?></label>
<div class="col-sm-10">
<? IF BindHostLoop ?>
<select class="form-control" id="inputBindHost" name="bindhost">
@ -131,9 +143,8 @@
</div>
</div>
<? ENDIF ?>
<div class="form-group">
<label for="inputDCCBindHost" class="col-sm-2 control-label">DCCBindHost:</label>
<label for="inputDCCBindHost" class="col-sm-2 control-label"><? FORMAT "DCCBindHost:" ?></label>
<div class="col-sm-10">
<? IF DCCBindHostLoop ?>
<select class="form-control" id="inputDCCBindHost" name="dccbindhost">
@ -147,9 +158,9 @@
</div>
<div class="form-group">
<label for="inputQuit" class="col-sm-2 control-label">Quit Message:</label>
<label for="inputQuit" class="col-sm-2 control-label"><? FORMAT "Quit Message:" ?></label>
<div class="col-sm-10">
<input type="text" class="form-control" id="inputQuit" name="quitmsg" value="<? VAR QuitMsg ?>" maxlength="256" placeholder="You may define a Message shown, when you quit IRC.">
<input type="text" class="form-control" id="inputQuit" name="quitmsg" value="<? VAR QuitMsg ?>" maxlength="256" placeholder="<? FORMAT "You may define a Message shown, when you quit IRC." ?>">
</div>
</div>
</div> <!-- IRC Information -->
@ -160,14 +171,14 @@
<table class="table table-bordered table-hover table-striped">
<thead>
<tr>
<td><a href="addnetwork?user=<? VAR Username ESC=URL ?>" class="btn btn-default btn-xs">Add</a></td>
<td><a href="<? VAR ModPath TOP ?>addnetwork?user=<? VAR Username ESC=URL ?>" class="btn btn-default btn-xs"><? FORMAT "Add" ?></a></td>
<? IF NetworkLoop ?>
<td>Name</td>
<td>Clients</td>
<td>Current Server</td>
<td>IRC Nick</td>
<td><? FORMAT "Name" ?></td>
<td><? FORMAT "Clients" ?></td>
<td><? FORMAT "Current Server" ?></td>
<td><? FORMAT "Nick" ?></td>
<? ELSE ?>
<td>&lt;- Add a network (opens in same page)</td>
<td><? FORMAT "← Add a network (opens in same page)" ?></td>
<? ENDIF ?>
</tr>
</thead>
@ -176,7 +187,7 @@
<tr>
<td>
<input type="hidden" name="network" value="<? VAR Name ?>" />
<a href="editnetwork?user=<? VAR Username ESC=URL ?>&amp;network=<? VAR Name ESC=URL ?>" class="btn btn-primary btn-xs">Edit</a> <a href="delnetwork?user=<? VAR Username ESC=URL ?>&amp;name=<? VAR Name ESC=URL ?>" class="btn btn-danger btn-xs">Delete</a>
<a href="<? VAR ModPath TOP ?>editnetwork?user=<? VAR Username ESC=URL ?>&amp;network=<? VAR Name ESC=URL ?>" class="btn btn-primary btn-xs">Edit</a> <a href="delnetwork?user=<? VAR Username ESC=URL ?>&amp;name=<? VAR Name ESC=URL ?>" class="btn btn-danger btn-xs"><? FORMAT "Del" ?></a>
</td>
<td><? VAR Name ?></td>
<td><? VAR Clients ?></td>
@ -187,21 +198,35 @@
</tbody>
</table>
<? ELSE ?>
<span class="info">You will be able to add + modify networks here after you <? IF Clone ?>have cloned<? ELSE ?>created<? ENDIF ?> the user.</span><br />
<? IF Clone ?>
<span class="info"><? FORMAT "You will be able to add + modify networks here after you have cloned the user." ?></span><br />
<? ELSE ?>
<span class="info"><? FORMAT "You will be able to add + modify networks here after you have created the user." ?></span><br />
<? ENDIF ?>
<? ENDIF ?>
</div><!-- Networks -->
<!-- Modules -->
<div class="tab-pane fade" id="modulestab">
<? LOOP EmbeddedModuleLoop ?>
<? IF Embed ?>
<div class="form-group">
<label for="input<? VAR ModName ?>" class="col-sm-2 control-label"><? VAR ModName ?>:</label>
<div class="col-sm-10">
<? INC *Embed ?>
</div>
</div>
<? ENDIF ?>
<? ENDLOOP ?>
<table class="table table-bordered table-hover table-striped">
<thead>
<tr>
<td>Status</td>
<td>Name</td>
<td>Arguments</td>
<td>Description</td>
<td>Global</td>
<td>Networks</td>
<td><? FORMAT "Status" ?></td>
<td><? FORMAT "Name" ?></td>
<td><? FORMAT "Arguments" ?></td>
<td><? FORMAT "Description" ?></td>
<td><? FORMAT "Loaded globally" ?></td>
<td><? FORMAT "Loaded by networks" ?></td>
</tr>
</thead>
<tbody>
@ -210,6 +235,9 @@
<td>
<div class="switch">
<input type="checkbox" name="loadmod" id="lm_<? VAR Name ?>" value="<? VAR Name ?>" class="cmn-toggle cmn-toggle-round-flat" value="<? VAR Name ?>"<? IF Checked ?> checked="checked"<? ENDIF ?><? IF Disabled ?> disabled="disabled"<? ENDIF ?> />
<? IF Disabled ?>
<input type="hidden" name="loadmod" value="<? VAR Name ?>" value="<? VAR Name ?>"<? IF Checked ?> checked="checked"<? ENDIF ?> />
<? ENDIF ?>
<label for="lm_<? VAR Name ?>"></label>
</div>
</td>
@ -251,23 +279,41 @@
</div> <!-- Modules -->
<!-- Default Settings -->
<div class="tab-pane fade" id="defaultsettingstab">
<div class="tab-pane fade" id="channelstab">
<div class="form-group">
<label for="inputModes" class="col-sm-2 control-label">Channel Modes:</label>
<label for="inputModes" class="col-sm-2 control-label"><? FORMAT "Default Modes:" ?></label>
<div class="col-sm-10">
<input type="text" class="form-control" id="inputModes" name="chanmodes" value="<? VAR DefaultChanModes ?>" maxlength="32" placeholder="These are the default modes ZNC will set when you join an empty channel.">
<div class="alert alert-info help-block">Empty = use standard value</div>
<input type="text" class="form-control" id="inputModes" name="chanmodes" value="<? VAR DefaultChanModes ?>" maxlength="32" placeholder="<? FORMAT "These are the default modes ZNC will set when you join an empty channel." ?>">
<div class="alert alert-info help-block"><? FORMAT "Empty = use standard value" ?></div>
</div>
</div>
<div class="form-group">
<label for="inputBufferSize" class="col-sm-2 control-label">Buffer Size:</label>
<label for="chanbuffersize" class="col-sm-2 control-label"><? FORMAT "Buffer Size:" ?></label>
<div class="col-sm-10">
<input type="text" class="form-control" id="inputBufferSize" name="bufsize" value="<? VAR BufferCount ?>" min="0" placeholder="This is the amount of lines that the playback buffer will store before dropping off the oldest line. The buffers are stored in the memory by default." />
<div class="alert alert-info help-block">Empty = use standard value</div>
<input type="text" class="form-control" id="chanbufsize" name="chanbufsize" value="<? VAR ChanBufferSize ?>" min="0" placeholder="<? FORMAT "This is the amount of lines that the playback buffer will store for channels before dropping off the oldest line. The buffers are stored in the memory by default." ?>" />
<div class="alert alert-info help-block"><? FORMAT "Empty = use standard value" ?></div>
</div>
</div>
</div> <!-- Default Settings -->
</div>
<div class="tab-pane fade" id="queriestab">
<div class="form-group">
<label for="maxquerybuffers" class="col-sm-2 control-label"><? FORMAT "Max Buffers:" ?></label>
<div class="col-sm-10">
<input type="text" class="form-control" id="maxquerybuffers" name="maxquerybuffers" value="<? VAR MaxQueryBuffers ?>" min="0" placeholder="<? FORMAT "Maximum number of query buffers. 0 is unlimited." ?>" />
<div class="alert alert-info help-block"><? FORMAT "Empty = use standard value" ?></div>
</div>
</div>
<div class="form-group">
<label for="querybufsize" class="col-sm-2 control-label"><? FORMAT "Buffer Size:" ?></label>
<div class="col-sm-10">
<input type="text" class="form-control" id="querybufsize" name="querybufsize" value="<? VAR QueryBufferSize ?>" min="0" placeholder="<? FORMAT "This is the amount of lines that the playback buffer will store for queries before dropping off the oldest line. The buffers are stored in the memory by default." ?>" />
<div class="alert alert-info help-block"><? FORMAT "Empty = use standard value" ?></div>
</div>
</div>
</div> <!-- Default Settings -->
<!-- Flags -->
<div class="tab-pane fade" id="flagstab">
@ -276,8 +322,8 @@
<table class="table table-bordered table-hover table-striped">
<thead>
<tr>
<td>Status</td>
<td>Flag Title</td>
<td></td>
<td><? FORMAT "Description" ?></td>
</tr>
</thead>
<tbody>
@ -300,153 +346,145 @@
<!-- ZNC Behavior -->
<div class="tab-pane fade" id="zncbehavetab">
<div class="alert alert-info help-block">Any of the following text boxes can be left empty to use their default value.</div>
<div class="form-group">
<label for="inputtimeFormat" class="col-sm-2 control-label">Timestamp Format:</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="inputtimeFormat" name="timestampformat" value="<? VAR TimestampFormat ?>" placeholder="The format for the timestamps used in buffers, for example [%H:%M:%S]." />
<div class="alert alert-info help-block">This setting is ignored in new IRC clients, which use server-time. If your client supports server-time, change timestamp format in client settings instead.</div>
<div class="alert alert-info help-block"><? FORMAT "Any of the following text boxes can be left empty to use their default value." ?></div>
<div class="form-group">
<label for="inputtimeFormat" class="col-sm-2 control-label"><? FORMAT "Timestamp Format:" ?></label>
<div class="col-sm-10">
<input type="text" class="form-control" id="inputtimeFormat" name="timestampformat" value="<? VAR TimestampFormat ?>" placeholder="The format for the timestamps used in buffers, for example [%H:%M:%S]." />
<div class="alert alert-info help-block"><? FORMAT "The format for the timestamps used in buffers, for example [%H:%M:%S]. This setting is ignored in new IRC clients, which use server-time. If your client supports server-time, change timestamp format in client settings instead." ?></div>
</div>
</div>
</div>
<div class="form-group">
<label for="inputTimezone" class="col-sm-2 control-label">Timezone:</label>
<div class="col-sm-10">
<input class="form-control" id="inputTimezone" name="timezone" value="<? VAR Timezone ?>" placeholder="Select your timezone.">
<div class="alert alert-info help-block">E.g. <b>Europe/Berlin</b> or <b>GMT-6</b></div>
<div class="form-group">
<label for="inputTimezone" class="col-sm-2 control-label"><? FORMAT "Timezone:" ?></label>
<div class="col-sm-10">
<input class="form-control" id="inputTimezone" name="timezone" value="<? VAR Timezone ?>" placeholder="<? FORMAT "Select your timezone." ?>">
<div class="alert alert-info help-block"><? FORMAT "E.g. <code>Europe/Berlin</code>, or <code>GMT-6</code>" ?></div>
</div>
</div>
</div>
<div class="form-group">
<label for="inputClientencode" class="col-sm-2 control-label">Client encoding:</label>
<div class="col-sm-10">
<? INC encoding_settings.tmpl ?>
<span class="help-block">Character encoding used between IRC client and ZNC. After changing this, reconnect client to ZNC</span>
<div class="form-group">
<label for="inputClientencode" class="col-sm-2 control-label"><? FORMAT "Client encoding:" ?></label>
<div class="col-sm-10">
<? INC encoding_settings.tmpl ?>
<span class="help-block"><? FORMAT "Character encoding used between IRC client and ZNC." ?></span>
</div>
</div>
</div>
<div class="form-group">
<label for="inputJoinTries" class="col-sm-2 control-label">Join Tries:</label>
<div class="col-sm-10">
<input class="form-control" type="number" id="inputJoinTries" name="jointries" value="<? VAR JoinTries ?>" min="0" placeholder="This defines how often ZNC tries to join, if the first join failed, e.g. due to channel mode +i/+k or if you're banned."/>
<div class="form-group">
<label for="inputJoinTries" class="col-sm-2 control-label"><? FORMAT "Join Tries:" ?></label>
<div class="col-sm-10">
<input class="form-control" type="number" id="inputJoinTries" name="jointries" value="<? VAR JoinTries ?>" min="0" placeholder="<? FORMAT "This defines how many times ZNC tries to join a channel, if the first join failed, e.g. due to channel mode +i/+k or if you are banned." ?>" />
</div>
</div>
</div>
<div class="form-group">
<label for="inputMaxJoins" class="col-sm-2 control-label">Max Joins:</label>
<div class="col-sm-10">
<input class="form-control" type="number" id="inputMaxJoins" name="maxjoins" value="<? VAR MaxJoins ?>" min="0" placeholder="How many channels are joined in one JOIN command. 0 is unlimited (default). Set to small positive value if you get disconnected with `Max SendQ Exceeded'"/>
<div class="form-group">
<label for="inputMaxJoins" class="col-sm-2 control-label"><? FORMAT "Join speed:" ?></label>
<div class="col-sm-10">
<input class="form-control" type="number" id="inputMaxJoins" name="maxjoins" value="<? VAR MaxJoins ?>" min="0" placeholder="<? FORMAT "How many channels are joined in one JOIN command. 0 is unlimited (default). Set to small positive value if you get disconnected with “Max SendQ Exceeded”" ?>" />
</div>
</div>
</div>
<div class="form-group">
<label for="inputmaxIRCnet" class="col-sm-2 control-label">Max IRC Networks Number:</label>
<div class="col-sm-10">
<input class="form-control" type="number" id="inputmaxIRCnet" name="maxnetworks" value="<? VAR MaxNetworks ?>" min="0" placeholder="Maximum number of IRC networks allowed for this user." <? IF !ImAdmin ?>disabled="disabled"<? ENDIF ?> />
<div class="form-group">
<label for="inputmaxIRCnet" class="col-sm-2 control-label"><? FORMAT "Max IRC Networks Number:" ?></label>
<div class="col-sm-10">
<input class="form-control" type="number" id="inputmaxIRCnet" name="maxnetworks" value="<? VAR MaxNetworks ?>" min="0" placeholder="<? FORMAT "Maximum number of IRC networks allowed for this user." ?>" <? IF !ImAdmin ?>disabled="disabled"<? ENDIF ?> />
</div>
</div>
</div>
<div class="form-group">
<label for="inputmaxQueryBuffers" class="col-sm-2 control-label">Max Query Buffers:</label>
<div class="col-sm-10">
<input class="form-control" type="number" id="inputmaxQueryBuffers" name="maxquerybuffers" value="<? VAR MaxQueryBuffers ?>" class="third" min="0" placeholder="Maximum number of query buffers. 0 is unlimited."/>
<div class="form-group">
<label for="notraffictimeout" class="col-sm-2 control-label"><? FORMAT "Timeout before reconnect:" ?></label>
<div class="col-sm-10">
<input class="form-control" type="number" id="notraffictimeout" name="notraffictimeout" value="<? VAR NoTrafficTimeout ?>" class="third" min="30" placeholder="<? FORMAT "How much time ZNC waits (in seconds) until it receives something from network or declares the connection timeout. This happens after attempts to ping the peer." ?>"/>
</div>
</div>
</div>
<!-- Broken. Work is in progress... Hang in there cowboy/girl...
<? SETBLOCK Substitutions_Link ?><a href="https://wiki.znc.in/ExpandString" target="_blank" class="external"><? FORMAT "Substitutions" ?></a><? ENDSETBLOCK ?>
<div class="form-group" id="ctcpreplies_plain">
<label for="inputCTCPreplies" class="col-sm-2 control-label">CTCP Replies:</label>
<div class="col-sm-10">
<textarea class="form-control" id="inputCTCPreplies" name="ctcpreplies" cols="70" rows="3" id="ctcpreplies_text"><? LOOP CTCPLoop ?><? VAR CTCP ?>
<textarea class="form-control" name="ctcpreplies" cols="70" rows="3" id="ctcpreplies_text"><? LOOP CTCPLoop ?><? VAR CTCP ?>
<? ENDLOOP ?></textarea>
<div class="alert alert-info help-block">One reply per line. Example: TIME Buy a watch!</div>
<div class="alert alert-info help-block"><? FORMAT "One reply per line. Example: <code>TIME Buy a watch!</code>" ?></div>
<div class="alert alert-info help-block"><? FORMAT "{1} are available" "Substitutions_Link ESC=" ?></div>
</div>
</div>
<div class="form-group" id="ctcpreplies_js">
<label for="inputCTCPreplies" class="col-sm-2 control-label">CTCP Replies:</label>
<div class="form-group" id="ctcpreplies_js" style="display:none" data-placeholder="<? FORMAT "Empty value means this CTCP request will be ignored" ?>">
<label for="ctcpreplies" class="col-sm-2 control-label"><? FORMAT "CTCP Replies:" ?></label>
<div class="col-sm-10">
<table class="table table-hover">
<thead>
<tr>
<th>Request</th>
<th>Response</th>
<th><? FORMAT "Request" ?></th>
<th><? FORMAT "Response" ?></th>
</tr>
</thead>
<tbody id="ctcpreplies_tbody">
</tbody>
<tbody id="ctcpreplies_tbody" />
</table>
<select class="form-control" id="ctcpreplies_list">
<option value="PING">PING</option>
<option value="FINGER">FINGER</option>
<option value="CLIENTINFO">CLIENTINFO</option>
<option value="USERINFO">USERINFO</option>
<option value="VERSION">VERSION</option>
<option value="SOURCE">SOURCE</option>
<option value="TIME">TIME</option>
<option value="PAGE">PAGE</option>
<option value="DCC">DCC</option>
<option value="UPTIME">UPTIME</option>
</select>
<button type="button" class="btn btn-default" value="Add" id="ctcpreplies_add">Add</button>
<button type="button" class="btn btn-default" value="<? FORMAT "Add" ?>" id="ctcpreplies_add"><? FORMAT "Add" ?></button>
<span class="info"><? FORMAT "{1} are available" "Substitutions_Link ESC=" ?></span>
<datalist id="ctcpreplies_list">
<option value="PING"/>
<option value="FINGER"/>
<option value="CLIENTINFO"/>
<option value="USERINFO"/>
<option value="VERSION"/>
<option value="SOURCE"/>
<option value="TIME"/>
<option value="PAGE"/>
<option value="DCC"/>
<option value="UPTIME"/>
</datalist>
</div>
</div>
</div>
<script type="text/javascript">ctcpreplies_init(jQuery);</script>
-->
<div class="form-group">
<label for="inputCTCPreplies" class="col-sm-2 control-label">CTCP Replies:</label>
<div class="col-sm-10">
<textarea class="form-control" id="inputCTCPreplies" name="ctcpreplies" cols="70" rows="3"><? LOOP CTCPLoop ?><? VAR CTCP ?>
<? ENDLOOP ?></textarea>
<div class="alert alert-info help-block">One reply per line. Example: TIME Buy a watch! &mdash; Some variable-like strings can be found <a href="http://wiki.znc.in/ExpandString" target="_blank">here</a></div>
</div>
</div>
<div class="form-group">
<label for="inputSkins" class="col-sm-2 control-label">Skin(s):</label>
<div class="col-sm-10">
<? IF SkinLoop ROWS > 1 ?>
<select class="form-control" name="skin">
<option value="">- Global -</option>
<? LOOP SkinLoop ?>
<option value="<? VAR Name ?>"<? IF Checked ?> selected="selected"<? ENDIF ?>><? IF Name == "_default_" ?>Default<? ELSE ?><? VAR Name ?><? ENDIF ?></option>
<? ENDLOOP ?>
</select>
<? ELSE ?>
<p>No other skins found!</p>
<? ENDIF ?>
</div>
</div>
</div><!-- ZNC Behavior -->
<!-- Other Modules -->
<div class="tab-pane fade" id="othermodtab">
<? LOOP EmbeddedModuleLoop ?>
<? IF Embed ?>
<div class="form-group">
<label for="input<? VAR ModName ?>" class="col-sm-2 control-label"><? VAR ModName ?>:</label>
<div class="col-sm-10">
<? INC *Embed ?>
<label for="inputSkins" class="col-sm-2 control-label"><? FORMAT "Skin:" ?></label>
<div class="col-sm-10">
<? IF SkinLoop ROWS > 1 ?>
<select class="form-control" name="skin">
<option value=""><? FORMAT "- Global -" ?></option>
<? LOOP SkinLoop ?>
<option value="<? VAR Name ?>"<? IF Checked ?> selected="selected"<? ENDIF ?>><? IF Name == "_default_" ?><? FORMAT "Default" ?><? ELSE ?><? VAR Name ?><? ENDIF ?></option>
<? ENDLOOP ?>
</select>
<? ELSE ?>
<p><? FORMAT "No other skins found" ?></p>
<? ENDIF ?>
</div>
</div>
</div>
<? ENDIF ?>
<? ENDLOOP ?>
</div><!-- Other Modules -->
<div class="form-group">
<label for="language" class="col-sm-2 control-label"><? FORMAT "Language:" ?></label>
<div class="col-sm-10">
<? IF HaveI18N ?>
<select class="form-control" name="language">
<? LOOP LanguageLoop ?>
<option value="<? VAR Code ?>" <? IF Language TOP == *Code ?>selected="selected"<? ENDIF ?>><? VAR Name ?></option>
<? ENDLOOP ?>
</select>
<? ELSE ?>
<p>ZNC is compiled without i18n support!</p>
<? ENDIF ?>
</div>
</div>
</div><!-- ZNC Behavior -->
</div>
</div>
<div class="panel-footer text-right">
<? IF ImAdmin ?>
<? IF ImAdmin ?>
<input class="btn btn-danger" type="reset" value="Reset">
<input class="btn btn-success" type="submit" name="submit_return" value="<? IF Edit ?>Save<? ELSE ?><? IF Clone ?>Clone<? ELSE ?>Create<? ENDIF ?><? ENDIF ?>" />
<input class="btn btn-default" type="submit" name="submit_continue" value="<? IF Edit ?>Save and continue<? ELSE ?><? IF Clone ?>Clone<? ELSE ?>Create<? ENDIF ?><? ENDIF ?>" />
<input class="btn btn-success" type="submit" name="submit_return" value="<? IF Edit ?><? FORMAT "Save and return" ?><? ELSE ?><? IF Clone ?><? FORMAT "Clone and return" ?><? ELSE ?><? FORMAT "Create and return" ?><? ENDIF ?><? ENDIF ?>" />
<input class="btn btn-default" type="submit" name="submit_continue" value="<? IF Edit ?><? FORMAT "Save and continue" ?><? ELSE ?><? IF Clone ?><? FORMAT "Clone and continue" ?><? ELSE ?><? FORMAT "Create and continue" ?><? ENDIF ?><? ENDIF ?>" />
<? ELSE ?>
<input class="btn btn-danger" type="reset" value="Reset">
<input class="btn btn-success" type="submit" value="<? IF Edit ?>Save<? ELSE ?><? IF Clone ?>Clone<? ELSE ?>Create<? ENDIF ?><? ENDIF ?>" />
<input class="btn btn-success" type="submit" value="<? IF Edit ?><? FORMAT "Save" ?><? ELSE ?><? IF Clone ?><? FORMAT "Clone" ?><? ELSE ?><? FORMAT "Create" ?><? ENDIF ?><? ENDIF ?>" />
<? ENDIF ?>
</div>
</div>

@ -1,22 +1,23 @@
<? I18N znc-webadmin ?>
<? INC Header.tmpl ?>
<div class="container">
<div class="row">
<div class="col-md-6 col-md-offset-3">
<div class="panel panel-danger">
<div class="panel-heading">Confirm Network Deletion</div>
<div class="panel-heading"><? FORMAT "Confirm Network Deletion" ?></div>
<div class="panel-body">
<p>Are you absolutely sure you want to delete <b>"<? VAR Network ?>"</b> network, <? VAR Username ?>?</p>
<p><? FORMAT "Are you sure you want to delete network “{2}” of user “{1}”?" Username Network ?></p>
<br>
<center>
<form action="<? VAR URIPrefix TOP ?><? VAR ModPath TOP ?>delnetwork" method="post">
<form action="<? VAR URIPrefix TOP ?><? VAR ModPath TOP ?>delnetwork?user=<? VAR Username ?>&network=<? VAR Network ?>" method="post">
<? INC _csrf_check.tmpl ?>
<input type="hidden" name="user" value="<? VAR Username ?>" />
<input type="hidden" name="name" value="<? VAR Network ?>" />
<input type="submit" class="btn btn-danger btn-xs" value="Yes, I want <? VAR Network ?> deleted" />
<input type="submit" class="btn btn-danger btn-xs" value="<? FORMAT "Yes" ?>" />
</form><br>
<form action="<? VAR URIPrefix TOP ?><? VAR ModPath TOP ?>listusers" method="get">
<input type="submit" class="btn btn-success btn-xs" value="No, I want to keep <? VAR Network ?>" />
<input type="submit" class="btn btn-success btn-xs" value="<? FORMAT "No" ?>" />
</form>
</center>
</div>

@ -1,22 +1,23 @@
<? I18N znc-webadmin ?>
<? INC Header.tmpl ?>
<div class="container">
<div class="row">
<div class="col-md-6 col-md-offset-3">
<div class="panel panel-danger">
<div class="panel-heading">Confirm User Deletion</div>
<div class="panel-heading"><? FORMAT "Confirm User Deletion" ?></div>
<div class="panel-body">
<p>Are you absolutely sure you want to delete "<? VAR Username ?>"?</p>
<p><? FORMAT "Are you sure you want to delete user “{1}”?" Username ?></p>
<br>
<center>
<form action="<? VAR URIPrefix TOP ?><? VAR ModPath TOP ?>deluser" method="post">
<form action="<? VAR URIPrefix TOP ?><? VAR ModPath TOP ?>deluser?user=<? VAR Username ?>" method="post">
<? INC _csrf_check.tmpl ?>
<input type="hidden" name="submitted" value="1" />
<input type="hidden" name="user" value="<? VAR Username ?>" />
<input type="submit" class="btn btn-danger btn-xs" value="Yes, delete <? VAR Username ?>" />
<input type="submit" class="btn btn-danger btn-xs" value="<? FORMAT "Yes" ?>" />
</form><br>
<form action="<? VAR URIPrefix TOP ?><? VAR ModPath TOP ?>listusers" method="get">
<input type="submit" class="btn btn-success btn-xs" value="No, do not delete <? VAR Username ?>" />
<input type="submit" class="btn btn-success btn-xs" value="<? FORMAT "No" ?>" />
</form>
</center>

@ -1,33 +1,35 @@
<? I18N znc-webadmin ?>
<? SETBLOCK Encoding_Placeholder ?><span class="encoding-placeholder-big text-success">&nbsp;&nbsp;<span class="encoding-placeholder"></span>&nbsp;&nbsp;</span><? ENDSETBLOCK ?>
<div class="radio">
<label>
<input type="radio" name="encoding_utf" id="encoding_utf_legacy" value="legacy" <? IF EncodingUtf == "legacy" ?>checked="checked"<? ENDIF ?> <? IF EncodingDisabled ?>disabled="disabled"<? ENDIF ?> />
<span class="help-block" for="encoding_utf_legacy">Don't ensure any encoding at all (legacy mode, not recommended)</span>
<span class="help-block" for="encoding_utf_legacy"><? FORMAT "Don't ensure any encoding at all (legacy mode, not recommended)" ?></span>
</label>
</div>
<div class="radio">
<label>
<input type="radio" name="encoding_utf" id="encoding_utf_send" value="send" <? IF EncodingUtf == "send" ?>checked="checked"<? ENDIF ?> <? IF EncodingDisabled ?>disabled="disabled"<? ENDIF ?> />
<span class="help-block" for="encoding_utf_send">Try to parse as UTF-8 and as <span class="encoding-placeholder-big text-success">&nbsp;&nbsp;<span class="encoding-placeholder"></span>&nbsp;&nbsp;</span>, send as UTF-8</span>
<span class="help-block" for="encoding_utf_send"><? FORMAT "Try to parse as UTF-8 and as {1}, send as UTF-8 (recommended)" "Encoding_Placeholder ESC=" ?></span>
</label>
</div>
<div class="radio">
<label>
<input type="radio" name="encoding_utf" id="encoding_utf_receive" value="receive" <? IF EncodingUtf == "receive" ?>checked="checked"<? ENDIF ?> <? IF EncodingDisabled ?>disabled="disabled"<? ENDIF ?> />
<span class="help-block" for="encoding_utf_receive">Try to parse as UTF-8 and as <span class="encoding-placeholder-big text-success">&nbsp;&nbsp;<span class="encoding-placeholder"></span>&nbsp;&nbsp;</span>, send as <span class="encoding-placeholder-big text-success">&nbsp;&nbsp;<span class="encoding-placeholder"></span >&nbsp;&nbsp;</span>
<span class="help-block" for="encoding_utf_receive"><? FORMAT "Try to parse as UTF-8 and as {1}, send as {1}" "Encoding_Placeholder ESC=" ?></span>
</label>
</div>
<div class="radio">
<label>
<input type="radio" name="encoding_utf" id="encoding_utf_simple" value="simple" <? IF EncodingUtf == "simple" ?>checked="checked"<? ENDIF ?> <? IF EncodingDisabled ?>disabled="disabled"<? ENDIF ?> />
<span class="help-block" for="encoding_utf_simple">Parse and send as <span class="encoding-placeholder-big text-success">&nbsp;&nbsp;<span class="encoding-placeholder"></span>&nbsp;&nbsp;</span> only</span>
<span class="help-block" for="encoding_utf_simple"><? FORMAT "Parse and send as {1} only" "Encoding_Placeholder ESC=" ?></span>
</label>
</div>
<div class="test-text">
<input class="form-control" type="text" name="encoding" placeholder="Enter a text here (e.g. UTF-8 or ISO-8859-15)" value="<? VAR Encoding ?>" list="encoding_list" <? IF EncodingDisabled ?>disabled="disabled"<? ENDIF ?> />
<input class="form-control" type="text" name="encoding" placeholder="<? FORMAT "E.g. <code>UTF-8</code>, or <code>ISO-8859-15</code>" ?>" value="<? VAR Encoding ?>" list="encoding_list" <? IF EncodingDisabled ?>disabled="disabled"<? ENDIF ?> />
</div>
<datalist id="encoding_list">
@ -53,4 +55,4 @@
jQuery("input:radio[name=encoding_utf]").change(updateEncodingLegacy);
updateEncodingLegacy();
</script>
</script>

@ -1,10 +1,11 @@
<? I18N znc-webadmin ?>
<? INC Header.tmpl ?>
<div class="container col-md-10 col-md-offset-1">
<div class="panel panel-default">
<div class="panel-heading">Webadmin</div>
<div class="panel-body">
<p>Welcome to the ZNC webadmin module.<br>All changes you make will be in effect immediately after you submitted them.</p>
<p><? FORMAT "Welcome to the ZNC webadmin module." ?><br><? FORMAT "All changes you make will be in effect immediately after you submitted them." ?></p>
</div>
</div>
</div>

@ -1,60 +1,70 @@
<? I18N znc-webadmin ?>
<? INC Header.tmpl ?>
<div class="container col-md-10 col-md-offset-1">
<div class="panel panel-default">
<div class="panel-heading">List of Users</div>
<div class="panel-body">
<?IF !UserLoop?>
<div class="alert alert-warning">
There are no users defined. Click <a href="<? VAR URIPrefix TOP ?><? VAR ModPath TOP ?>adduser">here</a> if you would like to add one.
</div>
<?ELSE?>
<div class="row">
<div class="col-md-4 col-md-offset-8">
<div class="input-group custom-search-form" style=".custom-search-form{margin-top:5px;}">
<input class="form-control" id="system-search" name="q" placeholder="Search..." required>
<span class="input-group-btn">
<button type="submit" class="btn btn-default">
<span class="fa fa-search"></span>
</button>
</span>
<div class="panel-body">
<?IF !UserLoop?>
<div class="alert alert-warning">
<? FORMAT "There are no users defined. Click <a href="{1}adduser">here</a> if you would like to add one." "ModPath TOP" ?>
</div>
<?ELSE?>
<div class="table">
<input type="text" class="form-control input-lg" id="inputSearch" onkeyup="UserSearch()" placeholder="Search..." title="Type in a user">
<br>
<table class="table table-bordered table-hover" id="users">
<thead>
<tr class="header">
<th><a href="<? VAR URIPrefix TOP ?><? VAR ModPath TOP ?>adduser" class="btn btn-default btn-xs"><? FORMAT "Add" ?></a></th>
<th><? FORMAT "Username" ?></th>
<th><? FORMAT "Networks" ?></th>
<th><? FORMAT "Clients" ?></th>
</tr>
</thead>
<tbody>
<?LOOP UserLoop SORTASC=Username ?>
<tr class="<?IF __EVEN__?>evenrow<?ELSE?>oddrow<?ENDIF?>">
<td>
<span class="nowrap">
<a href="<? VAR URIPrefix TOP ?><? VAR ModPath TOP ?>edituser?user=<?VAR Username ESC=URL?>" class="btn btn-primary btn-xs"><? FORMAT "Edit" ?></a>
<a href="<? VAR URIPrefix TOP ?><? VAR ModPath TOP ?>adduser?clone=<? VAR Username ESC=URL ?>" alt="Clone <? VAR Username ESC=URL ?>" class="btn btn-warning btn-xs"><? FORMAT "Clone" ?></a>
<? IF !IsSelf ?><a href="<? VAR URIPrefix TOP ?><? VAR ModPath TOP ?>deluser?user=<?VAR Username ESC=URL?>" class="btn btn-danger btn-xs"><? FORMAT "Delete" ?></a><? ENDIF ?>
</span>
</td>
<td><? VAR Username ?></td>
<td><? VAR Networks ?></td>
<td><? VAR Clients ?></td>
</tr>
<?ENDLOOP?>
</tbody>
</table>
<?ENDIF?>
</div>
</div>
<br>
<table class="table table-bordered table-hover table-striped table-list-search">
<thead>
<tr>
<td><a href="<? VAR URIPrefix TOP ?><? VAR ModPath TOP ?>adduser" class="btn btn-default btn-xs">Add</a></td>
<td>Username</td>
<td>Networks</td>
<td>Clients</td>
</tr>
</thead>
<tbody>
<?LOOP UserLoop SORTASC=Username ?>
<tr class="<?IF __EVEN__?>evenrow<?ELSE?>oddrow<?ENDIF?>">
<td>
<span class="nowrap">
<a href="<? VAR URIPrefix TOP ?><? VAR ModPath TOP ?>edituser?user=<?VAR Username ESC=URL?>" class="btn btn-primary btn-xs">Edit</a>
<a href="<? VAR URIPrefix TOP ?><? VAR ModPath TOP ?>adduser?clone=<? VAR Username ESC=URL ?>" alt="Clone <? VAR Username ESC=URL ?>" class="btn btn-warning btn-xs">Clone</a>
<? IF !IsSelf ?><a href="<? VAR URIPrefix TOP ?><? VAR ModPath TOP ?>deluser?user=<?VAR Username ESC=URL?>" class="btn btn-danger btn-xs">Delete</a><? ENDIF ?>
</span>
</td>
<td><? VAR Username ?></td>
<td><? VAR Networks ?></td>
<td><? VAR Clients ?></td>
</tr>
<?ENDLOOP?>
</tbody>
</table>
<?ENDIF?>
</div>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">$(document).ready(function(){var e=$(".list-group-item.active");$("#system-search").keyup(function(){var e=this;var t=$(".table-list-search tbody");var n=$(".table-list-search tbody tr");$(".search-sf").remove();n.each(function(r,i){var s=$(i).text().toLowerCase();var o=$(e).val().toLowerCase();if(o!=""){$(".search-query-sf").remove();t.prepend('<tr class="search-query-sf"><td colspan="6"><strong>Searching for: "'+$(e).val()+'"</strong></td></tr>')}else{$(".search-query-sf").remove()}if(s.indexOf(o)==-1){n.eq(r).hide()}else{$(".search-sf").remove();n.eq(r).show()}});if(n.children(":visible").length==0){t.append('<tr class="search-sf"><td class="text-muted" colspan="6">No entries found.</td></tr>')}})})</script>
<script>
function UserSearch() {
var input, filter, table, tr, td, i;
input = document.getElementById("inputSearch");
filter = input.value.toUpperCase();
table = document.getElementById("users");
tr = table.getElementsByTagName("tr");
for (i = 0; i < tr.length; i++) {
td = tr[i].getElementsByTagName("td")[1];
if (td) {
if (td.innerHTML.toUpperCase().indexOf(filter) > -1) {
tr[i].style.display = "";
} else {
tr[i].style.display = "none";
}
}
}
}
</script>
<? INC Footer.tmpl ?>

@ -1,12 +1,13 @@
<? I18N znc-webadmin ?>
<? INC Header.tmpl ?>
<div class="container col-md-10 col-md-offset-1">
<div class="panel with-nav-tabs panel-default">
<div class="panel-heading">
<ul class="nav nav-tabs">
<li class="active"><a href="#listenporttab" data-toggle="tab">Listen Port(s)</a></li>
<li><a href="#settingstab" data-toggle="tab">Settings</a></li>
<li><a href="#globalmodtab" data-toggle="tab">Global Modules</a></li>
<li class="active"><a href="#listenporttab" data-toggle="tab"><? FORMAT "Listen Port(s)" ?></a></li>
<li><a href="#settingstab" data-toggle="tab"><? FORMAT "Settings" ?></a></li>
<li><a href="#globalmodtab" data-toggle="tab"><? FORMAT "Global Modules" ?></a></li>
</ul>
</div>
<div class="panel-body">
@ -16,14 +17,15 @@
<table class="table table-bordered table-hover table-striped">
<thead>
<tr>
<td>Port</td>
<td>BindHost</td>
<td>SSL</td>
<td>IPv4</td>
<td>IPv6</td>
<td>IRC</td>
<td>Web</td>
<td>URIPrefix</td>
<th><? FORMAT "Port" ?></th>
<th><? FORMAT "BindHost" ?></th>
<th><? FORMAT "SSL" ?></th>
<th><? FORMAT "IPv4" ?></th>
<th><? FORMAT "IPv6" ?></th>
<th><? FORMAT "IRC" ?></th>
<th><? FORMAT "HTTP" ?></th>
<th><? FORMAT "URIPrefix" ?></th>
<th><? FORMAT "Delete" ?></th>
</tr>
</thead>
<? LOOP ListenLoop ?>
@ -70,8 +72,10 @@
<input name="ssl" type="hidden" value="<? VAR IsSSL ?>"/>
<input name="ipv4" type="hidden" value="<? VAR IsIPV4 ?>"/>
<input name="ipv6" type="hidden" value="<? VAR IsIPV6 ?>"/>
<input type="submit" class="btn btn-danger btn-xs" value="Del"/>
<input type="submit" class="btn btn-danger btn-xs" value="<? FORMAT "Del" ?>"/>
</form>
<? ELSE ?>
<input name="unavailable" type="text" disabled="disabled" title="<? FORMAT "To delete port which you use to access webadmin itself, either connect to webadmin via another port, or do it in IRC (/znc DelPort)" ?>" value="<? FORMAT "Current" ?>" />
<? ENDIF ?>
</td>
</tr>
@ -116,7 +120,7 @@
</div>
</td>
<td><input type="text" class="form-control" name="uriprefix" value="/"></td>
<td><input type="submit" class="btn btn-primary btn-xs" value="Add"/></td>
<td><input type="submit" class="btn btn-primary btn-xs" value="<? FORMAT "Add" ?>"/></td>
</form>
</tr>
</table>
@ -128,93 +132,95 @@
<? INC _csrf_check.tmpl ?>
<input type="hidden" name="submitted" value="1" />
<div class="form-group">
<label for="inputSkins" class="col-sm-2 control-label">Skin(s):</label>
<label for="inputSkins" class="col-sm-2 control-label"><? FORMAT "Skin:" ?></label>
<div class="col-sm-10">
<select class="form-control" id="inputSkins" name="skin">
<? LOOP SkinLoop ?>
<option value="<? VAR Name ?>"<? IF Checked ?> selected="selected"<? ENDIF ?>><? IF Name == "_default_" ?>Default<? ELSE ?><? VAR Name ?><? ENDIF ?></option>
<option value="<? VAR Name ?>"<? IF Checked ?> selected="selected"<? ENDIF ?>><? IF Name == "_default_" ?><? FORMAT "Default" ?><? ELSE ?><? VAR Name ?><? ENDIF ?></option>
<? ENDLOOP ?>
</select>
</div>
</div>
<div class="form-group">
<label for="inputStatusPrefix" class="col-sm-2 control-label">Status Prefix:</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="inputStatusPrefix" value="<? VAR StatusPrefix ?>" placeholder="The prefix for the status and module queries."/>
<div class="alert alert-info help-block">Default for new users only.</div>
<label for="inputStatusPrefix" class="col-sm-2 control-label"><? FORMAT "Status Prefix:" ?></label>
<div class="col-sm-10">
<input type="text" class="form-control" id="inputStatusPrefix" value="<? VAR StatusPrefix ?>" placeholder="<? FORMAT "The prefix for the status and module queries." ?>"/>
<div class="alert alert-info help-block"><? FORMAT "Default for new users only." ?></div>
</div>
</div>
</div>
<div class="form-group">
<label for="inputmaxBufferSize" class="col-sm-2 control-label">Maximum Buffer Size:</label>
<div class="col-sm-10">
<input type="number" class="form-control" id="inputmaxBufferSize" name="maxbufsize" value="<? VAR MaxBufferSize ?>" placeholder="Sets the global Max Buffer Size a user can have."/>
<div class="form-group">
<label for="inputmaxBufferSize" class="col-sm-2 control-label"><? FORMAT "Maximum Buffer Size:" ?></label>
<div class="col-sm-10">
<input type="number" class="form-control" id="inputmaxBufferSize" name="maxbufsize" value="<? VAR MaxBufferSize ?>" placeholder="<? FORMAT "Sets the global Max Buffer Size a user can have." ?>"/>
</div>
</div>
</div>
<div class="form-group">
<label for="inputConnectDelay" class="col-sm-2 control-label">Connect Delay:</label>
<div class="col-sm-10">
<input type="number" class="form-control" id="inputConnectDelay" name="connectdelay" value="<? VAR ConnectDelay ?>" placeholder="The time every connection will be delayed, in seconds. Some servers refuse your connection if you reconnect too fast. This affects the connection between ZNC and the IRC server; not the connection between your IRC client and ZNC. "/>
<div class="form-group">
<label for="inputConnectDelay" class="col-sm-2 control-label"><? FORMAT "Connect Delay:" ?></label>
<div class="col-sm-10">
<input type="number" class="form-control" id="inputConnectDelay" name="connectdelay" value="<? VAR ConnectDelay ?>" placeholder="<? FORMAT "The time between connection attempts to IRC servers, in seconds. This affects the connection between ZNC and the IRC server; not the connection between your IRC client and ZNC." ?>" />
</div>
</div>
</div>
<div class="form-group">
<label for="inputServerThrottle" class="col-sm-2 control-label">Server Throttle:</label>
<div class="col-sm-10">
<input type="number" class="form-control" id="inputServerThrottle" name="serverthrottle" value="<? VAR ServerThrottle ?>" placeholder="The time between two connect attempts to the same hostname." />
<div class="form-group">
<label for="inputServerThrottle" class="col-sm-2 control-label"><? FORMAT "Server Throttle:" ?></label>
<div class="col-sm-10">
<input type="number" class="form-control" id="inputServerThrottle" name="serverthrottle" value="<? VAR ServerThrottle ?>" placeholder="<? FORMAT "The minimal time between two connect attempts to the same hostname, in seconds. Some servers refuse your connection if you reconnect too fast." ?>" />
</div>
</div>
</div>
<div class="form-group">
<label for="inputAnonIPLimit" class="col-sm-2 control-label">Anonymous IP Limit:</label>
<div class="col-sm-10">
<input type="number" class="form-control" id="inputAnonIPLimit" name="anoniplimit" value="<? VAR AnonIPLimit ?>" placeholder="Limits the number of unidentified connections per IP." />
<div class="form-group">
<label for="inputAnonIPLimit" class="col-sm-2 control-label"><? FORMAT "Anonymous Connection Limit per IP:" ?></label>
<div class="col-sm-10">
<input type="number" class="form-control" id="inputAnonIPLimit" name="anoniplimit" value="<? VAR AnonIPLimit ?>" placeholder="<? FORMAT "Limits the number of unidentified connections per IP." ?>" />
</div>
</div>
</div>
<div class="form-group">
<label for="inputprotectWeb" class="col-sm-2 control-label">Protect Web Sessions:</label>
<div class="col-sm-10">
<div class="switch">
<input type="checkbox" name="protectwebsessions" id="protectwebsessions_checkbox" class="cmn-toggle cmn-toggle-round-flat"<? IF ProtectWebSessions ?> checked="checked"<? ENDIF ?> />
<label for="protectwebsessions_checkbox"></label>
<div class="alert alert-info help-block">Disallow IP changing during each web session</div>
<div class="form-group">
<label for="inputprotectWeb" class="col-sm-2 control-label"><? FORMAT "Protect Web Sessions:" ?></label>
<div class="col-sm-10">
<div class="switch">
<input type="checkbox" name="protectwebsessions" id="protectwebsessions_checkbox" class="cmn-toggle cmn-toggle-round-flat"<? IF ProtectWebSessions ?> checked="checked"<? ENDIF ?> />
<label for="protectwebsessions_checkbox"></label>
<div class="alert alert-info help-block"><? FORMAT "Disallow IP changing during each web session" ?></div>
</div>
</div>
</div>
</div>
<div class="form-group">
<label for="inputhideversion" class="col-sm-2 control-label">Hide ZNC Version:</label>
<div class="col-sm-10">
<div class="switch">
<input type="checkbox" name="hideversion" id="hideversion_checkbox" class="cmn-toggle cmn-toggle-round-flat"<? IF HideVersion ?> checked="checked"<? ENDIF ?> />
<label for="hideversion_checkbox"></label>
<div class="alert alert-info help-block">Hide version number from non-ZNC users</div>
<div class="form-group">
<label for="inputhideversion" class="col-sm-2 control-label"><? FORMAT "Hide ZNC Version:" ?></label>
<div class="col-sm-10">
<div class="switch">
<input type="checkbox" name="hideversion" id="hideversion_checkbox" class="cmn-toggle cmn-toggle-round-flat"<? IF HideVersion ?> checked="checked"<? ENDIF ?> />
<label for="hideversion_checkbox"></label>
<div class="alert alert-info help-block"><? FORMAT "Hide version number from non-ZNC users" ?></div>
</div>
</div>
</div>
</div>
<div class="form-group">
<label for="inputauthonlyviamodule" class="col-sm-2 control-label"><? FORMAT "Auth Only Via Module:" ?></label>
<div class="col-sm-10">
<div class="switch">
<input type="checkbox" name="authonlyviamodule" id="authonlyviamodule_checkbox" class="cmn-toggle cmn-toggle-round-flat"<? IF AuthOnlyViaModule ?> checked="checked"<? ENDIF ?> />
<label for="authonlyviamodule_checkbox"></label>
<div class="alert alert-info help-block"><? FORMAT "Allow user authentication by external modules only" ?></div>
</div>
</div>
</div>
<div class="form-group">
<label for="inputMOTD" class="col-sm-2 control-label">MOTD:</label>
<label for="inputMOTD" class="col-sm-2 control-label"><? FORMAT "MOTD:" ?></label>
<div class="col-sm-10">
<textarea class="form-control" id="inputMOTD" name="motd" rows="5" class="monospace"><? LOOP MOTDLoop ?><? VAR Line ?>
<? ENDLOOP ?>
</textarea>
<div class="alert alert-info help-block">"Message of the Day", sent to all ZNC users on connect.</div>
</div>
<div class="alert alert-info help-block"><? FORMAT "“Message of the Day”, sent to all ZNC users on connect." ?></div>
</div>
</div>
<div class="form-group">
<label for="inputBindHosts" class="col-sm-2 control-label">BindHosts:</label>
<div class="col-sm-10">
<textarea type="text" class="form-control" id="inputBindHosts" name="bindhosts" rows="5"><? LOOP BindHostLoop ?><? VAR BindHost ?>
<? ENDLOOP ?>
</textarea>
<div class="alert alert-info help-block">One host name or IP entry per line.</div>
</div>
</div>
</div><!-- Settings -->
<!-- Global Module Settings -->
@ -222,12 +228,12 @@
<table class="table table-bordered table-hover table-striped">
<thead>
<tr>
<td>Status</td>
<td>Name</td>
<td>Arguments</td>
<td>Description</td>
<td>Global</td>
<td>Networks</td>
<th></th>
<th><? FORMAT "Name" ?></th>
<th><? FORMAT "Arguments" ?></th>
<th><? FORMAT "Description" ?></th>
<th><? FORMAT "Loaded by networks" ?></th>
<th><? FORMAT "Loaded by users" ?></th>
</tr>
</thead>
<tbody>
@ -283,7 +289,7 @@
<div class="panel-footer text-right">
<input class="btn btn-danger" type="reset" value="Reset">
<input class="btn btn-success" type="submit" value="Save" />
<input class="btn btn-success" type="submit" value="<? FORMAT "Save" ?>" />
</div>
</div>

@ -1,8 +1,9 @@
<? I18N znc-webadmin ?>
<? INC Header.tmpl ?>
<div class="container col-md-10 col-md-offset-1">
<div class="panel panel-default">
<div class="panel-heading">Traffic Information</div>
<div class="panel-heading"><? FORMAT "Information" ?></div>
<div class="panel-body">
<div class="row">
<div class="col-md-6"><div id="totalstats"></div></div>
@ -58,10 +59,10 @@
<table class="table table-bordered table-hover">
<tbody>
<tr>
<th>Uptime</th>
<th><? FORMAT "Uptime" ?></th>
<td><? VAR Uptime ?></td>
<td>
<div class="progress" data-toggle="tooltip" data-placement="right" data-original-title="<? VAR Uptime ?> Uptime">
<div class="progress" data-toggle="tooltip" data-placement="right" data-original-title="<? VAR Uptime ?> <? FORMAT "Uptime" ?>">
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100" style="width: 100%;">
</div>
</div>
@ -69,52 +70,52 @@
</tr>
<? IF IsAdmin ?>
<tr>
<th>Total Users</th>
<th><? FORMAT "Total Users" ?></th>
<td>
<? VAR TotalUsers ?>
</td>
<td>
<div class="progress" data-toggle="tooltip" data-placement="right" data-original-title="<? VAR TotalUsers ?> Total Users">
<div class="progress" data-toggle="tooltip" data-placement="right" data-original-title="<? VAR TotalUsers ?> <? FORMAT "Total Users" ?>">
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="<? VAR TotalUsers ?>" aria-valuemin="0" aria-valuemax="500" style="width: <? VAR TotalUsers ?>%">
</div>
</div>
</td>
</tr>
<tr>
<th>Total Networks</th>
<th><? FORMAT "Total Networks" ?></th>
<td><? VAR TotalNetworks ?></td>
<td>
<div class="progress" data-toggle="tooltip" data-placement="right" data-original-title="<? VAR TotalNetworks ?> Total Networks">
<div class="progress" data-toggle="tooltip" data-placement="right" data-original-title="<? VAR TotalNetworks ?> <? FORMAT "Total Networks" ?>">
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="<? VAR TotalNetworks ?>" aria-valuemin="0" aria-valuemax="500" style="width: <? VAR TotalNetworks ?>%">
</div>
</div>
</td>
</tr>
<tr>
<th>Attached Networks</th>
<th><? FORMAT "Attached Networks" ?></th>
<td><? VAR AttachedNetworks ?></td>
<td>
<div class="progress" data-toggle="tooltip" data-placement="right" data-original-title="<? VAR AttachedNetworks ?> Attached Networks">
<div class="progress" data-toggle="tooltip" data-placement="right" data-original-title="<? VAR AttachedNetworks ?> <? FORMAT "Attached Networks" ?>">
<div class="progress-bar" role="progressbar" aria-valuenow="<? VAR AttachedNetworks ?>" aria-valuemin="0" aria-valuemax="500" style="width: <? VAR AttachedNetworks ?>%;">
</div>
</div>
</td>
</tr>
<tr>
<th>Total Client Connections</th>
<th><? FORMAT "Total Client Connections" ?></th>
<td><? VAR TotalCConnections ?></td>
<td>
<div class="progress" data-toggle="tooltip" data-placement="right" data-original-title="<? VAR TotalCConnections ?> Total Client Connections">
<div class="progress" data-toggle="tooltip" data-placement="right" data-original-title="<? VAR TotalCConnections ?> <? FORMAT "Total Client Connections" ?>">
<div class="progress-bar" role="progressbar" aria-valuenow="<? VAR TotalCConnections ?>" aria-valuemin="0" aria-valuemax="500" style="width: <? VAR TotalCConnections ?>%;">
</div>
</div>
</td>
</tr>
<tr>
<th>Total IRC Connections</th>
<th><? FORMAT "Total IRC Connections" ?></th>
<td><? VAR TotalIRCConnections ?></td>
<td>
<div class="progress" data-toggle="tooltip" data-placement="right" data-original-title="<? VAR TotalIRCConnections ?> Total IRC Connections">
<div class="progress" data-toggle="tooltip" data-placement="right" data-original-title="<? VAR TotalIRCConnections ?> <? FORMAT "Total IRC Connections" ?>">
<div class="progress-bar" role="progressbar" aria-valuenow="<? VAR TotalIRCConnections ?>" aria-valuemin="0" aria-valuemax="500" style="width: <? VAR TotalIRCConnections ?>%;">
</div>
</div>
@ -140,10 +141,10 @@
<table class="table table-bordered table-hover table-striped table-list-search">
<thead>
<tr>
<td>Username</td>
<td>In</td>
<td>Out</td>
<td>Total</td>
<td></td>
<th><? FORMAT CTX="Traffic" "In" ?></th>
<th><? FORMAT CTX="Traffic" "Out" ?></th>
<th><? FORMAT "Total" ?></th>
</tr>
</thead>
<tbody>
@ -158,19 +159,19 @@
<? ENDREM ?>
<? IF __LAST__ ?>
<tr>
<td>User Total</td>
<td><? FORMAT "Users" ?></td>
<td><? VAR UserIn TOP ?></td>
<td><? VAR UserOut TOP ?></td>
<td><? VAR UserTotal TOP ?></td>
</tr>
<tr>
<td>ZNC Total</td>
<td>ZNC</td>
<td><? VAR ZNCIn TOP ?></td>
<td><? VAR ZNCOut TOP ?></td>
<td><? VAR ZNCTotal TOP ?></td>
</tr>
<tr>
<td>Grand Total</td>
<td><? FORMAT "Total" ?></td>
<td><? VAR AllIn TOP ?></td>
<td><? VAR AllOut TOP ?></td>
<td><? VAR AllTotal TOP ?></td>

Loading…
Cancel
Save