HomeHelpTrac

source: tags/6.1/viewVideo.php @ 10242

Revision 10242, 3.0 KB checked in by Alexander Trofimov, 3 years ago (diff)

dolphin 6.1.5, initial commit

Line 
1<?php
2
3/***************************************************************************
4*                            Dolphin Smart Community Builder
5*                              -----------------
6*     begin                : Mon Mar 23 2006
7*     copyright            : (C) 2006 BoonEx Group
8*     website              : http://www.boonex.com/
9* This file is part of Dolphin - Smart Community Builder
10*
11* Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License.
12* http://creativecommons.org/licenses/by/3.0/
13*
14* Dolphin is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
15* without even the implied warranty of  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16* See the Creative Commons Attribution 3.0 License for more details.
17* You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin,
18* see license.txt file; if not, write to marketing@boonex.com
19***************************************************************************/
20
21require_once('inc/header.inc.php');
22require_once(BX_DIRECTORY_PATH_INC . 'sharing.inc.php');
23require_once(BX_DIRECTORY_PATH_CLASSES . 'BxDolSharedMediaView.php');
24
25$iFile = 0;
26if (isset($_GET['fileUri']))
27    $iFile = getFileIdByUri($_GET['fileUri'], 'video');
28elseif (isset($_GET['fileID']))
29    $iFile = (int)$_GET['fileID'];
30
31$member['ID'] = (int)$_COOKIE['memberID'];
32   
33check_logged();
34
35$oNew = new BxDolSharedMediaView($iFile, 'video', $site, $dir, $member);
36
37$oVotingView = new BxTemplVotingView('gvideo', 0, 0);
38$_page['extra_js']  = $oVotingView->getExtraJs();
39
40$_page['name_index'] = 81;
41$_ni = $_page['name_index'];
42$_page['css_name'] = $oNew->oShared->sCssName;
43$_page['extra_css'] = $oNew->oCmtsView->getExtraCss();
44$_page['extra_js']  .= $oNew->oCmtsView->getExtraJs();
45
46
47$_page['header'] = _t( "_view Video" );
48$_ni = $_page['name_index'];
49
50$check_res = checkAction( $member['ID'], $oNew->oShared->sViewActionName );
51if ( $check_res[CHECK_ACTION_RESULT] != CHECK_ACTION_RESULT_ALLOWED && !$logged['admin'] && !$logged['moderator'] ) {
52    $sCode  = "
53        <table width=100% height=100% cellpadding=0 cellspacing=0 class=text2>
54            <td align=center bgcolor=$boxbg2>
55                ". $check_res[CHECK_ACTION_MESSAGE] ."<br />
56            </td>
57        </table>\n";
58
59    $_page['name_index'] = 0;
60    $_page_cont[0]['page_main_code'] = $sCode;
61    PageCode();
62    exit();
63}
64
65if (!is_array($oNew->aInfo)) {
66    $sCode = MsgBox( _t( '_No file' ) );
67    $_page['name_index'] = 0;
68    $_page_cont[0]['page_main_code'] = $sCode;
69    PageCode();
70    exit();
71}
72else {
73    $_page['header'] = $oNew->aInfo['medTitle'];
74    db_res("UPDATE `{$oNew->oShared->sMainTable}` SET `{$oNew->oShared->aTableFields['medViews']}` = `{$oNew->oShared->aTableFields['medViews']}` + 1 WHERE `{$oNew->oShared->aTableFields['medID']}`='$iFile'");
75    $_page_cont[$_ni]['page_main_code'] = $oNew->getCode();
76    PageCode();
77   
78    checkAction( $member['ID'], $oNew->oShared->sViewActionName, true );
79}
80
81?>
Note: See TracBrowser for help on using the repository browser.