- Update the copyright notices to use the correct year and not a non-ASCII symbol
[bugdar.git] / admin / index.php
1 <?php
2 /*=====================================================================*\
3 || ###################################################################
4 || # Bugdar
5 || # Copyright (c)2004-2008 Blue Static
6 || #
7 || # This program is free software; you can redistribute it and/or modify
8 || # it under the terms of the GNU General Public License as published by
9 || # the Free Software Foundation; version 2 of the License.
10 || #
11 || # This program is distributed in the hope that it will be useful, but
12 || # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 || # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 || # more details.
15 || #
16 || # You should have received a copy of the GNU General Public License along
17 || # with this program; if not, write to the Free Software Foundation, Inc.,
18 || # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
19 || ###################################################################
20 \*=====================================================================*/
21
22 require_once('./global.php');
23
24 NavLinks::optionsPages();
25 $navigator->set_focus('tab', 'options', null);
26 $navigator->set_focus('link', 'options-pages-home', 'options-pages');
27
28 $admin->page_start(T('Home'));
29
30 // ###################################################################
31
32 if (!(defined('NO_VERSION_CHECK') AND constant('NO_VERSION_CHECK') == true))
33 {
34 $check = @file_get_contents('http://www.bluestatic.org/versioncheck.php?prod=bugdar&ver=' . str_replace(' ', '-', bugdar::$options['trackerversion']));
35 if (strpos($check, '<version-check>') !== false)
36 {
37 $check = $bugsys->xml->parse($check);
38 if (isset($check['version-check']['update']))
39 {
40 $admin->page_code('<div style="background-color: white; border-color: red; border-width: 2px; border-style: solid; color: red; padding: 4px"><div style="font-size: 18px; font-weight: bold">' . T('Update Avaliable') . ':</div>' . sprintf(T('Your installation of Bugdar is out-of-date. You are running version <strong>%1$s</strong> and the latest version is <strong>%2$s</strong>. You can download the update at <a href="http://www.bluestatic.org">Blue Static\'s website</a>. You are strongly encouraged to apply all updates to fix bugs and any security issues (if present).'), bugdar::$options['trackerversion'], $check['version-check']['update']['value']) . '</div>');
41 }
42 else if (isset($check['version-check']['up-to-date']))
43 {
44 $admin->page_code('<div style="background-color: white; border-color: green; border-width: 2px; border-style: solid; color: green; padding: 4px"><div style="font-size: 18px; font-weight: bold">' . T('Up-to-Date') . ':</div>' . sprintf(T('Your installation of Bugdar is up-to-date. You are running version <strong>%1$s</strong>.'), bugdar::$options['trackerversion']) . '</div>');
45 }
46 }
47 }
48
49 // ###################################################################
50
51 $admin->table_start();
52 $admin->table_head(T('Welcome to the Bugdar Admin Panel'));
53
54 // -------------------------------------------------------------------
55 $admin->row_span(T('Version Information'), 'thead');
56 $admin->row_text(T('Bugdar Version'), bugdar::$options['trackerversion']);
57 $admin->row_text(T('PHP Version'), phpversion());
58
59 $mysql = $db->queryFirst("SELECT VERSION() AS version");
60 $admin->row_text(T('MySQL Version'), $mysql['version']);
61
62 $admin->row_text(T('Web Server'), ($_SERVER['SERVER_SOFTWARE'] ? $_SERVER['SERVER_SOFTWARE'] : $SERVER['SERVER_SOFTWARE']));
63
64 // -------------------------------------------------------------------
65 $admin->row_span(T('Server Options'), 'thead');
66
67 $mysql = $db->queryFirst("SHOW VARIABLES LIKE 'max_allowed_packet'");
68 $admin->row_text(T('MySQL: Maximum Packet Size'), $mysql['Value']);
69
70 $admin->row_text(T('MySQL: Maximum Upload Size'), BSFunctions::fetch_max_php_file_size());
71
72 $mysql = $db->queryFirst("SHOW VARIABLES LIKE 'ft_min_word_len'");
73 $admin->row_text(T('MySQL: Full-Text Search Minimum Word Length'), $mysql['Value']);
74
75 $admin->row_text(T('PHP: Safe Mode'), ((ini_get('safe_mode') == 1 OR strtolower(ini_get('safe_mode')) == 'on') ? T('Yes') : T('No')));
76 $admin->row_text(T('PHP: Register Globals'), ((ini_get('register_globals') == 1 OR strtolower(ini_get('register_globals')) == 'on') ? T('Yes') : T('No')));
77 $admin->row_text(T('PHP: Magic Quotes GPC'), ((ini_get('magic_quotes_gpc') == 1 OR strtolower(ini_get('magic_quotes_gpc')) == 'on') ? T('Yes') : T('No')));
78 $admin->row_text(T('PHP: Magic Quotes Sybase'), ((ini_get('magic_quotes_sybase') == 1 OR strtolower(ini_get('magic_quotes_sybase')) == 'on') ? T('Yes') : T('No')));
79 $admin->row_text(T('PHP: Gettext Installed'), (function_exists('ngettext') ? T('Yes') : T('No')));
80
81 // -------------------------------------------------------------------
82
83 $admin->table_end();
84
85 $admin->page_end();
86
87 ?>