1 |
2
|
Manuela
|
<?php
|
2 |
|
|
/**
|
3 |
|
|
*
|
4 |
|
|
* @category admin
|
5 |
|
|
* @package login
|
6 |
|
|
* @author Ryan Djurovich, WebsiteBaker Project
|
7 |
|
|
* @copyright WebsiteBaker Org. e.V.
|
8 |
|
|
* @link http://www.websitebaker2.org/
|
9 |
|
|
* @license http://www.gnu.org/licenses/gpl.html
|
10 |
|
|
* @platform WebsiteBaker 2.8.3
|
11 |
|
|
* @requirements PHP 5.3.6 and higher
|
12 |
|
|
* @version $Id$
|
13 |
|
|
* @filesource $HeadURL$
|
14 |
|
|
* @lastmodified $Date$
|
15 |
|
|
*
|
16 |
|
|
*/
|
17 |
|
|
|
18 |
|
|
if ( !defined( 'WB_PATH' ) ){ require( dirname(dirname((__DIR__))).'/config.php' ); }
|
19 |
|
|
if ( !class_exists('admin', false) ) { require(WB_PATH.'/framework/class.admin.php'); }
|
20 |
|
|
if ( !class_exists('SysInfo', false) ) { require(WB_PATH.'/framework/SysInfo.php'); }
|
21 |
|
|
|
22 |
|
|
$admin = new admin('##skip##','start', false, false);
|
23 |
|
|
if (!$admin->is_authenticated() || !$admin->ami_group_member('1')){
|
24 |
|
|
throw new RuntimeException('Illegal file access!');
|
25 |
|
|
}
|
26 |
|
|
if (!class_exists('Twig_Autoloader')) {
|
27 |
|
|
$msg = 'This modul requires TWIG. please download from <a href="http://wiki.'
|
28 |
|
|
. 'websitebaker.org/doku.php/en/downloads" target="_blank" ><b>wiki.wb</a></b>...';
|
29 |
|
|
throw new RuntimeException($msg);
|
30 |
|
|
} else {
|
31 |
|
|
$aWritablePaths = array(
|
32 |
|
|
'languages',
|
33 |
|
|
'media',
|
34 |
|
|
'modules',
|
35 |
|
|
'pages',
|
36 |
|
|
'temp',
|
37 |
|
|
'templates',
|
38 |
|
|
'var',
|
39 |
|
|
);
|
40 |
|
|
$oInfo = new SysInfo();
|
41 |
|
|
if (is_readable(WB_PATH.'/modules/SimpleRegister.php')){
|
42 |
|
|
require WB_PATH.'/modules/SimpleRegister.php';
|
43 |
|
|
}
|
44 |
|
|
|
45 |
|
|
if(is_object($oReg->Db->DbHandle)) {
|
46 |
|
|
$title = "MySQLi Info";
|
47 |
|
|
$server_info = mysqli_get_server_info($oReg->Db->DbHandle);
|
48 |
|
|
$host_info = mysqli_get_host_info($oReg->Db->DbHandle);
|
49 |
|
|
$proto_info = mysqli_get_proto_info($oReg->Db->DbHandle);
|
50 |
|
|
$client_info = mysqli_get_client_info($oReg->Db->DbHandle);
|
51 |
|
|
$client_encoding = mysqli_character_set_name($oReg->Db->DbHandle);
|
52 |
|
|
$status = explode(' ', mysqli_stat($oReg->Db->DbHandle));
|
53 |
|
|
}
|
54 |
|
|
// Create new template object with phplib
|
55 |
|
|
$aTwigData = array(
|
56 |
|
|
'WB_URL' => $oReg->AppUrl,
|
57 |
|
|
'THEME_URL' => $oReg->ThemeUrl,
|
58 |
|
|
'INFO_URL' => $oReg->AcpUrl.'start/wb_info.php',
|
59 |
|
|
'sAddonThemeUrl' => THEME_URL.'',
|
60 |
|
|
'getInterface' => $oInfo->getInterface(),
|
61 |
|
|
'isCgi' => $oInfo->isCgi(),
|
62 |
|
|
'WbVersion' => $oInfo->getWbVersion(),
|
63 |
|
|
'getOsVersion' => $oInfo->getOsVersion(true),
|
64 |
|
|
'aWritablePaths' => $oInfo->checkFolders($aWritablePaths),
|
65 |
|
|
'getSqlServer' => $oInfo->getSqlServer(),
|
66 |
|
|
'client_encoding' => $client_encoding,
|
67 |
|
|
'php_version' => PHP_VERSION,
|
68 |
|
|
'oReg' => $oReg,
|
69 |
|
|
'server' => $oReg->Db->db_handle,
|
70 |
|
|
'client_info' => $client_info,
|
71 |
|
|
'server_info' => $server_info,
|
72 |
|
|
);
|
73 |
|
|
$aTwigloader = array('header'=> 'header.twig',
|
74 |
|
|
'content' => 'content.twig',
|
75 |
|
|
'sysinfo' => 'sysInfo.twig',
|
76 |
|
|
'footer' => 'footer.twig'
|
77 |
|
|
);
|
78 |
|
|
if (is_readable($oReg->ThemePath.'templates/'.$aTwigloader['sysinfo'])){
|
79 |
|
|
$loader = new Twig_Loader_Filesystem($oReg->ThemePath . 'templates');
|
80 |
|
|
$Twig = new Twig_Environment(
|
81 |
|
|
$loader, array(
|
82 |
|
|
'autoescape' => false,
|
83 |
|
|
'cache' => false,
|
84 |
|
|
'strict_variables' => false,
|
85 |
|
|
'debug' => false,
|
86 |
|
|
));
|
87 |
|
|
/*-- finalize the page -----------------------------------------------------------------*/
|
88 |
|
|
echo $Output = $Twig->Render($aTwigloader['sysinfo'], $aTwigData);//
|
89 |
|
|
} else {
|
90 |
|
|
print '<pre class="mod-pre rounded">function <span>'.__FUNCTION__.'( '.''.' );</span> filename: <span>'.basename(__FILE__).'</span> line: '.__LINE__.' -> <br />';
|
91 |
|
|
print_r( $aTwigloader['sysinfo'] ); print '</pre>'; flush (); // ob_flush();;sleep(10); die();
|
92 |
|
|
}
|
93 |
|
|
}
|