36 |
kaklik |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
/*************************************************************
|
|
|
4 |
* TorrentFlux - PHP Torrent Manager
|
|
|
5 |
* www.torrentflux.com
|
|
|
6 |
**************************************************************/
|
|
|
7 |
/*
|
|
|
8 |
This file is part of TorrentFlux.
|
|
|
9 |
|
|
|
10 |
TorrentFlux is free software; you can redistribute it and/or modify
|
|
|
11 |
it under the terms of the GNU General Public License as published by
|
|
|
12 |
the Free Software Foundation; either version 2 of the License, or
|
|
|
13 |
(at your option) any later version.
|
|
|
14 |
|
|
|
15 |
TorrentFlux is distributed in the hope that it will be useful,
|
|
|
16 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
17 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
18 |
GNU General Public License for more details.
|
|
|
19 |
|
|
|
20 |
You should have received a copy of the GNU General Public License
|
|
|
21 |
along with TorrentFlux; if not, write to the Free Software
|
|
|
22 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
23 |
*/
|
|
|
24 |
|
|
|
25 |
// contributed by NovaKing -- thanks duder!
|
|
|
26 |
|
|
|
27 |
include_once("config.php");
|
|
|
28 |
include_once("functions.php");
|
|
|
29 |
|
|
|
30 |
DisplayHead("View NFO");
|
|
|
31 |
|
|
|
32 |
$file = $_GET["path"];
|
|
|
33 |
$folder = htmlspecialchars( substr( $file, 0, strrpos( $file, "/" ) ) );
|
|
|
34 |
|
|
|
35 |
if( ( $output = @file_get_contents( $cfg["path"] . $file ) ) === false )
|
|
|
36 |
$output = "Error opening NFO File.";
|
|
|
37 |
?>
|
|
|
38 |
<div align="center" style="width: 740px;">
|
|
|
39 |
<a href="<?php echo "viewnfo.php?path=$file&dos=1"; ?>">DOS Format</a> :-:
|
|
|
40 |
<a href="<?php echo "viewnfo.php?path=$file&win=1"; ?>">WIN Format</a> :-:
|
|
|
41 |
<a href="dir.php?dir=<?=$folder;?>">Back</a>
|
|
|
42 |
</div>
|
|
|
43 |
<pre style="font-size: 10pt; font-family: 'Courier New', monospace;">
|
|
|
44 |
<?php
|
|
|
45 |
if( ( empty( $_GET["dos"] ) && empty( $_GET["win"] ) ) || !empty( $_GET["dos"] ) )
|
|
|
46 |
echo htmlentities( $output, ENT_COMPAT, "cp866" );
|
|
|
47 |
else
|
|
|
48 |
echo htmlentities( $output );
|
|
|
49 |
?>
|
|
|
50 |
</pre>
|
|
|
51 |
<?php
|
|
|
52 |
DisplayFoot();
|
|
|
53 |
?>
|