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 |
encoding_emails.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 $dirname = "./../language";
33 $dir = opendir($dirname);
34
35 while ( $file = readdir($dir) )
36 {
37 if ( ereg('^lang_', $file) && !is_file(phpbb_realpath($dirname . '/' . $file)) && !is_link(phpbb_realpath($dirname . '/' . $file)) )
38 {
39 include($dirname . '/' . $file . '/lang_main.php');
40
41 $lang_dir = opendir($dirname . '/' . $file . '/email');
42
43 while ( $email = readdir($lang_dir) )
44 {
45 if ( ereg('\.tpl$', $email) && is_file(phpbb_realpath($dirname . '/' . $file . '/email/' . $email)) )
46 {
47 $fp = fopen($dirname . '/' . $file . '/email/' . $email, 'r+');
48
49 $email_file = "";
50 while ( $line = fread($fp, 100000) )
51 {
52 $email_file .= $line;
53 }
54
55 if ( !preg_match('/^Charset: .*?$/m', $email_file) )
56 {
57 $email_file = preg_replace('/^((Subject: .*?\n)(\n))?/i', "\\2Charset: " . $lang['ENCODING'] . "\n\n", $email_file);
58 }
59
60 echo '<b>' . $dirname . '/' . $file . '/email/' . $email . "</b><br />\n";
61 echo nl2br($email_file);
62 echo "\n\n<br /><br />\n\n";
63
64 fseek($fp, 0);
65 fwrite($fp, $email_file);
66 fclose($fp);
67 }
68 }
69 echo "\n\n<hr />\n\n";
70 }
71 }
72
73 ?>