function MemberMenuDesign($iUserId = 0) { global $site; global $aMenu; global $tmpl; global $oTemplConfig; $oTemplMenu = new BxTemplMenu($oTemplConfig); $aMenuIcon = array('1' => '_member_panel.gif', '2' => '_profile_edit.gif', '3' => '_profile_customize.gif', '4' => '_communicator.gif', '5' => '_chat.gif', '6' => '_forum.gif', '7' => '_membership.jpg', '8' => '_cart.gif', '9' => '_feedback.jpg', '10' => '_gallery.gif', '11' => '_blog.gif', '12' => '_gallery.gif', '13' => '_polls.gif', '14' => '_polls.gif', '15' => '_speed_dating.gif', '16' => '_logout.gif', '17' => '_join.gif', '18' => '_login.gif', '19' => '_profile_photos.gif', '20' => '_forum.gif', '21' => '_chat.gif', '22' => '_groups.gif'); $sMenuLink = ""; $sPath = ""; $sVisible = $iUserId == 0 ? "non" : "memb"; $ret .= '<div class="menu_item_block">'; foreach ($aMenu as $iVal => $aValue) { $sIconName = $tmpl == 'dol' ? $aMenuIcon[$iVal] : ''; if ($aValue['MenuGroup'] != 0) { continue; } $sMenuLink = $iUserId != 0 ? add_id($aValue['Link'], $iUserId) : $aValue['Link']; if (strpos($sMenuLink, 'http://') === FALSE) { $sPath = ""; } else { $sPath = $sMenuLink; $sMenuLink = ""; } $jFunc = strlen($aValue['Onclick']) > 0 ? $aValue['Onclick'] : ""; $memberPass = getPassword($iUserId); $jFunc = str_replace('{*}', $iVal, $jFunc); $jFunc = str_replace('{URL}', $site['url'], $jFunc); $jFunc = str_replace('{memberID}', $iUserId, $jFunc); $jFunc = str_replace('{memberPass}', $memberPass, $jFunc); if (check_condition(str_replace('\\$', '$', $aValue['Check'])) == TRUE && strrpos($aValue['Visible'], $sVisible) !== FALSE) { $ret .= $oTemplMenu->getMenuItem(_t($aValue['Caption']), $sMenuLink, $sPath, $aValue['Target'], $jFunc, $sIconName); $ret .= 'group' == $aValue['MenuType'] ? '<div id="submenu_' . $iVal . '" style="display: none;" class="member_submenu"></div>' : ''; } } $ret .= "</div>"; return $ret; }
function showBlockActionsMenu($sCaption) { global $logged; global $p_arr; $oTemplMenu = new BxTemplMenu($this->oTemplConfig); if (!$logged['member'] or !$p_arr) { return ''; } $memberID = (int) $_COOKIE['memberID']; $profileID = (int) $p_arr['ID']; if ($memberID == $profileID) { return ''; } /* * * * Ray IM Integration * * * */ $check_res_im = checkAction($memberID, ACTION_ID_USE_RAY_IM); if (getParam('enable_ray') == 'on' and get_user_online_status($profileID) and $check_res_im[CHECK_ACTION_RESULT] == CHECK_ACTION_RESULT_ALLOWED) { $sSndPassword = getPassword($memberID); $IMNow = $oTemplMenu->getMenuItem('action_im.gif', _t('_ChatNow', $p_arr['NickName']), "javascript:void(0);", '', '', "openRayWidget( 'im', 'user', '{$memberID}', '{$sSndPassword}', '{$profileID}' );"); } else { $IMNow = ''; } /* * * * Ray IM Integration [END]* * * */ $ret = '<div class="menuBlock">'; $ret .= '<div class="menu_item_block">'; $ret .= '<div class="menu_item_block_left">'; $ret .= $oTemplMenu->getMenuItem('action_send.gif', _t('_SendLetter'), "compose.php?ID={$profileID}"); $ret .= $oTemplMenu->getMenuItem('action_fave.gif', _t('_Fave'), "javascript:void(0);", '', '', "window.open( 'list_pop.php?action=hot&ID={$profileID}', '', 'width={$this->oTemplConfig->popUpWindowWidth},height={$this->oTemplConfig->popUpWindowHeight},menubar=no,status=no,resizable=no,scrollbars=yes,toolbar=no,location=no' );"); $ret .= $oTemplMenu->getMenuItem('action_friends.gif', _t('_Befriend'), "javascript:void(0);", '', '', "window.open( 'list_pop.php?action=friend&ID={$profileID}', '', 'width={$this->oTemplConfig->popUpWindowWidth},height={$this->oTemplConfig->popUpWindowHeight},menubar=no,status=no,resizable=no,scrollbars=yes,toolbar=no,location=no' );"); $ret .= $oTemplMenu->getMenuItem('action_greet.gif', _t('_Greet'), "javascript:void(0);", '', '', "window.open( 'greet.php?sendto={$profileID}', '', 'width={$this->oTemplConfig->popUpWindowWidth},height={$this->oTemplConfig->popUpWindowHeight},menubar=no,status=no,resizable=no,scrollbars=yes,toolbar=no,location=no' );"); $ret .= $IMNow; if (!$this->oTemplConfig->bAnonymousMode) { $ret .= $oTemplMenu->getMenuItem('action_email.gif', _t('_Get E-mail'), "javascript:void(0);", '', '', "window.open( 'freemail.php?ID={$profileID}', '', 'width={$this->oTemplConfig->popUpWindowWidth},height={$this->oTemplConfig->popUpWindowHeight},menubar=no,status=no,resizable=no,scrollbars=yes,toolbar=no,location=no' );"); } $ret .= '</div>'; $ret .= '<div class="menu_item_block_right">'; $ret .= $oTemplMenu->getMenuItem('action_photos.gif', _t('_ProfilePhotos'), "photos_gallery.php?ID={$profileID}"); $ret .= $oTemplMenu->getMenuItem('action_videos.gif', _t('_ProfileVideos'), "javascript:void(0);", '', '', "openRayWidget( 'video', 'player', '{$profileID}' );"); //$ret .= $oTemplMenu -> getMenuItem( 'action_videos.gif', _t('_ProfileVideos'), "media_gallery.php?show=video&ID=$profileID"); $ret .= $oTemplMenu->getMenuItem('action_music.gif', _t('_ProfileMusic'), "javascript:void(0);", '', '', "openRayWidget( 'mp3', 'player', '{$profileID}', '" . getPassword($memberID) . "', '{$memberID}');"); $ret .= $oTemplMenu->getMenuItem('action_share.gif', _t('_Share'), "javascript:void(0);", '', '', "return launchTellFriendProfile({$profileID});"); $ret .= $oTemplMenu->getMenuItem('action_report.gif', _t('_Report'), "javascript:void(0);", '', '', "window.open( 'list_pop.php?action=spam&ID={$profileID}', '', 'width={$this->oTemplConfig->popUpWindowWidth},height={$this->oTemplConfig->popUpWindowHeight},menubar=no,status=no,resizable=no,scrollbars=yes,toolbar=no,location=no' );"); $ret .= $oTemplMenu->getMenuItem('action_block.gif', _t('_Block'), "javascript:void(0);", '', '', "window.open( 'list_pop.php?action=block&ID={$profileID}', '', 'width={$this->oTemplConfig->popUpWindowWidth},height={$this->oTemplConfig->popUpWindowHeight},menubar=no,status=no,resizable=no,scrollbars=yes,toolbar=no,location=no' );"); $ret .= '</div>'; $ret .= '<div class="clear_both"></div>'; $ret .= '</div>'; $ret .= '</div>'; echo DesignBoxContent(_t($sCaption), $ret, 1); }