-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.php
97 lines (60 loc) · 1.44 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
<html>
<!--
MyV No Adblock config install file
-->
<header>
<link rel="stylesheet" href="css/main.css">
<title>MyV No Adblock</title>
</header>
<body>
<center>
<div id="no-ab-ground">
<?php
if (!file_exists('config.php')){
echo '
<img src="https://envato.m-y-v.com/img/n-ab.png" alt="MyV Logo" width="300" height="auto">
<br>
<h2>Installing</h2>
<h4>Please wait ...</h4>
<div id="no-ab-footer">MyV - No Adblock</div>
';
$conffile = fopen("config.php", "w") or die("<br>ERROR: Cannot create config file!<br> Set the permissions of the folder to 777");
$url = $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"];
$urlParts = explode("index.php", $url);
$txt = '<?php
// MyV No Adblock Config file
$config = [
"url" => "' . $urlParts[0] . '",
];
?>';
fwrite($conffile, $txt);
fclose($conffile);
?>
<script>
window.location.replace("?installed=true");
</script>
<?php
} else{
if ($_GET["installed"] == "true"){
echo '
<img src="https://envato.m-y-v.com/img/n-ab.png" alt="MyV Logo" width="300" height="auto">
<br>
<h2>Installed</h2>
<h4>You have successfully installed No Adblock</h4>
<div id="no-ab-footer">MyV - No Adblock</div>
';
} else{
echo '
<img src="https://envato.m-y-v.com/img/n-ab.png" alt="MyV Logo" width="300" height="auto">
<br>
<h2>Active</h2>
<h4>No Adblock is active and ready to use</h4>
<div id="no-ab-footer">MyV - No Adblock</div>
';
}
}
?>
</div>
</center>
</body>
</html>