Go to the documentation of this file.00001 <?php
00002
00007 class dyn_adbutler extends dyn_interface
00008 {
00015 public function render()
00016 {
00017 parent::render();
00018
00019 $oShop = oxNew( "oxshop" );
00020 $oShop->load( oxSession::getVar( "actshop") );
00021 $this->_aViewData["edit"] = $oShop;
00022
00023 return "dyn_adbutler.tpl";
00024 }
00025
00031 public function save()
00032 {
00033 $soxId = $this->getEditObjectId();
00034 $aParams = oxConfig::getParameter( "editval");
00035
00036 $oShop = oxNew( "oxshop" );
00037 $oShop->load( $soxId);
00038
00039 $aParams['oxshops__oxadbutlerid'] = $this->_checkId($aParams['oxshops__oxadbutlerid']);
00040
00041
00042 $oShop->assign( $aParams);
00043
00044 $oShop->save();
00045 }
00046
00054 public function _checkId( $sProgrammId )
00055 {
00056 $iIdLen = strlen( $sProgrammId );
00057 if ( $iIdLen < 9 ) {
00058 $sProgrammId = str_repeat( "0", 9-$iIdLen ) . $sProgrammId;
00059 }
00060 return $sProgrammId;
00061 }
00062 }