' . $check_res[CHECK_ACTION_MESSAGE] . ' '; return $ret; } $ret = ''; if ($_GET['prev_id']) $ret .= showPreviousRated((int)$_GET['prev_id']); if( $oTemplConfig -> customize['rate']['showSexSelector'] ) { $ret .= '
'; $ret .= '
'; $ret .= ''; $ret .= _t("_Show me"); $ret .= ''; $ret .= ''; $ret .= ''; $ret .= ''; $ret .= '
'; $ret .= '
'; } if( empty( $aPhoto ) ) { $ret .= _t_action('_there_is_no_photo_that_you_can_rate'); } else { if( $oTemplConfig -> customize['rate']['showProfileInfo'] ) { $ret .= '
'; $ret .= ProfileDetails( $aPhoto['med_prof_id'] ); $ret .= '
'; } $ret .= getRatingPhoto( $aPhoto ); $oVotingView = new BxTemplVotingView ('media', (int)$aPhoto['med_id']); if( $oVotingView->isEnabled()) { $sUrlAdd = ''; if ($_REQUEST['showme']) $sUrlAdd .= 'showme='.$_REQUEST['showme'].'&'; $ret .= " "; $ret .= '
' . $oVotingView->getBigVoting () . '
'; } } return $ret; } function getVotingItem() { if ( strlen($_REQUEST['showme']) && $_REQUEST['showme'] != 'all' ) { $sSexOnly = process_db_input($_REQUEST['showme']); } $sVoted = getVotedItems(); $oMediaQuery = new BxDolMediaQuery(); $oDolVoting = new BxDolVoting ('media', 0, 0); return $oMediaQuery -> selectVotingItem( $oDolVoting, $sVoted, $sSexOnly ); } function VotingTrack( $iMediaID ) { $oMediaQuery = new BxDolMediaQuery(); $iMediaID = (int)$iMediaID; $ip = getVisitorIP(); $oMediaQuery -> insertVotingTrack( $iMediaID, $ip ); } function getVotedItems() { $ip = getVisitorIP(); $oDolVoting = new BxDolVoting ('media', 0, 0); $_aVotedItems = $oDolVoting -> getVotedItems ($ip); $aVotedItems = reviewArray( $_aVotedItems ); return $aVotedItems; } function reviewArray( $arrays ) { $line = ''; foreach($arrays as $array) { $line .= '\'' . $array['med_id'] . '\','; } $line .= '\'\''; return $line; } function getRatingPhoto( $aPhoto ) { global $max_photo_width, $max_photo_height, $dir, $site; $sFileSrc = $dir['profileImage'] . $aPhoto['med_prof_id'] . '/photo_' . $aPhoto['med_file']; if( extFileExists($sFileSrc) ) { $sPhotoUrl = $site['profileImage'] . $aPhoto['med_prof_id'] . '/photo_' . $aPhoto['med_file']; } else { header('Location:' . $_SERVER['PHP_SELF']); } $ret = ''; $ret .= '
'; $ret .= process_line_output( $aPhoto['med_title'] ); $ret .= '
'; $ret .= '
'; $ret .= ''; $ret .= '
'; return $ret; } function showPreviousRated( $iPhotoID ) { global $site; global $oTemplConfig; global $max_thumb_width; global $max_thumb_height; $iBarWidth = $oTemplConfig -> iRateSmallRatingBar; $iBarNum = $oTemplConfig -> iRateSmallRatingBarNum; $query = " SELECT `media`.`med_id`, `med_prof_id`, `med_file`, `med_title`, `med_rating_count`, `med_rating_sum`, `Profiles`.`NickName` FROM `media` LEFT JOIN `media_rating` USING (`med_id`) LEFT JOIN `Profiles` ON (`Profiles`.`ID`=`media`.`med_prof_id`) WHERE `med_status` = 'active' AND `media`.`med_id` = $iPhotoID "; $ph_arr = db_arr( $query ); if( !$ph_arr ) return ''; $urlImg = "{$site['profileImage']}{$ph_arr['med_prof_id']}/thumb_{$ph_arr['med_file']}"; $urlSpacer = getTemplateIcon( 'spacer.gif' ); $sProfLink = getProfileLink($ph_arr['med_prof_id']); $sRatingBar = ''; $oVotingView = new BxTemplVotingView ('media', (int)$iPhotoID); if( $oVotingView->isEnabled()) $sRatingBar = $oVotingView->getSmallVoting (false); $ret .= <<
{$ph_arr['NickName']}
$sRatingBar
EOJ; return DesignBoxContent( _t('_Previous rated'), $ret, 1 ); } ?>