Update to v0.1
This commit is contained in:
90
modules/webadmin/tmpl/add_edit_chan.tmpl
Normal file
90
modules/webadmin/tmpl/add_edit_chan.tmpl
Normal file
@@ -0,0 +1,90 @@
|
||||
<? INC Header.tmpl ?>
|
||||
<div class="container">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">Channel Info</div>
|
||||
<div class="panel-body">
|
||||
<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 ?>
|
||||
|
||||
<? 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>
|
||||
|
||||
<h3>Flags</h3>
|
||||
<hr>
|
||||
<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>
|
||||
<tr>
|
||||
<td><div class="checkboxSwitch"><input type="checkbox" name="save" id="save" 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="checkboxSwitch"><input type="checkbox" name="<? VAR Name ?>" id="opt_<? VAR Name ?>" 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>
|
||||
|
||||
<? LOOP EmbeddedModuleLoop ?>
|
||||
<? IF Embed ?>
|
||||
<div class="section">
|
||||
<h3>Module <? VAR ModName ?></h3>
|
||||
<? INC *Embed ?>
|
||||
</div>
|
||||
<? ENDIF ?>
|
||||
<? ENDLOOP ?>
|
||||
|
||||
<div class="btn-group pull-right">
|
||||
<input class="btn btn-danger" type="reset" value="Reset">
|
||||
<input class="btn btn-success" type="submit" value="<? IF Edit ?>Save<? ELSE ?>Add Channel<? ENDIF ?>" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<? INC Footer.tmpl ?>
|
211
modules/webadmin/tmpl/add_edit_network.tmpl
Normal file
211
modules/webadmin/tmpl/add_edit_network.tmpl
Normal file
@@ -0,0 +1,211 @@
|
||||
<? AddRow JSLoop HREF=/modfiles/global/webadmin/webadmin.js ?>
|
||||
<? INC Header.tmpl ?>
|
||||
<div class="container">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">Network Info</div>
|
||||
<div class="panel-body">
|
||||
<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>
|
||||
<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 ?>" />
|
||||
<? IF Edit ?><input type="hidden" name="network" value="<? VAR Name ?>" /><? ENDIF ?>
|
||||
<div class="alert alert-info">Nick, AltNick, Ident, RealName, BindHost can be left empty to use the value from the user.</div>
|
||||
<? IF !Edit ?>
|
||||
<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="network" value="<? VAR Name ?>" maxlength="20" placeholder="The name of the IRC network.">
|
||||
</div>
|
||||
</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="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="inputActive" class="col-sm-2 control-label">Active:</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="checkboxSwitch">
|
||||
<input type="checkbox" value="1" name="doconnect" 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">
|
||||
<label for="inputServers" class="col-sm-2 control-label">Servers of this IRC network:</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" rows="5"><? LOOP ServerLoop ?><? VAR Server ?><? ENDLOOP ?></textarea>
|
||||
<span class="help-block">One server per line, "host [[+]port] [password]", + means SSL</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3>Flood Protection</h3>
|
||||
<hr>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="inputFloodpro" class="col-sm-2 control-label">Flood protection:</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="checkboxSwitch">
|
||||
<input type="checkbox" name="floodprotection" id="floodprotection_checkbox" placeholder="You might enable the flood protection. This prevents `excess flood' errors, which occur, when your IRC bot is command flooded or spammed." onchange="floodprotection_change();" <? IF FloodProtection ?>checked="checked"<? ENDIF ?> />
|
||||
<label for="floodprotection_checkbox"></label>
|
||||
</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 ?> /> seconds per line
|
||||
</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" placeholder="Defines the number of lines, which can be sent immediately." <? IF FloodProtection ?> value="<? VAR FloodBurst ?>" <? ELSE ?> value="4" disabled="disabled" <? ENDIF ?> /> lines can be sent immediately
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">floodprotection_change();</script>
|
||||
|
||||
<h3>Channels</h3>
|
||||
<hr>
|
||||
|
||||
<? 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><input type="checkbox" name="save_<? VAR Name ?>"<? IF InConfig ?> checked="checked"<? ENDIF ?> /></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 ?>
|
||||
|
||||
<h3>Modules</h3>
|
||||
<hr>
|
||||
<table class="table table-bordered table-hover table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>Status</td>
|
||||
<td>Name</td>
|
||||
<td>Arguments</td>
|
||||
<td>Description</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<? LOOP ModuleLoop ?>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="checkboxSwitch">
|
||||
<input type="checkbox" name="loadmod" id="lm_<? VAR Name ?>" 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 ?> />
|
||||
<? ENDIF ?>
|
||||
</td>
|
||||
<td><? VAR Description ?></td>
|
||||
</tr>
|
||||
<? ENDLOOP ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<? LOOP EmbeddedModuleLoop ?>
|
||||
<? IF Embed ?>
|
||||
<h3>Module <? VAR ModName ?></h3>
|
||||
<? INC *Embed ?>
|
||||
<? ENDIF ?>
|
||||
<? ENDLOOP ?>
|
||||
|
||||
<div class="btn-group pull-right">
|
||||
<input class="btn btn-danger" type="reset" value="Reset">
|
||||
<input class="btn btn-success" type="submit" value="<? IF Edit ?>Save<? ELSE ?>Add Network<? ENDIF ?>" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<? INC Footer.tmpl ?>
|
347
modules/webadmin/tmpl/add_edit_user.tmpl
Normal file
347
modules/webadmin/tmpl/add_edit_user.tmpl
Normal file
@@ -0,0 +1,347 @@
|
||||
<? INC Header.tmpl ?>
|
||||
<div class="container">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">Edit User</div>
|
||||
<div class="panel-body">
|
||||
<form class="form-horizontal" action="<? IF Edit ?>edituser<? ELSE ?>adduser<? ENDIF ?>" method="post">
|
||||
<? INC _csrf_check.tmpl ?>
|
||||
<div class="section">
|
||||
<input type="hidden" name="submitted" value="1" />
|
||||
|
||||
<h3>Authentication</h3>
|
||||
<hr>
|
||||
|
||||
<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 ?>" />
|
||||
<? ENDIF ?>
|
||||
|
||||
<? IF Edit ?>
|
||||
<input type="hidden" class="form-control" id="inputUsername" name="user" value="<? VAR Username ?>" />
|
||||
<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="Please enter a username." />
|
||||
<? 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="Please enter a password.">
|
||||
</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="Please re-type the above 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" 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>
|
||||
|
||||
<h3>IRC Information</h3>
|
||||
<hr>
|
||||
|
||||
<? 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>
|
||||
|
||||
<h3>Networks</h3>
|
||||
<hr>
|
||||
|
||||
<? 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 class="<? IF __EVEN__ ?>evenrow<? ELSE ?>oddrow<? ENDIF ?>">
|
||||
<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 ?>
|
||||
|
||||
|
||||
<h3>Modules</h3>
|
||||
<hr>
|
||||
|
||||
<table class="table table-bordered table-hover table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>Status</td>
|
||||
<td>Name</td>
|
||||
<td>Arguments</td>
|
||||
<td>Description</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<? LOOP ModuleLoop ?>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="checkboxSwitch">
|
||||
<input type="checkbox" name="loadmod" id="lm_<? VAR Name ?>" 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>
|
||||
</tr>
|
||||
<? ENDLOOP ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h3>Default Settings For New Future Channels</h3>
|
||||
<hr>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="inputModes" class="col-sm-2 control-label">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>
|
||||
|
||||
<h3>Flags</h3>
|
||||
<hr>
|
||||
|
||||
<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="checkboxSwitch">
|
||||
<input type="checkbox" name="<? VAR Name ?>" id="opt_<? VAR Name ?>" 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>
|
||||
|
||||
<h3>ZNC Behavior</h3>
|
||||
<hr>
|
||||
<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>
|
||||
</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="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="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!</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="input..." 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>
|
||||
|
||||
<? LOOP EmbeddedModuleLoop ?>
|
||||
<? IF Embed ?>
|
||||
<h3>Module <? VAR ModName ?></h3>
|
||||
<hr>
|
||||
|
||||
<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 class="btn-group pull-right">
|
||||
<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 ?>" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<? 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="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="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 Network Deletion</div>
|
||||
<div class="panel-body">
|
||||
<p>Are you absolutely sure you want to delete "<? VAR Username ?>"?</p>
|
||||
<br>
|
||||
<center>
|
||||
<form action="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="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 ?>
|
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">
|
||||
<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">
|
||||
<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="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>Action</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="edituser?user=<?VAR Username ESC=URL?>" class="btn btn-primary btn-xs">Edit</a>
|
||||
<a href="adduser?clone=<? VAR Username ESC=URL ?>" alt="Clone <? VAR Username ESC=URL ?>" class="btn btn-warning btn-xs">Clone</a>
|
||||
<? IF !IsSelf ?><a href="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 ?>
|
242
modules/webadmin/tmpl/settings.tmpl
Normal file
242
modules/webadmin/tmpl/settings.tmpl
Normal file
@@ -0,0 +1,242 @@
|
||||
<? INC Header.tmpl ?>
|
||||
|
||||
<div class="container">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">Settings</div>
|
||||
<div class="panel-body">
|
||||
<h3>Listen Port(s)</h3>
|
||||
<hr>
|
||||
<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>
|
||||
</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 IsWeb ?>" disabled="disabled" <? IF IsWeb ?>checked="checked"<? ENDIF ?>/>
|
||||
<label for="<? VAR IsWeb ?>"></label>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<? IF SuggestDeletion ?>
|
||||
<form action="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="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="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"/>
|
||||
<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="submit" class="btn btn-primary btn-xs" value="Add"/></td>
|
||||
</form>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<form class="form-horizontal" action="settings" method="post">
|
||||
<? INC _csrf_check.tmpl ?>
|
||||
<input type="hidden" name="submitted" value="1" />
|
||||
<h3>Settings</h3>
|
||||
<hr>
|
||||
<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="checkboxSwitch">
|
||||
<input type="checkbox" class="form-control" name="protectwebsessions" id="protectwebsessions_checkbox"<? 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="inputMOTD" class="col-sm-2 control-label">MOTD:</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea type="text" class="form-control" id="inputMOTD" name="motd" cols="70" 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>
|
||||
|
||||
<h3>Global Modules</h3>
|
||||
<hr>
|
||||
<table class="table table-bordered table-hover table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>Status</td>
|
||||
<td>Name</td>
|
||||
<td>Arguments</td>
|
||||
<td>Description</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<? LOOP ModuleLoop ?>
|
||||
<tr class="<? IF __EVEN__ ?>evenrow<? ELSE ?>oddrow<? ENDIF ?>">
|
||||
<td>
|
||||
<div class="checkboxSwitch">
|
||||
<input type="checkbox" name="loadmod" id="lm_<? VAR Name ?>" 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>
|
||||
</tr>
|
||||
<? ENDLOOP ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="btn-group pull-right">
|
||||
<input class="btn btn-danger" type="reset" value="Reset">
|
||||
<input class="btn btn-success" type="submit" value="Save" />
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<? INC Footer.tmpl ?>
|
137
modules/webadmin/tmpl/traffic.tmpl
Normal file
137
modules/webadmin/tmpl/traffic.tmpl
Normal file
@@ -0,0 +1,137 @@
|
||||
<? INC Header.tmpl ?>
|
||||
|
||||
<div class="container">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">Information</div>
|
||||
<div class="panel-body">
|
||||
<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 ?>
|
||||
<h3>Traffic</h3>
|
||||
<hr>
|
||||
<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