getExtraJs(); // --------------- GET/POST actions $_ni = $_page['name_index']; $_page_cont[$_ni]['page_main_code'] = getPageMainCode(); // --------------- [END] page components PageCode(); // --------------- page components functions function getPageMainCode() { $aPhotoConf = array(); $aPhotoConf['profileID'] = (int)$_REQUEST['ID']; $aPhotoConf['visitorID'] = (int)$_COOKIE['memberID']; $aPhotoConf['isOwner'] = ( $aPhotoConf['profileID'] == $aPhotoConf['visitorID'] ) ? true : false; if( $aPhotoConf['isOwner'] ) { header( "Location:upload_media.php?show=photos" ); exit; } $check_res = checkAction( $aPhotoConf['visitorID'], ACTION_ID_VIEW_PHOTOS ); if ( $check_res[CHECK_ACTION_RESULT] != CHECK_ACTION_RESULT_ALLOWED ) { $ret = '
' . $check_res[CHECK_ACTION_MESSAGE] . '
'; return $ret; } $oPhotos = new ProfilePhotos( $aPhotoConf['profileID'] ); $oPhotos -> getActiveMediaArray(); $ret = ''; if( $_REQUEST['voteSubmit'] && $_REQUEST['photoID'] ) { $oPhotos -> setVoting(); header('Location:' . $_SERVER['PHP_SELF'] . '?ID=' . $oPhotos -> iProfileID . '&photoID=' . $_REQUEST['photoID'] ); } if( !$aPhotoConf['isOwner'] ) { $ret .= ProfileDetails( $oPhotos -> iProfileID ); $ret .= '
'; } if( 0 < $_REQUEST['photoID'] ) { $iPhotoID = $_REQUEST['photoID']; $ret .= $oPhotos -> getMediaPage( $iPhotoID ); } else { $ret .= $oPhotos -> getMediaPage(); } return $ret; } ?>