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