Beispiel #1
0
 function actionAlbumsViewMy($sParamValue = '', $sParamValue1 = '', $sParamValue2 = '', $sParamValue3 = '')
 {
     $sAction = bx_get('action');
     if ($sAction !== false) {
         require_once 'BxSoundsUploader.php';
         $oUploader = new BxSoundsUploader();
         switch ($sAction) {
             case 'accept_upload':
                 echo $oUploader->serviceAcceptFile();
                 exit;
                 break;
             case 'accept_record':
                 echo $oUploader->serviceAcceptRecordFile();
                 exit;
                 break;
             case 'cancel_file':
                 echo $oUploader->serviceCancelFileInfo();
                 exit;
                 break;
             case 'accept_file_info':
                 echo $oUploader->serviceAcceptFileInfo();
                 exit;
                 break;
             case 'accept_multi_files':
                 echo $oUploader->servicePerformMultiMusicUpload();
                 exit;
                 break;
             default:
                 break;
         }
     } else {
         parent::actionAlbumsViewMy($sParamValue, $sParamValue1, $sParamValue2, $sParamValue3);
     }
 }
 function getBlockCode_addObjects($iBoxId)
 {
     if (!in_array('addObjects', $this->aCurrentBlocks['blocks'])) {
         return '';
     }
     $aAlbumInfo = $this->oAlbum->getAlbumInfo(array('fileUri' => $this->aAddParams[1], 'owner' => $this->iOwnerId));
     if ($aAlbumInfo['Owner'] != $this->iOwnerId) {
         $sCode = MsgBox(_t('_Access denied'));
     }
     if (!$this->oSearch->oModule->isAllowedAdd()) {
         $sCode = MsgBox(_t('_' . $this->oConfig->getMainPrefix() . '_access_denied'));
         $sSubMenu = '';
     } else {
         require_once 'BxSoundsUploader.php';
         $sLink = BX_DOL_URL_ROOT . $this->oConfig->getBaseUri() . 'albums/my/add_objects/' . $this->aAddParams[1] . '/' . $this->aAddParams[2] . '/' . $this->aAddParams[3];
         $aMenu = $this->oConfig->getUploaderSwitcher($sLink);
         $sSubMenu = $this->oTemplate->getExtraSwitcher($aMenu, '_' . $this->oConfig->getMainPrefix() . '_choose_uploader', $iBoxId);
         $oUploader = new BxSoundsUploader();
         $sCode = $this->oTemplate->parseHtmlByName('default_margin.html', array('content' => $oUploader->GenMainAddMusicForm(array('album' => $this->aAddParams[1]))));
     }
     $GLOBALS['oTopMenu']->setCustomSubHeader($aAlbumInfo['Caption']);
     return array($sSubMenu . $sCode, $this->getTopMenu('add_objects'), '', '');
 }
 function getBlockCode_addObjects($iBoxId)
 {
     if (!in_array('addObjects', $this->aCurrentBlocks['blocks'])) {
         return '';
     }
     if (!$this->oSearch->oModule->isAllowedAdd()) {
         $sCode = MsgBox(_t('_' . $this->oConfig->getMainPrefix() . '_access_denied'));
         $sSubMenu = '';
     } else {
         require_once 'BxSoundsUploader.php';
         $sLink = BX_DOL_URL_ROOT . $this->oConfig->getBaseUri() . 'albums/my/add_objects/' . $this->aAddParams[1] . '/' . $this->aAddParams[2] . '/' . $this->aAddParams[3];
         $aMenu = $this->oConfig->getUploaderSwitcher($sLink);
         $sSubMenu = $this->oTemplate->getExtraSwitcher($aMenu, '_' . $this->oConfig->getMainPrefix() . '_choose_uploader', $iBoxId);
         $oUploader = new BxSoundsUploader();
         $sCode = '<div class="bx_sys_default_padding">' . $oUploader->GenMainAddMusicForm(array('album' => $this->aAddParams[1])) . '</div>';
     }
     return array($sSubMenu . $sCode, $this->getTopMenu('add_objects'), '', '');
 }