-
Notifications
You must be signed in to change notification settings - Fork 0
/
default_hostingerid.php
553 lines (250 loc) · 10.3 KB
/
default_hostingerid.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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
<?
header('Content-Type: text/html; charset=utf-8');
$host = $_SERVER['HTTP_HOST'];
setlocale(LC_TIME, "id_ID");
date_default_timezone_set('Asia/Jakarta');
/*
Directory Listing Script - Version 2
====================================
Script Author: Ash Young <[email protected]>. www.evoluted.net
Layout: Manny <[email protected]>. www.tenka.co.uk
*/
$startdir = '.';
$showthumbnails = false;
$showdirs = true;
$forcedownloads = false;
$hide = array(
'dlf',
'public_html',
'index.php',
'Thumbs',
'.htaccess',
'.htpasswd'
);
$displayindex = false;
$allowuploads = false;
$overwrite = false;
$indexfiles = array (
'index.html',
'index.htm',
'default.htm',
'default.html'
);
$filetypes = array (
'png' => 'jpg.gif',
'jpeg' => 'jpg.gif',
'bmp' => 'jpg.gif',
'jpg' => 'jpg.gif',
'gif' => 'gif.gif',
'zip' => 'archive.png',
'rar' => 'archive.png',
'exe' => 'exe.gif',
'setup' => 'setup.gif',
'txt' => 'text.png',
'htm' => 'html.gif',
'html' => 'html.gif',
'php' => 'php.gif',
'fla' => 'fla.gif',
'swf' => 'swf.gif',
'xls' => 'xls.gif',
'doc' => 'doc.gif',
'sig' => 'sig.gif',
'fh10' => 'fh10.gif',
'pdf' => 'pdf.gif',
'psd' => 'psd.gif',
'rm' => 'real.gif',
'mpg' => 'video.gif',
'mpeg' => 'video.gif',
'mov' => 'video2.gif',
'avi' => 'video.gif',
'eps' => 'eps.gif',
'gz' => 'archive.png',
'asc' => 'sig.gif',
);
error_reporting(0);
if(!function_exists('imagecreatetruecolor')) $showthumbnails = false;
$leadon = $startdir;
if($leadon=='.') $leadon = '';
if((substr($leadon, -1, 1)!='/') && $leadon!='') $leadon = $leadon . '/';
$startdir = $leadon;
if($_GET['dir']) {
// check this is okay.
if(substr($_GET['dir'], -1, 1)!='/') {
$_GET['dir'] = $_GET['dir'] . '/';
}
$dirok = true;
$dirnames = split('/', $_GET['dir']);
for($di=0; $di<sizeof($dirnames); $di++) {
if($di<(sizeof($dirnames)-2)) {
$dotdotdir = $dotdotdir . $dirnames[$di] . '/';
}
if($dirnames[$di] == '..') {
$dirok = false;
}
}
if(substr($_GET['dir'], 0, 1)=='/') {
$dirok = false;
}
if($dirok) {
$leadon = $leadon . $_GET['dir'];
}
}
$opendir = $leadon;
if(!$leadon) $opendir = '.';
if(!file_exists($opendir)) {
$opendir = '.';
$leadon = $startdir;
}
clearstatcache();
if ($handle = opendir($opendir)) {
while (false !== ($file = readdir($handle))) {
// first see if this file is required in the listing
if ($file == "." || $file == "..") continue;
$discard = false;
for($hi=0;$hi<sizeof($hide);$hi++) {
if(strpos($file, $hide[$hi])!==false) {
$discard = true;
}
}
if($discard) continue;
if (@filetype($leadon.$file) == "dir") {
if(!$showdirs) continue;
$n++;
if($_GET['sort']=="date") {
$key = @filemtime($leadon.$file) . ".$n";
}
else {
$key = $n;
}
$dirs[$key] = $file . "/";
}
else {
$n++;
if($_GET['sort']=="date") {
$key = @filemtime($leadon.$file) . ".$n";
}
elseif($_GET['sort']=="size") {
$key = @filesize($leadon.$file) . ".$n";
}
else {
$key = $n;
}
$files[$key] = $file;
if($displayindex) {
if(in_array(strtolower($file), $indexfiles)) {
header("Location: $file");
die();
}
}
}
}
closedir($handle);
}
// sort our files
if($_GET['sort']=="date") {
@ksort($dirs, SORT_NUMERIC);
@ksort($files, SORT_NUMERIC);
}
elseif($_GET['sort']=="size") {
@natcasesort($dirs);
@ksort($files, SORT_NUMERIC);
}
else {
@natcasesort($dirs);
@natcasesort($files);
}
// order correctly
if($_GET['order']=="desc" && $_GET['sort']!="size") {$dirs = @array_reverse($dirs);}
if($_GET['order']=="desc") {$files = @array_reverse($files);}
$dirs = @array_values($dirs); $files = @array_values($files);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Selamat datang di <? print $host; ?>! Hostinger web hosting gratis dengan PHP, MySQL.</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="http://www.main-hosting.com/hostinger/welcome/css/site.css" media="screen" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="main">
<div id="content">
<div class="header">
<a id="logo" href="http://www.idhostinger.com/"><img src="http://www.idhostinger.com/images/logo-id.png" alt="Web hosting" /></a>
</div>
<div class="content">
<h1>Akun Anda telah dibuat!</h1>
<p>Website <b><? print $host; ?></b> telah sukses diinstal di server kami! Silahkan Anda hapus file <b>default.php</b> dari folder <b>public_html</b> dan kemudian uploadlah website Anda dengan menggunakan FTP atau File Manajer</p>
<p>Berikut adalah daftar file Anda yang berada di folder public_html:</p>
<div id="files">
<div class="top"></div>
<div class="cont">
<div id="listingcontainer">
<div id="listing">
<?
$class = 'b';
if($dirok) {
?>
<div><a href="<?=$dotdotdir;?>" class="<?=$class;?>"><img src="http://www.main-hosting.com/hostinger/welcome/index/dirup.png" alt="Folder" /><strong>..</strong> <em>-</em><? $mtime = filemtime($dotdotdir); $mtime = date("m/d/Y H:i:s", $mtime); $mtime = strftime("%B %e, %G %T", strtotime($mtime)); print ucfirst($mtime); ?></a></div>
<?
if($class=='b') $class='w';
else $class = 'b';
}
$arsize = sizeof($dirs);
for($i=0;$i<$arsize;$i++) {
?>
<div><a href="<?=$leadon.$dirs[$i];?>" class="<?=$class;?>"><img src="http://www.main-hosting.com/hostinger/welcome/index/folder.png" alt="<?=$dirs[$i];?>" /><strong><?=$dirs[$i];?></strong> <em>-</em><? $mtime = filemtime($leadon.$dirs[$i]); $mtime = date("m/d/Y H:i:s", $mtime); $mtime = strftime("%B %e, %G %T", strtotime($mtime)); print ucfirst($mtime); ?></a></div>
<?
if($class=='b') $class='w';
else $class = 'b';
}
$arsize = sizeof($files);
for($i=0;$i<$arsize;$i++) {
$icon = 'unknown.png';
$ext = strtolower(substr($files[$i], strrpos($files[$i], '.')+1));
$supportedimages = array('gif', 'png', 'jpeg', 'jpg');
$thumb = '';
if($filetypes[$ext]) {
$icon = $filetypes[$ext];
}
$filename = $files[$i];
if(strlen($filename)>43) {
$filename = substr($files[$i], 0, 40) . '...';
}
$fileurl = $leadon . $files[$i];
?>
<div><a href="<?=$fileurl;?>" class="<?=$class;?>"<?=$thumb2;?>><img src="http://cpanel.main-hosting.com/images/index/<?=$icon;?>" alt="<?=$files[$i];?>" /><strong><?=$filename;?></strong><em><?=round(filesize($leadon.$files[$i])/1024);?> KB</em><? $mtime = filemtime($leadon.$files[$i]); $mtime = date("m/d/Y H:i:s", $mtime); $mtime = strftime("%B %e, %G %T", strtotime($mtime)); print ucfirst($mtime); ?><?=$thumb;?></a></div>
<?
if($class=='b') $class='w';
else $class = 'b';
}
?>
</div>
</div>
</div>
<div class="bottom"></div>
<div class="clear"></div>
</div>
<div class="clear"></div>
</div>
<div class="footer"></div>
<div class="clear"></div>
</div>
<div id="footer">
<div class="links">
<a href="http://www.idhostinger.com/web-hosting" target="_blank">Web Hosting</a>
<span class="pipe">|</span>
<a href="http://www.idhostinger.com/hosting-gratis" target="_blank">Hosting Gratis</a>
<span class="pipe">|</span>
<a href="http://www.idhostinger.com/forum" target="_blank">Support Forum</a>
<span class="pipe">|</span>
<a href="http://cpanel.idhostinger.com/" target="_blank">Client Login</a>
</div>
<div class="copyright">Hostinger © <? print date('Y'); ?>. All rights reserved</div>
<div class="social-icons">
<a href="http://www.facebook.com/IDHostinger"><img src="http://www.main-hosting.com/hostinger/welcome/images/fb.gif" /></a>
<a href="https://twitter.com/IDHostinger"><img src="http://www.main-hosting.com/hostinger/welcome/images/twitter.gif" /></a>
</div>
</div>
</div>
</body>
</html>