-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathprelogout.php
51 lines (49 loc) · 1.33 KB
/
prelogout.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
<?php
/*
* pmt.mcpe.me
*
* Copyright (C) 2015 PEMapModder
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* @author PEMapModder
*/
require_once __DIR__ . "/utils.php";
$proj = forceProject();
?>
<html>
<head>
<title>Reset Plugin | Plugin Generator</title>
<link rel="stylesheet" type="text/css" href="style/normal.css">
<?= INCLUDE_JQUERY ?>
<script>
var nameConfirm;
var checkName = function(){
var input = nameConfirm.val();
if(input == <?= json_encode($proj->getDesc()->getName()) ?>){
var submit = $("#submit");
submit.prop("disabled", false);
submit.click(function(){
window.location.replace("logout.php");
});
}
setTimeout(checkName, 100);
};
$(document).ready(function(){
nameConfirm = $("#nameConfirm");
setTimeout(checkName, 100);
});
</script>
</head>
<body>
<p>
Are you really sure to reset the project? Your settings will be lost <em>forever</em>!<br>
Type the name of the project (<strong><?= $proj->getDesc()->getName() ?></strong>) to confirm.
</p>
<input type="text" id="nameConfirm">
<button disabled type="button" id="submit">Confirm reset</button>
</body>
</html>