]> src.bluestatic.org Git - bugdar.git/blob - admin/index.php
r1384: It was actually bug 66...
[bugdar.git] / admin / index.php
1 <?php
2 /*=====================================================================*\
3 || ###################################################################
4 || # Bugdar [#]version[#]
5 || # Copyright ©2002-[#]year[#] 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 [#]gpl[#] 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(_('Home'));
29
30 // ###################################################################
31
32 if (!defined('NO_VERSION_CHEK') OR constant('NO_VERSION_CHECK') != true)
33 {
34 $check = @file_get_contents('http://www.bluestatic.org/versioncheck.php?prod=bugdar&ver=' . str_replace(' ', '-', $bugsys->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">' . _('Update Avaliable') . ':</div>' . sprintf(_('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).'), $bugsys->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">' . _('Up-to-Date') . ':</div>' . sprintf(_('Your installation of Bugdar is up-to-date. You are running version <strong>%1$s</strong>.'), $bugsys->options['trackerversion']) . '</div>');
45 }
46 }
47 }
48
49 // ###################################################################
50
51 $admin->table_start();
52 $admin->table_head(_('Welcome to the Bugdar Admin Panel'));
53
54 // -------------------------------------------------------------------
55 $admin->row_span(_('Version Information'), 'thead');
56 $admin->row_text(_('Bugdar Version'), $bugsys->options['trackerversion']);
57 $admin->row_text(_('PHP Version'), phpversion());
58
59 $mysql = $db->query_first("SELECT VERSION() AS version");
60 $admin->row_text(_('MySQL Version'), $mysql['version']);
61
62 $admin->row_text(_('Web Server'), ($_SERVER['SERVER_SOFTWARE'] ? $_SERVER['SERVER_SOFTWARE'] : $SERVER['SERVER_SOFTWARE']));
63
64 // -------------------------------------------------------------------
65 $admin->row_span(_('Server Options'), 'thead');
66
67 $mysql = $db->query_first("SHOW VARIABLES LIKE 'max_allowed_packet'");
68 $admin->row_text(_('MySQL: Maximum Packet Size'), $mysql['Value']);
69
70 $admin->row_text(_('MySQL: Maximum Upload Size'), $funct->fetch_max_attachment_size());
71
72 $mysql = $db->query_first("SHOW VARIABLES LIKE 'ft_min_word_len'");
73 $admin->row_text(_('MySQL: Full-Text Search Minimum Word Length'), $mysql['Value']);
74
75 $admin->row_text(_('PHP: Safe Mode'), ((ini_get('safe_mode') == 1 OR strtolower(ini_get('safe_mode')) == 'on') ? _('Yes') : _('No')));
76 $admin->row_text(_('PHP: Register Globals'), ((ini_get('register_globals') == 1 OR strtolower(ini_get('register_globals')) == 'on') ? _('Yes') : _('No')));
77 $admin->row_text(_('PHP: Magic Quotes GPC'), ((ini_get('magic_quotes_gpc') == 1 OR strtolower(ini_get('magic_quotes_gpc')) == 'on') ? _('Yes') : _('No')));
78 $admin->row_text(_('PHP: Magic Quotes Sybase'), ((ini_get('magic_quotes_sybase') == 1 OR strtolower(ini_get('magic_quotes_sybase')) == 'on') ? _('Yes') : _('No')));
79 $admin->row_text(_('PHP: Gettext Installed'), (function_exists('ngettext') ? _('Yes') : _('No')));
80
81 // -------------------------------------------------------------------
82
83 $admin->table_end();
84
85 $admin->page_end();
86
87 /*=====================================================================*\
88 || ###################################################################
89 || # $HeadURL$
90 || # $Id$
91 || ###################################################################
92 \*=====================================================================*/
93 ?>