-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
executable file
·129 lines (107 loc) · 4.75 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
<?php
if (isset($_POST['passw'])){
$mdp = md5($_POST['passw']);
$mdp_admin = "24109b73defbf52c9bad6783f37cca52";
if ($mdp == $mdp_admin){
$message = "<script>$('#modalConfirmDelete').modal('show');</script>";
}
else{
$message = "Le mot de passe est incorrect";
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Eteindre</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/png" href="images/LOGO-OSP-MENETP.png"/>
<link rel="stylesheet" type="text/css" href="vendor/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="fonts/font-awesome-4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="fonts/Linearicons-Free-v1.0.0/icon-font.min.css">
<link rel="stylesheet" type="text/css" href="vendor/animate/animate.css">
<link rel="stylesheet" type="text/css" href="vendor/css-hamburgers/hamburgers.min.css">
<link rel="stylesheet" type="text/css" href="vendor/animsition/css/animsition.min.css">
<link rel="stylesheet" type="text/css" href="vendor/select2/select2.min.css">
<link rel="stylesheet" type="text/css" href="vendor/daterangepicker/daterangepicker.css">
<link rel="stylesheet" type="text/css" href="css/util.css">
<link rel="stylesheet" type="text/css" href="css/main.css">
<link rel="stylesheet" type="text/css" href="css/modal.css">
<script src="vendor/jquery/jquery-3.2.1.min.js"></script>
<script src="vendor/animsition/js/animsition.min.js"></script>
<script src="vendor/bootstrap/js/popper.js"></script>
<script src="vendor/bootstrap/js/bootstrap.min.js"></script>
<script src="vendor/select2/select2.min.js"></script>
<script src="vendor/daterangepicker/moment.min.js"></script>
<script src="vendor/daterangepicker/daterangepicker.js"></script>
<script src="vendor/countdowntime/countdowntime.js"></script>
<script src="js/main.js"></script>
</head>
<body>
<!--Modal: modalConfirmDelete-->
<div class="modal fade" id="modalConfirmDelete" tabindex="-1" role="dialog" aria-labelledby="modalConfirmDelete" aria-hidden="true">
<div class="modal-dialog modal-sm modal-notify modal-danger" role="document">
<!--Content-->
<div class="modal-content text-center">
<!--Header-->
<div class="modal-header d-flex justify-content-center" style="background-color: #ff3547;">
<p class="heading" style="color: #ffffff;">Vous êtes sûr ?</p>
</div>
<!--Body-->
<div class="modal-body">
<i class="fa fa-times" style="font-size: 60px; color: #ff3547;"></i>
<p> Etes vous sûr de vouloir éteindre le serveur ?</p>
</div>
<!--Footer-->
<div class="modal-footer" style="justify-content: center;">
<form method="POST">
<button class="btn btn-outline-danger" style="color: #ff3547; border-color: #ff3547" name="ekena">Oui</button>
</form>
<a type="button" class="btn btn-danger waves-effect" data-dismiss="modal" style="background-color: #ff3547; color: #ffffff; border-color: #ff3547; cursor: pointer;">Non</a>
</div>
</div>
<!--/.Content-->
</div>
</div>
<!--Modal: modalConfirmDelete-->
<div class="limiter">
<div class="container-login100">
<div class="wrap-login100">
<div class="login100-form-title" style="background-image: url(images/penci.jpg);">
<span class="login100-form-title-1">
Eteindre le serveur
</span>
</div>
<form class="login100-form validate-form" style="margin-left: -5%;" method="POST">
<div class="wrap-input100 validate-input m-b-26" >
<span class="label-input100"><i class="fa fa-user"></i></span>
<input class="input100" style="font-weight:bold;" type="text" name="username" placeholder="" value = "Admin" disabled>
<span class="focus-input100"></span>
</div>
<div class="wrap-input100 validate-input m-b-18" data-validate = "Le mot de passe est réquis">
<span class="label-input100"><i class="fa fa-lock"></i></span>
<input class="input100" style="font-weight:bold;" type="password" name="passw" placeholder="Entrer le mot de passe">
<span class="focus-input100"></span>
</div>
<div class="flex-sb-m w-full p-b-30">
<p style="color:#ff3547; font-weight:bold; margin-left:18%">
<?php echo $message?>
</p>
</div>
<div class="container-login100-form-btn" style="margin-top: 2%; margin-bottom: -10%; margin-left: 26%;">
<button class="login100-form-btn">
<i class="fa fa-power-off"> <span class="eteindre" >Eteindre </span> </i>
</button>
</div>
</form>
</div>
</div>
</div>
</body>
</html>
<?php
if (isset($_POST['ekena'])){
shell_exec("python3 shutdown.py");
}
?>