source: trunk/short_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: 3.6 KB
Line 
1<?php
2
3require_once('inc/header.inc.php');
4require_once(BX_DIRECTORY_PATH_INC . 'design.inc.php');
5require_once(BX_DIRECTORY_PATH_INC . 'params.inc.php');
6require_once(BX_DIRECTORY_PATH_INC . 'utils.inc.php');
7
8bx_import('BxDolUserStatusView');
9bx_import('BxDolSubscription');
10
11check_logged();
12
13$iMemberId = ( isset($_COOKIE['memberID']) && isMember() ) ? (int)$_COOKIE['memberID'] : 0;
14
15$sTemplate = 'short_profile_info.html';
16
17if (isset($_GET['ID']) && (int)$_GET['ID'] > 0) {
18 $iProfId = (int)$_GET['ID'];
19 $aProfileInfo = getProfileInfo($iProfId);
20 $aMemberInfo = getProfileInfo($iMemberId);
21
22 $aProfileInfo['window_width'] = $oTemplConfig->popUpWindowWidth;
23 $aProfileInfo['window_height'] = $oTemplConfig->popUpWindowHeight;
24 $aProfileInfo['anonym_mode'] = $oTemplConfig->bAnonymousMode;
25 $aProfileInfo['member_pass'] = $aMemberInfo['Password'];
26 $aProfileInfo['member_id'] = $iMemberId;
27 $bDisplayType = ( getParam('enable_new_dhtml_popups')=='on' ) ? 0 : 1;
28 $aProfileInfo['display_type'] = $bDisplayType;
29 $aProfileInfo['url'] = BX_DOL_URL_ROOT;
30 $aProfileInfo['status_message'] = process_line_output($aProfileInfo['UserStatusMessage']);
31
32 //--- Subscription integration ---//
33 $oSubscription = new BxDolSubscription();
34 $aButton = $oSubscription->getButton($iMemberId, 'profile', '', $iProfId);
35
36 $aProfileInfo['sbs_profile_title'] = $aButton['title'];
37 $aProfileInfo['sbs_profile_script'] = $aButton['script'];
38 //--- Subscription integration ---//
39
40 //--- Check for member/non-member ---//
41 if(isMember()) {
42 $aProfileInfo['cpt_edit'] = _t('_EditProfile');
43 $aProfileInfo['cpt_send_letter'] = _t('_SendLetter');
44 $aProfileInfo['cpt_fave'] = _t('_Fave');
45 $aProfileInfo['cpt_befriend'] = _t('_Befriend');
46 $aProfileInfo['cpt_greet'] = _t('_Greet');
47 $aProfileInfo['cpt_get_mail'] = _t('_Get E-mail');
48 $aProfileInfo['cpt_share'] = _t('_Share');
49 $aProfileInfo['cpt_report'] = _t('_Report Spam');
50 $aProfileInfo['cpt_block'] = _t('_Block');
51 }
52 else {
53 $aProfileInfo['cpt_edit'] = '';
54 $aProfileInfo['cpt_send_letter'] = '';
55 $aProfileInfo['cpt_fave'] = '';
56 $aProfileInfo['cpt_befriend'] = '';
57 $aProfileInfo['cpt_greet'] = '';
58 $aProfileInfo['cpt_get_mail'] = '';
59 $aProfileInfo['cpt_share'] = '';
60 $aProfileInfo['cpt_report'] = '';
61 $aProfileInfo['cpt_block'] = '';
62 }
63
64 $sProfLink = '<a href="'.getProfileLink($iProfId).'">'.$aProfileInfo['NickName'].'</a> ';
65
66 $oUserStatus = new BxDolUserStatusView();
67 $sUserIcon = $oUserStatus->getStatusIcon($iProfId, $aProfileInfo['UserStatus']);
68 $sUserStatus = $oUserStatus->getStatus($iProfId);
69
70 $aUnit = array(
71 'status_pic' => getTemplateIcon($sUserIcon),
72 'profile_status' => _t('_prof_status', $sProfLink, $sUserStatus),
73 'profile_status_message' => $aProfileInfo['status_message'],
74 'profile_actions' => $oFunctions->genObjectsActions( $aProfileInfo, 'Profile'),
75 'bx_if:profile_status_cond' => array(
76 'condition' => $aProfileInfo['status'] == 'online',
77 'content' => array('chat_invite' => $sChat)
78 )
79 );
80
81 $sCloseIcon = getTemplateIcon('reduce.png');
82 ob_start();
83 ?>
84 <div class="reduce">
85 <img src="<?= $sCloseIcon ?>" class="login_ajx_close" />
86 </div>
87 <?
88 $sClose = ob_get_clean();
89 $sClose = str_replace('__site_images__', $site['images'], $sClose);
90 echo $oFunctions->transBox(
91 $sClose . $oSysTemplate->parseHtmlByName($sTemplate, $aUnit)
92 );
93}
94
95?>
Note: See TracBrowser for help on using the repository browser.