Verzeichnisstruktur phpBB-3.1.0


Veröffentlicht
27.10.2014

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

acp_send_statistics.php

Zuletzt modifiziert: 09.10.2024, 12:52 - Dateigröße: 2.04 KiB


01  <?php
02  /**
03  *
04  * This file is part of the phpBB Forum Software package.
05  *
06  * @copyright (c) phpBB Limited <https://www.phpbb.com>
07  * @license GNU General Public License, version 2 (GPL-2.0)
08  *
09  * For full copyright and license information, please see
10  * the docs/CREDITS.txt file.
11  *
12  */
13   
14  /**
15  * @ignore
16  */
17  if (!defined('IN_PHPBB'))
18  {
19      exit;
20  }
21   
22  class acp_send_statistics
23  {
24      var $u_action;
25   
26      function main($id, $mode)
27      {
28          global $config, $template, $phpbb_admin_path, $phpbb_root_path, $phpEx;
29   
30          include($phpbb_root_path . 'includes/questionnaire/questionnaire.' . $phpEx);
31   
32          $collect_url = "https://www.phpbb.com/stats/receive_stats.php";
33   
34          $this->tpl_name = 'acp_send_statistics';
35          $this->page_title = 'ACP_SEND_STATISTICS';
36   
37          // generate a unique id if necessary
38          if (!isset($config['questionnaire_unique_id']))
39          {
40              $install_id = unique_id();
41              set_config('questionnaire_unique_id', $install_id);
42          }
43          else
44          {
45              $install_id = $config['questionnaire_unique_id'];
46          }
47   
48          $collector = new phpbb_questionnaire_data_collector($install_id);
49   
50          // Add data provider
51          $collector->add_data_provider(new phpbb_questionnaire_php_data_provider());
52          $collector->add_data_provider(new phpbb_questionnaire_system_data_provider());
53          $collector->add_data_provider(new phpbb_questionnaire_phpbb_data_provider($config));
54   
55          $template->assign_vars(array(
56              'U_COLLECT_STATS'    => $collect_url,
57              'RAW_DATA'            => $collector->get_data_for_form(),
58              'U_ACP_MAIN'        => append_sid("{$phpbb_admin_path}index.$phpEx"),
59          ));
60   
61          $raw = $collector->get_data_raw();
62   
63          foreach ($raw as $provider => $data)
64          {
65              if ($provider == 'install_id')
66              {
67                  $data = array($provider => $data);
68              }
69   
70              $template->assign_block_vars('providers', array(
71                  'NAME'    => htmlspecialchars($provider),
72              ));
73   
74              foreach ($data as $key => $value)
75              {
76                  if (is_array($value))
77                  {
78                      $value = utf8_wordwrap(serialize($value), 75, "\n", true);
79                  }
80   
81                  $template->assign_block_vars('providers.values', array(
82                      'KEY'    => utf8_htmlspecialchars($key),
83                      'VALUE'    => utf8_htmlspecialchars($value),
84                  ));
85              }
86          }
87      }
88  }
89