本文整理汇总了PHP中isMember函数的典型用法代码示例。如果您正苦于以下问题:PHP isMember函数的具体用法?PHP isMember怎么用?PHP isMember使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了isMember函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
function __construct()
{
$this->sName = 'bottom';
$this->sDbTable = 'sys_menu_bottom';
$this->sCacheKey = 'sys_menu_bottom';
$this->aMenuInfo = array();
if (isMember()) {
$this->aMenuInfo['memberID'] = getLoggedId();
$this->aMenuInfo['memberNick'] = getNickName($this->aMenuInfo['memberID']);
$this->aMenuInfo['memberPass'] = getPassword($this->aMenuInfo['memberID']);
$this->aMenuInfo['memberLink'] = getProfileLink($this->aMenuInfo['memberID']);
$this->aMenuInfo['visible'] = 'memb';
} else {
$this->aMenuInfo['memberID'] = 0;
$this->aMenuInfo['memberNick'] = '';
$this->aMenuInfo['memberPass'] = '';
$this->aMenuInfo['memberLink'] = '';
$this->aMenuInfo['visible'] = 'non';
}
$this->aItems = array();
$this->oPermalinks = new BxDolPermalinks();
}
示例2: admFuncVariableIsValid
* 5 - Frage, ob Zugangsdaten geschickt werden soll
* 6 - Frage, ob Mitglied geloescht werden soll
* usr_id : Id des Benutzers, der bearbeitet werden soll
*
*****************************************************************************/
require_once '../../system/common.php';
require_once '../../system/login_valid.php';
// Initialize and check the parameters
$getUserId = admFuncVariableIsValid($_GET, 'usr_id', 'numeric', array('requireValue' => true));
$getMode = admFuncVariableIsValid($_GET, 'mode', 'numeric', array('requireValue' => true));
// nur berechtigte User duerfen Funktionen aufrufen
if (!$gCurrentUser->editUsers()) {
$gMessage->show($gL10n->get('SYS_NO_RIGHTS'));
}
// nun erst einmal allgemein pruefen, ob der User zur aktuellen Orga gehoert
if (isMember($getUserId)) {
$this_orga = true;
} else {
$this_orga = false;
}
if ($getMode != 1) {
// pruefen, ob der User noch in anderen Organisationen aktiv ist
$sql = 'SELECT rol_id
FROM ' . TBL_ROLES . ', ' . TBL_MEMBERS . ', ' . TBL_CATEGORIES . '
WHERE rol_valid = 1
AND rol_cat_id = cat_id
AND cat_org_id <> ' . $gCurrentOrganization->getValue('org_id') . '
AND mem_rol_id = rol_id
AND mem_begin <= \'' . DATE_NOW . '\'
AND mem_end > \'' . DATE_NOW . '\'
AND mem_usr_id = ' . $getUserId;
示例3: _getAuthorPassword
function _getAuthorPassword()
{
return !isMember() ? '' : $_COOKIE['memberPassword'];
}
示例4: isAllowedApprove
function isAllowedApprove($isPerformAction = false)
{
if ($this->isAdmin()) {
return true;
}
if (isMember() == false) {
return false;
}
$this->_defineActions();
$aCheck = checkAction($this->_iVisitorID, BX_BLOG_POSTS_APPROVING, $isPerformAction);
return $aCheck[CHECK_ACTION_RESULT] == CHECK_ACTION_RESULT_ALLOWED;
}
示例5: getProfileViewActions
function getProfileViewActions($iProfileId, $bDynamic = false)
{
global $oTemplConfig;
$iProfileId = (int) $iProfileId;
if (!$iProfileId) {
return '';
}
$aProfileInfo = getProfileInfo($iProfileId);
if (empty($aProfileInfo)) {
return '';
}
$iViewerId = getLoggedId();
// prepare all needed keys
$aConfig = array('url' => BX_DOL_URL_ROOT, 'anonym_mode' => '', 'member_id' => $iViewerId, 'member_pass' => getPassword($iViewerId));
$aMainKeys = array('cpt_edit', 'cpt_send_letter', 'cpt_fave', 'cpt_befriend', 'cpt_remove_friend', 'cpt_get_mail', 'cpt_share', 'cpt_report', 'cpt_block', 'cpt_unblock', 'cpt_activate', 'cpt_ban', 'cpt_delete', 'cpt_delete_spam', 'cpt_feature', 'act_activate', 'act_ban', 'act_feature');
$aMain = array_fill_keys($aMainKeys, '');
if (isMember($iViewerId)) {
$aMain['cpt_edit'] = _t('_EditProfile');
$aMain['cpt_send_letter'] = _t('_SendLetter');
$aMain['cpt_fave'] = _t('_Fave');
$aMain['cpt_remove_fave'] = _t('_Remove Fave');
$aMain['cpt_befriend'] = _t('_Befriend');
$aMain['cpt_remove_friend'] = _t('_Remove friend');
$aMain['cpt_get_mail'] = _t('_Get E-mail');
$aMain['cpt_share'] = $this->isAllowedShare($this->_aProfile) ? _t('_Share') : '';
$aMain['cpt_report'] = _t('_Report Spam');
$aMain['cpt_block'] = _t('_Block');
$aMain['cpt_unblock'] = _t('_Unblock');
}
if (isAdmin($iViewerId) || isModerator($iViewerId) and $iViewerId != $iProfileId) {
$sMsgKeyStart = '_adm_btn_mp_';
// delete
$aMain['cpt_delete'] = _t($sMsgKeyStart . 'delete');
// delete spam
$aMain['cpt_delete_spam'] = _t($sMsgKeyStart . 'delete_spammer');
// activate / deactivate
$sTypeActiv = 'activate';
if ($aProfileInfo['Status'] == 'Active') {
$sTypeActiv = 'de' . $sTypeActiv;
}
$aMain['cpt_activate'] = _t($sMsgKeyStart . $sTypeActiv);
$aMain['act_activate'] = $sTypeActiv;
// ban / unban
$sTypeBan = 'ban';
if (isLoggedBanned($aProfileInfo['ID'])) {
$sTypeBan = 'un' . $sTypeBan;
}
$aMain['cpt_ban'] = _t($sMsgKeyStart . $sTypeBan);
$aMain['act_ban'] = $sTypeBan;
// feature / unfeature
$sTypeFeat = 'featured';
$aMain['cpt_feature'] = _t('_Feature it');
if ((int) $aProfileInfo['Featured']) {
$sTypeFeat = 'un' . $sTypeFeat;
$aMain['cpt_feature'] = _t('_De-Feature it');
}
$aMain['act_feature'] = $sTypeFeat;
}
//--- Subscription integration ---//
$oSubscription = BxDolSubscription::getInstance();
$sAddon = $oSubscription->getData($bDynamic);
$aButton = $oSubscription->getButton($iViewerId, 'profile', '', $iProfileId);
$aMain['sbs_profile_title'] = $aButton['title'];
$aMain['sbs_profile_script'] = $aButton['script'];
//--- Subscription integration ---//
$aCheckGreet = checkAction(getLoggedId(), ACTION_ID_SEND_VKISS);
$aMain['cpt_greet'] = $aCheckGreet[CHECK_ACTION_RESULT] == CHECK_ACTION_RESULT_ALLOWED ? _t('_Greet') : '';
$aMain = array_merge($aProfileInfo, $aConfig, $aMain);
return $sAddon . $this->genObjectsActions($aMain, 'Profile');
}
示例6: actionIndex
function actionIndex()
{
$sMenu = "";
if (isMember()) {
$sLink = BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'post/';
$sCaption = _t('_feedback_lcaption_post');
$sMenu = BxDolPageView::getBlockCaptionMenu(mktime(), array('fdb_post' => array('href' => $sLink, 'title' => $sCaption)));
}
$sContent = $this->serviceArchiveBlock();
$aParams = array('index' => 2, 'css' => array('view.css', 'cmts.css'), 'title' => array('page' => _t('_feedback_pcaption_all'), 'block' => _t('_feedback_bcaption_view_all')), 'content' => array('page_menu_code' => $sMenu, 'page_main_code' => $sContent));
$this->_oTemplate->getPageCode($aParams);
}
示例7: session_start
<?php
include 'header.php';
require_once "util/Conexao.class.php";
require_once "util/funcoes.php";
if (session_status() != PHP_SESSION_ACTIVE) {
session_start();
}
$codGrupo = $_GET['codGrupo'];
$lista = $_GET['lista'];
$id = $_GET['id'];
if (!isMember($codGrupo)) {
?>
<div class="container" id="conteudo">
<p>Você não tem permissão para acessar essa página</p>
</div>
<?php
} else {
$conexao = new Conexao();
$colunas2 = array("LIS_GRU_CODIGO");
$data2 = $conexao->select("lista", $colunas2, "WHERE LIS_CODIGO = {$lista}");
if (count($data2) <= 0) {
?>
<div class="container" id='conteudo'>
<div class="alert alert-danger"><i class="fa fa-times"></i>Grupo ou item inexistente!</div>
<a href="/dashboard/" class="btn btn-default">Voltar</a>
</div>
<?php
} else {
$colunas = array("itens_lista.*");
$dados = $conexao->select("itens_lista", $colunas, "WHERE ITE_LIS_CODIGO = {$id}")[0];
示例8: define
//"news" - as above, but the forum is listed by original posting date (descending), not last-reply date
//"posts" - only users in "mods.txt" / "members.txt" can start threads or reply
define('FORUM_LOCK', trim(@file_get_contents('locked.txt')));
//get the list of moderators:
//(`file` returns NULL if the file doesn’t exist; casting that to an array creates an array with a blank element, and
// `array_filter` removes blank elements, including blank lines in the text file; we could use the `FILE_SKIP_EMPTY_LINES`
// flag, but `array_filter` kills two birds with one stone since we don’t have to check if the file exists beforehand.)
$MODS = array('GLOBAL' => array_filter((array) @file(FORUM_ROOT . DIRECTORY_SEPARATOR . 'mods.txt', FILE_IGNORE_NEW_LINES)), 'LOCAL' => PATH ? array_filter((array) @file('mods.txt', FILE_IGNORE_NEW_LINES)) : array());
//get the list (if any) of users allowed to access this current forum
$MEMBERS = array_filter((array) @file('members.txt', FILE_IGNORE_NEW_LINES));
//is the current user the site admin? (first name in the root 'mods.txt')
define('IS_ADMIN', AUTH && isAdmin(NAME));
//is the current user a moderator in this forum?
define('IS_MOD', AUTH && isMod(NAME));
//is the current user a member of this forum?
define('IS_MEMBER', AUTH && isMember(NAME));
/* theme & translation
====================================================================================================================== */
/* load the theme configuration
---------------------------------------------------------------------------------------------------------------------- */
//shorthand to the server-side location of the particular theme folder (this gets used a lot)
define('THEME_ROOT', FORUM_ROOT . DIRECTORY_SEPARATOR . 'themes' . DIRECTORY_SEPARATOR . FORUM_THEME . DIRECTORY_SEPARATOR);
//load the theme-specific functions
@(include THEME_ROOT . 'theme.php') or (require FORUM_LIB . 'error_theme.php');
//load the user’s theme configuration, if it exists
@(include THEME_ROOT . 'theme.config.php');
//include the theme defaults
@(include THEME_ROOT . 'theme.config.default.php') or (require FORUM_LIB . 'error_configtheme.php');
/* load translations and select one
---------------------------------------------------------------------------------------------------------------------- */
//include the language translations
示例9: str_replace
$emailTemplate = str_replace('#receiver#', $receiverName, $emailTemplate);
// prepare body of email with note of sender and homepage
$email->setSenderInText($postName, $receiverName);
// set Text
$email->setText($emailTemplate);
// finally send the mail
$sendResult = $email->sendEmail();
} else {
// if $postTo is not an Array, it is send from the hidden field.
if (!is_array($postTo)) {
$postTo = array($postTo);
}
// get user data from Database
$user = new User($gDb, $gProfileFields, $postTo[0]);
// check if it is allowed to send to this user
if (!$gCurrentUser->editUsers() && !isMember($user->getValue('usr_id')) || $user->getValue('usr_id') === '') {
$gMessage->show($gL10n->get('SYS_USER_ID_NOT_FOUND'));
}
// check if receiver of message has valid login
if ($user->getValue('usr_login_name') === '') {
$gMessage->show($gL10n->get('SYS_FIELD_EMPTY', $gL10n->get('SYS_TO')));
}
// save page in navigation - to have a check for a navigation back.
$gNavigation->addUrl(CURRENT_URL);
if ($getMsgId == 0) {
$PMId2 = 1;
$sql = "INSERT INTO " . TBL_MESSAGES . " (msg_type, msg_subject, msg_usr_id_sender, msg_usr_id_receiver, msg_timestamp, msg_read)\n VALUES ('" . $getMsgType . "', '" . $postSubjectSQL . "', '" . $gCurrentUser->getValue('usr_id') . "', '" . $postTo[0] . "', CURRENT_TIMESTAMP, '1')";
$gDb->query($sql);
$getMsgId = $gDb->lastInsertId();
} else {
$PMId2 = $message->countMessageParts() + 1;
示例10: getMenuInfo
function getMenuInfo()
{
global $p_arr;
$aSiteUrl = parse_url(BX_DOL_URL_ROOT);
$this->sRequestUriFile = htmlspecialchars_adv(substr($_SERVER['REQUEST_URI'], strlen($aSiteUrl['path'])));
$this->sSelfFile = htmlspecialchars_adv(substr(bx_html_attribute($_SERVER['PHP_SELF']), strlen($aSiteUrl['path'])));
if (isMember()) {
$this->aMenuInfo['memberID'] = (int) $_COOKIE['memberID'];
$this->aMenuInfo['memberNick'] = getNickName($this->aMenuInfo['memberID']);
$this->aMenuInfo['memberLink'] = getProfileLink($this->aMenuInfo['memberID']);
$this->aMenuInfo['visible'] = 'memb';
} else {
$this->aMenuInfo['memberID'] = 0;
$this->aMenuInfo['memberNick'] = '';
$this->aMenuInfo['memberLink'] = '';
$this->aMenuInfo['visible'] = 'non';
}
// if profile ID is not defined yet by script (using setCurrentProfileID)
if (empty($this->aMenuInfo['profileID'])) {
//get viewed profile ID (cherez jopu)
$selfFile = basename($_SERVER['PHP_SELF']);
if (isset($p_arr) and isset($p_arr['ID'])) {
$iProfileID = (int) $p_arr['ID'];
} elseif ($selfFile == 'browseMedia.php') {
$iProfileID = (int) $_GET['userID'];
} elseif ($selfFile == 'viewFriends.php') {
$iProfileID = (int) $_GET['iUser'];
} elseif (isset($_REQUEST['iUser'])) {
$iProfileID = (int) $_REQUEST['iUser'];
} elseif (isset($_REQUEST['userID'])) {
$iProfileID = (int) $_REQUEST['userID'];
} elseif (isset($_REQUEST['profileID'])) {
$iProfileID = (int) $_REQUEST['profileID'];
} elseif (isset($_REQUEST['ownerID'])) {
$iProfileID = (int) $_REQUEST['ownerID'];
} else {
$iProfileID = 0;
}
$this->setCurrentProfileID($iProfileID);
}
// detect current menu
$this->aMenuInfo['currentCustom'] = -1;
$this->aMenuInfo['currentTop'] = 0;
$this->aMenuInfo['currentTopLink'] = 0;
$aPossibleItems = array();
foreach ($this->aTopMenu as $iItemID => $aItem) {
if ($aItem['Type'] == 'top' and $this->aMenuInfo['currentTop'] and $this->aMenuInfo['currentTop'] != $iItemID) {
break;
} else {
$this->aMenuInfo['currentTopLink'] = $aItem['Link'];
$aItemUris = explode('|', $aItem['Link']);
foreach ($aItemUris as $sItemUri) {
if (empty($this->aMenuInfo['memberID'])) {
unset($this->aMenuInfo['memberID']);
unset($this->aMenuInfo['memberNick']);
unset($this->aMenuInfo['memberLink']);
}
if (empty($this->aMenuInfo['profileID'])) {
unset($this->aMenuInfo['profileID']);
unset($this->aMenuInfo['profileNick']);
unset($this->aMenuInfo['profileLink']);
}
foreach ($this->aMenuInfo as $k => $v) {
$sItemUri = str_replace('{' . $k . '}', $v, $sItemUri);
}
$sItemUriPermalink = $this->oPermalinks->permalink($sItemUri);
if (0 == strcasecmp($sItemUri, $this->sRequestUriFile) || 0 == strcasecmp($sItemUriPermalink, $this->sRequestUriFile) || 0 == strncasecmp(rawurldecode($this->sRequestUriFile), $sItemUri, strlen($sItemUri)) || 0 == strncasecmp($this->sRequestUriFile, $sItemUriPermalink, strlen($sItemUriPermalink))) {
if (isset($aPossibleItems[$sItemUriPermalink]) && $aPossibleItems[$sItemUriPermalink]['Type'] == "custom" && $aItem['Type'] == "top") {
continue;
}
$aItem['ID'] = $iItemID;
$aPossibleItems[$sItemUriPermalink] = $aItem;
}
}
}
}
$aPossibleItemsKeys = array_keys($aPossibleItems);
if (!empty($aPossibleItemsKeys)) {
$sMaxUri = $aPossibleItemsKeys[0];
for ($i = 1; $i < count($aPossibleItemsKeys); $i++) {
if (strlen($aPossibleItemsKeys[$i]) > strlen($sMaxUri)) {
$sMaxUri = $aPossibleItemsKeys[$i];
}
}
}
if (count($aPossibleItems) > 0) {
$aItem = $aPossibleItems[$sMaxUri];
if ($aItem['Type'] == 'custom') {
$this->aMenuInfo['currentCustom'] = $aItem['ID'];
$this->aMenuInfo['currentTop'] = (int) $aItem['Parent'];
$this->aMenuInfo['currentTopName'] = (int) $aItem['Parent'];
} else {
//top or system
if ($this->aMenuInfo['currentTop'] and $this->aMenuInfo['currentTop'] != $aItem['ID']) {
} else {
$this->aMenuInfo['currentTop'] = $aItem['ID'];
}
}
}
// if( $this->aMenuInfo['currentCustom'] )
//.........这里部分代码省略.........
示例11: getBlockCode_LoginSection
function getBlockCode_LoginSection($iBlockID, $sParams = '')
{
$sDolUrl = BX_DOL_URL_ROOT;
$sAdminUrl = BX_DOL_URL_ADMIN;
$sAdminPanelC = _t('_Admin Panel');
$sLogoutC = _t('_Log Out');
$sControlPanelC = _t('_Control Panel');
$sHelloMemberC = _t('_Hello member', getNickName($this->iMemberID));
$ret = '';
if (isAdmin()) {
$ret .= <<<EOF
<div class="logged_section_block">
<span><a href="{$sAdminUrl}index.php" class="logout">{$sAdminPanelC}</a></span>
<span> | | </span>
<span><a href="{$sDolUrl}logout.php?action=admin_logout" class="logout">{$sLogoutC}</a></span>
</div>
EOF;
} elseif (isMember()) {
$sMemberIcon = get_member_icon($memberID, 'left');
$ret .= <<<EOF
<div class="logged_member_block">
{$sMemberIcon}
<div class="hello_member bx-def-margin-sec-left">
{$sHelloMemberC}<br />
<a href="{$sDolUrl}member.php" class="logout">{$sControlPanelC}</a>
<a href="{$sDolUrl}logout.php?action=member_logout" class="logout">{$sLogoutC}</a>
</div>
</div>
EOF;
} else {
return getMemberLoginFormCode('login_box_form', $sParams);
}
return '<div class="dbContent bx-def-bc-margin">' . $ret . '</div>';
}
示例12: getParam
$aProfileInfo['window_height'] = $oTemplConfig->popUpWindowHeight;
$aProfileInfo['anonym_mode'] = $oTemplConfig->bAnonymousMode;
$aProfileInfo['member_pass'] = $aMemberInfo['Password'];
$aProfileInfo['member_id'] = $iMemberId;
$bDisplayType = getParam('enable_new_dhtml_popups') == 'on' ? 0 : 1;
$aProfileInfo['display_type'] = $bDisplayType;
$aProfileInfo['url'] = BX_DOL_URL_ROOT;
$aProfileInfo['status_message'] = process_line_output($aProfileInfo['UserStatusMessage']);
//--- Subscription integration ---//
$oSubscription = new BxDolSubscription();
$aButton = $oSubscription->getButton($iMemberId, 'profile', '', $iProfId);
$aProfileInfo['sbs_profile_title'] = $aButton['title'];
$aProfileInfo['sbs_profile_script'] = $aButton['script'];
//--- Subscription integration ---//
//--- Check for member/non-member ---//
if (isMember()) {
$aProfileInfo['cpt_edit'] = _t('_EditProfile');
$aProfileInfo['cpt_send_letter'] = _t('_SendLetter');
$aProfileInfo['cpt_fave'] = _t('_Fave');
$aProfileInfo['cpt_befriend'] = _t('_Befriend');
$aProfileInfo['cpt_remove_friend'] = _t('_Remove friend');
$aProfileInfo['cpt_greet'] = _t('_Greet');
$aProfileInfo['cpt_get_mail'] = _t('_Get E-mail');
$aProfileInfo['cpt_share'] = _t('_Share');
$aProfileInfo['cpt_report'] = _t('_Report Spam');
$aProfileInfo['cpt_block'] = _t('_Block');
$aProfileInfo['cpt_unblock'] = _t('_Unblock');
} else {
$aProfileInfo['cpt_edit'] = '';
$aProfileInfo['cpt_send_letter'] = '';
$aProfileInfo['cpt_fave'] = '';
示例13: getViewerType
function getViewerType()
{
$iViewerType = BX_TD_VIEWER_TYPE_VISITOR;
if (isAdmin()) {
$iViewerType = BX_TD_VIEWER_TYPE_ADMIN;
} else {
if (isMember()) {
$iViewerType = BX_TD_VIEWER_TYPE_MEMBER;
}
}
return $iViewerType;
}
示例14: mysqli_query
mysqli_query($link, $addnewuserquery);
$_SESSION['id'] = mysqli_insert_id($link);
$array = getaddress($_POST['registeraddress']);
insertWaitingList($link, $_SESSION['id'], getBlockId($link, $array[1], $array[2]));
//echo getBlockId($link,$array[1],$array[2]);
header("Location:NotMemberYet.php");
}
}
}
if ($_POST['submit'] == "Log in") {
date_default_timezone_set("America/New_York");
$lastaccesstime = date("Y-m-d H:i:s");
$loginquery = "SELECT * FROM User WHERE Email='" . $_POST['loginemail'] . "' AND Password='" . $_POST['loginpassword'] . "'";
$loginresult = mysqli_query($link, $loginquery);
$rows = mysqli_fetch_array($loginresult);
if ($rows) {
$_SESSION['id'] = $rows['UserId'];
$_SESSION['blockid'] = $rows['BlockId'];
$updatelastaccesstime = "UPDATE User SET LastAccessTime='" . $lastaccesstime . "'WHERE UserId='" . $_SESSION['id'] . "' ";
mysqli_query($link, $updatelastaccesstime);
if (isMember($link, $_SESSION['id'])) {
header('Location:message.php');
} else {
header('Location:NotMemberYet.php');
}
//Redirect to logged in page
} else {
$error = "We could not find a user with that email and password!";
}
}
}
示例15: group_print_summary
function group_print_summary($requestID)
{
global $db, $main_smarty, $the_template;
if (!is_numeric($requestID)) {
die;
}
$index = 0;
$group = $db->get_row("SELECT group_id,group_creator, group_status, group_members, group_date, group_name, group_safename, group_description, group_privacy, group_avatar FROM " . table_groups . " WHERE group_id = {$requestID}");
if ($group) {
$group_id = $group->group_id;
$group_name = $group->group_name;
$group_safename = $group->group_safename;
$group_description = $group->group_description;
$group_creator = $group->group_creator;
$group_status = $group->group_status;
$group_members = $group->group_members;
$group_date = $group->group_date;
$group_privacy = $group->group_privacy;
$group_avatar = $group->group_avatar;
//$group_date = date('M j, Y', $group->group_date);
$date = $db->get_var(" SELECT DATE_FORMAT(group_date, '%b, %e %Y') from " . table_groups . " WHERE group_id = {$group->group_id}");
//echo $date;
$group_date = $date;
//smarty variables
$main_smarty->assign('group_id', $group_id);
$main_smarty->assign('group_name', $group_name);
$main_smarty->assign('group_safename', $group_safename);
$main_smarty->assign('group_description', $group_description);
$main_smarty->assign('group_creator', $group_creator);
$main_smarty->assign('group_status', $group_status);
$main_smarty->assign('group_privacy', $group_privacy);
$main_smarty->assign('group_avatar', $group_avatar);
$main_smarty->assign('group_date', $group_date);
//get group avatar path
if ($group_avatar == "uploaded") {
$imgsrc = my_base_url . my_pligg_base . "/avatars/groups_uploaded/" . $group_id . "_" . group_avatar_size_width . ".jpg";
} else {
$imgsrc = my_base_url . my_pligg_base . "/templates/" . $the_template . "/images/group_large.gif";
}
$main_smarty->assign('imgsrc', $imgsrc);
//get group creator and his url
$g_name = get_group_username($group_creator);
$main_smarty->assign('group_submitter', $g_name);
//$main_smarty->assign('submitter_profile_url', getmyurl('user', $g_name));
$submitter_profile_url = getmyurl('user', $g_name);
$main_smarty->assign('group_avatar_url', getmyurl('group_avatar', $group_id));
//check group admin
global $current_user;
if ($current_user->user_id == $group_creator) {
$main_smarty->assign('is_group_admin', 1);
}
//language
$lang_Created_By = $main_smarty->get_config_vars("PLIGG_Visual_Group_Created_By");
$lang_Created_On = $main_smarty->get_config_vars("PLIGG_Visual_Group_Created_On");
$lang_Member = $main_smarty->get_config_vars("PLIGG_Visual_Group_Member");
//check member
//include_once(mnminclude.'group.php');
$main_smarty->assign('is_group_member', isMember($group_id));
//joinig unjoining member link
$main_smarty->assign('join_group_url', getmyurl("join_group", $group_id));
$main_smarty->assign('unjoin_group_url', getmyurl("unjoin_group", $group_id));
//check logged or not
$main_smarty->assign('user_logged_in', $current_user->user_login);
//sidebar
$main_smarty = do_sidebar($main_smarty);
//$main_smarty->assign('form_action', $_SERVER["PHP_SELF"]);
$group_story_url = getmyurl("group_story_title", $group_safename);
$group_edit_url = getmyurl("editgroup", $group_id);
$group_delete_url = getmyurl("deletegroup", $group_id);
$group_output .= '<div class ="group_container">
<div class ="group_left">
<span>
<img src="' . $imgsrc . '" alt="group_avatar" />
</span>
</div>
<div class ="group_right">
<div class="toptitle"><a href="' . $group_story_url . '">' . $group_name . '</a></div>
<span class ="ls_created_by">' . $lang_Created_By . ' </span>
<a href="' . $submitter_profile_url . '">' . $g_name . '</a> ' . $lang_Created_On . ' ' . $group_date . '<br/>
' . $group_description . '<br/>
' . $lang_Member . ' : ' . $group_members . ($group_status == 'disable' ? "<br><button onclick='document.location=\"?approve={$group_id}\"'>Approve</button>" : "") . '
</div>
</div>';
$index++;
}
return $group_output;
}