OXID eShop CE  4.8.11
 All Classes Files Functions Variables Pages
systeminfo.php
Go to the documentation of this file.
1 <?php
2 
8 class SystemInfo extends oxAdminView
9 {
16  public function render()
17  {
18  $myConfig = $this->getConfig();
19 
21 
22  $oAuthUser = oxNew( 'oxuser' );
23  $oAuthUser->loadAdminUser();
24  $blisMallAdmin = $oAuthUser->oxuser__oxrights->value == "malladmin";
25 
26  if ( $blisMallAdmin && !$myConfig->isDemoShop()) {
27  $aClassVars = get_object_vars( $myConfig);
28  $aSystemInfo = array();
29  $aSystemInfo['pkg.info'] = $myConfig->getPackageInfo();
30  $oSmarty = oxRegistry::get("oxUtilsView")->getSmarty();
31  while (list($name, $value) = each($aClassVars)) {
32  if (gettype($value)=="object")
33  continue;
34  // security fix - we do not output dbname and dbpwd cause of demoshops
35  if ( $name == "oDB" || $name == "dbUser" || $name == "dbPwd" ||
36  $name == "oSerial" || $name == "aSerials" || $name == "sSerialNr" )
37  continue;
38  $value = var_export($value, true);
39  $value = str_replace( "\n", "<br>", $value);
40  $aSystemInfo[$name] = $value;
41  //echo( "$name = $value <br>");
42  }
43  $oSmarty->assign( "oViewConf", $this->_aViewData["oViewConf"]);
44  $oSmarty->assign( "oView", $this->_aViewData["oView"]);
45  $oSmarty->assign( "shop", $this->_aViewData["shop"]);
46  $oSmarty->assign( "isdemo", $myConfig->isDemoShop());
47  $oSmarty->assign( "aSystemInfo", $aSystemInfo);
48  echo $oSmarty->fetch("systeminfo.tpl");
49  echo( "<br><br>");
50 
51  phpinfo();
52 
53  oxRegistry::getUtils()->showMessageAndExit( "" );
54  } else {
55  return oxRegistry::getUtils()->showMessageAndExit( "Access denied !" );
56  }
57  }
58 }