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             $aSystemInfo['pkg.info'] = $myConfig->getPackageInfo();
00030             $oSmarty = oxRegistry::get("oxUtilsView")->getSmarty();
00031             while (list($name, $value) = each($aClassVars)) {
00032                 if (gettype($value)=="object")
00033                     continue;
00034                 // security fix - we do not output dbname and dbpwd cause of demoshops
00035                 if ( $name == "oDB" || $name == "dbUser" || $name == "dbPwd" ||
00036                     $name == "oSerial" || $name == "aSerials" || $name == "sSerialNr" )
00037                     continue;
00038                 $value = var_export($value, true);
00039                 $value = str_replace( "\n", "<br>", $value);
00040                 $aSystemInfo[$name] = $value;
00041                 //echo( "$name = $value <br>");
00042             }
00043             $oSmarty->assign( "oViewConf", $this->_aViewData["oViewConf"]);
00044             $oSmarty->assign( "oView", $this->_aViewData["oView"]);
00045             $oSmarty->assign( "shop", $this->_aViewData["shop"]);
00046             $oSmarty->assign( "isdemo", $myConfig->isDemoShop());
00047             $oSmarty->assign( "aSystemInfo", $aSystemInfo);
00048             echo $oSmarty->fetch("systeminfo.tpl");
00049             echo( "<br><br>");
00050 
00051             phpinfo();
00052 
00053             oxRegistry::getUtils()->showMessageAndExit( "" );
00054         } else {
00055             return oxRegistry::getUtils()->showMessageAndExit( "Access denied !" );
00056         }
00057     }
00058 }