Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
nikrozman21 committed May 3, 2019
1 parent 2bb50ae commit d5b27bc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
echo '<td class="column3">' . $row['comment'] . '</td>';
echo '<td class="column4"></td>';
echo '<td class="column5"></td>';
echo '<td class="column6"><a class="btn btn-primary btn-sm" href="https://yourwebsite/manage?ip=' . $row['ip'] . '" role="button">Edit</a></td>';
echo '<td class="column6"><a class="btn btn-primary btn-sm" href="https://ipinfo.accuratenode.com/manage?ip=' . $row['ip'] . '" role="button">Edit</a></td>';
echo '</tr>';}
?>
</tbody>
Expand Down
20 changes: 11 additions & 9 deletions manage.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
<?php
session_start();
if(!isset($_SESSION['login'])) {
header('LOCATION:login'); die();}
if($_GET['ip'] == ''){
header('LOCATION:admin'); die();}
include 'config.php';
session_name(NAME);
session_start();
if (isset($_SESSION['id'])) {
$id = $_SESSION['id'];
$userInfo = $odb->query("SELECT * FROM `users` WHERE `id` = '$id'")->fetch();
}
else {
header('LOCATION: login');
}
?>

<!DOCTYPE html>
<html lang="en">

Expand Down Expand Up @@ -41,7 +45,6 @@
</tr>
</thead>
<tbody>

<?php
echo '<tr>';
echo '<td class="column1"><form action="post.php" method="post"><input type="text" name="ip" value="'. $_GET['ip'] . '" readonly> </td>';
Expand All @@ -51,8 +54,7 @@
echo '<td class="column5"></td>';
echo '<td class="column6"><input class="btn btn-primary btn-sm" type="submit"></td></form>';
echo '</tr>';
mysqli_close($con);
?>
?>
</tbody>
</table>
</div>
Expand Down

0 comments on commit d5b27bc

Please sign in to comment.