[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * 4 * @package acp 5 * @version $Id$ 6 * @copyright (c) 2005 phpBB Group 7 * @license http://opensource.org/licenses/gpl-license.php GNU Public License 8 * 9 */ 10 11 /** 12 * @ignore 13 */ 14 if (!defined('IN_PHPBB')) 15 { 16 exit; 17 } 18 19 include($phpbb_root_path . 'includes/questionnaire/questionnaire.' . $phpEx); 20 21 /** 22 * @package acp 23 */ 24 class acp_send_statistics 25 { 26 var $u_action; 27 28 function main($id, $mode) 29 { 30 global $config, $template, $phpbb_admin_path, $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 90 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Wed Oct 2 15:03:47 2013 | Cross-referenced by PHPXref 0.7.1 |