-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfil.php
123 lines (121 loc) · 3.38 KB
/
fil.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
<?
session_start();
include"head.php";
if(session_is_registered('log')){
switch($ad)
{case ipx :
if($ip!='')
{$op=fopen("./lib/ip-blacklisted.db","a");
fwrite($op,"$ip\r\n");
fclose($op);
echo "
<div class=\"alert alert-dismissable alert-success\">
<button type=\"button\" class=\"close\" data-dismiss=\"alert\">×</button>
<strong>Oke!</strong> $ip was addedd to Deny Ips. <a onclick=\"history.back()\" class=\"alert-link\">back.</a>.
</div>
";}
else{}
break;
case spamx :
if($spam!='')
{$op=fopen("./lib/spamw.db","a");
fwrite($op,"$spam\r\n");
fclose($op);
echo "
<div class=\"alert alert-dismissable alert-success\">
<button type=\"button\" class=\"close\" data-dismiss=\"alert\">×</button>
<strong>Oke!</strong> $spam was added to list Spam!. <a onclick=\"history.back()\" class=\"alert-link\">back.</a>.
</div>
";}
else{}
break;
}
switch($fil){
case ip : ?>
<form action="<?=$PHP_SELF;?>?ad=ipx" method="post">
<div class="form-group">
<label class="control-label">Input IP</label>
<div class="input-group">
<span class="input-group-addon"><i class="fa fa-ban"></i></span>
<input class="form-control" type="text" name="ip">
<span class="input-group-btn">
<button class="btn btn-default" type="submit" Value="Tambahkan">Add</button>
</span>
</div>
</form>
<?
break;
case spam : ?>
<form action="<?=$PHP_SELF;?>?ad=spamx" method="post">
<div class="form-group">
<label class="control-label">Input Word</label>
<div class="input-group">
<span class="input-group-addon"><i class="fa fa-times"></i></span>
<input class="form-control" type="text" name="spam">
<span class="input-group-btn">
<button class="btn btn-default" type="submit" Value="Tambahkan">Add</button>
</span>
</div>
</form>
<?
break;
}
switch($show)
{
case ip :
$data=file("./lib/ip-blacklisted.db");
$total=count($data);
$post=15;
if ($hal == "")
{$hal = "1";}
$first = $total - ($post * ($hal - 1));
$second = $total - ($post * $hal) + 1;
if ($second < 1) {$second = 1;}
$hals = ($total / $post);
if ($hal>1) $rew = "<a href=\"$PHP_SELF?show=ip&hal=".($hal-1)."\">".($hal-1)."</a>";
if ($hal<$hals) $next = "<a href=\"$PHP_SELF?show=ip&hal=".($hal+1)."\">".($hal+1)."</a>";
echo "<div class=\"panel panel-danger\"> <div class=\"panel-heading\"> <h3 class=\"panel-title\">List of IP Deny</h3> </div>
";
for ($i = $first-1; $i >= $second-1; $i--)
{
$ii = $i;$ii++;
echo $data[$i].' </br>';}
echo "
</div></div>
<p><a class=\"btn btn-default\" href=\"$PHP_SELF?fil=ip\">Add More</a></p></div>
<th><p>$rew $next</p>";
break;
case spam :
$data=file("./lib/spamw.db");
$total=count($data);
$post=15;
if ($hal == "")
{$hal = "1";}
$first = $total - ($post * ($hal - 1));
$second = $total - ($post * $hal) + 1;
if ($second < 1) {$second = 1;}
$hals = ($total / $post);
if ($hal>1) $rew = "<a href=\"$PHP_SELF?show=spam&hal=".($hal-1)."\">".($hal-1)."</a>";
if ($hal<$hals) $next = "<a href=\"$PHP_SELF?show=spam&hal=".($hal+1)."\">".($hal+1)."</a>";
echo "
<div class=\"panel panel-warning\">
<div class=\"panel-heading\">
<h3 class=\"panel-title\">List of Spams</h3>
</div>
<div class=\"panel-body\">
";
for ($i = $first-1; $i >= $second-1; $i--)
{
$ii = $i;$ii++;
$isi=explode(' ',$data[$i]);
echo $isi[0]."</br>";}
echo "
</div>
</div>
<p><a class=\"btn btn-default\" href=\"$PHP_SELF?fil=spam\">Add More</a></p></div>
<p>$rew $next</p>";
break;
}
}
include"cp.php";
include"footer.php";?>