]> jfr.im git - irc/unrealircd/unrealircd-webpanel.git/commitdiff
Add box for adding server bans
authorValerie Pond <redacted>
Sat, 7 Jan 2023 13:53:26 +0000 (13:53 +0000)
committerValerie Pond <redacted>
Sat, 7 Jan 2023 13:53:26 +0000 (13:53 +0000)
css/unrealircd-admin.css
index.php

index 08c6212dbbc5c3f3ac3229cb52bdeeb0661e0576..4951659d74367c4106191350f6f0e1431ef1d071 100644 (file)
@@ -5,7 +5,34 @@
     width: 25%;
     box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
 }
+.tkl_add_boxheader {
+    font-weight: bold;
+    background-color: #4B86EE;
+    width: 24%;
+    color: white;
+    margin-top: 20px;
+    border: 10px solid #4B86EE;
+    border-top-left-radius: 10px;
+    border-top-right-radius: 10px;
+}
+
+.align_right {
+    width: 10px;
+    text-align: right;
+}
+
+.tkl_add_form {
+    background-color: lightgray;
+    padding: 10px;
+    width: 24%;
+    box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
+    line-height: 30px;
+}
 
+.tkl_add_form_contents {
+    margin-left: auto; 
+    margin-right: 0;
+}
 .users_overview {
     font-family: arial, sans-serif;
     border-collapse: collapse;
@@ -13,7 +40,9 @@
     width: 100%;
     box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
 }
-
+.input_text {
+    border-radius: 7px;
+}
 select {
     border-radius: 7px;
 }
@@ -54,6 +83,19 @@ a {
     border: 3px solid darkred;
     background-color: rgba(255, 78, 78, 0.295);
 }
+
+.align_label {
+    width: 80px;
+    display: inline-block;
+    text-align: right;
+}
+
+.align_right_button_tkl_add {
+    width: 400px;
+    display: inline-block;
+    text-align: right;
+}
+
 .label {
     white-space: nowrap;
     font-family: 'Heebo', sans-serif;
index 5706cc4aec5e409aae73f6683a2d4887c71f07e9..b8d44f524959c1c3324633dd70f9fcedbc53da1d 100644 (file)
--- a/index.php
+++ b/index.php
@@ -313,7 +313,81 @@ rpc_pop_lists();
 
        <div class="tab-content\">
        <div id="TKL" data-tab-content>
-       
+       <div class="tkl_add_boxheader">
+               Add Server Ban
+       </div>
+       <div class="tkl_add_form">
+               
+               <form action="" method="post">
+                       <div class="align_label">IP / Host:</div><input class="input_text" type="text" id="tkl_add" name="tkl_add"><br>
+                       <div class="align_label">Ban Type:</div><select name="bantype" id="bantype">
+                               <option value=""></option>
+                               <optgroup label="Bans">
+                                       <option value="kline">Kill Line (KLine)</option>
+                                       <option value="gline">Global Kill Line (GLine)</option>
+                                       <option value="zline">Zap Line (ZLine)</option>
+                                       <option value="gzline">Global Zap Line (GZLine)</option>
+                                       
+                               </optgroup>
+                               <optgroup label="Restrictions">
+                                       <option value="local-qline">Reserve Nick Locally(QLine)</option>
+                                       <option value="qline">Reserve Nick Globally (QLine)</option>
+                                       <option value="shun">Shun</option>
+
+                               </optgroup>
+                               <optgroup label="Settings">
+                                       <option value="except">Global Exception (ELine)</option>
+                                       <option value="local-exception">Local Exception (ELine)</option>
+                               </optgroup>
+                       </select><br>
+                       <div class="align_label"><label for="banlen_w">Duration: </label></div>
+                                       <select name="banlen_w" id="banlen_w">
+                                                       <?php
+                                                       for ($i = 0; $i <= 56; $i++)
+                                                       {
+                                                               if (!$i)
+                                                                       echo "<option value=\"0w\"></option>";
+                                                               else
+                                                               {
+                                                                       $w = ($i == 1) ? "week" : "weeks";
+                                                                       echo "<option value=\"$i" . "w\">$i $w" . "</option>";
+                                                               }
+                                                       }
+                                                       ?>
+                                       </select>
+                                       <select name="banlen_d" id="banlen_d">
+                                                       <?php
+                                                       for ($i = 0; $i <= 31; $i++)
+                                                       {
+                                                               if (!$i)
+                                                                       echo "<option value=\"0d\"></option>";
+                                                               else
+                                                               {
+                                                                       $d = ($i == 1) ? "day" : "days";
+                                                                       echo "<option value=\"$i" . "d\">$i $d" . "</option>";
+                                                               }
+                                                       }
+                                                       ?>
+                                       </select>
+                                       <select name="banlen_h" id="banlen_h">
+                                                       <?php
+                                                       for ($i = 0; $i <= 24; $i++)
+                                                       {
+                                                               if (!$i)
+                                                                       echo "<option value=\"0d\"></option>";
+                                                               else
+                                                               {
+                                                                       $h = ($i == 1) ? "hour" : "hours";
+                                                                       echo "<option value=\"$i" . "h\">$i $h" . "</option>";
+                                                               }
+                                                       }
+                                                       ?>
+                                       </select>
+                                       <br><div class="align_label"><label for="ban_reason">Reason: </label></div>
+                                       <input class="input_text" type="text" id="ban_reason" name="ban_reason"><br>
+                                       <div class="align_right_button_tkl_add"><input class="cute_button" type="submit" id="submit" value="Submit"></div>
+               </form>
+       </div>
        <table class='users_overview'>
        <form action="" method="post">
        <th><input type="checkbox" label='selectall' onClick="toggle_tkl(this)" />Select all</th>