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.
Auf den Verzeichnisnamen klicken, dies zeigt nur das Verzeichnis mit Inhalt an

(Beispiel Datei-Icons)

Auf das Icon klicken um den Quellcode anzuzeigen

calc_email_hash.php

Zuletzt modifiziert: 09.10.2024, 12:50 - Dateigröße: 1.87 KiB


01  <?php
02  // -------------------------------------------------------------
03  //
04  // $Id$
05  //
06  // FILENAME  : calc_email_hash.php
07  // STARTED   : Tue Feb 03, 2004
08  // COPYRIGHT : � 2004 phpBB Group
09  // WWW       : http://www.phpbb.com/
10  // LICENCE   : GPL vs2.0 [ see /docs/COPYING ] 
11  // 
12  // -------------------------------------------------------------
13   
14  //
15  // Security message:
16  //
17  // This script is potentially dangerous.
18  // Remove or comment the next line (die(".... ) to enable this script.
19  // Do NOT FORGET to either remove this script or disable it after you have used it.
20  //
21  die("Please read the first lines of this script for instructions on how to enable it");
22  @set_time_limit(300);
23   
24  $db = $dbhost = $dbuser = $dbpasswd = $dbport = $dbname = '';
25   
26  define('IN_PHPBB', 1);
27  define('ANONYMOUS', 1);
28  $phpEx = substr(strrchr(__FILE__, '.'), 1);
29  $phpbb_root_path='./../';
30  include($phpbb_root_path . 'config.'.$phpEx);
31  require($phpbb_root_path . 'includes/acm/acm_' . $acm_type . '.'.$phpEx);
32  require($phpbb_root_path . 'includes/db/' . $dbms . '.'.$phpEx);
33  include($phpbb_root_path . 'includes/functions.'.$phpEx);
34   
35  $cache        = new acm();
36  $db            = new sql_db();
37   
38  // Connect to DB
39  $db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false);
40   
41  $start = 0;
42  do
43  {
44      // Batch query for group members, call group_user_del
45      $sql = "SELECT user_id, user_email 
46          FROM  {$table_prefix}users
47          LIMIT $start, 100";
48      $result = $db->sql_query($sql);
49   
50      if ($row = $db->sql_fetchrow($result))
51      {
52          do
53          {
54              $sql = "UPDATE {$table_prefix}users 
55                  SET user_email_hash = " . (crc32(strtolower($row['user_email'])) . strlen($row['user_email'])) . '
56                  WHERE user_id = ' . $row['user_id'];
57              $db->sql_query($sql);
58   
59              $start++;
60          }
61          while ($row = $db->sql_fetchrow($result));
62   
63          echo "<br />Batch -> $start\n";
64          flush();
65      }
66      else
67      {
68          $start = 0;
69      }
70      $db->sql_freeresult($result);
71  }
72  while ($start);
73   
74  echo "<p><b>Done</b></p>\n";
75   
76  ?>