HomeHelpTrac

source: tags/6.1/board.php @ 10316

Revision 10316, 2.3 KB checked in by Alexander Levitskiy, 3 years ago (diff)

Ray changes

Line 
1<?
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 . 'design.inc.php' );
23
24// --------------- page variables and login
25
26$_page['name_index']    = 57;
27$_page['css_name']      = 'ray_chat.css';
28
29$_page['header'] = _t( "_Boards" );
30$_page['header_text'] = _t( "_Boards" );
31
32$logged['member'] = member_auth( 0 );
33
34// --------------- page components
35
36$_ni = $_page['name_index'];
37$_page_cont[$_ni]['page_main_code'] = PageCompMainCode();
38
39// --------------- [END] page components
40
41PageCode();
42
43// --------------- page components functions
44
45/**
46 * page code function
47 */
48function PageCompMainCode() {
49    global $oTemplConfig;
50    global $logged;
51
52    $iId = (int)$_COOKIE['memberID'];
53    if ($iId > 0) {
54        $sPassword = getPassword($iId);
55        $bEnableRay = (getParam( 'enable_ray' ) == 'on');
56        $check_res = checkAction( $iId, ACTION_ID_USE_RAY_CHAT );
57
58        if($bEnableRay && $check_res[CHECK_ACTION_RESULT] == CHECK_ACTION_RESULT_ALLOWED) {
59            $ret .= getApplicationContent('board', 'user', array('id' => $iId, 'password' => $sPassword), true);
60        } else {
61            $ret .= MsgBox($check_res[CHECK_ACTION_MESSAGE]);
62        }
63        return DesignBoxContent( _t('_RAY_CHAT'), $ret, $oTemplConfig -> PageCompThird_db_num );
64    } else {
65        return DesignBoxContent(_t('_LOGIN_ERROR') , MsgBox(_t('_Please login before using Ray chat')), 1 );
66    }
67}
68?>
Note: See TracBrowser for help on using the repository browser.