找回密码
 注册
搜索
免费空间 免费域名 免费AI 老牌主机商首月仅1美分!27美元/年!Spaceship优惠码 Namecheap优惠码阿里云2核2G3M新老续费同享99元/年!
查看: 132|回复: 2

[问题求助] 有一个比较老旧的图床程序,各位大佬谁那还有源码

[复制链接]
发表于 2024-1-15 19:56:54 来自手机 | 显示全部楼层 |阅读模式
很久很久以前,有一个php目录直读的php图片程序,当年很多人用它在xrea上做图床,我也用过。现在忽然想起来,但找不到源码了,各位兄弟,谁那还有?
发表于 2024-1-15 20:10:50 | 显示全部楼层
www.bbs.today/blog/xc/?theme=dvxj  我这个好像是2.0的了

Neatpic1.2.3原来的版本应该是这个。
发表于 2024-1-15 21:44:38 | 显示全部楼层
老三蛋空间的自带的默认首页default.php
我很久以前存了一份,但是css文件没存

  1. <?

  2. $host=$_SERVER['HTTP_HOST'];

  3. /*

  4. Directory Listing Script - Version 2

  5. ====================================

  6. Script Author: Ash Young <ash@evoluted.net>. www.evoluted.net

  7. Layout: Manny <manny@tenka.co.uk>. www.tenka.co.uk

  8. */

  9. $startdir = '.';

  10. $showthumbnails = false;

  11. $showdirs = true;

  12. $forcedownloads = false;

  13. $hide = array(

  14.                                 'dlf',

  15.                                 'public_html',                               

  16.                                 'index.php',

  17.                                 'Thumbs',

  18.                                 '.htaccess',

  19.                                 '.htpasswd'

  20.                         );

  21. $displayindex = false;

  22. $allowuploads = false;

  23. $overwrite = false;



  24. $indexfiles = array (

  25.                                 'index.html',

  26.                                 'index.htm',

  27.                                 'default.htm',

  28.                                 'default.html'

  29.                         );

  30.                        

  31. $filetypes = array (

  32.                                 'png' => 'jpg.gif',

  33.                                 'jpeg' => 'jpg.gif',

  34.                                 'bmp' => 'jpg.gif',

  35.                                 'jpg' => 'jpg.gif',

  36.                                 'gif' => 'gif.gif',

  37.                                 'zip' => 'archive.png',

  38.                                 'rar' => 'archive.png',

  39.                                 'exe' => 'exe.gif',

  40.                                 'setup' => 'setup.gif',

  41.                                 'txt' => 'text.png',

  42.                                 'htm' => 'html.gif',

  43.                                 'html' => 'html.gif',

  44.                                 'php' => 'php.gif',                               

  45.                                 'fla' => 'fla.gif',

  46.                                 'swf' => 'swf.gif',

  47.                                 'xls' => 'xls.gif',

  48.                                 'doc' => 'doc.gif',

  49.                                 'sig' => 'sig.gif',

  50.                                 'fh10' => 'fh10.gif',

  51.                                 'pdf' => 'pdf.gif',

  52.                                 'psd' => 'psd.gif',

  53.                                 'rm' => 'real.gif',

  54.                                 'mpg' => 'video.gif',

  55.                                 'mpeg' => 'video.gif',

  56.                                 'mov' => 'video2.gif',

  57.                                 'avi' => 'video.gif',

  58.                                 'eps' => 'eps.gif',

  59.                                 'gz' => 'archive.png',

  60.                                 'asc' => 'sig.gif',

  61.                         );

  62.                        

  63. error_reporting(0);

  64. if(!function_exists('imagecreatetruecolor')) $showthumbnails = false;

  65. $leadon = $startdir;

  66. if($leadon=='.') $leadon = '';

  67. if((substr($leadon, -1, 1)!='/') && $leadon!='') $leadon = $leadon . '/';

  68. $startdir = $leadon;



  69. if($_GET['dir']) {

  70.         //check this is okay.

  71.        

  72.         if(substr($_GET['dir'], -1, 1)!='/') {

  73.                 $_GET['dir'] = $_GET['dir'] . '/';

  74.         }

  75.        

  76.         $dirok = true;

  77.         $dirnames = split('/', $_GET['dir']);

  78.         for($di=0; $di<sizeof($dirnames); $di++) {

  79.                

  80.                 if($di<(sizeof($dirnames)-2)) {

  81.                         $dotdotdir = $dotdotdir . $dirnames[$di] . '/';

  82.                 }

  83.                

  84.                 if($dirnames[$di] == '..') {

  85.                         $dirok = false;

  86.                 }

  87.         }

  88.        

  89.         if(substr($_GET['dir'], 0, 1)=='/') {

  90.                 $dirok = false;

  91.         }

  92.        

  93.         if($dirok) {

  94.                  $leadon = $leadon . $_GET['dir'];

  95.         }

  96. }







  97. $opendir = $leadon;

  98. if(!$leadon) $opendir = '.';

  99. if(!file_exists($opendir)) {

  100.         $opendir = '.';

  101.         $leadon = $startdir;

  102. }



  103. clearstatcache();

  104. if ($handle = opendir($opendir)) {

  105.         while (false !== ($file = readdir($handle))) {

  106.                 //first see if this file is required in the listing

  107.                 if ($file == "." || $file == "..")  continue;

  108.                 $discard = false;

  109.                 for($hi=0;$hi<sizeof($hide);$hi++) {

  110.                         if(strpos($file, $hide[$hi])!==false) {

  111.                                 $discard = true;

  112.                         }

  113.                 }

  114.                

  115.                 if($discard) continue;

  116.                 if (@filetype($leadon.$file) == "dir") {

  117.                         if(!$showdirs) continue;

  118.                

  119.                         $n++;

  120.                         if($_GET['sort']=="date") {

  121.                                 $key = @filemtime($leadon.$file) . ".$n";

  122.                         }

  123.                         else {

  124.                                 $key = $n;

  125.                         }

  126.                         $dirs[$key] = $file . "/";

  127.                 }

  128.                 else {

  129.                         $n++;

  130.                         if($_GET['sort']=="date") {

  131.                                 $key = @filemtime($leadon.$file) . ".$n";

  132.                         }

  133.                         elseif($_GET['sort']=="size") {

  134.                                 $key = @filesize($leadon.$file) . ".$n";

  135.                         }

  136.                         else {

  137.                                 $key = $n;

  138.                         }

  139.                         $files[$key] = $file;

  140.                        

  141.                         if($displayindex) {

  142.                                 if(in_array(strtolower($file), $indexfiles)) {

  143.                                         header("Location: $file");

  144.                                         die();

  145.                                 }

  146.                         }

  147.                 }

  148.         }

  149.         closedir($handle);

  150. }



  151. //sort our files

  152. if($_GET['sort']=="date") {

  153.         @ksort($dirs, SORT_NUMERIC);

  154.         @ksort($files, SORT_NUMERIC);

  155. }

  156. elseif($_GET['sort']=="size") {

  157.         @natcasesort($dirs);

  158.         @ksort($files, SORT_NUMERIC);

  159. }

  160. else {

  161.         @natcasesort($dirs);

  162.         @natcasesort($files);

  163. }



  164. //order correctly

  165. if($_GET['order']=="desc" && $_GET['sort']!="size") {$dirs = @array_reverse($dirs);}

  166. if($_GET['order']=="desc") {$files = @array_reverse($files);}

  167. $dirs = @array_values($dirs); $files = @array_values($files);





  168. ?>

  169. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

  170. <html xmlns="http://www.w3.org/1999/xhtml">

  171. <head>

  172. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

  173. <title>Welcome to <? print $host; ?></title>

  174. <link rel="stylesheet" type="text/css" href="http://www.000webhost.com/images/index/styles.css" />

  175. </head>

  176. <body>

  177. <div id="container">

  178.   <h1>Your  website is up and running!</h1>

  179.   <div id="breadcrumbs">

  180.     <p>Website <strong><? print $host; ?></strong> has been successfully installed on

  181.       server.<br />

  182.       Please delete file &quot;<strong>default.php</strong>&quot; from <strong>public_html</strong> folder and upload your website by using FTP or web based File Manager.<br />

  183.       <br />

  184.       - Your account information can be found on <a href="http://members.000webhost.com/"><u>http://members.000webhost.com/</u></a><br />

  185.       - If you need help, please check our <a href="http://www.000webhost.com/forum/" target="_blank"><u>forums</u></a> and and <a href="http://www.000webhost.com/faq.php"><u>FAQ List</u></a> or submit a ticket.<br />   

  186.       - Please review our <a href="http://www.000webhost.com/includes/tos.php" target="_blank"><u>Terms Of Service</u></a> to see what is not allowed to upload.<br />

  187.     </p>

  188.     <p><span class="style3">If you  are going to violate our <a href="http://www.000webhost.com/includes/tos.php" target="_blank"><u>TOS</u></a>, please read this text until it's not too late!<br />

  189.       Do not waste your time with 000webhost.com, if you are going to upload any illegal website here! All websites are manually reviewed by humans, so if we will notice anything illegal, your account will be terminated. So don't waste your time in promoting your scams, hacking websites, or anything else malicious - your account will be terminated in 5 minutes after we will receive first abuse report or anything abusive will be detected by our staff. We also report <strong>all</strong> illegal activities to  local and international authorities.</span>

  190.         </p>      

  191.           <p>Below you can see your current files in <strong>public_html</strong> folder.</p>

  192.   </div>

  193.   <div id="listingcontainer">

  194.     <div id="listingheader">

  195.         <div id="headerfile">File</div>

  196.         <div id="headersize">Size</div>

  197.         <div id="headermodified">Last Modified</div>

  198.         </div>

  199.     <div id="listing">

  200.         <?

  201.         $class = 'b';

  202.         if($dirok) {

  203.         ?>

  204.         <div><a href="<?=$dotdotdir;?>" class="<?=$class;?>"><img src="http://www.000webhost.com/images/index/dirup.png" alt="Folder" /><strong>..</strong> <em>-</em> <?=date ("M d Y h:i:s A", filemtime($dotdotdir));?></a></div>

  205.         <?

  206.                 if($class=='b') $class='w';

  207.                 else $class = 'b';

  208.         }

  209.         $arsize = sizeof($dirs);

  210.         for($i=0;$i<$arsize;$i++) {

  211.         ?>

  212.         <div><a href="<?=$leadon.$dirs[$i];?>" class="<?=$class;?>"><img src="http://www.000webhost.com/images/index/folder.png" alt="<?=$dirs[$i];?>" /><strong><?=$dirs[$i];?></strong> <em>-</em> <?=date ("M d Y h:i:s A", filemtime($leadon.$dirs[$i]));?></a></div>

  213.         <?

  214.                 if($class=='b') $class='w';

  215.                 else $class = 'b';       

  216.         }

  217.        

  218.         $arsize = sizeof($files);

  219.         for($i=0;$i<$arsize;$i++) {

  220.                 $icon = 'unknown.png';

  221.                 $ext = strtolower(substr($files[$i], strrpos($files[$i], '.')+1));

  222.                 $supportedimages = array('gif', 'png', 'jpeg', 'jpg');

  223.                 $thumb = '';

  224.                                

  225.                 if($filetypes[$ext]) {

  226.                         $icon = $filetypes[$ext];

  227.                 }

  228.                

  229.                 $filename = $files[$i];

  230.                 if(strlen($filename)>43) {

  231.                         $filename = substr($files[$i], 0, 40) . '...';

  232.                 }

  233.                

  234.                 $fileurl = $leadon . $files[$i];

  235.         ?>

  236.         <div><a href="<?=$fileurl;?>" class="<?=$class;?>"<?=$thumb2;?>><img src="http://www.000webhost.com/images/index/<?=$icon;?>" alt="<?=$files[$i];?>" /><strong><?=$filename;?></strong> <em><?=round(filesize($leadon.$files[$i])/1024);?>KB</em> <?=date ("M d Y h:i:s A", filemtime($leadon.$files[$i]));?><?=$thumb;?></a></div>

  237.         <?

  238.                 if($class=='b') $class='w';

  239.                 else $class = 'b';       

  240.         }       

  241.         ?></div>

  242.   </div>

  243. </div>

  244. <div id="copy">Free <a href="http://www.hosting24.com/">Web Hosting</a> by <a href="http://www.000webhost.com/">www.000webhost.com</a></div>

  245. </body>

  246. </html>

复制代码
您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|免费吧论坛

GMT+8, 2024-4-28 06:14 , Processed in 0.019477 second(s), 4 queries , Redis On.

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表