本文整理汇总了PHP中cbSef函数的典型用法代码示例。如果您正苦于以下问题:PHP cbSef函数的具体用法?PHP cbSef怎么用?PHP cbSef使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了cbSef函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: drawForm
/**
* Draws a form posting to $getParams with CSS class $cssClass around $settings with $warnings at top, and $formHiddens hidden elements. Also add validation languages into head.
*
* @param string $settings
* @param string $warning
* @param string[] $formHiddens
* @param string|array $getParams
* @param string|null $cssClass
* @return string
*/
public function drawForm($settings, $warning, $formHiddens, $getParams, $cssClass = null)
{
$html = '';
if ($warning) {
$html .= '<div class="alert alert-danger">' . $warning . '</div>' . "\n";
}
if (is_array($getParams)) {
$postUrl = 'index.php';
if ($getParams && count($getParams) > 0) {
foreach ($getParams as $k => $v) {
$getParams[$k] = $k . '=' . htmlspecialchars(urlencode($v));
}
$postUrl .= '?' . implode('&', $getParams);
}
} else {
$postUrl = $getParams;
}
if ($formHiddens !== null) {
cbValidator::loadValidation();
$html .= '<form enctype="multipart/form-data" action="' . cbSef($postUrl) . '" method="post" name="adminForm" id="cbAdminFormForm" class="cb_form form-auto cbValidation cbregfrontendform' . ($cssClass ? ' ' . $cssClass : '') . '">' . "\n";
}
if ($formHiddens !== null) {
foreach ($formHiddens as $k => $v) {
$html .= "\t" . '<input type="hidden" name="' . htmlspecialchars($k) . '" value="' . htmlspecialchars($v) . '" />' . "\n";
}
$html .= cbGetSpoofInputTag('plugin');
}
$html .= $settings;
if ($formHiddens !== null) {
$html .= "</form>\n";
}
return $html;
}
示例2: 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);
}
示例3: 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 );
}
示例4: getReturnURL
static function getReturnURL($params, $type)
{
global $cbSpecialReturnAfterLogin, $cbSpecialReturnAfterLogout;
static $returnUrl = null;
if (!isset($returnUrl)) {
$returnUrl = Application::Input()->get('get/return', '', GetterInterface::BASE64);
if ($returnUrl) {
$returnUrl = base64_decode($returnUrl);
if (!JUri::isInternal($returnUrl)) {
// The URL isn't internal to the site; reset it to index to be safe:
$returnUrl = 'index.php';
}
} else {
$isHttps = isset($_SERVER['HTTPS']) && !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off';
$returnUrl = 'http' . ($isHttps ? 's' : '') . '://' . $_SERVER['HTTP_HOST'];
if (!empty($_SERVER['PHP_SELF']) && !empty($_SERVER['REQUEST_URI'])) {
$returnUrl .= $_SERVER['REQUEST_URI'];
} else {
$returnUrl .= $_SERVER['SCRIPT_NAME'];
if (isset($_SERVER['QUERY_STRING']) && !empty($_SERVER['QUERY_STRING'])) {
$returnUrl .= '?' . $_SERVER['QUERY_STRING'];
}
}
}
$returnUrl = cbUnHtmlspecialchars(preg_replace('/[\\\\"\\\'][\\s]*javascript:(.*)[\\\\"\\\']/', '""', preg_replace('/eval\\((.*)\\)/', '', htmlspecialchars(urldecode($returnUrl)))));
if (preg_match('/index.php\\?option=com_comprofiler&task=confirm&confirmCode=|index.php\\?option=com_comprofiler&view=confirm&confirmCode=|index.php\\?option=com_comprofiler&task=login|index.php\\?option=com_comprofiler&view=login/', $returnUrl)) {
$returnUrl = 'index.php';
}
}
$secureForm = (int) $params->get('https_post', 0);
if ($type == 'login') {
$loginReturnUrl = $params->get('login', $returnUrl);
if (isset($cbSpecialReturnAfterLogin)) {
$loginReturnUrl = $cbSpecialReturnAfterLogin;
}
$url = cbSef($loginReturnUrl, true, 'html', $secureForm);
} elseif ($type == 'logout') {
$logoutReturnUrl = $params->get('logout', 'index.php');
if ($logoutReturnUrl == '#') {
$logoutReturnUrl = $returnUrl;
}
if (isset($cbSpecialReturnAfterLogout)) {
$logoutReturnUrl = $cbSpecialReturnAfterLogout;
}
$url = cbSef($logoutReturnUrl, true, 'html', $secureForm);
} else {
$url = $returnUrl;
}
return base64_encode($url);
}
示例5: 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');
}
示例6: showIcon
public function showIcon($userid)
{
global $_CB_framework, $_CB_PMS;
$myid = $_CB_framework->myId();
// Don't send messages from/to anonymous and to yourself
if ($myid == 0 || $userid == 0 || $userid == $myid) {
return '';
}
outputCbTemplate($_CB_framework->getUi());
$resultArray = $_CB_PMS->getPMSlinks($userid, $myid, '', '', 1);
$html = '';
if (count($resultArray) > 0) {
$linkItem = '<span class="pm" alt="' . JText::_('COM_KUNENA_VIEW_PMS') . '" />';
foreach ($resultArray as $res) {
if (is_array($res)) {
$html .= '<a href="' . cbSef($res["url"]) . '" title="' . getLangDefinition($res["tooltip"]) . '">' . $linkItem . '</a> ';
}
}
}
return $html;
}
示例7: renderUrlOfAutoExpiry
/**
* USED by XML interface ONLY !!! Renders url for the product
*
* @param string $value Variable value ( 'massexpire' )
* @param ParamsInterface $params
* @return string HTML to display
*/
public function renderUrlOfAutoExpiry($value, $params)
{
$url = 'index.php?option=com_comprofiler&task=pluginclass&plugin=cbpaidsubscriptions&do=' . htmlspecialchars($value) . '&key=' . md5($params->get('license_number'));
$url = cbSef($url, true, 'raw');
return '<a href="' . $url . '" target="_blank">' . $url . '</a>';
}
示例8: _linksArrayToFormat
/**
* Reformats a PHP array of links into $output format
*
* @param FieldTable $field
* @param array $links
* @param string $output 'html', 'xml', 'json', 'php', 'csvheader', 'csv', 'rss', 'fieldslist', 'htmledit'
* @return string|array|null
*/
protected function _linksArrayToFormat($field, $links, $output)
{
$values = array();
switch ($output) {
case 'xml':
foreach ($links as $link) {
if (isset($link['url'])) {
$values[] = '<link>' . '<url>' . cbSef($link['url']) . '</url>' . '<title>' . htmlspecialchars($link['title']) . '</title>' . '<tooltip>' . htmlspecialchars(CBTxt::T($link['tooltip'])) . '</tooltip>' . '</link>';
}
}
return '<' . htmlspecialchars($field->name) . '>' . implode('', $values) . '</' . htmlspecialchars($field->name) . '>';
break;
case 'json':
foreach ($links as $link) {
if (isset($link['url'])) {
$values[] = array('url' => cbSef($link['url']), 'link' => $link['title'], 'tooltip' => CBTxt::T($link['tooltip']));
}
}
return "'" . addslashes($field->name) . "' : " . json_encode($values, JSON_FORCE_OBJECT);
break;
case 'csv':
foreach ($links as $link) {
if (isset($link['url'])) {
$values[] = cbSef($link['url']);
}
}
return $this->_formatFieldOutput($field->name, implode(',', $values), $output, false);
break;
default:
foreach ($links as $link) {
if (isset($link['url'])) {
$values[] = '<a href="' . cbSef($link['url']) . '" title="' . htmlspecialchars(CBTxt::T($link['tooltip'])) . '">' . $link['title'] . '</a>';
}
}
return $this->_arrayToFormat($field, $values, $output, ' ', '', false);
break;
}
}
示例9: ShowFavorites
/**
* Generates HTML for favorites in forum tab
*
* @param object $template
* @param object $forum
* @param object $model
* @return mixed
*/
function ShowFavorites( $template, $forum, $model ) {
$html = null;
$oneOrTwo = 1;
if ( $template->favorites ) {
$html .= '<br /><table width="100%" cellspacing="0" cellpadding="3" border="0">'
. '<thead>'
. '<tr class="sectiontableheader">'
. '<th colspan="4">' . CBTxt::T( 'Your Favorites' ) . '</th>'
. '</tr>'
. '<tr class="sectiontableheader">'
. '<th width="20%">' . $template->titles->date . '</th>'
. '<th width="45%">' . $template->titles->subject . '</th>'
. '<th width="25%">' . $template->titles->category . '</th>'
. '<th width="10%">' . CBTxt::T( 'Action' ) . '</th>'
. '</tr>'
. '</thead>'
. '<tbody>';
foreach ( $template->favorites as $item ) {
$unsubURL = cbSef( $template->unFavThreadURL . $item->thread );
$postURL = cbSef( 'index.php?option=' . $forum->component . $forum->itemid . '&func=view&catid='. $item->catid . '&id=' . $item->id );
$catURL = cbSef( 'index.php?option=' . $forum->component . $forum->itemid . '&func=' . ( $forum->component == 'com_kunena' ? 'showcat' : 'view' ) . '&catid='. $item->catid );
$html .= '<tr class="sectiontableentry' . $oneOrTwo . '">'
. '<td>' . getFieldValue( 'date', date( 'Y-m-d, H:i:s', $item->time ) ) . '</td>'
. '<td><a href="' . $postURL . '">' . htmlspecialchars( stripslashes( $item->subject ) ) . '</a></td>'
. '<td><a href="' . $catURL . '">' . htmlspecialchars( stripslashes( $item->catname ) ) . '</a></td>'
. '<td><a href="javascript:void(0);" onclick="javascript:if ( confirm(\'' . CBTxt::T( "Are you sure you want to remove this favorite thread?" ) . '\') ) { location.href=\'' . $unsubURL . '\'; }">' . CBTxt::T( 'Remove' ) . '</a></td>'
. '</tr>';
$oneOrTwo = ( $oneOrTwo == 1 ? 2 : 1 );
}
$html .= '</tbody>'
. '</table>';
if ( $template->showPaging ) {
$html .= '<br /><div style="width:95%;text-align:center;">' . $template->paging . '</div>';
}
$html .= '<br /><div style="width:95%;text-align:center;"><input type="button" class="button" onclick="javascript:if ( confirm(\'' . CBTxt::T( "Are you sure you want to remove all your favorite threads?" ) . '\') ) { location.href=\'' . $template->unFavAllURL . '\'; }" value="' . CBTxt::T( 'Remove All' ) . '" /></div>';
} else {
$html .= '<br /><div>' . CBTxt::T( 'No favorites found for you.' ) . '</div>';
}
return $html;
}
示例10: getEditURL
public function getEditURL()
{
return cbSef('index.php?option=com_comprofiler&task=userAvatar' . getCBprofileItemid());
}
示例11: getUrl
/**
* @param int|OrderedTable $row
* @param boolean $htmlspecialchars
* @return string
*/
static public function getUrl( $row, $htmlspecialchars = true )
{
if ( is_object( $row ) ) {
$id = $row->get( 'id' );
} else {
$id = $row;
}
return cbSef( 'index.php?option=com_comprofiler&view=pluginclass&plugin=cbconsultations&action=consultations&func=show&id=' . (int) $id, $htmlspecialchars );
}
示例12: getPMIcon
/**
* Generates icon for PM link
*
* @param moscomprofilerUser $user
* @param string $mode
* @return mixed
*/
function getPMIcon( $user, $mode = 'kunena' ) {
global $_CB_PMS, $_CB_framework;
$url = null;
if ( $user->id ) {
$resultArray = $_CB_PMS->getPMSlinks( $user->id, $_CB_framework->myId(), null, null, 1 );
if ( count( $resultArray ) > 0 ) {
foreach ( $resultArray as $res ) {
if ( is_array( $res ) ) {
$url = cbSef( $res['url'] );
}
}
}
if ( $url ) {
$icon = $this->getFieldIcon( $user->username, CBTxt::T( 'Send Private Message: ' ), 'pm.gif', null, $mode );
$format = '<a href="' . $url . '">' . $icon . '</a>';
}
}
return ( $url ? $format : null );
}
示例13: getPointsHTML
/**
* output points field html display
*
* @param FieldTable $field
* @param UserTable $user
* @param string $reason
* @param boolean $ajax
* @return string
*/
private function getPointsHTML(&$field, &$user, $reason, $ajax = false)
{
global $_CB_framework;
static $JS_loaded = 0;
$userId = (int) $user->get('id');
$fieldName = $field->get('name');
$value = (int) $user->get($fieldName);
$readOnly = $this->_isReadOnly($field, $user, $reason);
$maxPoints = (int) $field->params->get('integer_maximum', '1000000');
$pointsLayout = $field->params->get('points_layout', '');
$userlistIncrement = (int) $field->params->get('points_list', 0);
$userlistAccess = false;
if ($reason == 'list') {
$fieldName = $fieldName . $userId;
if ($userlistIncrement) {
$userlistAccess = true;
}
}
$canIncrement = !$readOnly && $this->getIncrementAccess($field, $user) && ($reason == 'list' && $userlistAccess || $reason != 'list');
if ($canIncrement) {
$plusCSS = $field->params->get('points_plus_class', '');
$minusCSS = $field->params->get('points_minus_class', '');
$plusIcon = '<span class="' . ($plusCSS ? htmlspecialchars($plusCSS) : 'fa fa-plus-circle fa-lg') . '"></span>';
$minusIcon = '<span class="' . ($minusCSS ? htmlspecialchars($minusCSS) : 'fa fa-minus-circle fa-lg') . '"></span>';
$replace = array('[plus]' => $value < $maxPoints ? '<span class="cbPointsFieldIncrement cbPointsFieldIncrementPlus" data-value="plus" data-field="' . $field->get('name') . '" data-target="' . $userId . '">' . $plusIcon . '</span>' : null, '[minus]' => $value > 0 ? '<span class="cbPointsFieldIncrement cbPointsFieldIncrementMinus" data-value="minus" data-field="' . $field->get('name') . '" data-target="' . $userId . '">' . $minusIcon . '</span>' : null, '[value]' => '<span class="cbPointsFieldValue">' . $value . '</span>');
if ($pointsLayout) {
$pointsLayout = CBTxt::Th($pointsLayout, null, $replace);
} else {
$pointsLayout = CBTxt::Th('POINTS_FIELD_LAYOUT_VALUE_PLUS_MINUS', '[value] [plus] [minus]', $replace);
}
if ($ajax) {
$return = $pointsLayout;
} else {
$return = '<span id="' . $fieldName . 'Container" class="cbPointsField' . ($userlistAccess ? ' cbClicksInside' : null) . '">' . $pointsLayout . '</span>';
if (!$JS_loaded++) {
cbGetRegAntiSpamInputTag();
$cbGetRegAntiSpams = cbGetRegAntiSpams();
$js = "\$( '.cbPointsField' ).on( 'click', '.cbPointsFieldIncrement', function ( e ) {" . "var points = \$( this ).parents( '.cbPointsField' );" . "var increment = \$( this ).data( 'value' );" . "var field = \$( this ).data( 'field' );" . "var target = \$( this ).data( 'target' );" . "\$.ajax({" . "type: 'POST'," . "url: '" . addslashes(cbSef('index.php?option=com_comprofiler&view=fieldclass&function=savevalue&reason=' . urlencode($reason), false, 'raw')) . "'," . "data: {" . "field: field," . "user: target," . "value: increment," . cbSpoofField() . ": '" . addslashes(cbSpoofString(null, 'fieldclass')) . "'," . cbGetRegAntiSpamFieldName() . ": '" . addslashes($cbGetRegAntiSpams[0]) . "'" . "}" . "}).done( function( data, textStatus, jqXHR ) {" . "points.html( data );" . "});" . "});";
$_CB_framework->outputCbJQuery($js);
}
}
} else {
$return = parent::getField($field, $user, 'html', $reason, 0);
}
return $return;
}
示例14: 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'],"" );
}
//.........这里部分代码省略.........
示例15: 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&task=manageConnections' . getCBprofileItemid(), false ), $error, 'error' );
} else {
cbRedirect( cbSef( 'index.php?option=com_comprofiler&task=manageConnections' . getCBprofileItemid(), false ),
( is_array($connectionids) ) ? _UE_CONNECTIONACTIONSSUCCESSFULL : null );
}
return;
}