function getPageMainCode()
{
    global $oTemplConfig;
    $ret = '';
    $aPhotoConf = array();
    $aPhotoConf['profileID'] = (int) $_REQUEST['ID'];
    $aPhotoConf['visitorID'] = (int) $_COOKIE['memberID'];
    $aPhotoConf['isOwner'] = $aPhotoConf['profileID'] == $aPhotoConf['visitorID'] ? true : false;
    $check_res = checkAction($aPhotoConf['visitorID'], ACTION_ID_USE_GALLERY);
    if ($check_res[CHECK_ACTION_RESULT] != CHECK_ACTION_RESULT_ALLOWED) {
        $ret = '
			<table width="100%" cellpadding="4" cellspacing="4" border="0">
				<tr>
					<td align="center">' . $check_res[CHECK_ACTION_MESSAGE] . '</td>
				</tr>
			</table>';
        return $ret;
    }
    $oMedia = new BxDolMedia();
    $oMedia->iProfileID = $aPhotoConf['profileID'];
    $oMedia->sMediaType = isset($_REQUEST['show']) ? $_REQUEST['show'] : 'video';
    $oMedia->BxDolMedia();
    $oMedia->getActiveMediaArray();
    $ret .= ProfileDetails($oMedia->iProfileID);
    $ret .= '<div class="clear_both"></div>';
    if ($oTemplConfig->customize['media_gallery']['showMediaTabs']) {
        $ret .= '<div class="choiseBlock">';
        $ret .= getMediaTabs($oMedia->sMediaType, $oMedia->aMediaConfig);
        $ret .= '</div>';
    }
    //print_r( $oMedia -> aMedia);
    $i = 1;
    foreach ($oMedia->aMedia as $aValue) {
        $ret .= '<div class="mediaBlock">';
        $ret .= '<div class="mediaTitleVA">';
        $ret .= process_line_output($aValue['med_title']);
        $ret .= '</div>' . "\n";
        $ret .= '<div class="mediaActions">';
        $ret .= '<span>';
        $ret .= '<a href="' . $oMedia->getMediaLink($aValue) . '">';
        $ret .= _t('_download');
        $ret .= '</a>';
        $ret .= '</span>';
        /*
        $ret .= '<span>';
        	$ret .= '<a href="' . $_SERVER['PHP_SELF'] . '?show=' . $oMedia -> sMediaType . '&amp;action=delete&amp;mediaID=' . $aValue['med_id'] . '">';
        		$ret .= _t('_delete');
        	$ret .= '</a>';
        $ret .= '</span>';
        */
        $ret .= '</div>' . "\n";
        $ret .= '</div>' . "\n";
        if ($i >= $oMedia->aMediaConfig['max'][$oMedia->sMediaType]) {
            break;
        }
        $i++;
    }
    $ret .= '';
    return $ret;
}
 function UploadVideo($iProfileID)
 {
     $this->sMediaType = 'video';
     $this->sSupportedExt = 'avi,mov,mpeg,mpg,wmv,3gp,asf,rm,ram,rmv';
     $this->iProfileID = $iProfileID;
     parent::BxDolMedia();
 }
 function UploadAudio($iProfileID)
 {
     $this->sMediaType = 'audio';
     $this->sSupportedExt = 'mp3,mp4,wav,wma,ogg';
     $this->iProfileID = $iProfileID;
     parent::BxDolMedia();
 }
 function UploadPhoto($iProfileID)
 {
     $this->sMediaType = 'photo';
     $this->iProfileID = $iProfileID;
     parent::BxDolMedia();
     $aMember = getProfileInfo($this->iProfileID);
     $sSex = $aMember['Sex'];
     //$sSex = db_value( "SELECT `Sex` FROM `Profiles` WHERE `ID` = '{$this -> iProfileID}'" );
     if ($sSex == 'male' or $sSex == 'Male') {
         $this->sSexIcon = 'man_small.gif';
         $this->sSexPic = 'man_big.gif';
     } elseif ($sSex == 'female' or $sSex == 'Female') {
         $this->sSexIcon = 'woman_small.gif';
         $this->sSexPic = 'woman_big.gif';
     } else {
         $this->sSexIcon = 'visitor_small.gif';
         $this->sSexPic = 'visitor_big.gif';
     }
 }