-
Notifications
You must be signed in to change notification settings - Fork 0
/
check.php
74 lines (71 loc) · 1.54 KB
/
check.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
<?php
require('functions.php');
$user = $_GET['acc'];
$pass = $_GET['pwd'];
$host = $_GET['srv'];
$data = unserialize(_check($user, $pass, $host));
if ($data[0] == 'OK')
{
$status = 'OK';
$traffic = round(($data / 1000 / 1000)) . ' MB'.' / '.round(($data[1] / 1000 / 1000 / 1000)) . ' GB';
}
elseif ($data[0] == 'ERROR')
{
$status = $data[1];
$traffic = 0;
}
else
{
$status = $data[0];
$traffic = 0;
}
?>
<table class="table">
<tr>
<td align="left">Account</td>
<td>:</td>
<td><b><?=$user?></b></td>
</tr>
<tr>
<td align="left">Passwort</td>
<td>:</td>
<td><b><?=$pass?></b></td>
</tr>
<tr>
<td align="left">Server</td>
<td>:</td>
<td><b><?=$host?></b></td>
</tr>
<tr>
<td align="left">Status</td>
<td>:</td>
<td><b><?=$status?></b></td>
</tr>
<?php if ($traffic > 0) { ?>
<tr>
<td align="left">Traffic</td>
<td>:</td>
<td><b><?=$traffic?></b></td>
</tr>
<?php
}
$user = base64_encode($user);
$pass = base64_encode($pass);
$host = base64_encode($host);
$img = sprintf('image.php?acc=%s=&pwd=%s&srv=%s', $user, $pass, $host);
?>
<tr>
<td align="left">Image</td>
<td>:</td>
<td><img src="<?=$img?>" alt="" /></td>
</tr>
<tr>
<td align="left">BBCode</td>
<td>:</td>
<?php
$bbcode = '[url=http://%s/][img]http://%s/image.php?acc=%s=&pwd=%s&srv=%s[/img][/url]';
$bbcode = sprintf($bbcode, $_SERVER['SERVER_NAME'], $_SERVER['SERVER_NAME'], $user, $pass, $host);
?>
<td><input class="box" type="text" value="<?=$bbcode?>" onmouseover="high(this)" onclick="high(this)" /></td>
</tr>
</table>