Source code

<?php
#  _     /)---(\ 
#  \\   (/ . . \)   
#   \\__)-\(*)/    
#   \_       (_
#   (___/-(____)
session_start();
#if(!isset($_GET['err']))
#  error_reporting(0);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" >
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <meta http-equiv="Content-Language" content="fr">
  <title>Files on theo7.free.fr</title>
  <meta name="Description" content="Web site file navigator .">
  <meta name="Author" content="theo7">
  <meta name="Revisit-after" content="1">
  <meta name="Robots" content="INDEX, FOLLOW">
  <style type="text/css">
    body
    {
      width:98%;
      margin-right:auto;
      margin-left:auto;
      background-color:#000;
      font-family:sans;
      font-size:11px;
      color:lightgreen;
    }
    .corp
    {
      /*border:1px solid #100;
      -moz-border-radius:3px;*/
      padding-top:10px;
      padding-bottom:10px;
      background-color:#000;
      padding-left:20px;
    }
    .dir
    {
      color:GRAY;
    }
    .dir:hover
    {
      color:#565656;
    }
    .center
    {
      text-align:center;
    }
    a
    {
      text-decoration:none;
      color:SILVER;
    }
    a:hover
    {
      color:GRAY;
    }
    a:visited:before
    {
      font-size:7px;
      content:"> ";
    }
    a.dir:visited
    {
      color:#2f4124;
    }
    .hidden span{display:none}
    .hidden:hover{background:none;z-index:10;}
    .hidden:hover span
    {
      display:inline;
      position:absolute;                        
      margin-right:5px;
      margin-top:5px;
      font-size:10px;
      opacity:0.60;
      background:#3a3a3a;
      color:lightgreen;
      padding:3px;
      border:1px solid #565656;
      border-left:0.4em solid #565656;
    }
    .include
    {
      padding:10px;
      border:1px solid #565656;
      background:#383838;
      margin-right:20px;
    }
    input
    {
      border:1px solid #565656;
      background:black;
      color:lightgreen;
    }
  </style>
</head>
<body>

<?php
// Traduction
$langage "en"
$chdir "/";
if(
$langage == "fr")
{
  
$index_of "Index de";
  
$up "Haut .";
  
$bad "Mauvais mot de passe ou login";
  
$good "Ok, rechargez";
  
$tlogin "login : ";
  
$tpasswd "mot de passe : ";
  
$tsubmit "Envoyer";
  
$size "Taille";
  
$last_mod "Derniere modification : ";
  
$ttype "Type";
  
$dateFormat "l, F N Y \a\t  H:i:s";
  
$back "Retour .";
  
$err401 "Bad access .";
  
$err403 "Forbidden .";
  
$err404 "File doesn\'t exist .";
  
$err500 "Internal error .";
  
$sourceCode "Source code";
  
$tcontinue "Continuer";
  
$pleaseWait "Please wait ...";
  
$terror "Erreur";
}
if(
$langage == "en")
{
  
$index_of "Index of";
  
$up "Up .";
  
$bad "Bad";
  
$good "Ok, reload please";
  
$tlogin "login : ";
  
$tpasswd "passw : ";
  
$tsubmit "Submit query";
  
$size "Size";
  
$last_mod "Last mod";
  
$ttype "Type";
  
$dateFormat "l, F N Y \a\t  H:i:s";
  
$back "Back .";
  
$err401 "Bad access .";
  
$err403 "Forbidden .";
  
$err404 "File doesn\'t exist .";
  
$err500 "Internal error .";
  
$sourceCode "Source code";
  
$tcontinue "Continue";
  
$pleaseWait "Please wait ...";
  
$terror "Error";
}
?>

<div class="corp">
  <?php
  
function fileext($matches)
  {
    if(
preg_matche('`(.*)\.(\w+)`'$file$matches))
      return 
$matches[2];
  } 
  if(empty(
$_GET['erreur']) AND empty($_GET['source']) AND empty($_GET['file']))
  {
    if(empty(
$_GET['dir']))
      echo
'<h3>'.$index_of.' /</h3><p>';
    else
      echo
'<h3>'.$index_of.' '.htmlentities($_GET['dir']).'</h3><p>';
    function 
test_dir()
    {
      if(
is_dir($_GET['dir'].$result))
        return 
'/';
    }
    
$filesi opendir($_SERVER['DOCUMENT_ROOT'].$chdir.$_GET['dir']);
    
$files opendir($_SERVER['DOCUMENT_ROOT'].$chdir.$_GET['dir']);
    echo
'<a href="?dir=';

    
$url explode('dir='$_SERVER['REQUEST_URI']);
    
$url explode('/'$url[1]);
    
$nbUrl count($url);

    foreach(
$url as $key => $url)
    {
      if(
$key $nbUrl 2)
    break;
      if(
$key == $nbUrl 2)
    echo 
$url;
      else
    echo 
$url.'/';
    }

    echo
'">'.$up.'</a><br/><br/>';
    
$continue 1;
    while(
$readf readdir($filesi) AND !isset($_SESSION['continue']))
    {
      if(
preg_match('`((.*)/*)Private([0-9]*)(/*(.*))`'$_SERVER['REQUEST_URI'], $matches))
      {
    
$htprivate explode('?dir='$_SERVER['REQUEST_URI']);
    if(!empty(
$matches[4]))
    {
      
$htprivate explode($matches[4], $htprivate[1]);
      
$htprivate $htprivate[0];
    }
    else
      
$htprivate $htprivate[1];

    
$title explode('%'file_get_contents($htprivate.'/.htprivate'));
    
$pass explode(':'$title[2]);
    
$login explode("\n"$pass[0]);
    
$continue 0;
    
$private 1;

    if(isset(
$_POST['login'], $_POST['pass']))
    {
      if(
sha1($_POST['pass']) == $pass[1] AND $_POST['login'] == $login[1])
      {
        
$continue 1;
        
$_SESSION['continue'] = 1;
        echo
'Ok, reload please';
      }
      else
        echo
'Bad';
        }
    
?>
      <form action="<?php echo htmlentities($_SERVER['REQUEST_URI']);?>" method="post">
        <p>
         <?php echo $tlogin;?><input name="login"/><br/>
         <?php echo $tpasswd;?><input type="password" name="pass"/><br/>
         <input type="submit" value="<?php echo $tsubmit;?>"/>
        </p>
      </form>
    <?php
    
break;
      }
    }

    while(
$result readdir($files) AND $continue == 1)
    {
      if(
$private == AND !isset($_SESSION['continue']))
    break;
      if(
$result != '..' AND $result != '.')
      {
    echo
'<a href="?';
    if(
is_file($_GET['dir'].test_dir().$result))
      echo
'file=1&amp;';
    echo
'dir=';
    echo 
$_GET['dir'];
    if(
is_dir($_GET['dir']))
      echo
'/';
    echo 
$result.'">';
      
    if(
is_dir($_GET['dir'].test_dir().$result))
      echo
'<span class="dir">'.$result.'</span>';
    if(
is_file($_GET['dir'].test_dir().$result))
    {
      echo
'<span class="hidden">'.$result.'
             <span>
                '
.$size.' : '.round((filesize($_GET['dir'].test_dir().$result)/1024), 2).' <acronym title="Kilo Bits">KB</acronym><br/>
                '
.$ttype.' : '.filetype($_GET['dir'].test_dir().$result).'<br/>
                '
.$last_mod.' : '.date($dateFormatfilemtime($_GET['dir'].test_dir().$result)).'<br/>
              </span></span>'
;
    } 
    echo
'</a><br/>';
      }
    }
  }
  if(!empty(
$_GET['erreur']))
  {
    echo
'<h3>'.$terror.'</h3>';
    if(
$_GET['erreur'] == '403')
      echo
'<p>403 - '.$err403.'</p>';
    if(
$_GET['erreur'] == '404')
      echo
'<p>404 - '.$err404.'</p>';
    if(
$_GET['erreur'] == '401')
      echo
'<p>401 - '.$err401.'</p>';
    if(
$_GET['erreur'] == '500')
      echo
'<p>500 - '.$err500.'</p>';
    echo
'<p><a href="javascript:history.go(-2);">'.$back.'</a></p>';
  }
  if(!empty(
$_GET['source'])) # :-D
  
{
    echo
'<h3>'.$sourceCode.'</h3>';
    echo
'<p class="include">';highlight_file(__FILE__);echo'</p>';
    echo
'<p><a href="javascript:history.go(-1);">'.$back.'</a></p>';
  }
  if(!empty(
$_GET['file']))
  {
    if(
substr($_GET['dir'],-4) == '.txt')
    {
      echo
'<h3>Include : </h3>';
      echo
'<p class="include">'.nl2br(file_get_contents($_SERVER['DOCUMENT_ROOT'].'/'.$_GET['dir'])).'</p>';
      echo
'<p><a href="'.htmlentities($_SERVER['HTTP_REFERER']).'">Back .</a></p>';
    }
    elseif(
substr($_GET['dir'],-5) == '.phps')
    {
      echo
'<h3>Include : </h3>';
      echo
'<p class="include">';highlight_file($_SERVER['DOCUMENT_ROOT'].'/'.$_GET['dir']);echo'</p>';
      echo
'<p><a href="'.htmlentities($_SERVER['HTTP_REFERER']).'">Back .</a></p>';
    }
    else
    {
      if(!
headers_sent())
        
header('Location : '.$_GET['file']);
      else
        echo 
$pleaseWait.'<script type="text/javascript">window.location.replace("'.$_GET['dir'].'");</script><noscript><a href="'.$_GET['dir'].'">'.$tcontinue.'</a></noscript>';
      
    }
  }
    
?>
  <p>

<!--
<script type="text/javascript"><!--
google_ad_client = "pub-7191758373472892";
/* 728x90, date de création 08/06/08 */
google_ad_slot = "7421900273";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script> -->

<br/>

    <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/2.0/fr/">
    <img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-nc-sa/2.0/fr/80x15.png" />
    </a>
    <a rel="Source" href="?source=1"><img src="http://theo7.free.fr/Public/pictures/icons/text.gif" style="border:0px"></a>
  </p>

</div>
</body>
</html>

Back .

-->
Creative Commons License