systeminfo.php

Go to the documentation of this file.
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             $aClassVars = get_object_vars( $myConfig);
00028             $aSystemInfo = array();
00029             $oSmarty = oxUtilsView::getInstance()->getSmarty();
00030             while (list($name, $value) = each($aClassVars)) {
00031                 if (gettype($value)=="object")
00032                     continue;
00033                 // security fix - we do not output dbname and dbpwd cause of demoshops
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                 //echo( "$name = $value <br>");
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             oxUtils::getInstance()->showMessageAndExit( "" );
00052         } else {
00053             return oxUtils::getInstance()->showMessageAndExit( "Access denied !" );
00054         }
00055     }
00056 }