• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP getCBprofileItemid函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中getCBprofileItemid函数的典型用法代码示例。如果您正苦于以下问题:PHP getCBprofileItemid函数的具体用法?PHP getCBprofileItemid怎么用?PHP getCBprofileItemid使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了getCBprofileItemid函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: render

 /**
  * Renders a form in frontend (or backend maybe later)
  * Usage:
  *	$options			=	array(	$baseClass->_getPagingParamName( 'basket' )			=> $this->id,
  *									$baseClass->_getPagingParamName( 'bck' )			=> $this->checkHashUser()
  *									);
  *
  * @param  string              $actionType
  * @param  string              $action
  * @param  cbpaidTable         $dataModel
  * @param  array               $options
  * @param  int                 $user_id
  * @param  ParamsInterface     $input
  * @return string
  */
 public static function render($actionType, $action, $dataModel, $options = array(), $user_id = null, ParamsInterface $input = null)
 {
     global $_CB_framework;
     if ($options === null) {
         $options = array();
     }
     $di = Application::DI();
     if ($input === null) {
         $input = new Input(array());
     }
     $output = Output::createNew('html', array());
     $getParams = array('option' => 'com_comprofiler', 'view' => 'pluginclass', 'plugin' => 'cbpaidsubscriptions', 'user' => $user_id);
     if ($_CB_framework->getUi() == 1) {
         $itemid = getCBprofileItemid(0);
         if ($itemid) {
             $getParams['Itemid'] = $itemid;
         }
     }
     $route = array('option' => 'com_comprofiler', 'view' => $action, 'action' => $actionType, 'method' => 'edit');
     if ($route['view'] == '') {
         $route['view'] = 'pluginclass';
     }
     /** @var \CBLib\AhaWow\Controller\Controller $ahaWowController */
     $ahaWowController = $di->get('CBLib\\AhaWow\\Controller\\Controller', array('input' => $input, 'output' => $output, 'options' => $options, 'getParams' => $getParams, 'data' => $dataModel));
     self::registerXml($action, $actionType);
     $ahaWowController->dispatchRoute($route);
     return (string) $output;
 }
开发者ID:jasonrgd,项目名称:Digital-Publishing-Platform-Joomla,代码行数:43,代码来源:cbpaidXmlHandler.php


示例2: getProfileURL

	public function getProfileURL($user, $task='', $xhtml = true)
	{
		$user = KunenaFactory::getUser($user);
		if ($user->userid == 0) return false;
		// Get CUser object
		$cbUser = CBuser::getInstance( $user->userid );
		if($cbUser === null) return false;
		return cbSef( 'index.php?option=com_comprofiler&task=userProfile&user=' . $user->userid. getCBprofileItemid(), $xhtml );
	}
开发者ID:rich20,项目名称:Kunena,代码行数:9,代码来源:profile.php


示例3: getInboxURL

 public function getInboxURL()
 {
     $userid = $this->getCBUserid();
     if ($userid === null) {
         return null;
     }
     $itemid = getCBprofileItemid();
     return cbSef('index.php?option=com_comprofiler&task=userProfile&user=' . $userid . $itemid);
 }
开发者ID:proyectoseb,项目名称:University,代码行数:9,代码来源:private.php


示例4: getInboxLink

	public function getInboxLink ($text) {
		if (!$text) $text = JText::_('COM_KUNENA_PMS_INBOX');
		global $_CB_framework;

		$cbpath = JPATH_ADMINISTRATOR . '/components/com_comprofiler/plugin.foundation.php';
		if (file_exists($cbpath)) require_once($cbpath);
		else return;

		$userid = $_CB_framework->myId();

		$cbUser =& CBuser::getInstance( (int) $userid );
		if($cbUser === null) return;

		$itemid = getCBprofileItemid();

		return CKunenaLink::GetHrefLink ( cbSef ('index.php?option=com_comprofiler&task=userProfile&user=' .$userid. $itemid), $text, '', 'follow');
	}
开发者ID:rich20,项目名称:Kunena,代码行数:17,代码来源:private.php


示例5: getMenuAndStatus

	/**
	* Generates the menu and user status to display on the user profile by calling back $this->addMenu
	* @param  moscomprofilerTab   $tab       the tab database entry
	* @param  moscomprofilerUser  $user      the user being displayed
	* @param  int                 $ui        1 for front-end, 2 for back-end
	* @return boolean                        either true, or false if ErrorMSG generated
	*/
	function getMenuAndStatus( $tab, $user, $ui ) {
		global $_CB_framework, $_CB_database, $ueConfig,$_REQUEST,$_POST;

		$params				=	$this->params;

		$Itemid				=	getCBprofileItemid( 0 );

		// Build basic menu:
		$ue_base_url		 = "index.php?option=com_comprofiler";
		if ( $Itemid ) {
			$ue_base_url	.= "&Itemid=" . $Itemid;	// Base URL string
		}
		$ue_credits_url		 = $ue_base_url."&task=teamCredits";
		$ue_userdetails_url	 = $ue_base_url."&task=userDetails" . $this->_addUid( $user );
		$ue_useravatar_url	 = $ue_base_url."&task=userAvatar" . $this->_addUid( $user );
		$ue_deleteavatar_url = $ue_base_url."&task=userAvatar&do=deleteavatar" . $this->_addUid( $user );
		$ue_unbanrequest_url = $ue_base_url."&task=banProfile&act=2&reportform=1&uid=".$user->id;
		$ue_banhistory_url   = $ue_base_url."&task=moderateBans&act=2&uid=".$user->id;
		$ue_ban_url 		 = $ue_base_url."&task=banProfile&act=1&uid=".$user->id;
		$ue_unban_url 		 = $ue_base_url."&task=banProfile&act=0&reportform=0&uid=".$user->id;
		$ue_reportuser_url	 = $ue_base_url."&task=reportUser&uid=".$user->id;
		$ue_viewuserreports_url = $ue_base_url."&task=viewReports&uid=".$user->id;
		$ue_viewOlduserreports_url = $ue_base_url."&task=viewReports&act=1&uid=".$user->id;
		$ue_approve_image_url= $ue_base_url."&task=approveImage&flag=1&avatars=".$user->id;
		$ue_reject_image_url = $ue_base_url."&task=approveImage&flag=0&avatars=".$user->id;
		$ue_userprofile_url	 = $ue_base_url."";
		$adminimagesdir		=	$_CB_framework->getCfg( 'live_site' ) . '/components/com_comprofiler/images/';

		// $this->menuBar->set("class", "mainlevel");		//BB: hardcoded to check >RC2.

		$firstMenuName		= $params->get('firstMenuName', '_UE_MENU_CB');
		$firstSubMenuName	= $params->get('firstSubMenuName', '_UE_MENU_ABOUT_CB');
		$firstSubMenuHref	= $params->get('firstSubMenuHref', $ue_credits_url);
		$secondSubMenuName	= $params->get('secondSubMenuName', '');
		$secondSubMenuHref	= $params->get('secondSubMenuHref', '');
		if ($firstMenuName != "") {
			$mi = array(); $mi[$firstMenuName]='';
		//	$this->_addMenuItem( $mi,$firstMenuName,"javascript:void(0)" );		// Community
			if ($firstSubMenuName != "") {
				unset($mi);
				if ($firstSubMenuHref == "") $firstSubMenuHref = "javascript:void(0)";
				$mi = array(); $mi[$firstMenuName]["_UE_TEAMCREDITS_CB"]='';
				$this->_addMenuItem( $mi,getLangDefinition($firstSubMenuName),cbSef($firstSubMenuHref) );		// About...
				if ($secondSubMenuName != "") {
					if ($secondSubMenuHref == "") $secondSubMenuHref = "javascript:void(0)";
					$mi = array(); $mi[$firstMenuName]["_UE_SECOND"]='';
					$this->_addMenuItem( $mi,getLangDefinition($secondSubMenuName),cbSef($secondSubMenuHref) );		// Free...
				}
			}
		}
		// ----- VIEW MENU - BEFORE EDIT MENU IF NOT VIEWING A PROFILE -----
		if ( $_CB_framework->myId() > 0 ) {
			// View My Profile:
			if ( $_CB_framework->displayedUser() === null ) {
				$mi = array(); $mi["_UE_MENU_VIEW"]["_UE_MENU_VIEWMYPROFILE"]=null;
				$this->_addMenuItem( $mi, _UE_MENU_VIEWMYPROFILE,cbSef($ue_userprofile_url), "",
				"","", _UE_MENU_VIEWMYPROFILE_DESC,"" );
			}
		}
		// ----- EDIT MENU -----
		if ( ! cbCheckIfUserCanPerformUserTask( $user->id, 'allowModeratorsUserEdit') ) {
			if ( $user->id == $_CB_framework->myId() ) {
				$menuTexts	=	array(	'_UE_UPDATEPROFILE'				=>	_UE_UPDATEPROFILE,
										'_UE_MENU_UPDATEPROFILE_DESC'	=>	_UE_MENU_UPDATEPROFILE_DESC,
										'_UE_UPDATEAVATAR'				=>	_UE_UPDATEAVATAR,
										'_UE_MENU_UPDATEAVATAR_DESC'	=>	_UE_MENU_UPDATEAVATAR_DESC,
										'_UE_DELETE_AVATAR'				=>	_UE_DELETE_AVATAR,
										'_UE_MENU_DELETE_AVATAR_DESC'	=>	_UE_MENU_DELETE_AVATAR_DESC
									);
			} else {
				$menuTexts	=	array(	'_UE_UPDATEPROFILE'				=>	_UE_MOD_MENU_UPDATEPROFILE,
										'_UE_MENU_UPDATEPROFILE_DESC'	=>	_UE_MOD_MENU_UPDATEPROFILE_DESC,
										'_UE_UPDATEAVATAR'				=>	_UE_MOD_MENU_UPDATEAVATAR,
										'_UE_MENU_UPDATEAVATAR_DESC'	=>	_UE_MOD_MENU_UPDATEAVATAR_DESC,
										'_UE_DELETE_AVATAR'				=>	_UE_MOD_MENU_DELETE_AVATAR,
										'_UE_MENU_DELETE_AVATAR_DESC'	=>	_UE_MOD_MENU_DELETE_AVATAR_DESC
									);
			}
			// Update Profile:
			$mi = array(); $mi["_UE_MENU_EDIT"]["_UE_UPDATEPROFILE"]=null;
			$this->_addMenuItem( $mi, $menuTexts['_UE_UPDATEPROFILE'],cbSef($ue_userdetails_url), "",
			"<img src=\"".$adminimagesdir."updateprofile.gif\" alt='' />","", $menuTexts['_UE_MENU_UPDATEPROFILE_DESC'],"" );
			// Update Avatar:
			if($ueConfig['allowAvatar']==1 && ($ueConfig['allowAvatarUpload']==1 || $ueConfig['allowAvatarGallery']==1)) {
				$mi = array(); $mi["_UE_MENU_EDIT"]["_UE_UPDATEAVATAR"]=null;
				$this->_addMenuItem( $mi, $menuTexts['_UE_UPDATEAVATAR'],cbSef($ue_useravatar_url), "",
				"<img src=\"".$adminimagesdir."newavatar.gif\" alt='' />","", $menuTexts['_UE_MENU_UPDATEAVATAR_DESC'],"" );
				// Delete Avatar:
				if($user->avatar!='' && $user->avatar!=null) {
					$mi = array(); $mi["_UE_MENU_EDIT"]["_UE_DELETE_AVATAR"]=null;
					$this->_addMenuItem( $mi, $menuTexts['_UE_DELETE_AVATAR'],cbSef($ue_deleteavatar_url), "",
					"<img src=\"".$adminimagesdir."delavatar.gif\" alt='' />","", $menuTexts['_UE_MENU_DELETE_AVATAR_DESC'],"" );
				}
//.........这里部分代码省略.........
开发者ID:rkern21,项目名称:videoeditor,代码行数:101,代码来源:cb.menu.php


示例6: processConnectionActions

function processConnectionActions($connectionids) {
	global $_CB_framework, $ueConfig, $_POST;

	// simple spoof check security
	cbSpoofCheck( 'manageConnections' );

	if(!$ueConfig['allowConnections']) {
		echo _UE_FUNCTIONALITY_DISABLED;
		return;
	}
	if ( ! ( $_CB_framework->myId() > 0 ) ) {
		cbNotAuth();
		return;
	}
	$cbCon	=	new cbConnection( $_CB_framework->myId() );

	if (is_array($connectionids)) {
		foreach($connectionids AS $cid) {
			$action		=	cbGetParam( $_POST, $cid . 'action' );
			if ( $action== 'd' ) {
				$cbCon->denyConnection( $_CB_framework->myId(), $cid );
			} elseif ( $action == 'a' ) {
				$cbCon->acceptConnection( $_CB_framework->myId(), $cid );
			}
		}
	}
	$error				=	$cbCon->getErrorMSG();
	if ( $error ) {
		cbRedirect( cbSef( 'index.php?option=com_comprofiler&amp;task=manageConnections' . getCBprofileItemid(), false ), $error, 'error' );
	} else {
		cbRedirect( cbSef( 'index.php?option=com_comprofiler&amp;task=manageConnections' . getCBprofileItemid(), false ),
							( is_array($connectionids) ) ? _UE_CONNECTIONACTIONSSUCCESSFULL : null );
	}
	return;
}
开发者ID:rkern21,项目名称:videoeditor,代码行数:35,代码来源:comprofiler.php


示例7: getInvoicesListUrl

	/**
	 * Returns a protected user-specific invoice display address URL
	 *
	 * @param  UserTable  $user
	 * @return string
	 */
	protected function getInvoicesListUrl( &$user ) {
		$basegetarray			=	array( 'user' => $user->id, 'Itemid' => getCBprofileItemid( 0 ), 'act' => 'showinvoiceslist' );
		return $this->base->getHttpsAbsURLwithParam( $basegetarray, 'pluginclass', true );
	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:10,代码来源:cbpaidControllerCBTab.php


示例8: getProfileURL

 function getProfileURL($userid)
 {
     $cbUser =& CBuser::getInstance((int) $userid);
     if ($cbUser === null) {
         return;
     }
     return cbSef('index.php?option=com_comprofiler&task=userProfile&user=' . $userid . getCBprofileItemid());
 }
开发者ID:kaantunc,项目名称:MYK-BOR,代码行数:8,代码来源:kunena.communitybuilder.php


示例9: getUserProfileLink

 public static function getUserProfileLink($user_id, $source = '')
 {
     if ($source == 'easysocial') {
         if (JFile::exists(JPATH_ADMINISTRATOR . '/components/com_easysocial/includes/foundry.php')) {
             require_once JPATH_ADMINISTRATOR . '/components/com_easysocial/includes/foundry.php';
             $suser = Foundry::user($user_id);
             $sconfig = Foundry::config();
             $link = '';
             $name = $sconfig->get('users.aliasName') == 'realname' ? $suser->name : $suser->username;
             $name = $user_id . ':' . $name;
             // Check if the permalink is set
             if ($suser->permalink && !empty($suser->permalink)) {
                 $name = $suser->permalink;
             }
             // If alias exists and permalink doesn't we use the alias
             if ($suser->alias && !empty($suser->alias) && !$suser->permalink) {
                 $name = $suser->alias;
             }
             // Ensure that the name is a safe url.
             $name = JFilterOutput::stringURLSafe($name);
             $options = array('id' => $name);
             $link = FRoute::profile($options);
         }
     } else {
         if ($source == 'joomsocial') {
             if (JFile::exists(JPATH_ROOT . '/components/com_community/libraries/core.php')) {
                 include_once JPATH_ROOT . '/components/com_community/libraries/core.php';
                 $link = CRoute::_('index.php?option=com_community&view=profile&userid=' . $user_id);
             }
         } else {
             if ($source == 'cb') {
                 global $_CB_framework, $mainframe;
                 if (defined('JPATH_ADMINISTRATOR')) {
                     if (!file_exists(JPATH_ADMINISTRATOR . '/components/com_comprofiler/plugin.foundation.php')) {
                         echo 'CB not installed!';
                         return;
                     }
                     include_once JPATH_ADMINISTRATOR . '/components/com_comprofiler/plugin.foundation.php';
                 } else {
                     if (!file_exists($mainframe->getCfg('absolute_path') . '/administrator/components/com_comprofiler/plugin.foundation.php')) {
                         echo 'CB not installed!';
                         return;
                     }
                     include_once $mainframe->getCfg('absolute_path') . '/administrator/components/com_comprofiler/plugin.foundation.php';
                 }
                 $cbUser =& CBuser::getInstance($user_id);
                 if ($cbUser) {
                     $xhtml = '';
                     $link = cbSef('index.php?option=com_comprofiler&amp;task=userProfile&amp;user=' . $user_id . getCBprofileItemid(), $xhtml);
                 }
             }
         }
     }
     return $link;
 }
开发者ID:kidaa30,项目名称:lojinha,代码行数:55,代码来源:djsocial.php


示例10: getUserProfileUrl

 public function getUserProfileUrl($system, $userId, $urlOnly = true, $name = 'Guest', $attribs = array())
 {
     $url = '#';
     if ($userId) {
         switch ($system) {
             case 'cjforum':
                 $api = JPATH_ROOT . '/components/com_cjforum/lib/api.php';
                 if (file_exists($api)) {
                     require_once $api;
                     $profileApi = CjForumApi::getProfileApi();
                     $url = $profileApi->getUserProfileLink($userId, 'name', true);
                 }
                 break;
             case 'cjblog':
                 $api = JPATH_ROOT . '/components/com_cjblog/api.php';
                 if (file_exists($api)) {
                     require_once $api;
                     $url = CjBlogApi::get_user_profile_url($userId, 'name', true, $attribs);
                 }
                 break;
             case 'easyprofile':
                 $api = JPATH_ROOT . '/components/com_jsn/helpers/helper.php';
                 if (file_exists($api)) {
                     require_once $api;
                     $user = new JsnUser($userId);
                     $url = $user->getLink();
                 }
                 break;
             case 'jomsocial':
                 $jspath = JPATH_BASE . '/components/com_community/libraries/core.php';
                 if (file_exists($jspath)) {
                     include_once $jspath;
                     $url = CRoute::_('index.php? option=com_community&view=profile&userid=' . $userId);
                 }
                 break;
             case 'cb':
                 global $_CB_framework, $_CB_database, $ueConfig, $mainframe;
                 $api = JPATH_ADMINISTRATOR . '/components/com_comprofiler/plugin.foundation.php';
                 if (!is_file($api)) {
                     return;
                 }
                 require_once $api;
                 cbimport('cb.database');
                 cbimport('cb.tables');
                 cbimport('language.front');
                 cbimport('cb.field');
                 $url = cbSef('index.php?option=com_comprofiler&amp;task=userProfile&amp;user=' . (int) $userId . getCBprofileItemid(true, false));
                 break;
             case 'kunena':
                 if ($this->_initialize_kunena() && $userId > 0) {
                     $user = KunenaFactory::getUser($userId);
                     if ($user === false) {
                         break;
                     }
                     $url = KunenaRoute::_('index.php?option=com_kunena&func=profile&userid=' . $user->userid, true);
                 }
                 break;
             case 'aup':
                 $api_AUP = JPATH_SITE . '/components/com_alphauserpoints/helper.php';
                 if (file_exists($api_AUP)) {
                     require_once $api_AUP;
                     $url = AlphaUserPointsHelper::getAupLinkToProfil($userId);
                 }
                 break;
             case 'easysocial':
                 $api = JPATH_ADMINISTRATOR . '/components/com_easysocial/includes/foundry.php';
                 if (file_exists($api)) {
                     require_once $api;
                     $my = Foundry::user($userId);
                     $url = FRoute::profile(array('id' => $my->getAlias()));
                     $name = $my->getName();
                 }
                 break;
         }
     }
     if ($url && !$urlOnly) {
         $url = JHtml::link($url, $name, $attribs);
     }
     return null == $url ? $name : $url;
 }
开发者ID:pguilford,项目名称:vcomcc,代码行数:80,代码来源:api.php


示例11: _getAbsURLwithParam

 /**
  * Gives the URL of a link with plugin parameters.
  *
  * @param  array    $paramArray        array of string with key name of parameters
  * @param  string   $task              cb task to link to (default: userProfile)
  * @param  boolean  $sefed             TRUE to call cbSef (default), FALSE to leave URL unsefed
  * @param  array    $excludeParamList  of string with keys of parameters to not include
  * @param  string   $format            'html', 'raw'		(added in CB 1.2.3)
  * @return string                      value of the parameter (htmlspecialchared)
  */
 function _getAbsURLwithParam($paramArray, $task = 'userProfile', $sefed = true, $excludeParamList = null, $format = 'html')
 {
     global $_POST, $_GET;
     if ($excludeParamList === null) {
         $excludeParamList = array();
     }
     $prefix = $this->_getPrefix();
     if ($task == 'userProfile') {
         $Itemid = (int) getCBprofileItemid(0);
         unset($paramArray['Itemid']);
     } elseif (isset($paramArray['Itemid'])) {
         $Itemid = (int) $paramArray['Itemid'];
         unset($paramArray['Itemid']);
     } elseif (isset($_POST['Itemid'])) {
         $Itemid = (int) cbGetParam($_POST, 'Itemid', 0);
     } elseif (isset($_GET['Itemid'])) {
         $Itemid = (int) cbGetParam($_GET, 'Itemid', 0);
     } else {
         $Itemid = (int) getCBprofileItemid(0);
     }
     if ($task == 'userProfile' && !isset($paramArray['user'])) {
         if (isset($_POST['user'])) {
             $paramArray['user'] = urldecode(cbGetParam($_POST, 'user', null));
         } else {
             $paramArray['user'] = urldecode(cbGetParam($_GET, 'user', null));
         }
     }
     if ($task == 'pluginclass') {
         $plugin = $this->getPluginObject();
         $unsecureChars = array('/', '\\', ':', ';', '{', '}', '(', ')', "\"", "'", '.', ',', "", ' ', "\t", "\n", "\r", "\v");
         $paramArray['plugin'] = substr(str_replace($unsecureChars, '', $plugin->element), 0, 32);
         $paramArray['tab'] = null;
     } elseif (strtolower($task) == 'manageconnections') {
         $paramArray['plugin'] = null;
         $paramArray['tab'] = null;
     } else {
         $paramArray['plugin'] = null;
         if (!isset($paramArray['tab'])) {
             $paramArray['tab'] = strtolower(get_class($this));
         }
     }
     $uri = 'index.php?option=com_comprofiler&amp;task=' . $task . (isset($paramArray['user']) && $paramArray['user'] ? '&amp;user=' . htmlspecialchars(stripslashes($paramArray['user'])) : '') . ($Itemid ? '&amp;Itemid=' . $Itemid : '') . ($paramArray['tab'] ? '&amp;tab=' . htmlspecialchars(stripslashes($paramArray['tab'])) : '') . ($paramArray['plugin'] ? '&amp;plugin=' . htmlspecialchars(stripslashes($paramArray['plugin'])) : '');
     reset($paramArray);
     while (list($key, $val) = each($paramArray)) {
         if (!in_array($key, array('Itemid', 'user', 'tab', 'plugin')) && !in_array($key, $excludeParamList)) {
             if ($val) {
                 $uri .= '&amp;' . htmlspecialchars($prefix . $key) . '=' . htmlspecialchars(stripslashes($val));
             }
         }
     }
     if ($sefed) {
         return cbSef($uri, true, $format);
     } else {
         return $uri;
     }
 }
开发者ID:rogatnev-nikita,项目名称:cloudinterpreter,代码行数:66,代码来源:plugin.class.php


示例12: getEditProfileURL

 public function getEditProfileURL($userid, $xhtml = true)
 {
     return cbSef('index.php?option=com_comprofiler&task=userDetails' . getCBprofileItemid(), $xhtml);
 }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:4,代码来源:profile.php


示例13: getField

 /**
  * Returns a field in specified format
  *
  * @param  moscomprofilerFields  $field
  * @param  moscomprofilerUser    $user
  * @param  string                $output  'html', 'xml', 'json', 'php', 'csvheader', 'csv', 'rss', 'fieldslist', 'htmledit'
  * @param  string                $reason  'profile' for user profile view, 'edit' for profile edit, 'register' for registration, 'list' for user-lists
  * @param  int                   $list_compare_types   IF reason == 'search' : 0 : simple 'is' search, 1 : advanced search with modes, 2 : simple 'any' search
  * @return mixed                
  */
 function getField(&$field, &$user, $output, $reason, $list_compare_types)
 {
     global $_CB_framework, $ueConfig;
     $value = $user->get($field->name);
     switch ($output) {
         case 'html':
         case 'rss':
             if ($field->type == 'primaryemailaddress') {
                 $imgMode = 0;
                 if ($ueConfig['allow_email_display'] == 3 || $imgMode != 0) {
                     $oValueText = _UE_SENDEMAIL;
                 } else {
                     $oValueText = htmlspecialchars($value);
                 }
                 $emailIMG = '<img src="' . $_CB_framework->getCfg('live_site') . '/components/com_comprofiler/images/email.gif" border="0" alt="' . _UE_SENDEMAIL . '" title="' . _UE_SENDEMAIL . '" />';
                 switch ($imgMode) {
                     case 0:
                         $linkItemImg = null;
                         $linkItemSep = null;
                         $linkItemTxt = $oValueText;
                         break;
                     case 1:
                         $linkItemImg = $emailIMG;
                         $linkItemSep = null;
                         $linkItemTxt = null;
                         break;
                     case 2:
                         $linkItemImg = $emailIMG;
                         $linkItemSep = ' ';
                         $linkItemTxt = $oValueText;
                         break;
                 }
                 $oReturn = '';
                 //if no email or 4 (do not display email) then return empty string
                 if ($value == null || $ueConfig['allow_email_display'] == 4 || $imgMode != 0 && $ueConfig['allow_email_display'] == 1) {
                     // $oReturn				=	'';
                 } else {
                     switch ($ueConfig['allow_email_display']) {
                         case 1:
                             //display email only
                             $oReturn = moscomprofilerHTML::emailCloaking(htmlspecialchars($value), 0);
                             break;
                         case 2:
                             //mailTo link
                             // cloacking doesn't cloack the text of the hyperlink, if that text does contain email addresses		//TODO: fix it.
                             if (!$linkItemImg && $linkItemTxt == htmlspecialchars($value)) {
                                 $oReturn = moscomprofilerHTML::emailCloaking(htmlspecialchars($value), 1, '', 0);
                             } elseif ($linkItemImg && $linkItemTxt != htmlspecialchars($value)) {
                                 $oReturn = moscomprofilerHTML::emailCloaking(htmlspecialchars($value), 1, $linkItemImg . $linkItemSep . $linkItemTxt, 0);
                             } elseif ($linkItemImg && $linkItemTxt == htmlspecialchars($value)) {
                                 $oReturn = moscomprofilerHTML::emailCloaking(htmlspecialchars($value), 1, $linkItemImg, 0) . $linkItemSep;
                                 $oReturn .= moscomprofilerHTML::emailCloaking(htmlspecialchars($value), 1, '', 0);
                             } elseif (!$linkItemImg && $linkItemTxt != htmlspecialchars($value)) {
                                 $oReturn = moscomprofilerHTML::emailCloaking(htmlspecialchars($value), 1, $linkItemTxt, 0);
                             }
                             break;
                         case 3:
                             //email Form (with cloacked email address if visible)
                             $oReturn = "<a href=\"" . cbSef("index.php?option=com_comprofiler&amp;task=emailUser&amp;uid=" . $user->id . getCBprofileItemid(true)) . "\" title=\"" . _UE_MENU_SENDUSEREMAIL_DESC . "\">" . $linkItemImg . $linkItemSep;
                             if ($linkItemTxt && $linkItemTxt != _UE_SENDEMAIL) {
                                 $oReturn .= moscomprofilerHTML::emailCloaking($linkItemTxt, 0);
                             } else {
                                 $oReturn .= $linkItemTxt;
                             }
                             $oReturn .= "</a>";
                             break;
                     }
                 }
             } else {
                 // emailaddress:
                 if ($value == null) {
                     $oReturn = '';
                 } else {
                     if ($ueConfig['allow_email'] == 1) {
                         $oReturn = moscomprofilerHTML::emailCloaking(htmlspecialchars($value), 1, "", 0);
                     } else {
                         $oReturn = moscomprofilerHTML::emailCloaking(htmlspecialchars($value), 0);
                     }
                 }
             }
             break;
         case 'htmledit':
             $ajaxCheck = ($field->type == 'primaryemailaddress' && (isset($ueConfig['reg_email_checker']) && $ueConfig['reg_email_checker'] > 0) || $field->params->get('field_check_email', 0) || $_CB_framework->getUi() == 2) && $reason != 'search';
             if (defined('_CB_VALIDATE_NEW')) {
                 if ($ajaxCheck && $reason != 'search') {
                     $oReturn = $this->_fieldEditToHtml($field, $user, $reason, 'input', 'text', $value, '', null, true, array('email', $this->ajaxCheckField($field, $user, $reason, array('email:true'))));
                     // $this->ajaxCheckField( $field, $user, $reason );
                 } else {
                     $oReturn = $this->_fieldEditToHtml($field, $user, $reason, 'input', 'text', $value, '', null, true, $reason != 'search' ? array('email') : array());
                     if ($reason == 'search') {
//.........这里部分代码省略.........
开发者ID:rogatnev-nikita,项目名称:cloudinterpreter,代码行数:101,代码来源:cb.core.php


示例14: manageConnections


//.........这里部分代码省略.........
                $list = array();
                $list['connectionType'] = moscomprofilerHTML::selectList($connectionTypes, $connection->id . 'connectiontype[]', 'class="inputbox" multiple="multiple" size="5"', 'value', 'text', $k, 0);
                $conAvatar = null;
                $conAvatar = getFieldValue('image', $connection->avatar, $connection);
                $emailIMG = getFieldValue('primaryemailaddress', $connection->email, $connection, null, 1);
                $pmIMG = getFieldValue('pm', $connection->username, $connection, null, 1);
                $onlineIMG = $ueConfig['allow_onlinestatus'] == 1 ? getFieldValue('status', $connection->isOnline, $connection, null, 1) : "";
                if ($connection->accepted == 1 && $connection->pending == 1) {
                    $actionIMG = "<img src=\"components/com_comprofiler/images/pending.png\" border=\"0\" alt=\"" . _UE_CONNECTIONPENDING . "\" title=\"" . _UE_CONNECTIONPENDING . "\" /> <a href=\"" . cbSef("index.php?option=com_comprofiler&amp;act=connections&amp;task=removeConnection&amp;connectionid=" . $connection->memberid . ($Itemid ? "&amp;Itemid=" . (int) $Itemid : "")) . "\" onclick=\"return confirmSubmit();\" ><img src=\"components/com_comprofiler/images/publish_x.png\" border=\"0\" alt=\"" . _UE_REMOVECONNECTION . "\" title=\"" . _UE_REMOVECONNECTION . "\" /></a>";
                } elseif ($connection->accepted == 1 && $connection->pending == 0) {
                    $actionIMG = "<a href=\"" . cbSef("index.php?option=com_comprofiler&amp;act=connections&amp;task=removeConnection&amp;connectionid=" . $connection->memberid . ($Itemid ? "&amp;Itemid=" . (int) $Itemid : "")) . "\" onclick=\"return confirmSubmit();\" ><img src=\"components/com_comprofiler/images/publish_x.png\" border=\"0\" alt=\"" . _UE_REMOVECONNECTION . "\" title=\"" . _UE_REMOVECONNECTION . "\" /></a>";
                } elseif ($connection->accepted == 0) {
                    $actionIMG = "<a href=\"" . cbSef("index.php?option=com_comprofiler&amp;act=connections&amp;task=acceptConnection&amp;connectionid=" . $connection->memberid . ($Itemid ? "&amp;Itemid=" . (int) $Itemid : "")) . "\"><img src=\"components/com_comprofiler/images/tick.png\" border=\"0\" alt=\"" . _UE_ACCEPTCONNECTION . "\" title=\"" . _UE_ACCEPTCONNECTION . "\" /></a> <a href=\"" . cbSef("index.php?option=com_comprofiler&amp;act=connections&amp;task=removeConnection&amp;connectionid=" . $connection->memberid . ($Itemid ? "&amp;Itemid=" . (int) $Itemid : "")) . "\"><img src=\"components/com_comprofiler/images/publish_x.png\" border=\"0\" alt=\"" . _UE_REMOVECONNECTION . "\" title=\"" . _UE_DECLINECONNECTION . "\" /></a>";
                }
                $tipField = "<b>" . _UE_CONNECTEDSINCE . "</b> : " . dateConverter($connection->membersince, 'Y-m-d', $ueConfig['date_format']);
                if ($connection->type != null) {
                    $tipField .= "<br /><b>" . _UE_CONNECTIONTYPE . "</b> : " . getConnectionTypes($connection->type);
                }
                if ($connection->description != null) {
                    $tipField .= "<br /><b>" . _UE_CONNECTEDCOMMENT . "</b> : " . htmlspecialchars($connection->description);
                }
                $tipTitle = _UE_CONNECTEDDETAIL;
                $htmltext = $conAvatar;
                $style = "style=\"padding:5px;\"";
                $tooltip = cbFieldTip($ui, $tipField, $tipTitle, '200', '', $htmltext, '', $style, '', false);
                echo "\n<tr style='vertical-align:top;' class='sectiontableentry" . $i . "'>";
                echo "\n\t<td style='text-align:center;'>" . $onlineIMG . ' ' . getNameFormat($connection->name, $connection->username, $ueConfig['name_format']) . "<br />" . $tooltip . "<br />" . $actionIMG . " <a href=\"" . cbSef("index.php?option=com_comprofiler&amp;task=userProfile&amp;user=" . $connection->memberid . ($Itemid ? "&amp;Itemid=" . (int) $Itemid : "")) . "\"><img src=\"components/com_comprofiler/images/profiles.gif\" border=\"0\" alt=\"" . _UE_VIEWPROFILE . "\" title=\"" . _UE_VIEWPROFILE . "\" /></a> " . $emailIMG . " " . $pmIMG . "</td>";
                echo "\n\t<td style='text-align:center;'>" . $list['connectionType'] . "</td>";
                echo "\n\t<td style='text-align:center;'><textarea cols=\"25\" class=\"inputbox\"  rows=\"5\" name=\"" . $connection->id . "description\">" . htmlspecialchars($connection->description) . "</textarea><input type=\"hidden\" name=\"uid[]\" value=\"" . $connection->id . "\" /></td>";
                echo "\n</tr>";
                $i = $i == 1 ? 2 : 1;
            }
            echo "</tbody>";
            echo "</table><br />";
            if ($perpage < $total) {
                echo "<div style='width:95%;text-align:center;'>" . $connMgmtTabs->_writePaging($pagingParams, 'connections_', $perpage, $total, 'manageConnections') . "</div>";
            }
            echo "<div style=\"width:100%;text-align:right;\"><input type=\"submit\" class=\"button\"  value=\"" . _UE_UPDATE . "\" /></div>";
            echo cbGetSpoofInputTag('manageConnections');
            echo "</form>";
        }
        echo $tabs->endTab();
        // Tab 2: Users connected with me:
        if ($ueConfig['autoAddConnections'] == 0) {
            echo $tabs->startTab('myCon', _UE_CONNECTEDWITH, 'connected');
            if (!count($connecteds) > 0) {
                echo _UE_NOCONNECTEDWITH;
            } else {
                // tooltip params:
                $width = '200';
                $icon = '';
                $href = '';
                echo '<table cellpadding="5" cellspacing="0" border="0" width="95%">';
                echo '<tr>';
                echo '<td>';
                foreach ($connecteds as $connected) {
                    $conAvatar = null;
                    $conAvatar = getFieldValue('image', $connected->avatar, $connected);
                    $emailIMG = getFieldValue('primaryemailaddress', $connected->email, $connected, null, 1);
                    $pmIMG = getFieldValue('pm', $connected->username, $connected, null, 1);
                    $onlineIMG = $ueConfig['allow_onlinestatus'] == 1 ? getFieldValue('status', $connected->isOnline, $connected, null, 1) : '';
                    if ($connected->accepted == 1 && $connected->pending == 1) {
                        $actionIMG = '<img src="components/com_comprofiler/images/pending.png" border="0" alt="' . _UE_CONNECTIONPENDING . '" title="' . _UE_CONNECTIONPENDING . '" /> ' . '<a href="' . cbSef('index.php?option=com_comprofiler&amp;act=connections&amp;task=denyConnection&amp;connectionid=' . $connected->memberid . ($Itemid ? '&amp;Itemid=' . (int) $Itemid : '')) . '" onclick="return confirmSubmit();">' . '<img src="components/com_comprofiler/images/publish_x.png" border="0" alt="' . _UE_REMOVECONNECTION . '" title="' . _UE_REMOVECONNECTION . '" /></a>';
                    } elseif ($connected->accepted == 1 && $connected->pending == 0) {
                        $actionIMG = '<a href="' . cbSef('index.php?option=com_comprofiler&amp;act=connections&amp;task=denyConnection&amp;connectionid=' . $connected->referenceid . ($Itemid ? '&amp;Itemid=' . (int) $Itemid : '')) . '" onclick="return confirmSubmit();">' . '<img src="components/com_comprofiler/images/publish_x.png" border="0" alt="' . _UE_REMOVECONNECTION . '" title="' . _UE_REMOVECONNECTION . '" /></a>';
                    } elseif ($connected->accepted == 0) {
                        $actionIMG = '<a href="' . cbSef('index.php?option=com_comprofiler&amp;act=connections&amp;task=acceptConnection&amp;connectionid=' . $connected->referenceid . ($Itemid ? '&amp;Itemid=' . (int) $Itemid : '')) . '">' . '<img src="components/com_comprofiler/images/tick.png" border="0" alt="' . _UE_ACCEPTCONNECTION . '" title="' . _UE_ACCEPTCONNECTION . '" /></a> ' . '<a href="' . cbSef('index.php?option=com_comprofiler&amp;act=connections&amp;task=denyConnection&amp;connectionid=' . $connected->referenceid . ($Itemid ? '&amp;Itemid=' . (int) $Itemid : '')) . '" onclick="return confirmSubmit();">' . '<img src="components/com_comprofiler/images/publish_x.png" border="0" alt="' . _UE_REMOVECONNECTION . '" title="' . _UE_DECLINECONNECTION . '" /></a>';
                    }
                    $tipField = '<b>' . _UE_CONNECTEDSINCE . '</b> : ' . dateConverter($connected->membersince, 'Y-m-d', $ueConfig['date_format']);
                    if (getLangDefinition($connected->type) != null) {
                        $tipField .= '<br /><b>' . _UE_CONNECTIONTYPE . '</b> : ' . getLangDefinition($connected->type);
                    }
                    if ($connected->description != null) {
                        $tipField .= '<br /><b>' . _UE_CONNECTEDCOMMENT . '</b> : ' . htmlspecialchars($connected->description);
                    }
                    $tipTitle = _UE_CONNECTEDDETAIL;
                    $htmltext = $conAvatar;
                    $style = 'style="padding:5px;"';
                    $tooltip = cbFieldTip($ui, $tipField, $tipTitle, $width, $icon, $htmltext, $href, $style, '', false);
                    echo '<div class="connectionBox">';
                    echo $actionIMG . '<br />';
                    echo $tooltip . '<br />';
                    echo $onlineIMG . ' ' . getNameFormat($connected->name, $connected->username, $ueConfig['name_format']);
                    echo '<br /><a href="' . cbSef('index.php?option=com_comprofiler&amp;task=userProfile&amp;user=' . $connected->memberid . ($Itemid ? '&amp;Itemid=' . (int) $Itemid : '')) . '"><img src="components/com_comprofiler/images/profiles.gif" border="0" alt="' . _UE_VIEWPROFILE . '" title="' . _UE_VIEWPROFILE . '" /></a> ' . $emailIMG . ' ' . $pmIMG . "\n";
                    echo " </div>\n";
                }
                echo '</td>';
                echo '</tr>';
                echo '</table>';
            }
            echo $tabs->endTab();
        }
        echo $tabs->endPane();
        if (isset($_REQUEST['tab'])) {
            $_CB_framework->outputCbJQuery("showCBTabPaneMy( '" . addslashes(urldecode(stripslashes(cbGetParam($_REQUEST, 'tab')))) . "' );");
        } elseif (!(count($actions) > 0)) {
            $_CB_framework->outputCbJQuery("tabPanemyCon.setSelectedIndex( 1 );");
        }
        echo '<div style="clear:both;padding:5px"><a href="' . cbSef('index.php?option=com_comprofiler' . getCBprofileItemid(true)) . '">' . _UE_BACK_TO_YOUR_PROFILE . '</a></div>';
    }
开发者ID:rogatnev-nikita,项目名称:cloudinterpreter,代码行数:101,代码来源:comprofiler.html.php


示例15: rawViewUrl

 /**
  * Returns a raw CB task specific url (without SEF)
  *
  * @param string $task 'manageconnections', 'registers', 'lostpassword', 'login', 'logout', 'moderateimages', 'moderatereports', 'moderatebans', 'viewreports', 'processreports', 'pendingapprovaluser'
  * @param bool $htmlspecialchars
  * @param array $variables array of variables to append to the url
  * @param string $format 'html', 'component', 'raw', 'rawrel'
  * @param int $ssl '1' force HTTPS, '0' leave as is, '-1' force HTTP
  * @param string $additional additional string to append to itemid url check (note: this is unchecked)
  * @return string
  */
 function rawViewUrl($task, $htmlspecialchars = true, $variables = array(), $format = 'html', $ssl = 0, $additional = null)
 {
     $extra = null;
     if ($variables && is_array($variables)) {
         foreach ($variables as $name => $value) {
             if ($name && $value !== null) {
                 if (is_array($value)) {
                     $value = implode('|*|', $value);
                 }
                 $extra .= '&' . urlencode($name) . '=' . urlencode($value);
             }
         }
     }
     if (!$task) {
         $task = 'userprofile';
     }
     return $this->cbSef('index.php?option=com_comprofiler&view=' . urlencode($task) . $extra . getCBprofileItemid(false, $task, $additional), $htmlspecialchars, $format, $ssl, false);
 }
开发者ID:bobozhangshao,项目名称:HeartCare,代码行数:29,代码来源:CBframework.php


示例16: usersList


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getCGI函数代码示例发布时间:2022-05-15
下一篇:
PHP getBypassValue函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap