]>
src.bluestatic.org Git - bugdar.git/blob - admin/index.php
2 /*=====================================================================*\
3 || ###################################################################
5 || # Copyright (c)2004-2009 Blue Static
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.
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
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 \*=====================================================================*/
22 $fetchtemplates = array ( 'main' );
24 require_once ( './global.php' );
26 $template = new BSTemplate ( 'main' );
28 // ###################################################################
31 if (!( defined ( 'NO_VERSION_CHECK' ) AND constant ( 'NO_VERSION_CHECK' ) == true ))
33 $template- > vars
[ 'versionCheck' ] = true ;
35 $check = @ file_get_contents ( 'http://www.bluestatic.org/versioncheck.php?prod=bugdar&ver=' . str_replace ( ' ' , '-' , bugdar
:: $options [ 'trackerversion' ]));
36 if ( strpos ( $check , '<version-check>' ) !== false )
38 $check = simplexml_load_string ( $check );
41 $template- > vars
[ 'upToDate' ] = false ;
42 $template- > vars
[ 'updateTitle' ] = T ( 'Update Avaliable' );
43 $template- > vars
[ 'updateString' ] = 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- > update
);
47 $template- > vars
[ 'upToDate' ] = true ;
48 $template- > vars
[ 'updateTitle' ] = T ( 'Up-to-Date' );
49 $template- > vars
[ 'updateString' ] = sprintf ( T ( 'Your installation of Bugdar is up-to-date. You are running version <strong>%1 $s </strong>.' ), bugdar
:: $options [ 'trackerversion' ]);
54 // ###################################################################
55 // some option information
57 $template- > vars
[ 'mysqlVersion' ] = $db- > queryFirst ( "SELECT VERSION() AS version" , 'fetchObject' )-> version
;
58 $template- > vars
[ 'webServer' ] = ( $_SERVER [ 'SERVER_SOFTWARE' ]) ? $_SERVER [ 'SERVER_SOFTWARE' ] : $SERVER [ 'SERVER_SOFTWARE' ];
60 $template- > vars
[ 'mysqlPacketSize' ] = $db- > queryFirst ( "SHOW VARIABLES LIKE 'max_allowed_packet'" , 'fetchObject' )-> Value
;
61 $template- > vars
[ 'mysqlWordLength' ] = $db- > queryFirst ( "SHOW VARIABLES LIKE 'ft_min_word_len'" , 'fetchObject' )-> Value
;
63 $template- > vars
[ 'phpSafeMode' ] = ( ini_get ( 'safe_mode' ) == 1 || strtolower ( ini_get ( 'safe_mode' )) == 'on' );
64 $template- > vars
[ 'phpRegGlobals' ] = ( ini_get ( 'register_globals' ) == 1 || strtolower ( ini_get ( 'register_globals' )) == 'on' );
65 $template- > vars
[ 'phpMagicQuotesGPC' ] = ( ini_get ( 'magic_quotes_gpc' ) == 1 || strtolower ( ini_get ( 'magic_quotes_gpc' )) == 'on' );
66 $template- > vars
[ 'phpMagicQuotesSybase' ] = ( ini_get ( 'magic_quotes_sybase' ) == 1 || strtolower ( ini_get ( 'magic_quotes_sybase' )) == 'on' );
68 $template- > evaluate ()-> flush ();