function deleteMedia($iProfileID, $iMediaID, $sMediaType)
{
$sQuery = "\r\n\t\t\tDELETE FROM " . BX_DOL_TABLE_MEDIA . " WHERE\r\n\t\t\t\t`med_id` = '{$iMediaID}'\r\n\t\t\tAND\t`med_type` = '{$sMediaType}'\r\n\t\t\tAND `med_prof_id` = '{$iProfileID}'\r\n\t\t\tLIMIT 1\r\n\t\t";
$this->query($sQuery);
// delete voting
require_once BX_DIRECTORY_PATH_CLASSES . 'BxDolVoting.php';
$oVotingMedia = new BxDolVoting('media', 0, 0);
$oVotingMedia->deleteVotings($iMediaID);
}