查看: 1568|回复: 5
收起左侧

[网络] 求此网站源码

[复制链接]
664766245
发表于 2014-1-22 14:00:27 | 显示全部楼层 |阅读模式
如题 跪求
http://distro.ibiblio.org/
越简单越好.
gemini09
发表于 2014-1-22 14:15:25 | 显示全部楼层
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.1//EN' 'http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en'>
    <head>
        <title>Index of /</title>
        <link rel="stylesheet" type="text/css" media="screen" href="/directory_list/directory_list.css" />
<script type="text/javascript">
window.google_analytics_uacct = "UA-330438-13";
</script>
<script type="text/javascript">
    var _gaq = _gaq || [];
    _gaq.push(['_setAccount', 'UA-330438-13']);
    _gaq.push(['_trackPageview']);

    (function() {
        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
    })();
</script>
    </head>
    <body>
    <div id="header" class="header">
        <div id="header-logo" class="header-logo">
            <a rel="home" href="http://www.ibiblio.org/">
                <img alt="ibiblio" src="http://www.ibiblio.org/cms/wp-content/themes/ibiblio/img/md_ibiblio_trans.gif">
            </a>
            <p id="header-description" class="header-logo">The Public's Library and Digital Archive</p>
        </div>
        <div id="header-search" class="header-search">
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
  google.load('search', '1');
  google.setOnLoadCallback(function() {
    google.search.CustomSearchControl.attachAutoCompletion(
      '006345117986368989313:zrjuanyk0rw',
      document.getElementById('q'),
      'cse-search-box');
  });
</script>
<form action="http://distro.ibiblio.org/search/" id="custom-search">
  <div>
    <input type="hidden" name="cx" value="006345117986368989313:zrjuanyk0rw" />
    <input type="hidden" name="cof" value="FORID:11" />
    <input type="hidden" name="ie" value="UTF-8" />
    <input type="text" name="q" id="q" autocomplete="off" size="31" />
    <input type="submit" name="sa" value="Search" />
  </div>
</form>
<script type="text/javascript" src="http://www.google.com/cse/brand?form=cse-search-box&lang=en"></script>
        </div>
    </div>
    <div class="clear"></div>
    <h2>Index of /</h2>
    <div id="directory-list" class="list">
    <table summary='Directory Listing' cellpadding='0' cellspacing='0'>
        <thead><tr>
        <th class="n">Name</th>
        <th class="m">Last Modified</th>
        <th class="s">Size</th>
        <th class="t">Type</th>
        </tr></thead>
    <tbody>
        <tr><td class="n"><a href='../'>Parent Directory</a></td><td class="m">&nbsp;</td><td class="s">&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="adminsparadise/">adminsparadise/</a></td><td class="m">2011-Jan-25 20:29:08</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="amigolinux/">amigolinux/</a></td><td class="m">2013-Apr-28 08:17:42</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="anubis-linux/">anubis-linux/</a></td><td class="m">2011-Jan-25 20:29:08</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="archpwn/">archpwn/</a></td><td class="m">2011-Jan-25 20:29:08</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="arco-debian/">arco-debian/</a></td><td class="m">2011-Jan-25 20:29:08</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="baslinux/">baslinux/</a></td><td class="m">2011-Jan-25 20:29:08</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="bayanihan/">bayanihan/</a></td><td class="m">2011-Jan-25 20:29:08</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="bio-linux/">bio-linux/</a></td><td class="m">2011-Jul-06 15:41:23</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="bitcurator/">bitcurator/</a></td><td class="m">2014-Jan-18 15:18:02</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="btp/">btp/</a></td><td class="m">2011-Jan-25 20:29:08</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="cdlinux/">cdlinux/</a></td><td class="m">2011-Jan-25 20:29:08</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="centos/">centos/</a></td><td class="m">2013-Dec-11 15:15:22</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="crunchbang/">crunchbang/</a></td><td class="m">2011-Jan-25 20:29:08</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="damnsmall/">damnsmall/</a></td><td class="m">2012-Sep-18 22:06:29</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="davinci/">davinci/</a></td><td class="m">2011-Jan-25 20:29:08</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="dragora/">dragora/</a></td><td class="m">2013-Nov-26 15:27:54</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="dynebolic/">dynebolic/</a></td><td class="m">2011-Jan-25 20:29:08</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="elemental/">elemental/</a></td><td class="m">2012-Sep-08 10:56:20</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="elrepo/">elrepo/</a></td><td class="m">2014-Jan-20 19:15:36</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="epidemic/">epidemic/</a></td><td class="m">2013-Mar-04 19:09:31</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="esunlinux/">esunlinux/</a></td><td class="m">2011-Jan-25 20:29:08</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="fatdog/">fatdog/</a></td><td class="m">2013-Sep-12 12:21:40</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="fedora/">fedora/</a></td><td class="m">2011-Jan-25 20:29:08</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="fortmactux/">fortmactux/</a></td><td class="m">2011-Jan-25 20:29:08</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="funtoo/">funtoo/</a></td><td class="m">2011-Jan-25 20:29:08</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="generations/">generations/</a></td><td class="m">2013-Oct-13 22:54:55</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="gibraltar/">gibraltar/</a></td><td class="m">2009-Aug-24 08:13:39</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="gobolinux/">gobolinux/</a></td><td class="m">2011-Jan-25 20:29:09</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="granular/">granular/</a></td><td class="m">2011-Jan-25 20:29:09</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="hamux/">hamux/</a></td><td class="m">2013-Jan-23 21:56:43</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="hanthana/">hanthana/</a></td><td class="m">2012-Sep-12 13:25:20</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="knoppix/">knoppix/</a></td><td class="m">2013-Sep-17 17:20:34</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="knoppix-nsm/">knoppix-nsm/</a></td><td class="m">2011-Jan-25 20:29:09</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="ladybug/">ladybug/</a></td><td class="m">2011-Jan-25 20:29:09</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="linuxshark/">linuxshark/</a></td><td class="m">2013-Oct-21 14:38:44</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="lnx/">lnx/</a></td><td class="m">2011-Jan-25 20:29:09</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="mageia/">mageia/</a></td><td class="m">2011-Sep-05 17:05:24</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="mepis/">mepis/</a></td><td class="m">2011-Jan-25 20:29:09</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="mydebian/">mydebian/</a></td><td class="m">2011-Jan-25 20:29:09</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="netlinx/">netlinx/</a></td><td class="m">2011-Jan-25 20:29:09</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="oniondsl/">oniondsl/</a></td><td class="m">2011-Jan-25 20:29:09</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="opensuse/">opensuse/</a></td><td class="m">2014-Jan-05 03:39:55</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="openwall/">openwall/</a></td><td class="m">2010-Apr-03 05:11:22</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="pclinuxos/">pclinuxos/</a></td><td class="m">2013-Apr-27 17:22:05</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="pcos/">pcos/</a></td><td class="m">2014-Jan-12 16:13:28</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="pcpac/">pcpac/</a></td><td class="m">2011-Jan-25 20:29:09</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="pdaxrom/">pdaxrom/</a></td><td class="m">2011-Jan-25 20:29:09</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="peanut/">peanut/</a></td><td class="m">2013-Apr-03 17:55:04</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="pendrivelinux/">pendrivelinux/</a></td><td class="m">2011-Jan-25 20:29:09</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="polypux/">polypux/</a></td><td class="m">2011-Jan-25 20:29:09</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="pub/">pub/</a></td><td class="m">2011-Jan-25 20:29:09</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="puppylinux/">puppylinux/</a></td><td class="m">2014-Jan-14 19:19:35</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="puppyrus/">puppyrus/</a></td><td class="m">2011-Jan-26 05:01:09</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="quelitu/">quelitu/</a></td><td class="m">2012-Nov-15 13:14:17</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="quirky/">quirky/</a></td><td class="m">2013-Dec-26 18:51:36</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="refracta/">refracta/</a></td><td class="m">2013-Aug-31 18:18:35</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="robo/">robo/</a></td><td class="m">2011-Jan-25 20:29:09</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="rootlinux/">rootlinux/</a></td><td class="m">2013-Oct-21 15:26:43</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="sabayonlinux/">sabayonlinux/</a></td><td class="m">2011-Mar-09 13:21:57</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="slitaz/">slitaz/</a></td><td class="m">2012-Sep-27 12:41:49</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="smeserver/">smeserver/</a></td><td class="m">2014-Jan-22 00:08:30</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="sol/">sol/</a></td><td class="m">2011-Jan-25 20:29:09</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="sourcemage/">sourcemage/</a></td><td class="m">2011-Jan-25 20:29:09</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="startcom/">startcom/</a></td><td class="m">2013-Oct-21 08:38:56</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="swift/">swift/</a></td><td class="m">2011-Jan-25 20:29:09</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="t2/">t2/</a></td><td class="m">2011-Jan-25 20:29:09</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="tinycorelinux/">tinycorelinux/</a></td><td class="m">2013-Nov-30 18:33:18</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="tinyme/">tinyme/</a></td><td class="m">2012-Dec-13 23:13:51</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="ubuntu/">ubuntu/</a></td><td class="m">2014-Jan-20 19:07:58</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="unity/">unity/</a></td><td class="m">2013-Jun-21 08:46:13</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="vectorlinux/">vectorlinux/</a></td><td class="m">2013-Jul-11 02:10:40</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="zenarch/">zenarch/</a></td><td class="m">2011-Jan-25 20:29:09</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="zenwalk/">zenwalk/</a></td><td class="m">2013-Nov-28 10:10:54</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href="zorin/">zorin/</a></td><td class="m">2013-May-21 11:48:38</td><td class="s">-&nbsp;</td><td class="t">Directory</td></tr>
    <tr><td class="n"><a href=".bplusvtoc_internal">.bplusvtoc_internal</a></td><td class="m">1969-Dec-31 19:00:00</td><td class="s">0K&nbsp;</td><td class="t">application/octet-stream</td></tr>
    <tr><td class="n"><a href=".vtoc_internal">.vtoc_internal</a></td><td class="m">1969-Dec-31 19:00:00</td><td class="s">0K&nbsp;</td><td class="t">application/octet-stream</td></tr>
    <tr><td class="n"><a href="robots.txt">robots.txt</a></td><td class="m">2012-Mar-22 15:51:20</td><td class="s">0K&nbsp;</td><td class="t">text/plain</td></tr>
    </tbody>
    </table>
    </div>
    </body>
</html>
linexp
头像被屏蔽
发表于 2014-1-22 15:51:35 | 显示全部楼层
本帖最后由 linexp 于 2014-1-22 16:06 编辑

php code
  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.   <div id="listingcontainer">
  179.     <div id="listingheader">
  180.         <div id="headerfile">File</div>
  181.         <div id="headersize">Size</div>
  182.         <div id="headermodified">Last Modified</div>
  183.         </div>
  184.     <div id="listing">
  185.         <?
  186.         $class = 'b';
  187.         if($dirok) {
  188.         ?>
  189.         <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>
  190.         <?
  191.                 if($class=='b') $class='w';
  192.                 else $class = 'b';
  193.         }
  194.         $arsize = sizeof($dirs);
  195.         for($i=0;$i<$arsize;$i++) {
  196.         ?>
  197.         <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>
  198.         <?
  199.                 if($class=='b') $class='w';
  200.                 else $class = 'b';       
  201.         }
  202.        
  203.         $arsize = sizeof($files);
  204.         for($i=0;$i<$arsize;$i++) {
  205.                 $icon = 'unknown.png';
  206.                 $ext = strtolower(substr($files[$i], strrpos($files[$i], '.')+1));
  207.                 $supportedimages = array('gif', 'png', 'jpeg', 'jpg');
  208.                 $thumb = '';
  209.                                
  210.                 if($filetypes[$ext]) {
  211.                         $icon = $filetypes[$ext];
  212.                 }
  213.                
  214.                 $filename = $files[$i];
  215.                 if(strlen($filename)>43) {
  216.                         $filename = substr($files[$i], 0, 40) . '...';
  217.                 }
  218.                
  219.                 $fileurl = $leadon . $files[$i];
  220.         ?>
  221.         <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>
  222.         <?
  223.                 if($class=='b') $class='w';
  224.                 else $class = 'b';       
  225.         }       
  226.         ?></div>
  227.   </div>
  228. </div>
  229. </body>
  230. </html>
复制代码
664766245
 楼主| 发表于 2014-1-22 21:30:29 | 显示全部楼层
gemini09 发表于 2014-1-22 14:15

F12 复制 我也会.
664766245
 楼主| 发表于 2014-1-22 21:31:14 | 显示全部楼层
linexp 发表于 2014-1-22 15:51
php code

虽然显示乱码 但还是谢谢自己找了个 还有点不理想 你能帮我改改吗?
QDUT
发表于 2014-1-23 09:04:16 | 显示全部楼层
664766245 发表于 2014-1-22 21:31
虽然显示乱码 但还是谢谢自己找了个 还有点不理想 你能帮我改改吗?

你下一个HTTrackPortable   把整个网站扒下来 不就知道了么。。 注:木有后台管理和数据库。
您需要登录后才可以回帖 登录 | 快速注册

本版积分规则

手机版|杀毒软件|软件论坛| 卡饭论坛

Copyright © KaFan  KaFan.cn All Rights Reserved.

Powered by Discuz! X3.4( 沪ICP备2020031077号-2 ) GMT+8, 2025-1-11 16:48 , Processed in 0.128230 second(s), 16 queries .

卡饭网所发布的一切软件、样本、工具、文章等仅限用于学习和研究,不得将上述内容用于商业或者其他非法用途,否则产生的一切后果自负,本站信息来自网络,版权争议问题与本站无关,您必须在下载后的24小时之内从您的电脑中彻底删除上述信息,如有问题请通过邮件与我们联系。

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