The UI for IP/Email bans is ready to go
This commit is contained in:
parent
31d4eb3ee5
commit
7b3bc087b1
@ -479,7 +479,7 @@ if ( defined('HESK_DEMO') )
|
||||
<li><a href="#numods-general" data-toggle="tab"><?php echo $hesklang['tab_1']; ?></a></li>
|
||||
<li><a href="#statuses" data-toggle="tab"><?php echo $hesklang['statuses']; ?></a></li>
|
||||
<li><a href="#colors" data-toggle="tab"><?php echo $hesklang['uiColors']; ?></a></li>
|
||||
<li><a href="#deniedParties" data-toggle="tab">(!) IP / Email Bans</a></li>
|
||||
<li><a href="#ipEmailBans" data-toggle="tab"><?php echo $hesklang['ip_email_bans']; ?></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@ -2157,16 +2157,16 @@ if ( defined('HESK_DEMO') )
|
||||
</div>
|
||||
</div>
|
||||
<!-- NuMods: Denied Parties -->
|
||||
<div class="tab-pane fade in" id="deniedParties">
|
||||
<h6 style="font-weight: bold">(!) IP Bans</h6>
|
||||
<div class="tab-pane fade in" id="ipEmailBans">
|
||||
<h6 style="font-weight: bold"><?php echo $hesklang['ip_bans']; ?></h6>
|
||||
<div class="footerWithBorder blankSpace"></div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Delete</th> <!-- Checkbox placeholder -->
|
||||
<th>(!) From</th>
|
||||
<th>(!) To</th>
|
||||
<th><?php echo $hesklang['delete']; ?></th>
|
||||
<th><?php echo $hesklang['from']; ?></th>
|
||||
<th><?php echo $hesklang['ip_to']; ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@ -2175,20 +2175,52 @@ if ( defined('HESK_DEMO') )
|
||||
while ($row = $ipRs->fetch_assoc()) {
|
||||
echo '<tr id="trIp'.$row['ID'].'">';
|
||||
echo '<td><input type="checkbox" name="ipDelete'.$row['ID'].'" onclick="toggleRow(\'trIp'.$row['ID'].'\')"></td>';
|
||||
echo '<td><input type="text" id="ipFrom'.$row['ID'].'" name="ipFrom'.$row['ID'].'" placeholder="From" class="form-control" value="'.$row['RangeStart'].'"></td>';
|
||||
echo '<td><input type="text" id="ipTo'.$row['ID'].'" name="ipTo'.$row['ID'].'" placeholder="To" class="form-control" value="'.$row['RangeEnd'].'"></td>';
|
||||
echo '<td><input type="text" name="ipFrom'.$row['ID'].'" placeholder="'.$hesklang['from'].'" class="form-control" value="'.$row['RangeStart'].'"></td>';
|
||||
echo '<td><input type="text" name="ipTo'.$row['ID'].'" placeholder="'.$hesklang['ip_to'].'" class="form-control" value="'.$row['RangeEnd'].'"></td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
|
||||
?>
|
||||
<tr class="info">
|
||||
<!-- Add new IP range -->
|
||||
<td><b>(!)Add New</b></td>
|
||||
<td><b><?php echo $hesklang['addNew']; ?></b></td>
|
||||
<td>
|
||||
<input type="text" id="addIpFrom" name="addIpFrom" placeholder="From" class="form-control">
|
||||
<input type="text" name="addIpFrom" placeholder="<?php echo $hesklang['from']; ?>" class="form-control">
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" id="addIpTo" name="addIpTo" placeholder="To" class="form-control">
|
||||
<input type="text" name="addIpTo" placeholder="<?php echo $hesklang['ip_to']; ?>" class="form-control">
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="blankSpace"></div>
|
||||
<h6 style="font-weight: bold"><?php echo $hesklang['email_bans']; ?></h6>
|
||||
<div class="footerWithBorder blankSpace"></div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php echo $hesklang['delete']; ?></th>
|
||||
<th><?php echo $hesklang['email']; ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$emailRs = hesk_dbQuery('SELECT * FROM `'.$hesk_settings['db_pfix'].'denied_emails`');
|
||||
while ($row = $emailRs->fetch_assoc()) {
|
||||
echo '<tr id="trEmail'.$row['ID'].'">';
|
||||
echo '<td><input type="checkbox" name="emailDelete'.$row['ID'].'" onclick="toggleRow(\'trEmail'.$row['ID'].'\')"></td>';
|
||||
echo '<td><input type="text" name="email'.$row['ID'].'" class="form-control" placeholder="'.$hesklang['email'].'" value="'.$row['Email'].'"></td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
?>
|
||||
|
||||
<!-- Add new email -->
|
||||
<tr class="info">
|
||||
<td><b><?php echo $hesklang['addNew']; ?></b></td>
|
||||
<td>
|
||||
<input type="text" name="addEmail" class="form-control" placeholder="<?php echo $hesklang['email']; ?>">
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -8,7 +8,7 @@ hesk_dbQuery("CREATE TABLE `".$hesk_settings['db_pfix']."denied_ips` (
|
||||
`ID` INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
||||
`RangeStart` VARCHAR(100) NOT NULL,
|
||||
`RangeEnd` VARCHAR(100) NOT NULL)");
|
||||
hesk_dbQuery("CREATE TABLE `".$hesk_settings['db_pfix']."denied_emails` (Email VARCHAR(100) NOT NULL PRIMARY KEY);");
|
||||
hesk_dbQuery("CREATE TABLE `".$hesk_settings['db_pfix']."denied_emails` (ID INT NOT NULL PRIMARY KEY AUTO_INCREMENT, Email VARCHAR(100) NOT NULL PRIMARY KEY);");
|
||||
?>
|
||||
|
||||
<h1>Update complete!</h1>
|
||||
|
@ -53,6 +53,10 @@ $hesklang['showIconsHelp'] = 'Check this box to show icons next to navigation ba
|
||||
$hesklang['maintenanceMode'] = 'Maintenance Mode';
|
||||
$hesklang['maintenanceModeHelp'] = 'Check this box to put the Help Desk in maintenance mode. Staff can still log into the backend, but the front end will be inaccessible.';
|
||||
$hesklang['err_nuMods_settings'] = 'Can\'t open file <b>nuMods_settings.inc.php</b> for writing. Please CHMOD this file to 666 (rw-rw-rw-)';
|
||||
$hesklang['ip_to'] = 'To';
|
||||
$hesklang['ip_bans'] = 'IP Bans';
|
||||
$hesklang['email_bans'] = 'Email Bans';
|
||||
$hesklang['ip_email_bans'] = 'IP / Email Bans';
|
||||
|
||||
// ADDED OR MODIFIED IN NuMods 1.3.1
|
||||
$hesklang['autorefresh'] = 'Autorefresh:';
|
||||
|
Loading…
x
Reference in New Issue
Block a user