efire_downloader.php

Go to the documentation of this file.
00001 <?php
00002 
00003 class EFire_Downloader extends Efire
00004 {
00010     protected $_sThisTemplate = "efire_downloader.tpl";
00011 
00017     public function render()
00018     {
00019         $oStr = getStr();
00020         $myConfig = $this->getConfig();
00021 
00022         $this->_aViewData['sEfiUsername'] = $oStr->htmlspecialchars( $myConfig->getConfigParam( 'sEfiUsername' ) );
00023         $this->_aViewData['sEfiPassword'] = $oStr->htmlspecialchars( $myConfig->getConfigParam( 'sEfiPassword' ) );
00024 
00025         return parent::render();
00026     }
00027 
00033     public function getAdminList()
00034     {
00035         $oUserList = oxNew( "oxUserList" );
00036         $oUser = $oUserList->getBaseObject();
00037 
00038         $sQ  = "select ".$oUser->getSelectFields()." from oxuser ";
00039         $sQ .= "where oxuser.oxrights != 'user' ";
00040 
00041         $oUserList->selectString( $sQ );
00042         return $oUserList;
00043     }
00044 
00050     public function getConnector()
00051     {
00052         $oConfig = $this->getConfig();
00053 
00054         $sEtUsername = $this->getConfig()->getParameter("etUsername");
00055         $sEtPassword = $this->getConfig()->getParameter("etPassword");
00056 
00057         $sShopVersion = $this->getConfig()->getEdition() . " " . $this->getConfig()->getVersion();
00058         $blSaveCredentials = $this->getConfig()->getParameter('blSaveCredentials');
00059 
00060         try {
00061             $oConnector = oxNew("oxefidownloader");
00062             $oConnector->downloadConnector( $sEtUsername, $sEtPassword, $sShopVersion, $blSaveCredentials );
00063             $this->_aViewData['message'] = oxLang::getInstance()->translateString('EFIRE_DOWNLOADER_SUCCESS' );
00064         } catch ( Exception $e ) {
00065             oxUtilsView::getInstance()->addErrorToDisplay( sprintf( oxLang::getInstance()->translateString('EFIRE_DOWNLOADER_ERROR' ), $e->getMessage() ) );
00066         }
00067     }
00068 }

Generated by  doxygen 1.6.2