Skip to content

Commit

Permalink
started on adding DB Based Server-Adding in servers.php l. 111
Browse files Browse the repository at this point in the history
  • Loading branch information
jmbluethner committed May 20, 2019
1 parent c2e542f commit fb3b79a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
1 change: 0 additions & 1 deletion plugins/home.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
<h1>Home</h1>
<div class="pane">
<h2>Welcome <?php print_r($_SESSION['username']) ?></h2>
<p class="contenttext">There are currently 4 Servers with a total of 13 Players</p>
</div>
<div class="pane" id="pane_servers">
<h3>Servers</h3>
Expand Down
19 changes: 13 additions & 6 deletions plugins/servers.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@
</button>
<div style="height: 35px; width: 1px;"></div>
<h4>Add server</h4>
<div class="flexwrap_line">
<input placeholder="Server Address" type="text" class="textinput split"></input>
<input placeholder="Port" type="text" class="textinput split"></input>
<input placeholder="Rcon Password" type="text" class="textinput split"></input>
</div>
<button class="buttonLarge">Add Server to Database</button>
<form method="get" action="servers.php">
<div class="flexwrap_line">
<input name="Sip" placeholder="Server Address" type="text" class="textinput split"></input>
<input name="Sport" placeholder="Port" type="text" class="textinput split"></input>
<input name="Srcon" placeholder="Rcon Password" type="text" class="textinput split"></input>
</div>
<button type="submit" name="addServer" class="buttonLarge">Add Server to Database</button>
</form>
</div>

<div class="pane" id="pane_ServerDetail_1">
Expand Down Expand Up @@ -104,5 +106,10 @@
</div>

<script src="../assets/js/functions.js"></script>
<?php
if(isset($_GET['addServer'])) {
// Check if IP is pingable, than add to Database
}
?>
</body>
</html>

0 comments on commit fb3b79a

Please sign in to comment.