Initial commit
This commit is contained in:
		
							
								
								
									
										143
									
								
								modules/webadmin/files/webadmin.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										143
									
								
								modules/webadmin/files/webadmin.js
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,143 @@
 | 
			
		||||
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.length == 0) 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();
 | 
			
		||||
 })();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* Broken. Work is in progress... Hang in there cowboy/girl...
 | 
			
		||||
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/>").val(request)
 | 
			
		||||
				.addClass("ctcpreplies_row_request")
 | 
			
		||||
				.attr({"type":"text","list":"ctcpreplies_list"})),
 | 
			
		||||
			$("<td/>").append($("<input/>").val(response)
 | 
			
		||||
				.addClass("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))
 | 
			
		||||
		);
 | 
			
		||||
		$("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();
 | 
			
		||||
	})();
 | 
			
		||||
}
 | 
			
		||||
*/
 | 
			
		||||
							
								
								
									
										106
									
								
								modules/webadmin/tmpl/add_edit_chan.tmpl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										106
									
								
								modules/webadmin/tmpl/add_edit_chan.tmpl
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,106 @@
 | 
			
		||||
<? INC Header.tmpl ?>
 | 
			
		||||
 | 
			
		||||
<form class="form-horizontal" role="form" action="<? IF Edit ?>editchan<? ELSE ?>addchan<? ENDIF ?>" method="post">
 | 
			
		||||
	<? INC _csrf_check.tmpl ?>
 | 
			
		||||
	<div class="section">
 | 
			
		||||
		<input type="hidden" name="submitted" value="1" />
 | 
			
		||||
		<input type="hidden" name="user" value="<? VAR User ?>" />
 | 
			
		||||
		<input type="hidden" name="network" value="<? VAR Network ?>" />
 | 
			
		||||
		<? IF Edit ?>
 | 
			
		||||
			<input type="hidden" name="name" value="<? VAR ChanName ?>" />
 | 
			
		||||
		<? ENDIF ?>
 | 
			
		||||
 | 
			
		||||
<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="#chaninfotab" data-toggle="tab">Channel Info</a></li>
 | 
			
		||||
				<li><a href="#flagstab" data-toggle="tab">Flags</a></li>
 | 
			
		||||
				<li><a href="#othermods" data-toggle="tab">More</a></li>
 | 
			
		||||
			</ul>
 | 
			
		||||
        </div>
 | 
			
		||||
 | 
			
		||||
		<div class="panel-body">
 | 
			
		||||
            <div class="tab-content">
 | 
			
		||||
				<!-- Channel Info -->
 | 
			
		||||
                <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>
 | 
			
		||||
							<div class="col-sm-10">
 | 
			
		||||
								<input class="form-control" id="inputlabelChanName" type="text" name="name" value="" placeholder="The channel name.">
 | 
			
		||||
							</div>
 | 
			
		||||
						</div>
 | 
			
		||||
					<? ENDIF ?>
 | 
			
		||||
 | 
			
		||||
						<div class="form-group">
 | 
			
		||||
						<label for="inputlabelKey" class="col-sm-2 control-label">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.">
 | 
			
		||||
							</div>
 | 
			
		||||
						</div>
 | 
			
		||||
  
 | 
			
		||||
						<div class="form-group">
 | 
			
		||||
						<label for="inputlabelBufferCount" class="col-sm-2 control-label">Buffer Count:</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.">
 | 
			
		||||
							</div>
 | 
			
		||||
						</div>
 | 
			
		||||
  
 | 
			
		||||
					<div class="form-group">
 | 
			
		||||
					<label for="inputDefaultModes" class="col-sm-2 control-label">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.">
 | 
			
		||||
						</div>
 | 
			
		||||
					</div>				 
 | 
			
		||||
				</div> <!-- Channel Info -->
 | 
			
		||||
				
 | 
			
		||||
				<!-- Flags -->
 | 
			
		||||
				<div class="tab-pane fade" id="flagstab">
 | 
			
		||||
					<div class="col-md-6 col-md-offset-3">
 | 
			
		||||
						<table class="table table-bordered table-hover table-striped">
 | 
			
		||||
							<thead>
 | 
			
		||||
								<tr>
 | 
			
		||||
									<td>Status</td>
 | 
			
		||||
									<td>Flag Title</td>
 | 
			
		||||
								</tr>
 | 
			
		||||
							</thead>
 | 
			
		||||
							<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>
 | 
			
		||||
								</tr>
 | 
			
		||||
								<? LOOP OptionLoop ?>
 | 
			
		||||
								<tr>
 | 
			
		||||
									<td><div class="switch"><input type="checkbox" name="<? VAR Name ?>" id="opt_<? VAR Name ?>" class="cmn-toggle cmn-toggle-round-flat" value="true"<? IF Checked ?> checked="checked"<? ENDIF ?><? IF Disabled ?> disabled="disabled"<? ENDIF ?> /> <label for="opt_<? VAR Name ?>"></label> </div></td>
 | 
			
		||||
									<td><? VAR DisplayName ?></td>		 
 | 
			
		||||
								</tr>
 | 
			
		||||
								<? ENDLOOP ?>	
 | 
			
		||||
							</tbody>
 | 
			
		||||
						</table>
 | 
			
		||||
					</div>
 | 
			
		||||
				</div> <!-- Flags -->	
 | 
			
		||||
	
 | 
			
		||||
			<!-- Other Modules -->
 | 
			
		||||
			<div class="tab-pane fade" id="othermods">
 | 
			
		||||
			<? LOOP EmbeddedModuleLoop ?>
 | 
			
		||||
				<? IF Embed ?>
 | 
			
		||||
					<h3>Module <? VAR ModName ?></h3>
 | 
			
		||||
					<? INC *Embed ?>
 | 
			
		||||
				<? ENDIF ?>
 | 
			
		||||
			<? ENDLOOP ?>			
 | 
			
		||||
			</div> <!-- Other Modules -->	
 | 
			
		||||
		</div>
 | 
			
		||||
	</div>
 | 
			
		||||
	
 | 
			
		||||
	<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 ?>" />
 | 
			
		||||
	</div>
 | 
			
		||||
			
 | 
			
		||||
		
 | 
			
		||||
	</div>
 | 
			
		||||
</div>
 | 
			
		||||
</form>
 | 
			
		||||
<? INC Footer.tmpl ?>
 | 
			
		||||
							
								
								
									
										319
									
								
								modules/webadmin/tmpl/add_edit_network.tmpl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										319
									
								
								modules/webadmin/tmpl/add_edit_network.tmpl
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,319 @@
 | 
			
		||||
<? AddRow JSLoop HREF=/modfiles/global/webadmin/webadmin.js ?>
 | 
			
		||||
<? INC Header.tmpl ?>
 | 
			
		||||
 | 
			
		||||
<form class="form-horizontal" role="form" action="<? IF Edit ?>editnetwork<? ELSE ?>addnetwork<? ENDIF ?>" method="post">
 | 
			
		||||
	<? INC _csrf_check.tmpl ?>
 | 
			
		||||
	<div class="section">
 | 
			
		||||
		<input type="hidden" name="submitted" value="1" />
 | 
			
		||||
		<input type="hidden" name="user" value="<? VAR Username ?>" />
 | 
			
		||||
		<input type="hidden" name="network" value="<? VAR Name ?>" />
 | 
			
		||||
 | 
			
		||||
<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="#netinfotab" data-toggle="tab">Network Info</a></li>
 | 
			
		||||
				<li><a href="#floodprotab" data-toggle="tab">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>
 | 
			
		||||
            </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 ?><network><? ENDIF ?>:<password></code> or username field as <code><? VAR Username ?>/<? IF Edit ?><? VAR Name ?><? ELSE ?><network><? 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>
 | 
			
		||||
 | 
			
		||||
				<div class="form-group">
 | 
			
		||||
				<label for="inputNetworkName" class="col-sm-2 control-label">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">
 | 
			
		||||
					</div>
 | 
			
		||||
				</div>
 | 
			
		||||
 | 
			
		||||
				<div class="form-group">
 | 
			
		||||
				<label for="inputNickname" class="col-sm-2 control-label">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.">
 | 
			
		||||
					</div>
 | 
			
		||||
				</div>
 | 
			
		||||
 | 
			
		||||
				<div class="form-group">
 | 
			
		||||
				<label for="inputAltNickname" class="col-sm-2 control-label">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.">
 | 
			
		||||
					</div>
 | 
			
		||||
				</div>
 | 
			
		||||
 | 
			
		||||
				<div class="form-group">
 | 
			
		||||
				<label for="inputIdent" class="col-sm-2 control-label">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.">
 | 
			
		||||
					</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="128" placeholder="Your real name.">
 | 
			
		||||
					</div>
 | 
			
		||||
				</div>
 | 
			
		||||
 | 
			
		||||
				<? IF BindHostEdit ?>
 | 
			
		||||
				<div class="form-group">
 | 
			
		||||
				<label for="inputBindHost" class="col-sm-2 control-label">BindHost:</label>
 | 
			
		||||
					<div class="col-sm-10">
 | 
			
		||||
					<? IF BindHostLoop ?>
 | 
			
		||||
						<select class="form-control" name="bindhost">
 | 
			
		||||
							<option value="">Default</option>
 | 
			
		||||
								<? LOOP BindHostLoop ?>
 | 
			
		||||
									<option value="<? VAR BindHost ?>"<? IF Checked ?> selected="selected"<? ENDIF ?>><? VAR BindHost ?></option>
 | 
			
		||||
								<? ENDLOOP ?>
 | 
			
		||||
						</select>
 | 
			
		||||
					<? ELSE ?>
 | 
			
		||||
						<input class="form-control" type="text" name="bindhost" value="<? VAR BindHost ?>"/>
 | 
			
		||||
					<? ENDIF ?>
 | 
			
		||||
					</div>
 | 
			
		||||
				</div>
 | 
			
		||||
				<? ENDIF ?>
 | 
			
		||||
 | 
			
		||||
				<div class="form-group">
 | 
			
		||||
				<label for="inputQuit" class="col-sm-2 control-label">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.">
 | 
			
		||||
					</div>
 | 
			
		||||
				</div>
 | 
			
		||||
 | 
			
		||||
				<div class="form-group">
 | 
			
		||||
				<label for="inputActive" class="col-sm-2 control-label">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 & 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="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>
 | 
			
		||||
				</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="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>
 | 
			
		||||
				</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>
 | 
			
		||||
					<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>
 | 
			
		||||
					</div>
 | 
			
		||||
				</div>
 | 
			
		||||
			</div> <!-- Network Info -->
 | 
			
		||||
 | 
			
		||||
			 <!-- 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>
 | 
			
		||||
					<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>
 | 
			
		||||
						</div>
 | 
			
		||||
					</div>
 | 
			
		||||
				</div>
 | 
			
		||||
 | 
			
		||||
				<div class="form-group">
 | 
			
		||||
				<label for="inputFloodproRate" class="col-sm-2 control-label">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>
 | 
			
		||||
					</div>
 | 
			
		||||
				</div>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
				<div class="form-group">
 | 
			
		||||
				<label for="inputFloodproBurst" class="col-sm-2 control-label">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>
 | 
			
		||||
					</div>
 | 
			
		||||
				</div>
 | 
			
		||||
 | 
			
		||||
				<div class="form-group">
 | 
			
		||||
				<label for="inputChanjoindelay" class="col-sm-2 control-label">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>
 | 
			
		||||
					</div>
 | 
			
		||||
				</div>
 | 
			
		||||
 | 
			
		||||
				<script type="text/javascript">floodprotection_change();</script>
 | 
			
		||||
			</div> <!-- Flood Protection -->
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
			 <!-- 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>
 | 
			
		||||
						<div class="col-sm-10">
 | 
			
		||||
							<? INC encoding_settings.tmpl ?>
 | 
			
		||||
						</div>
 | 
			
		||||
				</div>
 | 
			
		||||
			</div> <!-- Server Encoding -->
 | 
			
		||||
 | 
			
		||||
			<!-- 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 />
 | 
			
		||||
				<? ELSE ?>
 | 
			
		||||
				<table class="table table-bordered table-hover table-striped">
 | 
			
		||||
					<thead>
 | 
			
		||||
						<tr>
 | 
			
		||||
							<td><a href="addchan?user=<? VAR Username ESC=URL ?>&network=<? VAR Name ESC=URL ?>" class="btn btn-primary btn-xs">Add</a></td>
 | 
			
		||||
							<? IF ChannelLoop ?>
 | 
			
		||||
							<td>Save</td>
 | 
			
		||||
							<td>Name</td>
 | 
			
		||||
							<td>CurModes</td>
 | 
			
		||||
							<td>DefModes</td>
 | 
			
		||||
							<td>BufferCount</td>
 | 
			
		||||
							<td>Options</td>
 | 
			
		||||
							<? ELSE ?>
 | 
			
		||||
							<td><- Add a channel (opens in same page)</td>
 | 
			
		||||
							<? ENDIF ?>
 | 
			
		||||
						</tr>
 | 
			
		||||
					</thead>
 | 
			
		||||
					<tbody>
 | 
			
		||||
						<? LOOP ChannelLoop SORTASC=Name ?>
 | 
			
		||||
						<tr>
 | 
			
		||||
							<td>
 | 
			
		||||
								<input type="hidden" name="channel" value="<? VAR Name ?>" /> <a href="editchan?user=<? VAR Username ESC=URL ?>&network=<? VAR Network ESC=URL ?>&name=<? VAR Name ESC=URL ?>" class="btn btn-warning btn-xs">Edit</a> <a href="delchan?user=<? VAR Username ESC=URL ?>&network=<? VAR Network ESC=URL ?>&name=<? VAR Name ESC=URL ?>" class="btn btn-danger btn-xs">Del</a>
 | 
			
		||||
							</td>
 | 
			
		||||
							<td class="text-center">
 | 
			
		||||
								<div class="switch">
 | 
			
		||||
									<input type="checkbox" name="save_<? VAR Name ?>" class="cmn-toggle cmn-toggle-round-flat"<? IF InConfig ?> checked="checked"<? ENDIF ?> />
 | 
			
		||||
									<label for="save_<? VAR Name ?>"></label>
 | 
			
		||||
								</div>
 | 
			
		||||
							</td>
 | 
			
		||||
							<td><? VAR Name ?></td>
 | 
			
		||||
							<td><? VAR CurModes ?></td>
 | 
			
		||||
							<td><? VAR DefModes ?></td>
 | 
			
		||||
							<td><? VAR BufferCount ?></td>
 | 
			
		||||
							<td><? VAR Options ?></td>
 | 
			
		||||
						</tr>
 | 
			
		||||
						<? ENDLOOP ?>
 | 
			
		||||
					</tbody>
 | 
			
		||||
				</table>
 | 
			
		||||
				<? ENDIF ?>
 | 
			
		||||
			</div> <!-- Channels -->
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
			<!-- Modules -->
 | 
			
		||||
			<div class="tab-pane fade" id="modulestab">
 | 
			
		||||
			<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>
 | 
			
		||||
					</tr>
 | 
			
		||||
				</thead>
 | 
			
		||||
				<tbody>
 | 
			
		||||
				<? LOOP ModuleLoop ?>
 | 
			
		||||
					<tr>
 | 
			
		||||
						<td>
 | 
			
		||||
							<div class="switch">
 | 
			
		||||
								<input type="checkbox" name="loadmod" id="lm_<? VAR Name ?>" class="cmn-toggle cmn-toggle-round-flat" value="<? VAR Name ?>"<? IF Checked ?> checked="checked"<? ENDIF ?><? IF Disabled ?> disabled="disabled"<? ENDIF ?> />
 | 
			
		||||
								<label for="lm_<? VAR Name ?>"></label>
 | 
			
		||||
							</div>
 | 
			
		||||
						</td>
 | 
			
		||||
						<td>
 | 
			
		||||
						<label for="lm_<? VAR Name ?>"> <? IF Wiki ?><a href="http://wiki.znc.in/<? VAR Wiki ?>" target="_blank"><? VAR Name ?></a> <? ELSE ?> <? VAR Name ?> <? ENDIF ?></label>
 | 
			
		||||
						</td>
 | 
			
		||||
						<td>
 | 
			
		||||
							<? IF Disabled ?>
 | 
			
		||||
							<? VAR Args ?>
 | 
			
		||||
							<? ELSE ?>
 | 
			
		||||
							<input class="form-control" class="third" type="text" name="modargs_<? VAR Name ?>" value="<? VAR Args ?>"
 | 
			
		||||
							<? IF !HasArgs ?> disabled="disabled"<? ENDIF ?>
 | 
			
		||||
							<? IF ArgsHelpText ?> data-toggle="tooltip" data-placement="top" data-original-title="<? VAR ArgsHelpText ?>"<? ENDIF ?> autocomplete="off"/>
 | 
			
		||||
							<? ENDIF ?>
 | 
			
		||||
						</td>
 | 
			
		||||
						<td><? VAR Description ?></td>
 | 
			
		||||
						<td>
 | 
			
		||||
							<? IF CanBeLoadedGlobally ?>
 | 
			
		||||
								<div class="checkboxSwitchMini">
 | 
			
		||||
									<input type="checkbox" name="loaded_globally" id="loaded_globally_<? VAR Name ?>" value="<? VAR Name ?>"<? IF LoadedGloabally?> checked="checked"  <? ENDIF ?> class="sr-only" disabled="disabled" /> <? ENDIF ?>
 | 
			
		||||
									<label for="loaded_globally_<? VAR Name ?>"></label>
 | 
			
		||||
								</div>
 | 
			
		||||
							<? ENDIF ?>
 | 
			
		||||
						</td>
 | 
			
		||||
						<td>
 | 
			
		||||
							<? IF CanBeLoadedByUser ?>
 | 
			
		||||
								<div class="checkboxSwitchMini">
 | 
			
		||||
									<input type="checkbox" name="loaded_by_user" id="loaded_by_user_<? VAR Name ?>" value="<? VAR Name ?>"<? IF LoadedByUser ?> checked="checked"  <? ENDIF ?> class="sr-only" disabled="disabled" /> <? ENDIF ?>
 | 
			
		||||
									<label for="loaded_by_user_<? VAR Name ?>"></label>
 | 
			
		||||
								</div>
 | 
			
		||||
							<? ENDIF ?>
 | 
			
		||||
						</td>
 | 
			
		||||
					</tr>
 | 
			
		||||
				<? ENDLOOP ?>
 | 
			
		||||
				</tbody>
 | 
			
		||||
			</table>
 | 
			
		||||
			</div> <!-- Modules -->
 | 
			
		||||
 | 
			
		||||
			<!-- Other Modules -->
 | 
			
		||||
			<div class="tab-pane fade" id="othermods">
 | 
			
		||||
			<? LOOP EmbeddedModuleLoop ?>
 | 
			
		||||
				<? IF Embed ?>
 | 
			
		||||
					<h3>Module <? VAR ModName ?></h3>
 | 
			
		||||
					<? INC *Embed ?>
 | 
			
		||||
				<? ENDIF ?>
 | 
			
		||||
			<? ENDLOOP ?>
 | 
			
		||||
			</div> <!-- Other Modules -->
 | 
			
		||||
			</div>
 | 
			
		||||
		</div>
 | 
			
		||||
 | 
			
		||||
			<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 ?>" />
 | 
			
		||||
			</div>
 | 
			
		||||
 | 
			
		||||
	</div>
 | 
			
		||||
</div>
 | 
			
		||||
</form>
 | 
			
		||||
<? INC Footer.tmpl ?>
 | 
			
		||||
							
								
								
									
										455
									
								
								modules/webadmin/tmpl/add_edit_user.tmpl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										455
									
								
								modules/webadmin/tmpl/add_edit_user.tmpl
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,455 @@
 | 
			
		||||
<? INC Header.tmpl ?>
 | 
			
		||||
<form class="form-horizontal" action="<? IF Edit ?>edituser<? ELSE ?>adduser<? ENDIF ?>" method="post">
 | 
			
		||||
	<? INC _csrf_check.tmpl ?>
 | 
			
		||||
	<input type="hidden" name="submitted" value="1" />
 | 
			
		||||
 | 
			
		||||
<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="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>
 | 
			
		||||
                        </ul>
 | 
			
		||||
                </li>
 | 
			
		||||
            </ul>
 | 
			
		||||
        </div>
 | 
			
		||||
 | 
			
		||||
        <div class="panel-body">
 | 
			
		||||
            <div class="tab-content">
 | 
			
		||||
				<!--Authentication -->
 | 
			
		||||
                <div class="tab-pane fade in active" id="authtab">
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
					<div class="form-group">
 | 
			
		||||
					<label for="inputUsername" class="col-sm-2 control-label">Username:</label>
 | 
			
		||||
						<div class="col-sm-10">
 | 
			
		||||
						<? IF Clone ?>
 | 
			
		||||
							<input type="hidden" class="form-control" id="inputUsername" name="clone" value="<? VAR CloneUsername ?>" autocomplete="off" />
 | 
			
		||||
						<? ENDIF ?>
 | 
			
		||||
 | 
			
		||||
						<? IF Edit ?>
 | 
			
		||||
							<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" />
 | 
			
		||||
						<? ENDIF ?>
 | 
			
		||||
						</div>
 | 
			
		||||
					</div>
 | 
			
		||||
 | 
			
		||||
					<div class="form-group">
 | 
			
		||||
					<label for="inputPassword" class="col-sm-2 control-label">Password:</label>
 | 
			
		||||
						<div class="col-sm-10">
 | 
			
		||||
							<input type="password" class="form-control" id="inputPassword" name="password" placeholder="Enter a secure password" autocomplete="off">
 | 
			
		||||
						</div>
 | 
			
		||||
					</div>
 | 
			
		||||
 | 
			
		||||
					<div class="form-group">
 | 
			
		||||
					<label for="inputPassword2" class="col-sm-2 control-label">Confirm Password:</label>
 | 
			
		||||
						<div class="col-sm-10">
 | 
			
		||||
							<input type="password" class="form-control" id="inputPassword2" name="password2" placeholder="Re-type the password">
 | 
			
		||||
						</div>
 | 
			
		||||
					</div>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
					<div class="form-group">
 | 
			
		||||
					<label for="inputAllowedIP" class="col-sm-2 control-label">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>
 | 
			
		||||
						</div>
 | 
			
		||||
					</div>
 | 
			
		||||
				</div><!-- Authentication -->
 | 
			
		||||
 | 
			
		||||
				<!-- 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>
 | 
			
		||||
				<? ENDIF ?>
 | 
			
		||||
 | 
			
		||||
					<div class="form-group">
 | 
			
		||||
					<label for="inputNickname" class="col-sm-2 control-label">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.">
 | 
			
		||||
						</div>
 | 
			
		||||
					</div>
 | 
			
		||||
 | 
			
		||||
					<div class="form-group">
 | 
			
		||||
					<label for="inputaltNickname" class="col-sm-2 control-label">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.">
 | 
			
		||||
						</div>
 | 
			
		||||
					</div>
 | 
			
		||||
 | 
			
		||||
					<div class="form-group">
 | 
			
		||||
					<label for="inputIdent" class="col-sm-2 control-label">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.">
 | 
			
		||||
						</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.">
 | 
			
		||||
						</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>
 | 
			
		||||
					</div>
 | 
			
		||||
 | 
			
		||||
					<? IF BindHostEdit ?>
 | 
			
		||||
					<div class="form-group">
 | 
			
		||||
					<label for="inputBindHost" class="col-sm-2 control-label">BindHost:</label>
 | 
			
		||||
						<div class="col-sm-10">
 | 
			
		||||
						<? IF BindHostLoop ?>
 | 
			
		||||
							<select class="form-control" id="inputBindHost" name="bindhost">
 | 
			
		||||
								<option>Default</option>
 | 
			
		||||
								<? LOOP BindHostLoop ?><option value="<? VAR BindHost ?>"<? IF Checked ?> selected="selected"<? ENDIF ?>><? VAR BindHost ?></option><? ENDLOOP ?>
 | 
			
		||||
							</select>
 | 
			
		||||
						<? ELSE ?>
 | 
			
		||||
							<input class="form-control" type="text" name="bindhost" value="<? VAR BindHost ?>"/>
 | 
			
		||||
						<? ENDIF ?>
 | 
			
		||||
						</div>
 | 
			
		||||
					</div>
 | 
			
		||||
					<? ENDIF ?>
 | 
			
		||||
 | 
			
		||||
					<div class="form-group">
 | 
			
		||||
					<label for="inputDCCBindHost" class="col-sm-2 control-label">DCCBindHost:</label>
 | 
			
		||||
						<div class="col-sm-10">
 | 
			
		||||
						<? IF DCCBindHostLoop ?>
 | 
			
		||||
							<select class="form-control" id="inputDCCBindHost" name="dccbindhost">
 | 
			
		||||
								<option>Default</option>
 | 
			
		||||
								<? LOOP DCCBindHostLoop ?><option value="<? VAR BindHost ?>"<? IF Checked ?> selected="selected"<? ENDIF ?>><? VAR BindHost ?></option><? ENDLOOP ?>
 | 
			
		||||
							</select>
 | 
			
		||||
						<? ELSE ?>
 | 
			
		||||
							<input type="text" class="form-control" name="dccbindhost" value="<? VAR DCCBindHost ?>"/>
 | 
			
		||||
						<? ENDIF ?>
 | 
			
		||||
						</div>
 | 
			
		||||
					</div>
 | 
			
		||||
 | 
			
		||||
					<div class="form-group">
 | 
			
		||||
					<label for="inputQuit" class="col-sm-2 control-label">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.">
 | 
			
		||||
						</div>
 | 
			
		||||
					</div>
 | 
			
		||||
				</div> <!-- IRC Information -->
 | 
			
		||||
 | 
			
		||||
				<!-- Networks -->
 | 
			
		||||
				<div class="tab-pane fade" id="networkstab">
 | 
			
		||||
				<? IF Edit ?>
 | 
			
		||||
				<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>
 | 
			
		||||
							<? IF NetworkLoop ?>
 | 
			
		||||
							<td>Name</td>
 | 
			
		||||
							<td>Clients</td>
 | 
			
		||||
							<td>Current Server</td>
 | 
			
		||||
							<td>IRC Nick</td>
 | 
			
		||||
							<? ELSE ?>
 | 
			
		||||
							<td><- Add a network (opens in same page)</td>
 | 
			
		||||
							<? ENDIF ?>
 | 
			
		||||
						</tr>
 | 
			
		||||
					</thead>
 | 
			
		||||
					<tbody>
 | 
			
		||||
						<? LOOP NetworkLoop SORTASC=Name ?>
 | 
			
		||||
						<tr>
 | 
			
		||||
							<td>
 | 
			
		||||
								<input type="hidden" name="network" value="<? VAR Name ?>" />
 | 
			
		||||
								<a href="editnetwork?user=<? VAR Username ESC=URL ?>&network=<? VAR Name ESC=URL ?>" class="btn btn-primary btn-xs">Edit</a> <a href="delnetwork?user=<? VAR Username ESC=URL ?>&name=<? VAR Name ESC=URL ?>" class="btn btn-danger btn-xs">Delete</a>
 | 
			
		||||
							</td>
 | 
			
		||||
							<td><? VAR Name ?></td>
 | 
			
		||||
							<td><? VAR Clients ?></td>
 | 
			
		||||
							<td><? VAR Server DEFAULT="-N/A-" ?></td>
 | 
			
		||||
							<td><? VAR IRCNick ?></td>
 | 
			
		||||
						</tr>
 | 
			
		||||
						<? ENDLOOP ?>
 | 
			
		||||
					</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 />
 | 
			
		||||
					<? ENDIF ?>
 | 
			
		||||
				</div><!-- Networks -->
 | 
			
		||||
 | 
			
		||||
				<!-- Modules -->
 | 
			
		||||
				<div class="tab-pane fade" id="modulestab">
 | 
			
		||||
				<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>
 | 
			
		||||
						</tr>
 | 
			
		||||
					</thead>
 | 
			
		||||
					<tbody>
 | 
			
		||||
						<? LOOP ModuleLoop ?>
 | 
			
		||||
						<tr>
 | 
			
		||||
							<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 ?> />
 | 
			
		||||
									<label for="lm_<? VAR Name ?>"></label>
 | 
			
		||||
								</div>
 | 
			
		||||
							</td>
 | 
			
		||||
							<td>
 | 
			
		||||
								<label for="lm_<? VAR Name ?>"> <? IF Wiki ?><a href="http://wiki.znc.in/<? VAR Wiki ?>" target="_blank"><? VAR Name ?></a> <? ELSE ?> <? VAR Name ?> <? ENDIF ?></label>
 | 
			
		||||
							</td>
 | 
			
		||||
							<td>
 | 
			
		||||
								<? IF Disabled ?>
 | 
			
		||||
								<? VAR Args ?>
 | 
			
		||||
								<? ELSE ?>
 | 
			
		||||
								<input class="third form-control" type="text" name="modargs_<? VAR Name ?>" value="<? VAR Args ?>"
 | 
			
		||||
								<? IF !HasArgs ?> disabled="disabled"<? ENDIF ?>
 | 
			
		||||
								<? IF ArgsHelpText ?> data-toggle="tooltip" data-placement="top" data-original-title="<? VAR ArgsHelpText ?>"<? ENDIF ?> />
 | 
			
		||||
								<? ENDIF ?>
 | 
			
		||||
							</td>
 | 
			
		||||
							<td><? VAR Description ?></td>
 | 
			
		||||
							<td>
 | 
			
		||||
								<? IF CanBeLoadedGlobally ?>
 | 
			
		||||
									<div class="checkboxSwitchMini">
 | 
			
		||||
										<input type="checkbox" name="loaded_globally" id="loaded_globally_<? VAR Name ?>" value="<? VAR Name ?>"<? IF LoadedGloabally?> checked="checked"  <? ENDIF ?> class="sr-only" disabled="disabled" /> <? ENDIF ?>
 | 
			
		||||
										<label for="loaded_globally_<? VAR Name ?>"></label>
 | 
			
		||||
									</div>
 | 
			
		||||
								<? ENDIF ?>
 | 
			
		||||
							</td>
 | 
			
		||||
							<td>
 | 
			
		||||
								<? IF CanBeLoadedByNetwork ?>
 | 
			
		||||
									<div class="checkboxSwitchMini">
 | 
			
		||||
										<input type="checkbox" name="loaded_by_network" id="loaded_by_net_<? VAR Name ?>" value="<? VAR Name ?>"<? IF LoadedByAllNetworks ?> checked="checked"  <? ENDIF ?> class="sr-only" disabled="disabled" /> <? ENDIF ?>
 | 
			
		||||
										<label for="loaded_by_net_<? VAR Name ?>"></label>
 | 
			
		||||
									</div>
 | 
			
		||||
									<? IF LoadedBySomeNetworks && !LoadedByAllNetworks ?>
 | 
			
		||||
										<script type="text/javascript">document.getElementById("loaded_by_net_<? VAR Name ?>").indeterminate = true;</script>
 | 
			
		||||
								<? ENDIF ?>
 | 
			
		||||
							</td>
 | 
			
		||||
						</tr>
 | 
			
		||||
					<? ENDLOOP ?>
 | 
			
		||||
					</tbody>
 | 
			
		||||
				</table>
 | 
			
		||||
				</div> <!-- Modules -->
 | 
			
		||||
 | 
			
		||||
				<!-- Default Settings -->
 | 
			
		||||
				<div class="tab-pane fade" id="defaultsettingstab">
 | 
			
		||||
					<div class="form-group">
 | 
			
		||||
					<label for="inputModes" class="col-sm-2 control-label">Channel 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>
 | 
			
		||||
						</div>
 | 
			
		||||
					</div>
 | 
			
		||||
 | 
			
		||||
					<div class="form-group">
 | 
			
		||||
					<label for="inputBufferSize" class="col-sm-2 control-label">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>
 | 
			
		||||
						</div>
 | 
			
		||||
					</div>
 | 
			
		||||
				</div> <!-- Default Settings -->
 | 
			
		||||
 | 
			
		||||
				<!-- Flags -->
 | 
			
		||||
				<div class="tab-pane fade" id="flagstab">
 | 
			
		||||
				<div class="row">
 | 
			
		||||
					<div class="col-md-6 col-md-offset-3">
 | 
			
		||||
						<table class="table table-bordered table-hover table-striped">
 | 
			
		||||
							<thead>
 | 
			
		||||
								<tr>
 | 
			
		||||
									<td>Status</td>
 | 
			
		||||
									<td>Flag Title</td>
 | 
			
		||||
								</tr>
 | 
			
		||||
							</thead>
 | 
			
		||||
							<tbody>
 | 
			
		||||
								<? LOOP OptionLoop ?>
 | 
			
		||||
								<tr>
 | 
			
		||||
									<td>
 | 
			
		||||
										<div class="switch">
 | 
			
		||||
											<input type="checkbox" name="<? VAR Name ?>" id="opt_<? VAR Name ?>" class="cmn-toggle cmn-toggle-round-flat" value="1"<? IF Checked ?> checked="checked"<? ENDIF ?><? IF Disabled ?> disabled="disabled"<? ENDIF ?> />
 | 
			
		||||
											<label for="opt_<? VAR Name ?>"></label>
 | 
			
		||||
										</div>
 | 
			
		||||
									</td>
 | 
			
		||||
									<td><b><? VAR DisplayName ?></b></td>
 | 
			
		||||
								</tr>
 | 
			
		||||
								<? ENDLOOP ?>
 | 
			
		||||
							</tbody>
 | 
			
		||||
						</table>
 | 
			
		||||
					</div>
 | 
			
		||||
				</div>
 | 
			
		||||
				</div> <!-- Flags -->
 | 
			
		||||
 | 
			
		||||
				<!-- 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>
 | 
			
		||||
					</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>
 | 
			
		||||
					</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>
 | 
			
		||||
					</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>
 | 
			
		||||
					</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>
 | 
			
		||||
					</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>
 | 
			
		||||
					</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>
 | 
			
		||||
					</div>
 | 
			
		||||
 | 
			
		||||
					<!-- Broken. Work is in progress... Hang in there cowboy/girl...
 | 
			
		||||
					<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 ?>
 | 
			
		||||
<? ENDLOOP ?></textarea>
 | 
			
		||||
							<div class="alert alert-info help-block">One reply per line. Example: TIME Buy a watch!</div>
 | 
			
		||||
						</div>
 | 
			
		||||
					</div>
 | 
			
		||||
 | 
			
		||||
					<div class="form-group" id="ctcpreplies_js">
 | 
			
		||||
						<label for="inputCTCPreplies" class="col-sm-2 control-label">CTCP Replies:</label>
 | 
			
		||||
						<div class="col-sm-10">
 | 
			
		||||
							<table class="table table-hover">
 | 
			
		||||
								<thead>
 | 
			
		||||
									<tr>
 | 
			
		||||
										<th>Request</th>
 | 
			
		||||
										<th>Response</th>
 | 
			
		||||
									</tr>
 | 
			
		||||
								</thead>
 | 
			
		||||
								<tbody id="ctcpreplies_tbody">
 | 
			
		||||
								</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>
 | 
			
		||||
						</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! — 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 ?>
 | 
			
		||||
						</div>
 | 
			
		||||
					</div>
 | 
			
		||||
					<? ENDIF ?>
 | 
			
		||||
				<? ENDLOOP ?>
 | 
			
		||||
				</div><!-- Other Modules -->
 | 
			
		||||
 | 
			
		||||
			</div>
 | 
			
		||||
		</div>
 | 
			
		||||
				<div class="panel-footer text-right">
 | 
			
		||||
				<? 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 ?>" />
 | 
			
		||||
				<? 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 ?>" />
 | 
			
		||||
				<? ENDIF ?>
 | 
			
		||||
				</div>
 | 
			
		||||
	</div>
 | 
			
		||||
 </div>
 | 
			
		||||
 </form>
 | 
			
		||||
<? INC Footer.tmpl ?>
 | 
			
		||||
							
								
								
									
										28
									
								
								modules/webadmin/tmpl/del_network.tmpl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								modules/webadmin/tmpl/del_network.tmpl
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,28 @@
 | 
			
		||||
<? 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-body">
 | 
			
		||||
						<p>Are you absolutely sure you want to delete <b>"<? VAR Network ?>"</b> network, <? VAR Username ?>?</p>
 | 
			
		||||
						<br>
 | 
			
		||||
						<center>
 | 
			
		||||
						<form action="<? VAR URIPrefix TOP ?><? VAR ModPath TOP ?>delnetwork" 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" />
 | 
			
		||||
						</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 ?>" />
 | 
			
		||||
						</form>
 | 
			
		||||
						</center>
 | 
			
		||||
					</div>
 | 
			
		||||
			</div>
 | 
			
		||||
		</div>
 | 
			
		||||
	</div>
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
<? INC Footer.tmpl ?>
 | 
			
		||||
							
								
								
									
										29
									
								
								modules/webadmin/tmpl/del_user.tmpl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								modules/webadmin/tmpl/del_user.tmpl
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,29 @@
 | 
			
		||||
<? 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-body">
 | 
			
		||||
						<p>Are you absolutely sure you want to delete "<? VAR Username ?>"?</p>
 | 
			
		||||
						<br>
 | 
			
		||||
						<center>
 | 
			
		||||
						<form action="<? VAR URIPrefix TOP ?><? VAR ModPath TOP ?>deluser" 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 ?>" />
 | 
			
		||||
						</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 ?>" />
 | 
			
		||||
						</form>
 | 
			
		||||
						</center>
 | 
			
		||||
				
 | 
			
		||||
					</div>
 | 
			
		||||
			</div>	
 | 
			
		||||
		</div>
 | 
			
		||||
	</div>
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
<? INC Footer.tmpl ?>
 | 
			
		||||
							
								
								
									
										56
									
								
								modules/webadmin/tmpl/encoding_settings.tmpl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										56
									
								
								modules/webadmin/tmpl/encoding_settings.tmpl
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,56 @@
 | 
			
		||||
<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>
 | 
			
		||||
	</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">  <span class="encoding-placeholder"></span>  </span>, send as UTF-8</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">  <span class="encoding-placeholder"></span>  </span>, send as <span class="encoding-placeholder-big text-success">  <span class="encoding-placeholder"></span	>  </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">  <span class="encoding-placeholder"></span>  </span> only</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 ?> />
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
<datalist id="encoding_list">
 | 
			
		||||
	<? LOOP EncodingLoop ?>
 | 
			
		||||
		<option value="<? VAR Encoding ?>"/>
 | 
			
		||||
	<? ENDLOOP ?>
 | 
			
		||||
</datalist>
 | 
			
		||||
		
 | 
			
		||||
<script type="text/javascript">
 | 
			
		||||
	function updateEncodingText() {
 | 
			
		||||
		var value = jQuery("input[name=encoding]").val();
 | 
			
		||||
			jQuery(".encoding-placeholder").each(function(index, element) {
 | 
			
		||||
				jQuery(element).text(value);
 | 
			
		||||
			});
 | 
			
		||||
	}
 | 
			
		||||
		jQuery("input[name=encoding]").on("keyup change input", updateEncodingText);
 | 
			
		||||
			updateEncodingText();
 | 
			
		||||
 | 
			
		||||
		function updateEncodingLegacy() {
 | 
			
		||||
			var disabled = jQuery("input:radio[name=encoding_utf]:checked").val() == "legacy";
 | 
			
		||||
			jQuery("input[name=encoding]").prop("disabled", disabled);
 | 
			
		||||
		}
 | 
			
		||||
		
 | 
			
		||||
		jQuery("input:radio[name=encoding_utf]").change(updateEncodingLegacy);
 | 
			
		||||
		updateEncodingLegacy();
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										12
									
								
								modules/webadmin/tmpl/index.tmpl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								modules/webadmin/tmpl/index.tmpl
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,12 @@
 | 
			
		||||
<? 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>
 | 
			
		||||
			</div>
 | 
			
		||||
	</div>
 | 
			
		||||
</div>
 | 
			
		||||
	
 | 
			
		||||
<? INC Footer.tmpl ?>
 | 
			
		||||
							
								
								
									
										60
									
								
								modules/webadmin/tmpl/listusers.tmpl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										60
									
								
								modules/webadmin/tmpl/listusers.tmpl
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,60 @@
 | 
			
		||||
<? 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>
 | 
			
		||||
					</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>
 | 
			
		||||
 | 
			
		||||
<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>
 | 
			
		||||
 | 
			
		||||
<? INC Footer.tmpl ?>
 | 
			
		||||
							
								
								
									
										292
									
								
								modules/webadmin/tmpl/settings.tmpl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										292
									
								
								modules/webadmin/tmpl/settings.tmpl
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,292 @@
 | 
			
		||||
<? 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>   
 | 
			
		||||
            </ul>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="panel-body">
 | 
			
		||||
            <div class="tab-content">
 | 
			
		||||
				<!--Listen Port -->
 | 
			
		||||
                <div class="tab-pane fade in active" id="listenporttab">
 | 
			
		||||
					<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>
 | 
			
		||||
							</tr>
 | 
			
		||||
						</thead>
 | 
			
		||||
					<? LOOP ListenLoop ?>
 | 
			
		||||
						<tr>
 | 
			
		||||
							<td><? VAR Port ?></td>
 | 
			
		||||
							<td><? VAR BindHost DEFAULT=** ?></td>
 | 
			
		||||
							<td>
 | 
			
		||||
							<div class="checkboxSwitchMini">
 | 
			
		||||
								<input type="checkbox" disabled="disabled" id="<? VAR IsSSL ?>" <? IF IsSSL ?>checked="checked"<? ENDIF ?>/>
 | 
			
		||||
								<label for="<? VAR IsSSL ?>"></label>
 | 
			
		||||
							</div>
 | 
			
		||||
							</td>
 | 
			
		||||
							<td>
 | 
			
		||||
							<div class="checkboxSwitchMini">
 | 
			
		||||
								<input type="checkbox" disabled="disabled" id="<? VAR IsIPV4 ?>" <? IF IsIPV4 ?>checked="checked"<? ENDIF ?>/>
 | 
			
		||||
								<label for="<? VAR IsIPV4 ?>"></label>
 | 
			
		||||
							</div>
 | 
			
		||||
							</td>
 | 
			
		||||
							<td>
 | 
			
		||||
							<div class="checkboxSwitchMini">
 | 
			
		||||
								<input type="checkbox" id="<? VAR IsIPV6 ?>" disabled="disabled" <? IF IsIPV6 ?>checked="checked"<? ENDIF ?>/>
 | 
			
		||||
								<label for="<? VAR IsIPV6 ?>"></label>
 | 
			
		||||
							</div>
 | 
			
		||||
							</td>
 | 
			
		||||
							<td>
 | 
			
		||||
							<div class="checkboxSwitchMini">
 | 
			
		||||
								<input type="checkbox" id="<? VAR IsIRC ?>" disabled="disabled" <? IF IsIRC ?>checked="checked"<? ENDIF ?>/>
 | 
			
		||||
								<label for="<? VAR IsIRC ?>"></label>
 | 
			
		||||
							</div>
 | 
			
		||||
							</td>
 | 
			
		||||
							<td>
 | 
			
		||||
							<div class="checkboxSwitchMini">
 | 
			
		||||
								<input type="checkbox" id="<? VAR IsHTTP ?>" disabled="disabled" <? IF IsHTTP ?>checked="checked"<? ENDIF ?>/>
 | 
			
		||||
								<label for="<? VAR IsHTTP ?>"></label>
 | 
			
		||||
							</div>
 | 
			
		||||
							</td>
 | 
			
		||||
							<td><? VAR URIPrefix ?></td>
 | 
			
		||||
							<td>
 | 
			
		||||
							<? IF SuggestDeletion ?>
 | 
			
		||||
								<form action="<? VAR URIPrefix TOP ?><? VAR ModPath TOP ?>del_listener" method="post">
 | 
			
		||||
									<? INC _csrf_check.tmpl ?>
 | 
			
		||||
									<input name="host" type="hidden" value="<? VAR BindHost ?>"/>
 | 
			
		||||
									<input name="port" type="hidden" value="<? VAR Port ?>"/>
 | 
			
		||||
									<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"/>
 | 
			
		||||
								</form>
 | 
			
		||||
							<? ENDIF ?>
 | 
			
		||||
							</td>
 | 
			
		||||
						</tr>
 | 
			
		||||
					<? ENDLOOP ?>
 | 
			
		||||
						<tr>
 | 
			
		||||
							<form action="<? VAR URIPrefix TOP ?><? VAR ModPath TOP ?>add_listener" method="post">
 | 
			
		||||
								<? INC _csrf_check.tmpl ?>
 | 
			
		||||
								<td>
 | 
			
		||||
									<input type="number" class="form-control" name="port" min="1" max="65535" class="number" maxlength="5" placeholder="Port 1 to 65535"/>
 | 
			
		||||
								</td>
 | 
			
		||||
								<td>
 | 
			
		||||
									<input type="text" class="form-control" name="host" value="*"/>
 | 
			
		||||
								</td>
 | 
			
		||||
								<td>
 | 
			
		||||
									<div class="checkboxSwitchMini">
 | 
			
		||||
										<input type="checkbox" id="ssl" name="ssl" checked="checked"/>
 | 
			
		||||
										<label for="ssl"></label>
 | 
			
		||||
									</div>
 | 
			
		||||
								</td>
 | 
			
		||||
								<td>
 | 
			
		||||
									<div class="checkboxSwitchMini">
 | 
			
		||||
										<input type="checkbox" id="ipv4" name="ipv4" checked="checked"/>
 | 
			
		||||
										<label for="ipv4"></label>
 | 
			
		||||
									</div>
 | 
			
		||||
								</td>
 | 
			
		||||
								<td>
 | 
			
		||||
									<div class="checkboxSwitchMini">
 | 
			
		||||
										<input type="checkbox" id="ipv6" name="ipv6" checked="checked"/>
 | 
			
		||||
										<label for="ipv6"></label>
 | 
			
		||||
									</div>
 | 
			
		||||
								</td>
 | 
			
		||||
								<td>
 | 
			
		||||
									<div class="checkboxSwitchMini">
 | 
			
		||||
										<input type="checkbox" id="irc" name="irc" checked="checked"/>
 | 
			
		||||
										<label for="irc"></label>
 | 
			
		||||
									</div>
 | 
			
		||||
								</td>
 | 
			
		||||
								<td>
 | 
			
		||||
									<div class="checkboxSwitchMini">
 | 
			
		||||
										<input type="checkbox" id="web" name="web" checked="checked"/>
 | 
			
		||||
										<label for="web"></label>
 | 
			
		||||
									</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>
 | 
			
		||||
							</form>
 | 
			
		||||
						</tr>
 | 
			
		||||
					</table>
 | 
			
		||||
				</div><!--Listen Port -->
 | 
			
		||||
				
 | 
			
		||||
				<!-- Settings -->
 | 
			
		||||
				<div class="tab-pane fade" id="settingstab">
 | 
			
		||||
					<form class="form-horizontal" action="<? VAR URIPrefix TOP ?><? VAR ModPath TOP ?>settings" method="post">
 | 
			
		||||
					<? 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>
 | 
			
		||||
							<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>
 | 
			
		||||
									<? 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>
 | 
			
		||||
							</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>
 | 
			
		||||
						</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>
 | 
			
		||||
						</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>
 | 
			
		||||
						</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>
 | 
			
		||||
						</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>
 | 
			
		||||
							</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>
 | 
			
		||||
							</div>
 | 
			
		||||
						</div>
 | 
			
		||||
 
 | 
			
		||||
						<div class="form-group">
 | 
			
		||||
						<label for="inputMOTD" class="col-sm-2 control-label">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>
 | 
			
		||||
  
 | 
			
		||||
						<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 -->
 | 
			
		||||
				<div class="tab-pane fade" id="globalmodtab"> 
 | 
			
		||||
					<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>
 | 
			
		||||
							</tr>
 | 
			
		||||
						</thead>
 | 
			
		||||
						<tbody>
 | 
			
		||||
							<? LOOP ModuleLoop ?>
 | 
			
		||||
							<tr class="<? IF __EVEN__ ?>evenrow<? ELSE ?>oddrow<? ENDIF ?>">
 | 
			
		||||
								<td>
 | 
			
		||||
									<div class="switch">
 | 
			
		||||
										<input type="checkbox" name="loadmod" id="lm_<? VAR Name ?>" class="cmn-toggle cmn-toggle-round-flat" value="<? VAR Name ?>"<? IF Checked ?> checked="checked"<? ENDIF ?><? IF Disabled ?> disabled="disabled"<? ENDIF ?> />
 | 
			
		||||
										<label for="lm_<? VAR Name ?>"></label>
 | 
			
		||||
									</div>
 | 
			
		||||
								</td>
 | 
			
		||||
								<td>
 | 
			
		||||
									<label for="lm_<? VAR Name ?>">
 | 
			
		||||
									<? IF Wiki ?><a href="http://wiki.znc.in/<? VAR Wiki ?>" target="_blank"><? VAR Name ?></a>
 | 
			
		||||
									<? ELSE ?> <? VAR Name ?> <? ENDIF ?></label>
 | 
			
		||||
								</td>
 | 
			
		||||
								<td class="mod_args">
 | 
			
		||||
									<input type="text" class="form-control" name="modargs_<? VAR Name ?>" value="<? VAR Args ?>"
 | 
			
		||||
									<? IF !HasArgs ?> disabled="disabled"<? ENDIF ?>
 | 
			
		||||
									<? IF ArgsHelpText ?> data-toggle="tooltip" data-placement="top" data-original-title="<? VAR ArgsHelpText ?>"<? ENDIF ?> />
 | 
			
		||||
								</td>
 | 
			
		||||
								<td class="mod_descr"><? VAR Description ?></td>
 | 
			
		||||
								<td>
 | 
			
		||||
									<? IF CanBeLoadedByNetwork ?>
 | 
			
		||||
										<div class="checkboxSwitchMini">
 | 
			
		||||
											<input type="checkbox" name="loaded_by_network" id="loaded_by_net_<? VAR Name ?>" value="<? VAR Name ?>"<? IF LoadedByAllNetworks ?> checked="checked"  <? ENDIF ?> class="sr-only" disabled="disabled" />
 | 
			
		||||
											<? ENDIF ?>
 | 
			
		||||
											<label for="loaded_by_net_<? VAR Name ?>"></label>
 | 
			
		||||
										</div>
 | 
			
		||||
									<? IF LoadedBySomeNetworks && !LoadedByAllNetworks ?>
 | 
			
		||||
										<script type="text/javascript">document.getElementById("loaded_by_net_<? VAR Name ?>").indeterminate = true;</script>
 | 
			
		||||
									<? ENDIF ?>
 | 
			
		||||
								</td>
 | 
			
		||||
								<td>
 | 
			
		||||
									<? IF CanBeLoadedByUser ?>
 | 
			
		||||
										<div class="checkboxSwitchMini">
 | 
			
		||||
											<input type="checkbox" name="loaded_by_user" id="loaded_by_user_<? VAR Name ?>" value="<? VAR Name ?>"<? IF LoadedByAllNetworks ?> checked="checked"  <? ENDIF ?> class="sr-only" disabled="disabled" />
 | 
			
		||||
											<? ENDIF ?>
 | 
			
		||||
											<label for="loaded_by_user_<? VAR Name ?>"></label>
 | 
			
		||||
										</div>
 | 
			
		||||
									<? IF LoadedBySomeUsers && !LoadedByAllUsers ?>
 | 
			
		||||
										<script type="text/javascript">document.getElementById("loaded_by_user_<? VAR Name ?>").indeterminate = true;</script>								
 | 
			
		||||
									<? ENDIF ?>
 | 
			
		||||
								</td>
 | 
			
		||||
							</tr>
 | 
			
		||||
							<? ENDLOOP ?>
 | 
			
		||||
						</tbody>
 | 
			
		||||
					</table>
 | 
			
		||||
				</div><!-- Global Module Settings -->
 | 
			
		||||
			</div>
 | 
			
		||||
        </div>
 | 
			
		||||
           
 | 
			
		||||
			
 | 
			
		||||
		<div class="panel-footer text-right">	
 | 
			
		||||
			<input class="btn btn-danger" type="reset" value="Reset">
 | 
			
		||||
			<input class="btn btn-success" type="submit" value="Save" />
 | 
			
		||||
		</div>
 | 
			
		||||
	
 | 
			
		||||
	</div>
 | 
			
		||||
</div>	
 | 
			
		||||
</form> 
 | 
			
		||||
<? INC Footer.tmpl ?>
 | 
			
		||||
							
								
								
									
										187
									
								
								modules/webadmin/tmpl/traffic.tmpl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										187
									
								
								modules/webadmin/tmpl/traffic.tmpl
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,187 @@
 | 
			
		||||
<? 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-body">
 | 
			
		||||
				<div class="row">
 | 
			
		||||
					<div class="col-md-6"><div id="totalstats"></div></div>
 | 
			
		||||
					<div class="col-md-6"><div id="usertraffic"></div></div>
 | 
			
		||||
				</div>
 | 
			
		||||
			
 | 
			
		||||
			
 | 
			
		||||
			<script type="text/javascript" src="//www.google.com/jsapi"></script>
 | 
			
		||||
			<script>
 | 
			
		||||
				google.load('visualization', '1.0', {'packages':['corechart']});
 | 
			
		||||
				google.setOnLoadCallback(drawChart);
 | 
			
		||||
					function drawChart() {
 | 
			
		||||
						var data = google.visualization.arrayToDataTable([
 | 
			
		||||
							['Task', 'ZNC Stats'],
 | 
			
		||||
							['Users', <? VAR TotalUsers ?>],
 | 
			
		||||
							['Networks', <? VAR TotalNetworks ?>]
 | 
			
		||||
						]);
 | 
			
		||||
						var options = {
 | 
			
		||||
							width: 503,
 | 
			
		||||
							pieHole: 0.3,
 | 
			
		||||
							colors: ['#428bca', '#5bc0de'],
 | 
			
		||||
							backgroundColor: 'transparent',
 | 
			
		||||
							legend: {textStyle: {color: 'gray'}}
 | 
			
		||||
						};
 | 
			
		||||
						var chart = new google.visualization.PieChart(document.getElementById('totalstats'));
 | 
			
		||||
						chart.draw(data, options);
 | 
			
		||||
					}
 | 
			
		||||
				</script>
 | 
			
		||||
				<script>
 | 
			
		||||
					google.load('visualization', '1.0', {'packages':['corechart']});
 | 
			
		||||
					google.setOnLoadCallback(drawChart2);
 | 
			
		||||
					function drawChart2() {
 | 
			
		||||
						var data2 = google.visualization.arrayToDataTable([
 | 
			
		||||
							['Task', 'User Traffic'],
 | 
			
		||||
							['Attached Networks', <? VAR AttachedNetworks ?>],
 | 
			
		||||
							['Client Connections', <? VAR TotalCConnections ?>],
 | 
			
		||||
							['IRC Connections', <? VAR TotalIRCConnections ?>]
 | 
			
		||||
						]);
 | 
			
		||||
						var options2 = {
 | 
			
		||||
							width: 503,
 | 
			
		||||
							pieHole: 0.3,
 | 
			
		||||
							colors: ['#5cb85c', '#f0ad4e', '#d9534f'],
 | 
			
		||||
							backgroundColor: 'transparent',
 | 
			
		||||
							legend: {textStyle: {color: 'gray'}}
 | 
			
		||||
						};
 | 
			
		||||
						var chart2 = new google.visualization.PieChart(document.getElementById('usertraffic'));
 | 
			
		||||
						chart2.draw(data2, options2);
 | 
			
		||||
					}
 | 
			
		||||
			</script>
 | 
			
		||||
 
 | 
			
		||||
			
 | 
			
		||||
			
 | 
			
		||||
				<table class="table table-bordered table-hover">
 | 
			
		||||
					<tbody>
 | 
			
		||||
						<tr>
 | 
			
		||||
							<th>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-bar progress-bar-success" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100" style="width: 100%;">
 | 
			
		||||
									</div>
 | 
			
		||||
								</div>
 | 
			
		||||
						</td>
 | 
			
		||||
					</tr>
 | 
			
		||||
						<? IF IsAdmin ?>
 | 
			
		||||
						<tr>
 | 
			
		||||
							<th>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-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>
 | 
			
		||||
							<td><? VAR TotalNetworks ?></td>
 | 
			
		||||
							<td>
 | 
			
		||||
								<div class="progress" data-toggle="tooltip" data-placement="right" data-original-title="<? VAR TotalNetworks ?> 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>
 | 
			
		||||
							<td><? VAR AttachedNetworks ?></td>
 | 
			
		||||
							<td>
 | 
			
		||||
								<div class="progress" data-toggle="tooltip" data-placement="right" data-original-title="<? VAR AttachedNetworks ?> 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>
 | 
			
		||||
							<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-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>
 | 
			
		||||
							<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-bar" role="progressbar" aria-valuenow="<? VAR TotalIRCConnections ?>" aria-valuemin="0" aria-valuemax="500" style="width: <? VAR TotalIRCConnections ?>%;">
 | 
			
		||||
									</div>
 | 
			
		||||
								</div>
 | 
			
		||||
							</td>
 | 
			
		||||
						</tr>
 | 
			
		||||
						<? ENDIF ?>
 | 
			
		||||
					</tbody>
 | 
			
		||||
				</table>
 | 
			
		||||
						
 | 
			
		||||
<? IF IsAdmin && TrafficLoop ?>
 | 
			
		||||
	<br />
 | 
			
		||||
	<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>
 | 
			
		||||
		</div>
 | 
			
		||||
	</div>
 | 
			
		||||
	<br>
 | 
			
		||||
		<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>
 | 
			
		||||
				</tr>
 | 
			
		||||
			</thead>
 | 
			
		||||
			<tbody>
 | 
			
		||||
				<? LOOP TrafficLoop SORTASC=Username ?>
 | 
			
		||||
				<tr>
 | 
			
		||||
					<td><? VAR Username ?></td>
 | 
			
		||||
					<td><? VAR In  ?></td>
 | 
			
		||||
					<td><? VAR Out ?></td>
 | 
			
		||||
					<td><? VAR Total ?></td>
 | 
			
		||||
				</tr>
 | 
			
		||||
					<? REM ?>Add the totals separately so that if sort is ever used they stay at the bottom By keeping them inside the loop we can figure out even/odd classes though.
 | 
			
		||||
					<? ENDREM ?>
 | 
			
		||||
				<? IF __LAST__ ?>
 | 
			
		||||
				<tr>
 | 
			
		||||
					<td>User Total</td>
 | 
			
		||||
					<td><? VAR UserIn TOP ?></td>
 | 
			
		||||
					<td><? VAR UserOut TOP ?></td>
 | 
			
		||||
					<td><? VAR UserTotal TOP ?></td>
 | 
			
		||||
				</tr>
 | 
			
		||||
				<tr>
 | 
			
		||||
					<td>ZNC Total</td>
 | 
			
		||||
					<td><? VAR ZNCIn TOP ?></td>
 | 
			
		||||
					<td><? VAR ZNCOut TOP ?></td>
 | 
			
		||||
					<td><? VAR ZNCTotal TOP ?></td>
 | 
			
		||||
				</tr>
 | 
			
		||||
				<tr>
 | 
			
		||||
					<td>Grand Total</td>
 | 
			
		||||
					<td><? VAR AllIn TOP ?></td>
 | 
			
		||||
					<td><? VAR AllOut TOP ?></td>
 | 
			
		||||
					<td><? VAR AllTotal TOP ?></td>
 | 
			
		||||
				</tr>
 | 
			
		||||
				<? ENDIF ?>
 | 
			
		||||
			<? ENDLOOP ?>
 | 
			
		||||
			</tbody>
 | 
			
		||||
		</table>
 | 
			
		||||
<? ENDIF ?>
 | 
			
		||||
			</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>
 | 
			
		||||
<? INC Footer.tmpl ?>
 | 
			
		||||
		Reference in New Issue
	
	Block a user