Subversion Repositories svnkaklik

Rev

Go to most recent revision | Details | Last modification | View Log

Rev Author Line No. Line
6 kaklik 1
<?php
2
/*************************
3
  Coppermine Photo Gallery
4
  ************************
5
  Copyright (c) 2003-2005 Coppermine Dev Team
6
  v1.1 originaly written by Gregory DEMAR
7
 
8
  This program is free software; you can redistribute it and/or modify
9
  it under the terms of the GNU General Public License as published by
10
  the Free Software Foundation; either version 2 of the License, or
11
  (at your option) any later version.
12
  ********************************************
13
  Coppermine version: 1.3.3
14
  $Source: /cvsroot/coppermine/stable/getlang.php,v $
15
  $Revision: 1.6 $
16
  $Author: gaugau $
17
  $Date: 2005/04/19 03:17:10 $
18
**********************************************/
19
 
20
define('IN_COPPERMINE', true);
21
define('CONFIG_PHP', true);
22
 
23
define('LANG_DIR', 'lang');
24
 
25
require('include/init.inc.php');
26
 
27
$dir = opendir(LANG_DIR);
28
$lang_files = array();
29
while ($file = readdir($dir)) {
30
    if (is_file(LANG_DIR . '/' . $file)) {
31
        $lang_files[] = $file;
32
    }
33
}
34
closedir($dir);
35
asort($lang_files);
36
 
37
if (isset($HTTP_GET_VARS['get'])) {
38
    $file_index = (int)$HTTP_GET_VARS['get'];
39
    if ((isset($lang_files[$file_index]))) {
40
        header("Content-type: application/php");
41
        header("Content-Disposition: attachment; filename={$lang_files[$file_index]}");
42
        fpassthru(fopen(LANG_DIR . '/' . $lang_files[$file_index], 'r'));
43
        exit;
44
    }
45
}
46
 
47
pageheader('Language files');
48
starttable('100%', 'Language files');
49
foreach($lang_files as $index => $file) {
50
    echo <<<EOT
51
                <tr>
52
                        <td class="tableb">
53
                                <img src="images/folder.gif" alt="">&nbsp;<a href="$PHP_SELF?get=$index">$file</a>
54
                        </td>
55
                </tr>
56
EOT;
57
}
58
endtable();
59
pagefooter();
60
ob_end_flush();
61
 
62
?>