[ Index ] |
PHP Cross Reference of phpBB-3.1.12-deutsch |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * 4 * This file is part of the phpBB Forum Software package. 5 * 6 * @copyright (c) phpBB Limited <https://www.phpbb.com> 7 * @license GNU General Public License, version 2 (GPL-2.0) 8 * 9 * 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 if (!class_exists('phpbb_questionnaire_data_collector')) 31 { 32 include($phpbb_root_path . 'includes/questionnaire/questionnaire.' . $phpEx); 33 } 34 35 $collect_url = "https://www.phpbb.com/stats/receive_stats.php"; 36 37 $this->tpl_name = 'acp_send_statistics'; 38 $this->page_title = 'ACP_SEND_STATISTICS'; 39 40 // generate a unique id if necessary 41 if (!isset($config['questionnaire_unique_id'])) 42 { 43 $install_id = unique_id(); 44 set_config('questionnaire_unique_id', $install_id); 45 } 46 else 47 { 48 $install_id = $config['questionnaire_unique_id']; 49 } 50 51 $collector = new phpbb_questionnaire_data_collector($install_id); 52 53 // Add data provider 54 $collector->add_data_provider(new phpbb_questionnaire_php_data_provider()); 55 $collector->add_data_provider(new phpbb_questionnaire_system_data_provider()); 56 $collector->add_data_provider(new phpbb_questionnaire_phpbb_data_provider($config)); 57 58 $template->assign_vars(array( 59 'U_COLLECT_STATS' => $collect_url, 60 'RAW_DATA' => $collector->get_data_for_form(), 61 'U_ACP_MAIN' => append_sid("{$phpbb_admin_path}index.$phpEx"), 62 )); 63 64 $raw = $collector->get_data_raw(); 65 66 foreach ($raw as $provider => $data) 67 { 68 if ($provider == 'install_id') 69 { 70 $data = array($provider => $data); 71 } 72 73 $template->assign_block_vars('providers', array( 74 'NAME' => htmlspecialchars($provider), 75 )); 76 77 foreach ($data as $key => $value) 78 { 79 if (is_array($value)) 80 { 81 $value = utf8_wordwrap(serialize($value), 75, "\n", true); 82 } 83 84 $template->assign_block_vars('providers.values', array( 85 'KEY' => utf8_htmlspecialchars($key), 86 'VALUE' => utf8_htmlspecialchars($value), 87 )); 88 } 89 } 90 } 91 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Thu Jan 11 00:25:41 2018 | Cross-referenced by PHPXref 0.7.1 |