Verzeichnisstruktur phpBB-3.0.0
- Veröffentlicht
- 12.12.2007
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 |
change_smiley_ref.php
01 <?php
02 /***************************************************************************
03 * merge_clean_posts.php
04 * -------------------
05 * begin : Tuesday, February 25, 2003
06 * copyright : (C) 2003 The phpBB Group
07 * email : support@phpbb.com
08 *
09 * $Id$
10 *
11 ***************************************************************************/
12
13 /***************************************************************************
14 *
15 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation; either version 2 of the License, or
18 * (at your option) any later version.
19 *
20 ***************************************************************************/
21
22 //
23 // Security message:
24 //
25 // This script is potentially dangerous.
26 // Remove or comment the next line (die(".... ) to enable this script.
27 // Do NOT FORGET to either remove this script or disable it after you have used it.
28 //
29 die("Please read the first lines of this script for instructions on how to enable it");
30
31 @set_time_limit(2400);
32
33 // This script adds missing permissions
34 $db = $dbhost = $dbuser = $dbpasswd = $dbport = $dbname = '';
35
36 define('IN_PHPBB', 1);
37 define('ANONYMOUS', 1);
38 $phpEx = substr(strrchr(__FILE__, '.'), 1);
39 $phpbb_root_path='./../';
40 include($phpbb_root_path . 'config.'.$phpEx);
41 require($phpbb_root_path . 'includes/acm/acm_' . $acm_type . '.'.$phpEx);
42 require($phpbb_root_path . 'includes/db/' . $dbms . '.'.$phpEx);
43 include($phpbb_root_path . 'includes/functions.'.$phpEx);
44
45 $cache = new acm();
46 $db = new $sql_db();
47
48 // Connect to DB
49 $db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false);
50
51 $sql = "SELECT post_id, post_text FROM {$table_prefix}posts WHERE post_text LIKE '%{SMILE_PATH}%'";
52 $result = $db->sql_query($sql);
53
54 while ($row = $db->sql_fetchrow($result))
55 {
56 $db->sql_query("UPDATE {$table_prefix}posts SET post_text = '" . $db->sql_escape(str_replace('{SMILE_PATH}', '{SMILIES_PATH}', $row['post_text'])) . "' WHERE post_id = " . $row['post_id']);
57 }
58 $db->sql_freeresult($result);
59
60 echo "<p><b>Done</b></p>\n";
61
62 ?>