function getBlockCode_ShareVideos()
 {
     $aMem = array('ID' => $this->_iProfileID);
     $oNew = new BxDolSharedMedia('video', $this->aConfSite, $this->aConfDir, $aMem);
     $aRes = $oNew->getBlockCode_SharedMedia($this->oProfileV->_iProfileID);
     return $aRes;
 }
function profile_delete($ID)
{
    global $MySQL;
    global $dir;
    global $site;
    global $logged;
    $ID = (int) $ID;
    if (!$ID) {
        return false;
    }
    if (!getProfileInfo($ID)) {
        return false;
    }
    modules_del($ID);
    db_res("DELETE FROM `VKisses` WHERE `ID` = '{$ID}' OR `Member` = '{$ID}'");
    db_res("DELETE FROM `Profiles` WHERE `ID` = '{$ID}'");
    if (!mysql_affected_rows()) {
        return false;
    }
    db_res("DELETE FROM `BlockList` WHERE `ID` = '{$ID}' OR `Profile` = '{$ID}';");
    db_res("DELETE FROM `ProfilesTrack` WHERE `Member` = '{$ID}' OR `Profile` = '{$ID}'");
    db_res("DELETE FROM `Messages` WHERE Recipient = {$ID} ");
    db_res("DELETE FROM `Guestbook` WHERE Recipient = {$ID} ");
    db_res("DELETE FROM `aff_members` WHERE idProfile = {$ID}");
    db_res("DELETE FROM `HotList` WHERE ID = {$ID} OR Profile = {$ID}");
    db_res("DELETE FROM `FriendList` WHERE ID = {$ID} OR Profile = {$ID}");
    db_res("DELETE FROM `BlockList` WHERE ID = {$ID} OR Profile = {$ID}");
    db_res("DELETE FROM `BoughtContacts` WHERE `IDBuyer` = {$ID} OR `IDContact` = {$ID}");
    db_res("DELETE FROM `ProfileMemLevels` WHERE `IDMember` = {$ID}");
    db_res("DELETE FROM `ProfilesComments` WHERE `Sender` = {$ID} OR `Recipient` = {$ID}");
    db_res("DELETE FROM `ProfilesPolls` WHERE `id_profile` = {$ID}");
    db_res("DELETE FROM `Tags` WHERE `ID` = {$ID} AND `Type` = 'profile'");
    db_res("DELETE FROM `GroupsMembers` WHERE `memberID` = {$ID}");
    // delete profile votings
    require_once BX_DIRECTORY_PATH_CLASSES . 'BxDolVoting.php';
    $oVotingProfile = new BxDolVoting('profile', 0, 0);
    $oVotingProfile->deleteVotings($ID);
    // delete profile comments
    require_once BX_DIRECTORY_PATH_CLASSES . 'BxDolCmts.php';
    $oCmts = new BxDolCmts('profile', $ID);
    $oCmts->onObjectDelete();
    // delete all comments in all comments' systems, this user posted
    $oCmts->onAuthorDelete($ID);
    // Clean gallery
    $albumsRes = db_res("SELECT `ID` FROM `GalleryAlbums` WHERE `IDMember` = {$ID}");
    while ($albumArr = mysql_fetch_assoc($albumsRes)) {
        $albumID = $albumArr['ID'];
        $objectsRes = db_res("SELECT `Filename`, `ThumbFilename` FROM `GalleryObjects` WHERE `IDAlbum` = {$albumID}");
        while ($objectArr = mysql_fetch_assoc($objectsRes)) {
            @unlink("{$dir['gallery']}{$objectArr['Filename']}");
            if (strlen($objectArr['ThumbFilename']) && file_exists("{$dir['gallery']}{$objectArr['ThumbFilename']}")) {
                @unlink("{$dir['gallery']}{$objectArr['ThumbFilename']}");
            }
        }
        db_res("DELETE FROM `GalleryObjects` WHERE `IDAlbum` = {$albumID}");
    }
    db_res("DELETE FROM `GalleryAlbums` WHERE `IDMember` = {$ID}");
    // Clean customizations
    $customArr = db_arr("SELECT `BackgroundFilename` FROM `ProfilesSettings` WHERE `IDMember` = {$ID}");
    if (strlen($customArr['BackgroundFilename']) && file_exists($dir['profileImage'] . $customArr['BackgroundFilename']) && is_file($dir['profileImage'] . $customArr['BackgroundFilename'])) {
        unlink($dir['profileImage'] . $customArr['BackgroundFilename']);
    }
    db_res("DELETE FROM `ProfilesSettings` WHERE `IDMember` = {$ID}");
    // delete media
    $rMedia = db_res("SELECT `med_id`, `med_file`, `med_type` FROM `media` WHERE `med_prof_id` = {$ID}");
    $oVotingMedia = new BxDolVoting('media', 0, 0);
    while ($aMedia = mysql_fetch_assoc($rMedia)) {
        switch ($aMedia['med_type']) {
            case 'photo':
                $medDir = $dir['profileImage'] . $ID . "/";
                @unlink($medDir . 'icon_' . $aMedia['med_file']);
                @unlink($medDir . 'photo_' . $aMedia['med_file']);
                @unlink($medDir . 'thumb_' . $aMedia['med_file']);
                break;
            case 'audio':
                $medDir = $dir['profileSound'] . $ID . "/";
                @unlink($medDir . $aMedia['med_file']);
                break;
            case 'video':
                $medDir = $dir['profileVideo'] . $ID . "/";
                @unlink($medDir . $aMedia['med_file']);
                break;
        }
        // delete media voting
        $oVotingMedia->deleteVotings($aMedia['med_id']);
    }
    $aMem = array();
    $aMedia = array('photo', 'music', 'video');
    foreach ($aMedia as $sVal) {
        $oMedia = new BxDolSharedMedia($sVal, $site, $dir, $aMem);
        $oMedia->deleteUserGallery($ID, $logged);
    }
    db_res("DELETE FROM `media` WHERE `med_prof_id` = {$ID}");
    @rmdir($dir['profileImage'] . $ID);
    @rmdir($dir['profileVideo'] . $ID);
    @rmdir($dir['profileSound'] . $ID);
    //Clean blogs
    $aBlog = db_arr("SELECT `ID` FROM `Blogs` WHERE `OwnerID` = {$ID}");
    $iBlogID = $aBlog['ID'];
    if ($iBlogID > 0) {
        //Clean blogs
        $oBlogs = new BxDolBlogs(TRUE);
        $oBlogs->bAdminMode = TRUE;
        (int) ($_REQUEST['DeleteBlogID'] = $iBlogID);
        $oBlogs->ActionDeleteBlogSQL();
    }
    //delete user classifieds
    $oClassifieds = new BxDolClassifieds();
    $oClassifieds->bAdminMode = TRUE;
    $oClassifieds->DeleteProfileAdvertisement($ID);
    //delete user events
    $oEvents = new BxDolEvents();
    $oEvents->bAdminMode = TRUE;
    $oEvents->DeleteProfileEvents($ID);
    //delete cache file
    $sCacheFile = $dir['cache'] . 'user' . $ID . '.php';
    @unlink($sCacheFile);
    reparseObjTags('profile', $ID);
}
require_once BX_DIRECTORY_PATH_CLASSES . 'BxDolSharedMedia.php';
$_page['extra_js'] = '';
$logged['admin'] = member_auth(1, true, true);
$ADMIN = $logged[admin];
$_page['css_name'] = 'browse.css';
if (isset($_REQUEST['type']) && ($_REQUEST['type'] == 'photo' || $_REQUEST['type'] == 'music' || $_REQUEST['type'] == 'video')) {
    $sType = htmlspecialchars_adv($_REQUEST['type']);
} else {
    $sType = 'photo';
}
$sBigType = ucfirst($sType);
$_page['header'] = "Browse {$sBigType}";
$_page['header_text'] = "Browse {$sBigType}";
$_ni = $_page['name_index'];
$aMem = array();
$oNew = new BxDolSharedMedia($sType, $site, $dir, $aMem);
if (isset($_POST['Check']) && is_array($_POST['Check'])) {
    foreach ($_POST['Check'] as $iKey => $iVal) {
        switch (true) {
            case isset($_POST['Delete']):
                $oNew->deleteMedia((int) $iVal, $logged);
                break;
            case isset($_POST['Approve']):
                $oNew->approveMedia((int) $iVal);
                break;
        }
    }
}
$aWhere = array();
$aWhere[] = '1';
if (isset($_GET['userID'])) {
***************************************************************************/
require_once 'inc/header.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'design.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'admin.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'images.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'sharing.inc.php';
require_once BX_DIRECTORY_PATH_CLASSES . 'BxDolSharedMedia.php';
$_page['name_index'] = 44;
$_page['css_name'] = 'explanation.css';
$_page['extra_js'] = '';
check_logged();
$_page['header'] = _t("_Photo Actions");
$_page['header_text'] = _t("_Photo Actions");
$_ni = $_page['name_index'];
$member['ID'] = (int) $_COOKIE['memberID'];
$oMedia = new BxDolSharedMedia('photo', $site, $dir, $member);
// ----------------------------------- main variables for actions ------------------------------------ //
$sTable = 'sharePhotoFiles';
$sIdent = 'medID';
$aInfo = array('Owner' => 'medProfId', 'Title' => 'medTitle', 'Tags' => 'medTags', 'Desc' => 'medDesc', 'Uri' => 'medUri');
// -------------------------------------------------------------------------------------------------- //
if (isset($_POST['fileID']) && isset($_POST['send']) && isset($_POST['email'])) {
    $iFile = (int) $_POST['fileID'];
    $sEmail = $_POST['email'];
    $sMessage = htmlspecialchars_adv($_POST['messageText']);
    $sUrl = process_pass_data($_POST['fileUrl']);
    $sCode .= $oMedia->sendFileInfo($iFile, $sEmail, $sMessage, $sUrl);
}
if (isset($_POST['mediaAction']) && $_POST['mediaAction'] == 'edit') {
    $iFile = (int) $_POST['fileID'];
    saveChanges($iFile);
 function getBlockCode_ShareVideos()
 {
     global $site;
     global $dir;
     $aMem = array('ID' => $this->iMemberID);
     $oNew = new BxDolSharedMedia('video', $site, $dir, $aMem);
     $aRes = $oNew->getBlockCode_SharedMedia();
     return $aRes;
 }
*
* Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License. 
* http://creativecommons.org/licenses/by/3.0/
*
* Dolphin is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the Creative Commons Attribution 3.0 License for more details. 
* You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin, 
* see license.txt file; if not, write to marketing@boonex.com
***************************************************************************/
require_once 'inc/header.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'sharing.inc.php';
require_once BX_DIRECTORY_PATH_CLASSES . 'BxDolSharedMedia.php';
check_logged();
$member['ID'] = (int) $_COOKIE['memberID'];
$oNew = new BxDolSharedMedia('music', $site, $dir, $member);
$_page['name_index'] = 82;
$_page['css_name'] = $oNew->sCssName;
$_page['header'] = _t("_browseMusic");
$_page['header_text'] = _t("_browseMusic");
$_ni = $_page['name_index'];
$aCondition = $oNew->getConditionArray($logged);
if ($aCondition !== false) {
    $aSqlQuery = $aCondition['query'];
    $iTotalPages = $aCondition['total'];
    $iCurPage = $aCondition['cur_page'];
    $iPerPage = $aCondition['per_page'];
} else {
    $_page_cont[$_ni]['page_main_code'] = _t('_Sorry, nothing found');
    PageCode();
    exit;
 function getBlockCode_ShareMusic()
 {
     $aMem = array('ID' => $this->iMember, 'Password' => $this->aMemberInfo['Password']);
     $oNew = new BxDolSharedMedia('music', $this->aConfSite, $this->aConfDir, $aMem);
     $aRes = $oNew->getBlockCode_SharedMedia($oNew->iViewer);
     return $aRes;
 }