<?php
require_once "../common.php";
+require_once "../connection.php";
require_once "../header.php";
if ($uplink = $rpc->server()->get())
$channame = "";
$nick = NULL;
$channelObj = NULL;
+
+$can_edit = current_user_can(PERMISSION_EDIT_CHANNEL);
do_log($_GET);
do_log($_POST);
if (isset($_GET['chan']))
}
}
- if (isset($_POST['newmodes']) && isset($_POST['paramed_modes']))
+ if (isset($_POST['newmodes']) && isset($_POST['paramed_modes']) && $can_edit)
{
$m = $_POST['newmodes'];
$p = $_POST['paramed_modes'];
?>
<title><?php echo $title; ?></title>
<h6><?php echo $title; ?></h6>
-<br>
<form method="get" action="details.php">
</label>
</div>
<div class="input-group mb-3">
- <label for="bantype_sel_type">Ban Type
+ <label for="bantype_sel_type">Ban Type <small>Leave this blank for a "normal" ban</small>
<select class="form-control" name="bantype_sel_type" id="bantype_sel_type">
<option></option>
<option>Match Account</option>
</div>
<div class="modal-body">
<form method="post">
-
<?php generate_edit_chmodes($channelObj); ?>
-
- </div>
- <div class="modal-footer">
<input type="hidden" id="server" name="add_chex" value="e"></input>
<button id="CloseButton" type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button>
<button type="submit" action="post" class="btn btn-danger">Update</button>
<div class="tab-content">
<br>
<div class="tab-pane fade in" id="chanmodes">
- <button id="editlol" class="btn btn-sm btn-primary">Change Settings</button>
+ <button id="editlol" class="btn btn-sm btn-primary" <?php echo ($can_edit) ? "" : "disabled"; ?>>Change Settings</button>
<p class="card-text"><?php generate_html_chansettings($channelObj); ?></p>
</div><form id="editchanmodes" method="post" name="editchanmodes">
<div class="tab-pane" style="display: none" id="chanmodes_edit">