| 1 | <?php
|
|---|
| 2 |
|
|---|
| 3 | /***************************************************************************
|
|---|
| 4 | * Dolphin Smart Community Builder
|
|---|
| 5 | * -----------------
|
|---|
| 6 | * begin : Mon Mar 23 2006
|
|---|
| 7 | * copyright : (C) 2006 BoonEx Group
|
|---|
| 8 | * website : http://www.boonex.com/
|
|---|
| 9 | * This file is part of Dolphin - Smart Community Builder
|
|---|
| 10 | *
|
|---|
| 11 | * Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License.
|
|---|
| 12 | * http://creativecommons.org/licenses/by/3.0/
|
|---|
| 13 | *
|
|---|
| 14 | * Dolphin is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|---|
| 15 | * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|---|
| 16 | * See the Creative Commons Attribution 3.0 License for more details.
|
|---|
| 17 | * You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin,
|
|---|
| 18 | * see license.txt file; if not, write to marketing@boonex.com
|
|---|
| 19 | ***************************************************************************/
|
|---|
| 20 |
|
|---|
| 21 | require_once('inc/header.inc.php');
|
|---|
| 22 | require_once( BX_DIRECTORY_PATH_INC . 'design.inc.php' );
|
|---|
| 23 | require_once( BX_DIRECTORY_PATH_INC . 'admin.inc.php' );
|
|---|
| 24 | require_once( BX_DIRECTORY_PATH_INC . 'images.inc.php' );
|
|---|
| 25 | require_once( BX_DIRECTORY_PATH_INC . 'sharing.inc.php' );
|
|---|
| 26 | require_once( BX_DIRECTORY_PATH_CLASSES . 'BxDolSharedMedia.php' );
|
|---|
| 27 |
|
|---|
| 28 | $_page['name_index'] = 44;
|
|---|
| 29 | $_page['css_name'] = 'explanation.css';
|
|---|
| 30 |
|
|---|
| 31 | $_page['extra_js'] = '';
|
|---|
| 32 |
|
|---|
| 33 | check_logged();
|
|---|
| 34 |
|
|---|
| 35 | if (isset($_REQUEST['type'])) {
|
|---|
| 36 | $sType = htmlspecialchars_adv($_REQUEST['type']);
|
|---|
| 37 | if( $sType != 'photo' and $sType != 'music' and $sType != 'video' )
|
|---|
| 38 | exit;
|
|---|
| 39 | }
|
|---|
| 40 |
|
|---|
| 41 | $_page['header'] = _t( "_".ucfirst($sType)." Actions" );
|
|---|
| 42 | $_page['header_text'] = _t("_".ucfirst($sType)."Actions");
|
|---|
| 43 |
|
|---|
| 44 | $_ni = $_page['name_index'];
|
|---|
| 45 |
|
|---|
| 46 | $member['ID'] = (int)$_COOKIE['memberID'];
|
|---|
| 47 |
|
|---|
| 48 | $oMedia = new BxDolSharedMedia($sType, $site, $dir, $member);
|
|---|
| 49 |
|
|---|
| 50 | // -------------------------------------------------------------------------------------------------- //
|
|---|
| 51 |
|
|---|
| 52 | if (isset($_POST['fileID']) && isset($_POST['send']) && isset($_POST['email'])) {
|
|---|
| 53 | $iFile = (int)$_POST['fileID'];
|
|---|
| 54 | $sEmail = process_pass_data($_POST['email']);
|
|---|
| 55 | $sMessage = htmlspecialchars_adv($_POST['messageText']);
|
|---|
| 56 | $sUrl = process_pass_data($_POST['fileUrl']);
|
|---|
| 57 | $sCode = $oMedia->sendFileInfo($iFileId, $sEmail, $sMessage, $sUrl, strip_tags($_POST['mediaAction']));
|
|---|
| 58 | }
|
|---|
| 59 |
|
|---|
| 60 | if (isset($_POST['mediaAction']) && $_POST['mediaAction'] == 'edit') {
|
|---|
| 61 | $iFile = (int)$_POST['fileID'];
|
|---|
| 62 | $oMedia->saveChanges($iFile);
|
|---|
| 63 | echo '<script language="javascript">window.parent.opener.location = window.parent.opener.location; window.parent.close();</script>';
|
|---|
| 64 | }
|
|---|
| 65 |
|
|---|
| 66 | if (isset($_GET['action']) && isset($_GET['fileID'])) {
|
|---|
| 67 | $sAct = htmlspecialchars_adv($_GET['action']);
|
|---|
| 68 | $aAction['fileID'] = (int)$_GET['fileID'];
|
|---|
| 69 | switch ($sAct) {
|
|---|
| 70 | case 'favorite': $sCode = $oMedia->addToFavorites($aAction['fileID']); break;
|
|---|
| 71 | case 'edit': $sCode = $oMedia->displayMediaEditForm($aAction['fileID']); break;
|
|---|
| 72 | case 'report':
|
|---|
| 73 | case 'share': $aAction['action'] = $sAct; $aAction['fileUrl'] = urlencode($_GET['fileUrl']); $sCode = $oMedia->showSubmitForm($aAction); break;
|
|---|
| 74 | }
|
|---|
| 75 | }
|
|---|
| 76 |
|
|---|
| 77 | $_page_cont[$_ni]['page_main_code'] = DesignBoxContent( _t( '_Notification' ), $sCode, 1);
|
|---|
| 78 |
|
|---|
| 79 | PageCode();
|
|---|
| 80 |
|
|---|
| 81 | ?> |
|---|