* 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 . 'BxDolSharedMediaView.php';
$iFile = 0;
if (isset($_GET['fileUri'])) {
    $iFile = getFileIdByUri($_GET['fileUri'], 'photo');
} elseif (isset($_GET['fileID'])) {
    $iFile = (int) $_GET['fileID'];
}
$member['ID'] = (int) $_COOKIE['memberID'];
check_logged();
$oNew = new BxDolSharedMediaView($iFile, 'photo', $site, $dir, $member);
$oVotingView = new BxTemplVotingView('gphoto', 0, 0);
$_page['extra_js'] = $oVotingView->getExtraJs();
$_page['name_index'] = 81;
$_ni = $_page['name_index'];
$_page['css_name'] = $oNew->oShared->sCssName;
$_page['extra_css'] = $oNew->oCmtsView->getExtraCss();
$_page['extra_js'] .= $oNew->oCmtsView->getExtraJs();
$_page['header'] = _t("_view Photo");
$_ni = $_page['name_index'];
$check_res = checkAction($member['ID'], $oNew->oShared->sViewActionName);
if ($check_res[CHECK_ACTION_RESULT] != CHECK_ACTION_RESULT_ALLOWED && !$logged['admin'] && !$logged['moderator']) {
    $sCode = "\r\n    \t<table width=100% height=100% cellpadding=0 cellspacing=0 class=text2>\r\n    \t\t<td align=center bgcolor={$boxbg2}>\r\n    \t\t\t" . $check_res[CHECK_ACTION_MESSAGE] . "<br />\r\n    \t\t</td>\r\n    \t</table>\n";
    $_page['name_index'] = 0;
    $_page_cont[0]['page_main_code'] = $sCode;
    PageCode();
    exit;
}