5 * Copyright 2003-2004 (c) GForge LLC
6 * Copyright 2010 (c) Franck Villaume
7 * Copyright (C) 2010 Alain Peyrat - Alcatel-Lucent
8 * http://fusionforge.org
10 * This file is part of FusionForge. FusionForge is free software;
11 * you can redistribute it and/or modify it under the terms of the
12 * GNU General Public License as published by the Free Software
13 * Foundation; either version 2 of the Licence, or (at your option)
16 * FusionForge is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License along
22 * with FusionForge; if not, write to the Free Software Foundation, Inc.,
23 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 require_once '../env.inc.php';
27 require_once $gfcommon.'include/pre.php';
28 require_once $gfcommon.'reporting/report_utils.php';
29 require_once $gfcommon.'reporting/Report.class.php';
30 require_once $gfcommon.'reporting/ReportSetup.class.php';
32 session_require_global_perm ('forge_stats', 'admin') ;
34 if (getStringFromRequest('submit') && getStringFromRequest('im_sure')) {
36 $r = new ReportSetup();
38 if (!$r->initialSetup()) {
39 $error_msg = $r->getErrorMessage();
40 form_release_key(getStringFromRequest("form_key"));
42 $feedback = _('Successfully Rebuilt');
47 report_header(_('Reporting System Initialization'));
50 echo _('Occasionally, if cronjobs failed or the database was damaged, you may have to rebuild the reporting tables.');
53 echo _('If you are sure you want to rebuild all the reporting tables, check the “I am sure” box and click the button below.');
56 echo _('This could take a couple minutes, so DO NOT CLICK MORE THAN ONCE.');
60 <form action="<?php echo getStringFromServer('PHP_SELF'); ?>" method="post">
62 <input type="checkbox" name="im_sure" value="1" /><?php echo _('I am sure'); ?>
65 <input type="submit" name="submit" value="<?php echo _('Press ONLY ONCE'); ?>" />
75 // c-file-style: "bsd"