source: trunk/profile_info.php

Last change on this file was 2, checked in by george, 14 years ago
  • Přidáno: Trunk revize 13719.
File size: 4.4 KB
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
21 require_once( 'inc/header.inc.php' );
22 require_once( BX_DIRECTORY_PATH_INC . 'design.inc.php' );
23 require_once( BX_DIRECTORY_PATH_CLASSES . 'BxDolPageView.php' );
24
25 bx_import( 'BxTemplProfileView' );
26
27 check_logged();
28
29 $sPageCaption = _t( '_Profile info' );
30
31 $_page['name_index'] = 7;
32 $_page['header'] = $sPageCaption;
33 $_page['header_text'] = $sPageCaption;
34 $_page['css_name'] = 'profile_view.css';
35
36 bx_import ('BxTemplProfileView');
37
38 class BxDolProfileInfoPageView extends BxTemplProfileView
39 {
40 // contain informaion about viewed profile ;
41 var $aMemberInfo = array();
42 // logged member ID ;
43 var $iMemberID;
44 var $oProfilePV;
45
46 /**
47 * Class constructor ;
48 */
49 function BxDolProfileInfoPageView( $sPageName, &$aMemberInfo )
50 {
51 global $site, $dir;
52
53 $this->oProfileGen = new BxBaseProfileGenerator( $aMemberInfo['ID'] );
54 $this->aConfSite = $site;
55 $this->aConfDir = $dir;
56 parent::BxDolPageView($sPageName);
57
58 $this->iMemberID = getLoggedId();
59 $this->aMemberInfo = &$aMemberInfo;
60 }
61
62
63 /**
64 * Function will generate profile's general information ;
65 *
66 * @return : (text) - html presentation data;
67 */
68 function getBlockCode_GeneralInfo($iBlockID)
69 {
70 return $this -> getBlockCode_PFBlock($iBlockID, 17);
71 }
72
73 /**
74 * Function will generate profile's additional information ;
75 *
76 * @return : (text) - html presentation data;
77 */
78 function getBlockCode_AdditionalInfo($iBlockID)
79 {
80 return $this -> getBlockCode_PFBlock($iBlockID, 20);
81 }
82
83 /**
84 * Function will generate profile's additional information ;
85 *
86 * @return : (text) - html presentation data;
87 */
88 function getBlockCode_Description() {
89 if(!$this->aMemberInfo['DescriptionMe'])
90 return;
91
92 return array($this->aMemberInfo['DescriptionMe']);
93 }
94 }
95
96 //-- init some needed variables --//;
97
98 $iViewedID = ( isset($_GET['ID']) ) ? (int) $_GET['ID'] : 0;
99 $sOutputHtml = MsgBox ( _t( '_Profile NA' ) );
100 $GLOBALS['oTopMenu'] -> setCurrentProfileID($iViewedID);
101
102 // fill array with all profile informaion
103 $aMemberInfo = getProfileInfo($iViewedID);
104
105 // build page;
106 $_ni = $_page['name_index'];
107
108 if ( is_array($aMemberInfo) and !empty($aMemberInfo) )
109 {
110 // prepare all needed keys ;
111 $aMemberInfo['window_width'] = $oTemplConfig -> popUpWindowWidth;
112 $aMemberInfo['window_height'] = $oTemplConfig -> popUpWindowHeight;
113 $aMemberInfo['anonym_mode'] = $oTemplConfig -> bAnonymousMode;
114 $aMemberInfo['member_pass'] = $aMemberInfo['Password'];
115 $aMemberInfo['member_id'] = $aMemberInfo['ID'];
116
117 $bDisplayType = ( getParam('enable_new_dhtml_popups')=='on' ) ? 0 : 1;
118 $aMemberInfo['display_type'] = $bDisplayType;
119 $aMemberInfo['url'] = BX_DOL_URL_ROOT;
120
121 $oProfileInfo = new BxDolProfileInfoPageView('profile_info', $aMemberInfo);
122 $sOutputHtml = $oProfileInfo->getCode();
123 }
124
125 $_page_cont[$_ni]['page_main_code'] = $sOutputHtml;
126
127 PageCode();
Note: See TracBrowser for help on using the repository browser.