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

PHP getNameFormat函数代码示例

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

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



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

示例1: drawUserSomethings

 /**
  * Draws the user profile tab "Subscriptions" (if enabled, user is the profile owner, and something to display.
  * 
  * @param  UserTable  $user
  * @param  boolean    $itsmyself
  * @param  string     $htmlSubscribed
  * @return string
  */
 public function drawUserSomethings($user, $itsmyself, $htmlSubscribed)
 {
     global $_CB_framework, $ueConfig;
     $this->htmlSubscribed = $htmlSubscribed;
     $subscriptions = $this->_model;
     if (count($subscriptions) == 1) {
         $subTxt = CBPTXT::T(cbpaidApp::settingsParams()->get('subscription_name', 'subscription'));
     } else {
         $subTxt = CBPTXT::T(cbpaidApp::settingsParams()->get('subscriptions_name', 'subscriptions'));
     }
     if ($itsmyself) {
         $userName = null;
     } else {
         $userName = getNameFormat($user->name, $user->username, $ueConfig['name_format']);
     }
     if ($_CB_framework->getUi() == 1) {
         if ($itsmyself) {
             $this->htmlTabTitle = sprintf(CBPTXT::Th("Your current %s"), $subTxt);
         } else {
             $this->htmlTabTitle = sprintf(CBPTXT::Th("%s's current %s"), $userName, $subTxt);
         }
     } else {
         if ($itsmyself) {
             $this->htmlTabTitle = sprintf(CBPTXT::Th("Your current and past %s"), $subTxt);
         } else {
             $this->htmlTabTitle = sprintf(CBPTXT::Th("%s's current and past %s"), $userName, $subTxt);
         }
     }
     return $this->display();
 }
开发者ID:jasonrgd,项目名称:Digital-Publishing-Platform-Joomla,代码行数:38,代码来源:usersubscriptions.php


示例2: drawTab

 /**
  * Draws the user profile tab "Subscriptions" (if enabled, user is the profile owner, and something to display.
  * 
  * @param  string  $htmlSubscriptionsAndUpgrades
  * @param  string  $htmlInvoicesLink
  * @param  string  $tabTitleText
  * @param  string  $htmlTabDescription
  * @return string
  */
 public function drawTab($htmlSubscriptionsAndUpgrades, $htmlInvoicesLink, $tabTitleText, $htmlTabDescription)
 {
     global $ueConfig;
     $this->htmlSubscriptionsAndUpgrades = $htmlSubscriptionsAndUpgrades;
     $this->htmlInvoicesLink = $htmlInvoicesLink;
     $this->htmlTabDescription = $htmlTabDescription;
     $user = $this->_model;
     $title = cbReplaceVars(CBPTXT::Th(cbUnHtmlspecialchars($tabTitleText)), $user);
     if ($title) {
         $name = getNameFormat($user->name, $user->username, $ueConfig['name_format']);
         $title = sprintf($title, $name);
     }
     $this->htmlTabTitle = $title;
     return $this->display();
 }
开发者ID:jasonrgd,项目名称:Digital-Publishing-Platform-Joomla,代码行数:24,代码来源:userprofilesubstab.php


示例3: getDisplayTab

 /**
  * Generates the HTML to display the user profile tab
  * @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 mixed                          either string HTML for tab content, or false if ErrorMSG generated
  */
 function getDisplayTab($tab, $user, $ui)
 {
     global $_CB_framework, $_CB_database, $ueConfig;
     $return = null;
     if (!$ueConfig['allowConnections'] || isset($ueConfig['connectionDisplay']) && $ueConfig['connectionDisplay'] == 1 && $_CB_framework->myId() != $user->id) {
         return null;
     }
     $params = $this->params;
     $con_ShowTitle = $params->get('con_ShowTitle', '1');
     $con_ShowSummary = $params->get('con_ShowSummary', '0');
     $con_SummaryEntries = $params->get('con_SummaryEntries', '4');
     $con_pagingenabled = $params->get('con_PagingEnabled', '1');
     $con_entriesperpage = $params->get('con_EntriesPerPage', '10');
     $pagingParams = $this->_getPaging(array(), array("connshow_"));
     $showall = $this->_getReqParam("showall", false);
     if ($con_ShowSummary && !$showall && $pagingParams["connshow_limitstart"] === null) {
         $summaryMode = true;
         $showpaging = false;
         $con_entriesperpage = $con_SummaryEntries;
     } else {
         $summaryMode = false;
         $showpaging = $con_pagingenabled;
     }
     $isVisitor = null;
     if ($_CB_framework->myId() != $user->id) {
         $isVisitor = "\n AND m.pending=0 AND m.accepted=1";
     }
     if ($showpaging || $summaryMode) {
         //select a count of all applicable entries for pagination
         if ($isVisitor) {
             $contotal = $this->_getUserNumberOfConnections($user);
         } else {
             $query = "SELECT COUNT(*)" . "\n FROM #__comprofiler_members AS m" . "\n LEFT JOIN #__comprofiler AS c ON m.memberid=c.id" . "\n LEFT JOIN #__users AS u ON m.memberid=u.id" . "\n WHERE m.referenceid=" . (int) $user->id . "\n AND c.approved=1 AND c.confirmed=1 AND c.banned=0 AND u.block=0" . $isVisitor . "\n ";
             $_CB_database->setQuery($query);
             $contotal = $_CB_database->loadResult();
             if (!is_numeric($contotal)) {
                 $contotal = 0;
             }
         }
     }
     if (!$showpaging || $pagingParams["connshow_limitstart"] === null || $con_entriesperpage > $contotal) {
         $pagingParams["connshow_limitstart"] = "0";
     }
     $query = "SELECT m.*,u.name,u.email,u.username,c.avatar,c.avatarapproved, u.id " . "\n FROM #__comprofiler_members AS m" . "\n LEFT JOIN #__comprofiler AS c ON m.memberid=c.id" . "\n LEFT JOIN #__users AS u ON m.memberid=u.id" . "\n WHERE m.referenceid=" . (int) $user->id . "" . "\n AND c.approved=1 AND c.confirmed=1 AND c.banned=0 AND u.block=0" . $isVisitor . "\n ORDER BY m.membersince DESC, m.memberid ASC";
     $_CB_database->setQuery($query, (int) ($pagingParams["connshow_limitstart"] ? $pagingParams["connshow_limitstart"] : 0), (int) $con_entriesperpage);
     $connections = $_CB_database->loadObjectList();
     if (!count($connections) > 0) {
         $return .= _UE_NOCONNECTIONS;
         return $return;
     }
     if ($con_ShowTitle) {
         if ($_CB_framework->myId() == $user->id) {
             $return .= "<h3 class=\"cbConTitle\">" . _UE_YOURCONNECTIONS . "</h3>";
         } else {
             $return .= "<h3 class=\"cbConTitle\">" . sprintf(_UE_USERSNCONNECTIONS, getNameFormat($user->name, $user->username, $ueConfig['name_format'])) . "</h3>";
         }
     }
     $return .= $this->_writeTabDescription($tab, $user);
     $live_site = $_CB_framework->getCfg('live_site');
     $boxHeight = $ueConfig['thumbHeight'] + 46;
     $boxWidth = $ueConfig['thumbWidth'] + 28;
     foreach ($connections as $connection) {
         $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', null, $connection, null, 1) : "";
         if ($connection->accepted == 1 && $connection->pending == 1) {
             $actionIMG = '<img src="' . $live_site . '/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) . "\" onclick=\"return confirmSubmit();\" ><img src=\"" . $live_site . "/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) . "\" onclick=\"return confirmSubmit();\" ><img src=\"" . $live_site . "/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) . '"><img src="' . $live_site . "/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) . '"><img src="' . $live_site . "/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 (getLangDefinition($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;\"";
         $tooltipAvatar = cbFieldTip($ui, $tipField, $tipTitle, '250', '', $htmltext, '', $style, '', false);
         if ($_CB_framework->myId() == $user->id) {
             $return .= "<div class=\"connectionBox\" style=\"position:relative;height:" . ($boxHeight + 24) . "px;width:" . $boxWidth . "px;\">" . "<div style=\"position:absolute; top:3px; width:auto;left:5px;right:5px;\">" . $actionIMG . '</div>' . "<div style=\"position:absolute; top:18px; width:auto;left:5px;right:5px;\">" . $tooltipAvatar . '</div>' . "<div style=\"position:absolute; bottom:0px; width:auto;left:5px;right:5px;\">" . $onlineIMG . " " . getNameFormat($connection->name, $connection->username, $ueConfig['name_format']) . "<br /><a href=\"" . cbSef("index.php?option=com_comprofiler&amp;task=userProfile&amp;user=" . $connection->memberid) . '"><img src="' . $live_site . "/components/com_comprofiler/images/profiles.gif\" border=\"0\" alt=\"" . _UE_VIEWPROFILE . "\" title=\"" . _UE_VIEWPROFILE . "\" /></a> " . $emailIMG . " " . $pmIMG . "\n";
         } else {
             $return .= "<div class=\"connectionBox\" style=\"position:relative;height:" . $boxHeight . "px;width:" . $boxWidth . "px;\">" . "<div style=\"position:absolute; top:10px; width:auto;left:5px;right:5px;\">" . $tooltipAvatar . '</div>' . "<div style=\"position:absolute; bottom:0px; width:auto;left:5px;right:5px;\">" . $onlineIMG . " " . getNameFormat($connection->name, $connection->username, $ueConfig['name_format']) . "\n";
         }
         $return .= "</div></div>\n";
     }
     $return .= "<div style=\"clear:both;\">&nbsp;</div>";
     // Add paging control at end of list if paging enabled
//.........这里部分代码省略.........
开发者ID:rogatnev-nikita,项目名称:cloudinterpreter,代码行数:101,代码来源:cb.connections.php


示例4: sendNotification

	/**
	 * Sends a PM or Email notification with substitutions based off configuration
	 *
	 * @param int                  $type 1: Email, 2: PM, 3: Moderators, 4: Auto
	 * @param UserTable|int|null   $from
	 * @param UserTable|int|string $to
	 * @param string               $subject
	 * @param string               $body
	 * @param GroupTable           $group
	 * @param array                $extra
	 * @return bool
	 */
	static public function sendNotification( $type, $from, $to, $subject, $body, $group, $extra = array() )
	{
		global $_CB_framework, $_PLUGINS;

		if ( ( ! $subject ) || ( ! $body ) || ( ! $group->get( 'id' ) ) || ( $group->get( 'published', 1 ) != 1 ) || ( ! $group->category()->get( 'published', 1 ) ) || ( ! $to ) ) {
			return false;
		}

		if ( $from instanceof UserTable ) {
			$fromUser			=	$from;
		} elseif ( is_int( $from ) ) {
			$fromUser			=	\CBuser::getUserDataInstance( $from );
		} else {
			$fromUser			=	null;
		}

		if ( $to instanceof UserTable ) {
			$toUser				=	$to;
		} elseif ( is_int( $to ) ) {
			$toUser				=	\CBuser::getUserDataInstance( $to );
		} else {
			$toUser				=	null;
		}

		if ( $fromUser && $toUser && ( $fromUser->get( 'id' ) == $toUser->get( 'id' ) ) ) {
			return false;
		}

		static $plugin			=	null;
		static $params			=	null;

		if ( ! $params ) {
			$plugin				=	$_PLUGINS->getLoadedPlugin( 'user', 'cbgroupjive' );
			$params				=	$_PLUGINS->getPluginParams( $plugin );
		}

		$notifyBy				=	(int) $params->get( 'notifications_notifyby', 1 );
		$fromName				=	$params->get( 'notifications_from_name', null );
		$fromEmail				=	$params->get( 'notifications_from_address', null );
		$cbUser					=	\CBuser::getInstance( ( $fromUser ? (int) $fromUser->get( 'id' ) : ( $toUser ? (int) $toUser->get( 'id' ) : 0 ) ), false );
		$user					=	$cbUser->getUserData();

		$extras					=	array(	'category_id'		=>	(int) $group->category()->get( 'id' ),
											'category_name'		=>	( $group->category()->get( 'id' ) ? CBTxt::T( $group->category()->get( 'name' ) ) : CBTxt::T( 'Uncategorized' ) ),
											'category'			=>	'<a href="' . $_CB_framework->pluginClassUrl( $plugin->element, false, array( 'action' => 'categories', 'func' => 'show', 'id' => (int) $group->get( 'category' ) ) ) . '">' . ( $group->category()->get( 'id' ) ? CBTxt::T( $group->category()->get( 'name' ) ) : CBTxt::T( 'Uncategorized' ) ) . '</a>',
											'group_id'			=>	(int) $group->get( 'id' ),
											'group_name'		=>	htmlspecialchars( CBTxt::T( $group->get( 'name' ) ) ),
											'group'				=>	'<a href="' . $_CB_framework->pluginClassUrl( $plugin->element, false, array( 'action' => 'groups', 'func' => 'show', 'id' => (int) $group->get( 'id' ) ) ) . '">' . htmlspecialchars( CBTxt::T( $group->get( 'name' ) ) ) . '</a>',
											'user'				=>	'<a href="' . $_CB_framework->viewUrl( 'userprofile', false, array( 'user' => (int) $user->get( 'id' ) ) ) . '">' . getNameFormat( $user->get( 'name' ), $user->get( 'username' ), Application::Config()->get( 'name_format', 3 ) ) . '</a>'
										);

		if ( ! $toUser ) {
			$extras['email']	=	$to;
			$extras['name']		=	$to;
			$extras['username']	=	$to;
		}

		$extras					=	array_merge( $extras, $extra );
		$subject				=	$cbUser->replaceUserVars( $subject, true, false, $extras, false );
		$body					=	$cbUser->replaceUserVars( $body, false, false, $extras, false );

		if ( $type == 4 ) {
			$type				=	( $notifyBy == 2 ? 2 : 1 );
		}

		$notification			=	new \cbNotification();

		if ( $type == 3 ) {
			// Moderator Notification:
			$notification->sendToModerators( $subject, $body, false, 1 );
		} elseif ( ( $type == 2 ) && $toUser ) {
			// PM Notification:
			if ( ! $toUser->get( 'id' ) ) {
				return false;
			}

			$notification->sendUserPMSmsg( $toUser, 0, $subject, $body, true, false, 1, $extras );
		} else {
			// Email Notification:
			if ( $toUser ) {
				if ( ! $toUser->get( 'id' ) ) {
					return false;
				}

				$notification->sendFromSystem( $toUser, $subject, $body, 1, 1, null, null, null, $extras, true, $fromName, $fromEmail );
			} else {
				$userTo			=	new UserTable();

//.........这里部分代码省略.........
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:101,代码来源:CBGroupJive.php


示例5: _invoicesTitle

 /**
  * Computes text for the title of the invoices list
  *
  * @param  int        $invoicesNumber  array of cbpaidPaymentBasket  of Completed and Pending baskets
  * @param  UserTable  $user            reflecting the user being displayed (here null)
  * @param  boolean    $itsmyself       user is logged in user
  * @param  string     $periodText      if non-empty, text of the period showing invoices
  * @return string
  */
 protected function _invoicesTitle($invoicesNumber, $user, $itsmyself, $periodText)
 {
     global $ueConfig;
     if ($itsmyself) {
         if ($periodText) {
             $plansTitle = sprintf(CBPTXT::Th("Your invoices of last %s"), htmlspecialchars($periodText));
         } else {
             if ($invoicesNumber == 1) {
                 $plansTitle = CBPTXT::Th("Your invoice");
             } else {
                 $plansTitle = CBPTXT::Th("Your invoices");
             }
         }
     } else {
         if ($periodText) {
             $plansTitle = sprintf(CBPTXT::Th("%s's invoices of last %s"), getNameFormat($user->name, $user->username, $ueConfig['name_format']), htmlspecialchars($periodText));
         } else {
             $plansTitle = sprintf(CBPTXT::Th("%s's invoices"), getNameFormat($user->name, $user->username, $ueConfig['name_format']));
         }
     }
     return $plansTitle;
 }
开发者ID:jasonrgd,项目名称:Digital-Publishing-Platform-Joomla,代码行数:31,代码来源:invoiceslist.php


示例6: getDisplayTab


//.........这里部分代码省略.........
     $return = null;
     if (!$ueConfig['allowConnections'] || isset($ueConfig['connectionDisplay']) && $ueConfig['connectionDisplay'] == 1 && $_CB_framework->myId() != $user->id) {
         return null;
     }
     $js = "if ( typeof confirmSubmit != 'function' ) {" . "function confirmSubmit() {" . "if ( confirm( '" . addslashes(CBTxt::T('UE_CONFIRMREMOVECONNECTION', 'Are you sure you want to remove this connection?')) . "' ) ) {" . "return true;" . "} else {" . "return false;" . "}" . "};" . "}";
     $_CB_framework->document->addHeadScriptDeclaration($js);
     $params = $this->params;
     $con_ShowSummary = $params->get('con_ShowSummary', '0');
     $con_SummaryEntries = $params->get('con_SummaryEntries', '4');
     $con_pagingenabled = $params->get('con_PagingEnabled', '1');
     $con_entriesperpage = $params->get('con_EntriesPerPage', '10');
     $pagingParams = $this->_getPaging(array(), array('connshow_'));
     $showall = $this->_getReqParam("showall", false);
     if ($con_ShowSummary && !$showall && $pagingParams['connshow_limitstart'] === null) {
         $summaryMode = true;
         $showpaging = false;
         $con_entriesperpage = $con_SummaryEntries;
     } else {
         $summaryMode = false;
         $showpaging = $con_pagingenabled;
     }
     $isVisitor = null;
     if ($_CB_framework->myId() != $user->id) {
         $isVisitor = "\n AND m.pending=0 AND m.accepted=1";
     }
     if ($showpaging || $summaryMode) {
         //select a count of all applicable entries for pagination
         if ($isVisitor) {
             $contotal = $this->_getUserNumberOfConnections($user);
         } else {
             $query = "SELECT COUNT(*)" . "\n FROM #__comprofiler_members AS m" . "\n LEFT JOIN #__comprofiler AS c ON m.memberid=c.id" . "\n LEFT JOIN #__users AS u ON m.memberid=u.id" . "\n WHERE m.referenceid=" . (int) $user->id . "\n AND c.approved=1 AND c.confirmed=1 AND c.banned=0 AND u.block=0" . $isVisitor;
             $_CB_database->setQuery($query);
             $contotal = $_CB_database->loadResult();
             if (!is_numeric($contotal)) {
                 $contotal = 0;
             }
         }
     } else {
         $contotal = 0;
     }
     if (!$showpaging || $pagingParams['connshow_limitstart'] === null || $con_entriesperpage > $contotal) {
         $pagingParams['connshow_limitstart'] = 0;
     }
     $query = "SELECT m.*,u.name,u.email,u.username,c.avatar,c.avatarapproved, u.id" . "\n FROM #__comprofiler_members AS m" . "\n LEFT JOIN #__comprofiler AS c ON m.memberid=c.id" . "\n LEFT JOIN #__users AS u ON m.memberid=u.id" . "\n WHERE m.referenceid=" . (int) $user->id . "" . "\n AND c.approved=1 AND c.confirmed=1 AND c.banned=0 AND u.block=0" . $isVisitor . "\n ORDER BY m.membersince DESC, m.memberid ASC";
     $_CB_database->setQuery($query, (int) ($pagingParams['connshow_limitstart'] ? $pagingParams['connshow_limitstart'] : 0), (int) $con_entriesperpage);
     $connections = $_CB_database->loadObjectList();
     if (!count($connections) > 0) {
         $return .= CBTxt::Th('UE_NOCONNECTIONS', 'This user has no current connections.');
         return $return;
     }
     $return .= $this->_writeTabDescription($tab, $user);
     foreach ($connections as $connection) {
         $cbUser = CBuser::getInstance((int) $connection->id);
         if (!$cbUser) {
             $cbUser = CBuser::getInstance(null);
         }
         $tipField = getConnectionTab::renderConnectionToolTip($connection);
         $tipTitle = CBTxt::T('UE_CONNECTEDDETAIL', 'Connection Details');
         $htmlText = $cbUser->getField('avatar', null, 'html', 'none', 'list', 0, true);
         $tooltip = cbTooltip(1, $tipField, $tipTitle, 300, null, $htmlText, null, 'style="display: inline-block; padding: 5px;"');
         if ($connection->accepted == 1 && $connection->pending == 1) {
             $actionImg = '<span class="fa fa-clock-o fa-lg" title="' . htmlspecialchars(CBTxt::T('UE_CONNECTIONPENDING', 'Connection Pending')) . '"></span>' . ' <a href="' . $_CB_framework->viewUrl('removeconnection', true, array('act' => 'connections', 'connectionid' => (int) $connection->memberid)) . '" onclick="return confirmSubmit();" >' . '<span class="fa fa-times-circle-o fa-lg" title="' . htmlspecialchars(CBTxt::T('UE_REMOVECONNECTION_DESC', 'Remove Connection to that user')) . '"></span>' . '</a>';
         } elseif ($connection->accepted == 1 && $connection->pending == 0) {
             $actionImg = '<a href="' . $_CB_framework->viewUrl('removeconnection', true, array('act' => 'connections', 'connectionid' => (int) $connection->memberid)) . '" onclick="return confirmSubmit();" >' . '<span class="fa fa-times-circle-o fa-lg" title="' . htmlspecialchars(CBTxt::T('UE_REMOVECONNECTION', 'Remove Connection')) . '"></span>' . '</a>';
         } elseif ($connection->accepted == 0) {
             $actionImg = '<a href="' . $_CB_framework->viewUrl('acceptconnection', true, array('act' => 'connections', 'connectionid' => (int) $connection->memberid)) . '" >' . '<span class="fa fa-check-circle-o fa-lg" title="' . htmlspecialchars(CBTxt::T('UE_ACCEPTCONNECTION', 'Accept Connection')) . '"></span>' . '</a>' . ' <a href="' . $_CB_framework->viewUrl('removeconnection', true, array('act' => 'connections', 'connectionid' => (int) $connection->memberid)) . '" onclick="return confirmSubmit();" >' . '<span class="fa fa-times-circle-o fa-lg" title="' . htmlspecialchars(CBTxt::T('UE_REMOVECONNECTION', 'Remove Connection')) . '"></span>' . '</a>';
         } else {
             $actionImg = null;
         }
         if ($_CB_framework->myId() == $user->id) {
             $return .= '<div class="containerBox img-thumbnail">' . '<div class="containerBoxInner" style="min-height: 130px; min-width: 90px;">' . $actionImg . '<br />' . $cbUser->getField('onlinestatus', null, 'html', 'none', 'profile', 0, true, array('_imgMode' => 1)) . ' ' . $cbUser->getField('formatname', null, 'html', 'none', 'list', 0, true) . '<br />' . $tooltip . '<br />' . ' <a href="' . $_CB_framework->userProfileUrl((int) $connection->memberid) . '">' . '<span class="fa fa-user" title="' . htmlspecialchars(CBTxt::T('UE_VIEWPROFILE', 'View Profile')) . '"></span>' . '</a>' . ' ' . $cbUser->getField('email', null, 'html', 'none', 'profile', 0, true, array('_imgMode' => 1)) . ' ' . $cbUser->getField('pm', null, 'html', 'none', 'profile', 0, true, array('_imgMode' => 1)) . '</div>' . '</div>';
         } else {
             $return .= '<div class="containerBox img-thumbnail">' . '<div class="containerBoxInner" style="min-height: 100px; min-width: 90px;">' . $cbUser->getField('onlinestatus', null, 'html', 'none', 'profile', 0, true, array('_imgMode' => 1)) . ' ' . $cbUser->getField('formatname', null, 'html', 'none', 'list', 0, true) . '<br />' . $tooltip . '</div>' . '</div>';
         }
     }
     $return .= '<div class="clearfix"></div>';
     // Add paging control at end of list if paging enabled
     if ($showpaging && $con_entriesperpage < $contotal) {
         $return .= '<div class="text-center">' . $this->_writePaging($pagingParams, 'connshow_', $con_entriesperpage, $contotal) . '</div>';
     }
     if ($con_ShowSummary && $_CB_framework->myId() == $user->id || $summaryMode && $con_entriesperpage < $contotal) {
         $return .= '<div class="connSummaryFooter clearfix">';
         if ($_CB_framework->myId() == $user->id) {
             // Manage connections link:
             $return .= '<div id="connSummaryFooterManage" class="pull-left">' . '<a href="' . $_CB_framework->viewUrl('manageconnections') . '" >[' . CBTxt::Th('UE_MANAGECONNECTIONS', 'Manage Connections') . ']</a>' . '</div>';
         }
         if ($summaryMode && $con_entriesperpage < $contotal) {
             // See all of user's ## connections
             $return .= '<div id="connSummaryFooterSeeConnections" class="pull-right">' . '<a href="' . $this->_getAbsURLwithParam(array('showall' => 1)) . '">';
             if ($_CB_framework->myId() == $user->id) {
                 $return .= sprintf(CBTxt::Th('UE_SEEALLNCONNECTIONS', 'See all %s connections'), $contotal);
             } else {
                 $return .= sprintf(CBTxt::Th('UE_SEEALLOFUSERSNCONNECTIONS', 'See all of %s\'s %s connections'), getNameFormat($user->name, $user->username, $ueConfig['name_format']), "<strong>" . $contotal . "</strong>");
             }
             $return .= '</a>' . '</div>';
         }
         $return .= '</div>';
     }
     return $return;
 }
开发者ID:jasonrgd,项目名称:Digital-Publishing-Platform-Joomla,代码行数:101,代码来源:cb.connections.php


示例7: getDisplayTab

 /**
  * Generates the HTML to display the user profile tab
  *
  * @param  TabTable   $tab       the tab database entry
  * @param  UserTable  $user      the user being displayed
  * @param  int        $ui        1 for front-end, 2 for back-end
  * @return mixed                 Either string HTML for tab content, or false if ErrorMSG generated
  */
 public function getDisplayTab($tab, $user, $ui)
 {
     global $ueConfig;
     $params = $this->params;
     $title = cbReplaceVars($params->get('title', '_UE_PROFILE_TITLE_TEXT'), $user);
     $name = getNameFormat($user->name, $user->username, $ueConfig['name_format']);
     $return = (sprintf($title, $name) ? '<div class="page-header cbProfileTitle"><h3>' . sprintf($title, $name) . '</h3></div>' : null) . $this->_writeTabDescription($tab, $user);
     return $return;
 }
开发者ID:bobozhangshao,项目名称:HeartCare,代码行数:17,代码来源:cb.core.php


示例8: _bbeditor

	/**
	 * BBcode editor
	 *
	 * @uses $this->pbconfig->EnableRating, $this->pbconfig->ShowTitle, $this->pbconfig->ShowName, $this->pbconfig->ShowEmail, $this->pbconfig->UseLocation, $this->pbconfig->LocationField, $this->pbconfig->UseWebAddress, $this->pbconfig->WebField, $this->pbconfig->AllowBBCode, $this->pbconfig->AllowSmiles, $this->pbconfig->Captcha
	 *
	 * @param  pbProfileBookEntry  $item
	 * @param  string              $idTag
	 * @param  string              $htmlAreaLabel
	 * @param  string              $txtSubmit
	 * @param  UserTable           $curruser
	 * @param  boolean             $required
	 * @return string
	 */
	function _bbeditor( $item, $idTag, $htmlAreaLabel, $txtSubmit, $curruser, $required )
	{
		global $_CB_framework, $ueConfig;

		$myId			=	Application::MyUser()->getUserId();

		$newOrMe		=	( ( $item->posterid == -1 ) || ( $item->posterid == $myId ) );

		$htmltext		=	'<div class="cbpbEditorContainer" id="div' . $idTag . '">';
		
		//get the CB initiatied form action path this is used for all forms
		$base_url		=	$this->_getAbsURLwithParam( array() );
		$htmltext		.=	'<form name="admin' . $idTag . '" id="admin' . $idTag . '" method="post" onsubmit="javascript: return pb_submitForm(this);" action="' . $base_url . "\">\n";
		$htmltext		.=	'<input type="hidden" name="' . $this->_getPagingParamName( 'formaction' .  $this->pbconfig->MainMode[0] ) . '" value="' . ( $item->_pbid ? 'edit' : 'new' ) . "\" />\n";
		if ( $item->_pbid ) {
			$htmltext	.=	'<input type="hidden" name="' . $this->_getPagingParamName( 'id' ) . '" value="' . $item->_pbid . "\" />\n";
		}
		if ( $this->pbconfig->AllowBBCode ) {
			$editor		=	$this->getEditor( $idTag );
		} else {
			$editor		=	null;
		}
		$htmltext		.=	"<table width=\"100%\">\n";
		$locationField	=	null;
		//Check to see if the Location field should be used
		if ( $this->pbconfig->UseLocation ) {
			//Check to see if a registered user is logged in and if the admin has defined a a value for the location field
			if ( $myId && ( $this->pbconfig->LocationField != 0 ) && $newOrMe ) {
				$locationField		=	new FieldTable();
				$locationField->load( $this->pbconfig->LocationField );
				$naLocationField	=	$locationField->name;
				//if they true then display the location value from the users cb profile in read only
				$locationField		=	'<td class="titleCell">' . CBTxt::th( "Location" ) . ':<br /><input type="hidden" name="' . $this->_getPagingParamName( 'posterlocation' ) . '" value="' . htmlspecialchars( $curruser->$naLocationField ) . '" />' . htmlspecialchars( $curruser->$naLocationField ) . '</td>';
			} else {
				//else display an entry field to capture the location
				$locationField		=	'<td class="titleCell">' . CBTxt::th( "Location" ) . ':<br /><input class="inputbox" type="text" name="' . $this->_getPagingParamName( 'posterlocation' ) . '" value="' . htmlspecialchars( $item->posterlocation ) . '" /></td>';
			}
		}
		
		$webField					=	null;
		if ( $this->pbconfig->UseWebAddress ) {
			if ( $myId && ( $this->pbconfig->WebField != 0 ) && $newOrMe  ) {
				$webfield			=	new FieldTable();
				$webfield->load( $this->pbconfig->WebField );
				$naWebField			=	$webfield->name;
				$webField			=	'<td class="titleCell">' . CBTxt::th( "Web Address" ) . ':<br /><input type="hidden" name="' . $this->_getPagingParamName( 'posterurl' ) . '" value="' . $curruser->$naWebField . '" />' . $this->_displayWebAddress( $curruser->$naWebField ) . '</td>';
			} else {
				$webField			=	'<td class="titleCell">' . CBTxt::th( "Web Address" ) . ':<br /><input class="inputbox" type="text" name="' . $this->_getPagingParamName( 'posterurl' ) . '" value="' . htmlspecialchars( $item->posterurl ) . '" /></td>';
			}
		}
		
		$htmltext				.=	"\n<tr>";
		if ( ! $myId ) {
			$htmltext			.=	'<td class="titleCell">' . CBTxt::th( "Name" )  . ':<br /><input class="inputbox" type="text" name="' . $this->_getPagingParamName( 'postername' ) . '" value="' . htmlspecialchars( $item->postername ) . '" /></td>';
			$htmltext			.=	'<td class="titleCell">' . CBTxt::th( "Email" ) . ':<br /><input class="inputbox" type="text" name="' . $this->_getPagingParamName( 'posteremail' ) . '" value="' . htmlspecialchars( $item->posteremail ) . '" /></td>';
		} else {
			$htmlName	=	( $item->postername ? htmlspecialchars( $item->postername ) : getNameFormat( $curruser->name, $curruser->username, $ueConfig['name_format'] ) );
			if ( $this->pbconfig->ShowName ) {
				$htmltext		.=	'<td class="titleCell">' . CBTxt::th( "Name" ) . ':<br /><input type="hidden" name="' . $this->_getPagingParamName( 'postername' ) . '" value="' . $htmlName . '" />' . $htmlName . '</td>';
			} else {
				$htmltext		.=	'<td><input type="hidden" name="' . $this->_getPagingParamName( 'postername' ) . '" value="' . $htmlName . '" /></td>';
			}
			if ( $this->pbconfig->ShowEmail ) {
				$htmltext		.=	'<td class="titleCell">' . CBTxt::th( "Email" ) . ':<br />';
				if ( ! $item->posteremail || $myId == $item->posterid || Application::MyUser()->isAuthorizedToPerformActionOnAsset( 'core.manage', 'com_users' ) ) {
					$htmltext	.=	'<input type="hidden" name="' . $this->_getPagingParamName( 'posteremail' ) . '" value="' . ( $item->posteremail ? htmlspecialchars( $item->posteremail ) : htmlspecialchars( $curruser->email ) ) . '" />' . ( $item->posteremail ? htmlspecialchars( $item->posteremail ) : htmlspecialchars( $curruser->email ) );
				} else {
					$htmltext	.=	CBTxt::th( "Hidden" );
				}
			} else {
				if ( ! $item->posteremail || $myId == $item->posterid || Application::MyUser()->isAuthorizedToPerformActionOnAsset( 'core.manage', 'com_users' ) ) {
					$htmltext	.=	'<td><input type="hidden" name="' . $this->_getPagingParamName( 'posteremail' ) . '" value="' . ( $item->posteremail ? htmlspecialchars( $item->posteremail ) : htmlspecialchars( $curruser->email ) ) . '" /></td>';
				}
			}
		}
		$htmltext				.=	'</tr>';
		
		//Check to see if we are displaying the web address or location field. If we are then add a row for them
		if ( $webField != null || $locationField != null ) {
			$htmltext		.=	"\n<tr>" . $locationField . $webField . '</tr>';
		}
		$htmltext			.=	'<tr><td colspan="2">';
		
		//Check to see if the admin has enabled rating for profile entries
		if ( $this->pbconfig->EnableRating && ( $myId != $item->userid ) ) {
			//Yep its enabled so get the ratings HTML/Code
			$htmltext		.=	'<div class="titleCell">' . CBTxt::Th( "User Rating" ) . ':</div>'
//.........这里部分代码省略.........
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:101,代码来源:cb.profilebook.php


示例9: cbSetTitlePath

 /**
  * Computes page title, sets page title and pathway
  *
  * @param  UserTable  $user
  * @param  string              $thisUserTitle    Title if it's the user displaying
  * @param  string              $otherUserTitle   Title if it's another user displayed
  * @return string    title (plaintext, without htmlspecialchars or slashes)
  */
 function cbSetTitlePath($user, $thisUserTitle, $otherUserTitle)
 {
     global $ueConfig, $_CB_framework;
     $title = null;
     if ($_CB_framework->myId() == $user->id) {
         if ($thisUserTitle) {
             $title = $thisUserTitle;
         }
     } else {
         if ($otherUserTitle) {
             $name = getNameFormat($user->name, $user->username, $ueConfig['name_format']);
             $title = sprintf($otherUserTitle, $name);
         }
     }
     if ($title) {
         $_CB_framework->setPageTitle($title);
         $_CB_framework->appendPathWay(htmlspecialchars($title));
     }
     return $title;
 }
开发者ID:bobozhangshao,项目名称:HeartCare,代码行数:28,代码来源:LegacyComprofilerFunctions.php


示例10: getEditTab

	/**
	 * Generates the HTML to display the user edit tab
	 *
	 * @param  TabTable   $tab       the tab database entry
	 * @param  UserTable  $user      the user being displayed
	 * @param  int        $ui        1 for front-end, 2 for back-end
	 * @return mixed                 either string HTML for tab content, or false if ErrorMSG generated
	 */
	public function getEditTab( $tab, $user, $ui ) {
		global $ueConfig, $_CB_framework;

		$return		=	'';
		if ( ( $ui != 2 ) /* || ( $_CB_framework->myId() == $user->id ) */ ) {
			return $return;
		}

		cbpaidErrorHandler::on();

		if ( cbpaidApp::authoriseAction( 'cbsubs.usersubscriptionview' ) ) {


			$params					=	$this->params;
			
			$paidsubsManager		=&	cbpaidSubscriptionsMgr::getInstance();
			$paidsubsManager->checkExpireMe( __FUNCTION__ );
	
			if ( $user->id ) {
				$basketsMgr			=&	cbpaidOrdersMgr::getInstance();
				$basketsMgr->timeoutUnusedBaskets( $user->id );
			}
	
			$title					=	CBPTXT::Th( $params->get( 'profileTitle', "Your subscriptions" ));
			if ( $title ) {
				$name				=	getNameFormat( $user->name, $user->username, $ueConfig['name_format'] );
				$return				.=	'<div class="contentheading" id="cbregProfileTitle">' . sprintf( $title, $name ) . "</div>\n";
			}
	
			$return					.=	$this->_writeTabDescription( $tab, $user );
	
			$itsmyself				=	( $_CB_framework->myId() == $user->id );

			$subscriptionsGUI		=	new cbpaidControllerUI();
			$return					.=	$subscriptionsGUI->getShowSubscriptionUpgrades( $user, $itsmyself );

		}

		cbpaidErrorHandler::off();
		return $return;

/*
		global $_CB_framework;
		
		$params = $this->params;
		$exampleText		= $params->get('exampletext', 'Text Parameter not set!');

		$xmlfile = $_CB_framework->getCfg( 'absolute_path' ) . '/components/com_comprofiler/plugin/user/plug_cbpaidsubscriptions/cbpaidsubscriptions.xml';
		$this->userParams = new Registry( $user->cb_subs_params, $xmlfile, $maintagname='cbinstall', $attrname='type', $attrvalue='plugin', $paramsnode='params' );

		$ret = $this->userParams->render( $pluginId=null, $tabId=null, $tag_name='userparams',$attr='class',$attrvalue='getcbpaidsubscriptionsTab', $control_name='subscriptionparams', $paramstextarea=false );
		
		return $ret;
*/
	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:63,代码来源:cbpaidsubscriptions.php


示例11: _sendEmailMSG

 function _sendEmailMSG($to, $from, $sub, $msg, $addPrefix = false, $mode = 0, $cc = null, $bcc = null, $attachment = null)
 {
     //BB: add html
     global $_CB_framework, $ueConfig, $_SERVER;
     if ($addPrefix) {
         $uname = getNameFormat($from->name, $from->username, $ueConfig['name_format']);
         $premessage = sprintf(_UE_SENDEMAILNOTICE, $uname, cb_html_entity_decode_all($_CB_framework->getCfg('sitename')), $_CB_framework->getCfg('live_site'));
         if (isset($ueConfig['allow_email_replyto']) && $ueConfig['allow_email_replyto'] == 2) {
             $premessage .= sprintf(_UE_SENDEMAILNOTICE_REPLYTO, $uname, $from->email);
         }
         $postmessage = sprintf(_UE_SENDEMAILNOTICE_DISCLAIMER, cb_html_entity_decode_all($_CB_framework->getCfg('sitename')));
         // $premessage .=	sprintf(_UE_SENDEMAILNOTICE_MESSAGEHEADER, $uname);
         $msg = $premessage . $msg . $postmessage;
         $from->name = $uname . " @ " . cb_html_entity_decode_all($_CB_framework->getCfg('sitename'));
         // $ueConfig['reg_email_name']
     }
     //		if (class_exists("mosPHPMailer")) {
     $res = comprofilerMail($from->email, $from->name, $to->email, $sub, $msg, $mode, $cc, $bcc, $attachment, $from->replytoEmail, $from->replytoName);
     /*		} else if (function_exists( 'mosMail' )) {
     			$res = mosMail($from->email, $from->name, $to->email, $sub, $msg);
     		} else { //TODO drop this once we are dedicated to >= 4.5.2
     			$EOL			=	defined( 'PHP_EOL' ) ? PHP_EOL : '\n';	// assume Linux for old systems.
     			$header  = "MIME-Version: 1.0" . $EOL;
     			$header .= "Content-type: text/plain; charset=" . $_CB_framework->outputCharset() . $EOL;
     			$header .= "Content-Transfer-encoding: 8bit" . $EOL;
     			$fromTag  = $from->name." <" . $from->email . ">";
     			$header .= "From: ".$fromTag. $EOL;
     			$replyTag = $from->replytoName." <" . $from->replytoEmail . ">";
     			$header .= "Reply-To: ".$replyTag. $EOL;
     			$header .= "Organization: ".cb_html_entity_decode_all($_CB_framework->getCfg( 'sitename' )). $EOL;
     			$header .= "Message-ID: <".md5(uniqid(time()))."@{$_SERVER['SERVER_NAME']}>" . $EOL;
     			$header .= "Return-Path: ".$from->email. $EOL;
     			$header .= "X-Priority: 3" . $EOL;
     			$header .= "X-MSmail-Priority: Low" . $EOL;
     			$header .= "X-Mailer: PHP\r\n"; //hotmail and others dont like PHP mailer. --Microsoft Office Outlook, Build 11.0.5510
     			$header .= "X-Sender: ".$from->email. $EOL . $EOL;
     			$res =  mail($to->email, $sub, $msg, $header);
     		}
     */
     return $res;
 }
开发者ID:rogatnev-nikita,项目名称:cloudinterpreter,代码行数:41,代码来源:comprofiler.class.php


示例12: getDisplayTab

 /**
  * Generates the HTML to display the user profile tab
  * @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 mixed                          either string HTML for tab content, or false if ErrorMSG generated
  */
 function getDisplayTab($tab, $user, $ui)
 {
     global $ueConfig;
     // Display user's name + "Profile Page"
     $params = $this->params;
     $title = cbReplaceVars($params->get('title', '_UE_PROFILE_TITLE_TEXT'), $user);
     $name = getNameFormat($user->name, $user->username, $ueConfig['name_format']);
     $return = '<div class="contentheading" id="cbProfileTitle">' . sprintf($title, $name) . "</div>\n";
     $return .= $this->_writeTabDescription($tab, $user);
     return $return;
 }
开发者ID:rogatnev-nikita,项目名称:cloudinterpreter,代码行数:18,代码来源:cb.core.php


示例13: manageConnections

    static function manageConnections($connections, $actions, $total, &$connMgmtTabs, &$pagingParams, $perpage, $connecteds = null)
    {
        global $_CB_framework, $ueConfig, $_REQUEST;
        $Itemid = $_CB_framework->itemid();
        $ui = 1;
        outputCbTemplate($ui);
        initToolTip(1);
        ob_start();
        ?>
var tabPanemyCon;
function showCBTabPaneMy( sName ) {
	if (typeof tabPanemyCon != "undefined" ) {
		switch ( sName.toLowerCase() ) {
			case "<?php 
        echo strtolower(_UE_MANAGEACTIONS);
        ?>
":
			case "manageactions":
			case "0":
				tabPanemyCon.setSelectedIndex( 0 );
				break;
			case "<?php 
        echo strtolower(_UE_MANAGECONNECTIONS);
        ?>
":
			case "manageconnections":
			case "1":
				tabPanemyCon.setSelectedIndex( 1 );
				break;
			case "<?php 
        echo strtolower(_UE_CONNECTEDWITH);
        ?>
":
			case "connectedfrom":
			case "2":
				tabPanemyCon.setSelectedIndex( 2 );
				break;
		}
	}
}
<?php 
        $cbjavascript = ob_get_contents();
        ob_end_clean();
        $_CB_framework->outputCbJQuery($cbjavascript);
        ob_start();
        ?>
function confirmSubmit() {
	if (confirm("<?php 
        echo _UE_CONFIRMREMOVECONNECTION;
        ?>
"))
		return true ;
	else
		return false ;
}
<?php 
        $cbjavascript = ob_get_contents();
        ob_end_clean();
        $_CB_framework->document->addHeadScriptDeclaration($cbjavascript);
    

鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP getNameFromID函数代码示例发布时间:2022-05-15
下一篇:
PHP getName函数代码示例发布时间: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