$subdir"; $legal_dirs = array( $subdir."source/" => 1, $subdir."source/special/" => 1 ); $illegal_files = array( // ($subdir=="//"?"/":$subdir)."console.php"=>"Access to this file is restricted.", // ($subdir=="//"?"/":$subdir)."supermail.php"=>"Access to this file is restricted.", // ($subdir=="//"?"/":$subdir)."dbconnect.php"=>"It contains sensitive information specific to this installation.", // ($subdir=="//"?"/":$subdir)."leupak.php"=>"If you want to read the leupak script, I suggest you do so by defeating it!", // ($subdir=="//"?"/":$subdir)."dungeon.php"=>"Wouldn't you like to know?", // ($subdir=="//"?"/":$subdir)."wandering.php"=>"It wouldn't be fair to figure out the password by reading the source, would it?" ); $legal_files=array(); echo "

View Source: ", htmlentities($url), "

"; echo "Click here for the source, OR
"; echo "Other files that you may wish to view the source of:"; echo "

Source of: ", htmlentities($url), "

"; $page_name = substr($url,strlen($subdir)-1); if (substr($page_name,0,1)=="/") $page_name=substr($page_name,1); if ($legal_files[$url]){ show_source($page_name); }else if ($illegal_files[$url]!=""){ echo "

Cannot view this file: $illegal_files[$url]

"; }else { echo "

Cannot view this file.

"; } ?>