Advertisement
pusatdata

Index of File dari Idhostinger.com

Dec 3rd, 2014
267
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.06 KB | None | 0 0
  1. <?
  2. header('Content-Type: text/html; charset=utf-8');
  3. $host = $_SERVER['HTTP_HOST'];
  4. setlocale(LC_TIME, "id_ID");
  5. date_default_timezone_set('Asia/Jakarta');
  6.  
  7. /*
  8. Directory Listing Script - Version 2
  9. ====================================
  10. Script Author: Ash Young <ash@evoluted.net>. www.evoluted.net
  11. Layout: Manny <manny@tenka.co.uk>. www.tenka.co.uk
  12. */
  13. $startdir = '.';
  14. $showthumbnails = false;
  15. $showdirs = true;
  16. $forcedownloads = false;
  17. $hide = array(
  18. 'dlf',
  19. 'public_html',
  20. 'index.php',
  21. 'Thumbs',
  22. '.htaccess',
  23. '.htpasswd'
  24. );
  25. $displayindex = false;
  26. $allowuploads = false;
  27. $overwrite = false;
  28.  
  29. $indexfiles = array (
  30. 'index.html',
  31. 'index.htm',
  32. 'default.htm',
  33. 'default.html'
  34. );
  35.  
  36. $filetypes = array (
  37. 'png' => 'jpg.gif',
  38. 'jpeg' => 'jpg.gif',
  39. 'bmp' => 'jpg.gif',
  40. 'jpg' => 'jpg.gif',
  41. 'gif' => 'gif.gif',
  42. 'zip' => 'archive.png',
  43. 'rar' => 'archive.png',
  44. 'exe' => 'exe.gif',
  45. 'setup' => 'setup.gif',
  46. 'txt' => 'text.png',
  47. 'htm' => 'html.gif',
  48. 'html' => 'html.gif',
  49. 'php' => 'php.gif',
  50. 'fla' => 'fla.gif',
  51. 'swf' => 'swf.gif',
  52. 'xls' => 'xls.gif',
  53. 'doc' => 'doc.gif',
  54. 'sig' => 'sig.gif',
  55. 'fh10' => 'fh10.gif',
  56. 'pdf' => 'pdf.gif',
  57. 'psd' => 'psd.gif',
  58. 'rm' => 'real.gif',
  59. 'mpg' => 'video.gif',
  60. 'mpeg' => 'video.gif',
  61. 'mov' => 'video2.gif',
  62. 'avi' => 'video.gif',
  63. 'eps' => 'eps.gif',
  64. 'gz' => 'archive.png',
  65. 'asc' => 'sig.gif',
  66. );
  67.  
  68. error_reporting(0);
  69. if(!function_exists('imagecreatetruecolor')) $showthumbnails = false;
  70. $leadon = $startdir;
  71. if($leadon=='.') $leadon = '';
  72. if((substr($leadon, -1, 1)!='/') && $leadon!='') $leadon = $leadon . '/';
  73. $startdir = $leadon;
  74.  
  75. if($_GET['dir']) {
  76. // check this is okay.
  77.  
  78. if(substr($_GET['dir'], -1, 1)!='/') {
  79. $_GET['dir'] = $_GET['dir'] . '/';
  80. }
  81.  
  82. $dirok = true;
  83. $dirnames = split('/', $_GET['dir']);
  84. for($di=0; $di<sizeof($dirnames); $di++) {
  85.  
  86. if($di<(sizeof($dirnames)-2)) {
  87. $dotdotdir = $dotdotdir . $dirnames[$di] . '/';
  88. }
  89.  
  90. if($dirnames[$di] == '..') {
  91. $dirok = false;
  92. }
  93. }
  94.  
  95. if(substr($_GET['dir'], 0, 1)=='/') {
  96. $dirok = false;
  97. }
  98.  
  99. if($dirok) {
  100. $leadon = $leadon . $_GET['dir'];
  101. }
  102. }
  103.  
  104.  
  105.  
  106. $opendir = $leadon;
  107. if(!$leadon) $opendir = '.';
  108. if(!file_exists($opendir)) {
  109. $opendir = '.';
  110. $leadon = $startdir;
  111. }
  112.  
  113. clearstatcache();
  114. if ($handle = opendir($opendir)) {
  115. while (false !== ($file = readdir($handle))) {
  116. // first see if this file is required in the listing
  117. if ($file == "." || $file == "..") continue;
  118. $discard = false;
  119. for($hi=0;$hi<sizeof($hide);$hi++) {
  120. if(strpos($file, $hide[$hi])!==false) {
  121. $discard = true;
  122. }
  123. }
  124.  
  125. if($discard) continue;
  126. if (@filetype($leadon.$file) == "dir") {
  127. if(!$showdirs) continue;
  128.  
  129. $n++;
  130. if($_GET['sort']=="date") {
  131. $key = @filemtime($leadon.$file) . ".$n";
  132. }
  133. else {
  134. $key = $n;
  135. }
  136. $dirs[$key] = $file . "/";
  137. }
  138. else {
  139. $n++;
  140. if($_GET['sort']=="date") {
  141. $key = @filemtime($leadon.$file) . ".$n";
  142. }
  143. elseif($_GET['sort']=="size") {
  144. $key = @filesize($leadon.$file) . ".$n";
  145. }
  146. else {
  147. $key = $n;
  148. }
  149. $files[$key] = $file;
  150.  
  151. if($displayindex) {
  152. if(in_array(strtolower($file), $indexfiles)) {
  153. header("Location: $file");
  154. die();
  155. }
  156. }
  157. }
  158. }
  159. closedir($handle);
  160. }
  161.  
  162. // sort our files
  163. if($_GET['sort']=="date") {
  164. @ksort($dirs, SORT_NUMERIC);
  165. @ksort($files, SORT_NUMERIC);
  166. }
  167. elseif($_GET['sort']=="size") {
  168. @natcasesort($dirs);
  169. @ksort($files, SORT_NUMERIC);
  170. }
  171. else {
  172. @natcasesort($dirs);
  173. @natcasesort($files);
  174. }
  175.  
  176. // order correctly
  177. if($_GET['order']=="desc" && $_GET['sort']!="size") {$dirs = @array_reverse($dirs);}
  178. if($_GET['order']=="desc") {$files = @array_reverse($files);}
  179. $dirs = @array_values($dirs); $files = @array_values($files);
  180.  
  181. ?>
  182. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  183. <html>
  184. <head>
  185. <title>Selamat datang di <? print $host; ?>! Hostinger web hosting gratis dengan PHP, MySQL.</title>
  186. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  187. <link href="http://www.main-hosting.com/hostinger/welcome/css/site.css" media="screen" rel="stylesheet" type="text/css" />
  188. </head>
  189. <body>
  190. <div id="main">
  191. <div id="content">
  192. <div class="header">
  193. <a id="logo" href="http://www.idhostinger.com/"><img src="http://www.idhostinger.com/images/logo-id.png" alt="Web hosting" /></a>
  194. </div>
  195. <div class="content">
  196. <h1>Akun Anda telah dibuat!</h1>
  197. <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>
  198. <p>Berikut adalah daftar file Anda yang berada di folder public_html:</p>
  199. <div id="files">
  200. <div class="top"></div>
  201. <div class="cont">
  202.  
  203. <div id="listingcontainer">
  204. <div id="listing">
  205. <?
  206. $class = 'b';
  207. if($dirok) {
  208. ?>
  209. <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>
  210. <?
  211. if($class=='b') $class='w';
  212. else $class = 'b';
  213. }
  214. $arsize = sizeof($dirs);
  215. for($i=0;$i<$arsize;$i++) {
  216. ?>
  217. <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>
  218. <?
  219. if($class=='b') $class='w';
  220. else $class = 'b';
  221. }
  222.  
  223. $arsize = sizeof($files);
  224. for($i=0;$i<$arsize;$i++) {
  225. $icon = 'unknown.png';
  226. $ext = strtolower(substr($files[$i], strrpos($files[$i], '.')+1));
  227. $supportedimages = array('gif', 'png', 'jpeg', 'jpg');
  228. $thumb = '';
  229.  
  230. if($filetypes[$ext]) {
  231. $icon = $filetypes[$ext];
  232. }
  233.  
  234. $filename = $files[$i];
  235. if(strlen($filename)>43) {
  236. $filename = substr($files[$i], 0, 40) . '...';
  237. }
  238.  
  239. $fileurl = $leadon . $files[$i];
  240. ?>
  241. <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>
  242. <?
  243. if($class=='b') $class='w';
  244. else $class = 'b';
  245. }
  246. ?>
  247. </div>
  248. </div>
  249.  
  250. </div>
  251. <div class="bottom"></div>
  252. <div class="clear"></div>
  253. </div>
  254. <div class="clear"></div>
  255. </div>
  256. <div class="footer"></div>
  257. <div class="clear"></div>
  258. </div>
  259. <div id="footer">
  260. <div class="links">
  261. <a href="http://www.idhostinger.com/web-hosting" target="_blank">Web Hosting</a>
  262. <span class="pipe">|</span>
  263. <a href="http://www.idhostinger.com/hosting-gratis" target="_blank">Hosting Gratis</a>
  264. <span class="pipe">|</span>
  265. <a href="http://www.idhostinger.com/forum" target="_blank">Support Forum</a>
  266. <span class="pipe">|</span>
  267. <a href="http://cpanel.idhostinger.com/" target="_blank">Client Login</a>
  268. </div>
  269. <div class="copyright">Hostinger &copy; <? print date('Y'); ?>. All rights reserved</div>
  270. <div class="social-icons">
  271. <a href="http://www.facebook.com/IDHostinger"><img src="http://www.main-hosting.com/hostinger/welcome/images/fb.gif" /></a>
  272. <a href="https://twitter.com/IDHostinger"><img src="http://www.main-hosting.com/hostinger/welcome/images/twitter.gif" /></a>
  273. </div>
  274. </div>
  275. </div>
  276. </body>
  277. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement