00001 <?php
00002
00008 class SystemInfo extends oxAdminView
00009 {
00016 public function render()
00017 {
00018 $myConfig = $this->getConfig();
00019
00020 parent::render();
00021
00022 $oAuthUser = oxNew( 'oxuser' );
00023 $oAuthUser->loadAdminUser();
00024 $blisMallAdmin = $oAuthUser->oxuser__oxrights->value == "malladmin";
00025
00026 if ( $blisMallAdmin && !$myConfig->isDemoShop()) {
00027 $aClass_vars = get_object_vars( $myConfig);
00028 $aSystemInfo = array();
00029 $oSmarty = oxUtilsView::getInstance()->getSmarty();
00030 while (list($name, $value) = each($aClass_vars)) {
00031 if (gettype($value)=="object")
00032 continue;
00033
00034 if ( $name == "oDB" || $name == "dbUser" || $name == "dbPwd" ||
00035 $name == "oSerial" || $name == "aSerials" || $name == "sSerialNr" )
00036 continue;
00037 $value = var_export($value, true);
00038 $value = str_replace( "\n", "<br>", $value);
00039 $aSystemInfo[$name] = $value;
00040
00041 }
00042 $oSmarty->assign( "oViewConf", $this->_aViewData["oViewConf"]);
00043 $oSmarty->assign( "shop", $this->_aViewData["shop"]);
00044 $oSmarty->assign( "isdemo", $myConfig->isDemoShop());
00045 $oSmarty->assign( "aSystemInfo", $aSystemInfo);
00046 echo $oSmarty->fetch("systeminfo.tpl");
00047 echo( "<br><br>");
00048
00049 phpinfo();
00050
00051 exit();
00052 }
00053 else
00054 die("Access denied !");
00055 }
00056 }