Verzeichnisstruktur phpBB-2.0.0
- Veröffentlicht
- 03.04.2002
So funktioniert es
|
Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück |
Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis. |
|
(Beispiel Datei-Icons)
|
Auf das Icon klicken um den Quellcode anzuzeigen |
revar_lang_files.php
01 <?php
02 /***************************************************************************
03 * revar_lang_files.php
04 * -------------------
05 * begin : Saturday, Feb 13, 2001
06 * copyright : (C) 2001 The phpBB Group
07 * email : support@phpbb.com
08 *
09 * $Id$
10 *
11 *
12 ***************************************************************************/
13
14 /***************************************************************************
15 *
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation; either version 2 of the License, or
19 * (at your option) any later version.
20 *
21 ***************************************************************************/
22
23 //
24 // Security message:
25 //
26 // This script is potentially dangerous.
27 // Remove or comment the next line (die(".... ) to enable this script.
28 // Do NOT FORGET to either remove this script or disable it after you have used it.
29 //
30 die("Please read the first lines of this script for instructions on how to enable it");
31
32 $vars = array('lang_main' => 'lang', 'lang_admin' => 'lang', 'lang_faq' => 'faq', 'lang_bbcode' => 'faq');
33
34 $dirname = "./../language";
35 $dir = opendir($dirname);
36
37 while ( $file = readdir($dir) )
38 {
39 if ( ereg("^lang_", $file) && !is_file(realpath($dirname . "/" . $file)) && !is_link(realpath($dirname . "/" . $file)) )
40 {
41 foreach($vars as $lang_file => $lang_var)
42 {
43 $$lang_var = array();
44
45 include($dirname . "/" . $file . "/" . $lang_file . '.php');
46
47 $store = "";
48 while( list($key, $value) = each($$lang_var) )
49 {
50 if ( !is_array($value) )
51 {
52 $key = ( is_string($key) ) ? "'$key'" : $key;
53 $store .= ( ( $store != "" ) ? ", \n\t" : "" ) . "$key => '" . addslashes($value) . "'";
54 }
55 else
56 {
57 $key = ( is_string($key) ) ? "'$key'" : $key;
58 $store .= ( ( $store != "" ) ? ", \n\t" : "" ) . "$key => array(\n\t\t";
59
60 $store2 = "";
61 while( list($key2, $value2) = each($value) )
62 {
63 $key2 = ( is_string($key) ) ? "'$key2'" : $key2;
64 $store2 .= ( ( $store2 != "" ) ? ", \n\t\t" : "" ) . "$key2 => '" . addslashes($value2) . "'";
65 }
66 $store .= $store2 . "\n\t)";
67 }
68 }
69
70 $store = "<?php\n\$$lang_var = array(\n\t$store\n);\n?".">";
71
72 $fp = fopen($dirname . "/" . $file . "/" . $lang_file . '.php', 'w');
73
74 fwrite($fp, $store);
75
76 fclose($fp);
77
78 }
79 }
80 }
81
82 ?>