} else { if ($group->isopenjoining == 'Y') { ?> <form id="joingroupform" name="joingroupform" action="" enctype="multipart/form-data" method="post"> <input type="hidden" id="groupid" name="groupid" value="<?php echo $groupid; ?> "> <input class="submitleft" type="submit" value="<?php echo $LNG->FORM_BUTTON_JOIN_GROUP; ?> " id="joingroup" name="joingroup"> </form> <?php } else { if ($group->isopenjoining == 'N' && !isGroupMember($groupid, $USER->userid) && !isGroupRejectedMember($groupid, $USER->userid) && !isGroupReportedMember($groupid, $USER->userid)) { ?> <form id="joingroupform" name="joingroupform" action="" enctype="multipart/form-data" method="post"> <input type="hidden" id="groupid" name="groupid" value="<?php echo $groupid; ?> "> <input class="mainfont active submitleft" style="white-space: normal;font-size:12pt; border: none; background: transparent" type="submit" value="<?php echo $LNG->FORM_BUTTON_JOIN_GROUP_CLOSED; ?> " id="joingroup" name="joingroup"><?php echo $LNG->GROUP_JOIN_GROUP; ?> </input> </form> <?php
echo $LNG->FORM_IDEA_MERGE_LABEL_TITLE; ?> " id="mergeidea" name="mergeidea" value="" /> <button <?php if (!isset($USER->userid) || isset($USER->userid) && isset($groupid) && $groupid != "" && !isGroupMember($groupid, $USER->userid)) { echo 'disabled'; } ?> class="submitleft" id="mergeidea" name="mergeidea" onclick="mergeSelectedNodes()"><?php echo $LNG->FORM_BUTTON_SUBMIT; ?> </button> </div> <div class="formrowsm"> <textarea <?php if (!isset($USER->userid) || isset($USER->userid) && isset($groupid) && $groupid != "" && !isGroupMember($groupid, $USER->userid)) { echo 'disabled'; } ?> rows="3" class="forminput hgrwide" placeholder="<?php echo $LNG->FORM_IDEA_MERGE_LABEL_DESC; ?> " id="mergeideadesc" name="mergeideadesc" value=""></textarea> </div> </div> </div> <?php } ?> <div id="tabber" style="clear:both;float:left; width:760px;display:none;">
function PageCompGroupActions() { global $memberID; global $groupID; global $arrGroup; global $site; global $dirGroups; global $logged; ob_start(); if ($logged['member']) { if (isGroupMember($memberID, $groupID, false)) { if (isGroupMember($memberID, $groupID)) { if ((int) $arrGroup['members_invite'] or $arrGroup['creatorID'] == $memberID) { genGroupActionBtn('Invite others', "group_actions.php?a=invite&ID={$groupID}"); } if ((int) $arrGroup['members_post_images'] or $arrGroup['creatorID'] == $memberID) { genGroupActionBtn('Upload image', "group_actions.php?a=upload&ID={$groupID}"); genGroupActionBtn('Upload files', "group_actions.php?a=uploadFile&ID={$groupID}"); } genGroupActionBtn('Post topic', "{$dirGroups}orca/?action=goto&forum_id={$groupID}#action=goto&new_topic={$groupID}"); } if ($arrGroup['creatorID'] == $memberID) { genGroupActionBtn('Edit group', "group_edit.php?ID={$groupID}"); } else { genGroupActionBtn('Resign group', "group_actions.php?a=resign&ID={$groupID}", true); } } else { genGroupActionBtn('Join group', "group_actions.php?a=join&ID={$groupID}", true); } } return ob_get_clean(); }
} else { $memberID = 0; $logged['admin'] = member_auth(1, false); } $groupID = (int) $_REQUEST['ID']; if (!$groupID) { Header("Location: {$site['url']}groups_home.php"); exit; } $bcd = getParam('breadCrampDivider'); $_page['header_text'] = _t("_Group members"); $_page['header'] = _t("_Group members"); $_ni = $_page['name_index']; if ($arrGroup = getGroupInfo($groupID)) { $arrGroup['Name_html'] = htmlspecialchars_adv($arrGroup['Name']); if ((int) $arrGroup['hidden_group'] and !isGroupMember($memberID, $groupID) and !$logged['admin']) { $_page_cont[$_ni]['page_main_code'] = _t("_You cannot view group members while not a group member"); } else { if ($arrGroup['status'] == 'Active' or $arrGroup['creatorID'] == $memberID or $logged['admin']) { $_page['header'] = _t("_Group members"); PageCompMainCode(); } else { $_page['name_index'] = 0; $_page['header'] = _t("_Group is suspended"); $_page['header_text'] = _t("_Group is suspended"); $_page_cont[0]['page_main_code'] = _t("_Sorry, group is suspended"); } } } else { $_page_cont[$_ni]['page_main_code'] = _t("_Group not found_desc"); }
} } } } } $groupid = optional_param("groupid", "", PARAM_ALPHANUMEXT); // try and get the groupid from the node if ($groupid == "" && isset($node->groups)) { $groups = $node->groups; // there should only be one group per node. if (count($groups) > 0) { $groupid = $groups[0]->groupid; } } $canAdd = false; if (isset($USER->userid) && isset($groupid) && isGroupMember($groupid, $USER->userid)) { $canAdd = true; } else { if (isset($USER->userid) && (!isset($groupid) || $groupid == "")) { $canAdd = true; } } if (isset($groupid) && $groupid != "") { $group = getGroup($groupid); //getGroup does not return group properties apart from its members if ($group instanceof Error) { echo "<h1>Group not found</h1>"; include_once "includes/footerembed.php"; die; } else { $userset = $group->members;
/* * assign the group keywords */ $tpl->assign('group_keywords', $group_keywords); error_log("istanbul guzeldir - 1"); /* * Set the authentication variables if this is an * authenticated user */ if ($access_isAuthenticated) { // $access_name = $access->getName(); // put user name if he/she is auth'd if (isGroupAdmin()) { $access_isGroupMember = true; $access_isGroupAdmin = true; } else { $access_isGroupMember = isGroupMember(); } } $defmod = "people"; $function = "people"; if (isset($_GET['function'])) { $function = strtolower($_GET['function']); } $num_of_modules = 0; $num_of_modules += intval($allow_wiki); $num_of_modules += intval($allow_talks); $no_menu = false; if ($num_of_modules == 1) { $no_menu = true; } $tpl->assign('no_menu', $no_menu);
$msg_text = addslashes($msg_text); db_res("INSERT INTO `Messages`\r\n\t\t\t\t\t\t\t( `Date`, `Sender`, `Recipient`, `Subject`, `Text`, `New` )\r\n\t\t\t\t\t\t\tVALUES ( NOW(), {$memberID}, {$mem}, '{$msg_subj}', '{$msg_text}', '1' )"); } else { $_page['header'] = _t("_Group member reject error"); $_page['header_text'] = _t("_Group member reject error"); $_page_cont[$_ni]['page_main_code'] = _t("_Some error occured"); } } } else { $_page['header'] = _t("_Group member reject error"); $_page['header_text'] = _t("_Group member reject error"); $_page_cont[$_ni]['page_main_code'] = _t("_You cannot reject group member because you are not group creator"); } break; case 'invite': if ((int) $arrGroup['members_invite'] and isGroupMember($memberID, $groupID) or $arrGroup['creatorID'] == $memberID) { if ($_REQUEST['do_submit']) { $_page['header'] = _t("_Group invite"); $_page['header_text'] = _t("_Group invite"); $arrInvites = $_REQUEST['invites']; if ($arrInvites) { foreach ($arrInvites as $i => $iMemID) { $arrInvites[$i] = (int) $iMemID; if (!$arrInvites[$i]) { unset($arrInvites[$i]); } } $arrInvites = array_unique($arrInvites); foreach ($arrInvites as $iMemID) { sendGroupInvite($groupID, $iMemID); }
/** * page code function */ function PageCompMainCode() { global $memberID; global $groupID; global $arrGroup; global $site; global $bcd; $breadCrumbs = <<<EOJ \t\t<div class="groups_breadcrumbs"> \t\t\t<a href="{$site['url']}">{$site['title']}</a> {$bcd} \t\t\t<a href="{$site['url']}groups_home.php">__Groups__</a> {$bcd} \t\t\t<a href="{$site['url']}group.php?ID={$groupID}">{$arrGroup['Name_html']}</a> {$bcd} \t\t\t<span class="active_link">__Group gallery__</span> \t\t</div> EOJ; $breadCrumbs = str_replace("__Groups__", _t("_Groups"), $breadCrumbs); $breadCrumbs = str_replace("__Group gallery__", _t("_Group gallery"), $breadCrumbs); ob_start(); echo $breadCrumbs; $query = "\r\n\t\tSELECT\r\n\t\t\t`GroupsGallery`.*,\r\n\t\t\t`NickName`\r\n\t\tFROM `GroupsGallery`\r\n\t\tLEFT JOIN `Profiles`\r\n\t\tON ( `by`=`Profiles`.`ID` )\r\n\t\tWHERE `groupID`={$groupID}\r\n\t\tORDER BY `GroupsGallery`.`ID`\r\n\t\t"; $resPics = db_res($query); ?> <div class="group_gallery_wrapper"> <div class="clear_both"></div> <?php while ($arrPic = mysql_fetch_assoc($resPics)) { ?> <div class="group_gallery_pic" style=""> <a href="<?php echo "{$site['groups_gallery']}{$arrPic['groupID']}_{$arrPic['ID']}_{$arrPic['seed']}.{$arrPic['ext']}"; ?> " title="<?php echo _t('_Uploaded by') . ' ' . htmlspecialchars_adv($arrPic['NickName']); ?> " onclick="window.open(this.href, '_blank', 'width=<?php echo $arrPic['width'] + 20; ?> ,height=<?php echo $arrPic['height'] + 20; ?> ');return false;"> <img src="<?php echo "{$site['groups_gallery']}{$arrPic['groupID']}_{$arrPic['ID']}_{$arrPic['seed']}_.{$arrPic['ext']}"; ?> " width="<?php echo $arrPic['width_']; ?> " height="<?php echo $arrPic['height_']; ?> "/> </a> <?php if ($arrGroup['thumb'] != $arrPic['ID'] and $arrGroup['creatorID'] == $memberID) { ?> <br /> <a href="<?php echo "{$site['url']}group_actions.php?ID={$groupID}&a=def&img={$arrPic['ID']}"; ?> " class="group_set_thumb"><?php echo _t('_Set as thumbnail'); ?> </a> <?php } if ($arrGroup['creatorID'] == $memberID or $arrPic['by'] == $memberID) { ?> <br /> <a href="<?php echo "{$site['url']}group_actions.php?ID={$groupID}&a=delimg&img={$arrPic['ID']}"; ?> " class="group_set_thumb" onclick="return confirm('<?php echo _t('_Are you sure want to delete this image?'); ?> ');"><?php echo _t('_Delete image'); ?> </a> <?php } ?> </div> <?php } ?> <div class="clear_both"></div> </div> <?php if ((int) $arrGroup['members_post_images'] and isGroupMember($memberID, $groupID) or $arrGroup['creatorID'] == $memberID) { ?> <a href="<?php echo "{$site['url']}group_actions.php?a=upload&ID={$groupID}"; ?> " class="actions"><?php echo _t('_Upload image'); ?> </a> <?php } return ob_get_clean(); }
function GenGroupMainPage($iGroupID, $iMemberID) { global $logged; global $site; global $aPreValues; //$bPermalink = getParam('permalinks_groups') == 'on' ? true : false; //ret vals $iNameIndex = 71; $sHeader = ''; $sHeaderT = ''; $sMainCode = ''; $sGrpBrd = ''; $sGrpLCat = ''; $sGrpLCreated = ''; $sGrpLLocation = ''; $sGrpLMemberCount = ''; $sGrpLCreator = ''; $sGrpLAbout = ''; $sGrpLType = ''; $sGrpLTypeHelp = ''; $sGrpVImage = ''; $sGrpVGalLink = ''; $sGrpVCreatorThumb = ''; $sGrpVCreatorLink = ''; $sGrpVCat = ''; $sGrpVCatLink = ''; $sGrpVType = ''; $sGrpVCreated = ''; $sGrpVCountry = ''; $sGrpVCity = ''; $sGrpVMCount = ''; $sGrpVAbout = ''; $sGrpVDesc = ''; $sGrpVStatus = ''; $sGrpVActions = ''; $sGrpVMembers = ''; $sGrpVForum = ''; $date_format_php = getParam('php_date_format'); if (!($aGroupInfo = $this->getGroupInfo($iGroupID))) { $iNameIndex = 0; $sHeader = _t("_Group not found"); $sHeaderT = _t("_Group not found"); $sMainCode = _t("_Group not found_desc"); } else { if ((int) $aGroupInfo['hidden_group'] and !isGroupMember($iMemberID, $iGroupID) and !$logged['admin']) { $iNameIndex = 0; $sHeader = _t("_Group is hidden"); $sHeaderT = _t("_Group is hidden"); $sMainCode = _t("_Sorry, group is hidden"); } else { if ($aGroupInfo['status'] == 'Active' or $aGroupInfo['creatorID'] == $iMemberID or $logged['admin']) { $aGroupInfo['Name_html'] = htmlspecialchars_adv($aGroupInfo['Name']); $sGroupsUrl = $this->bUseFriendlyLinks ? 'groups/all' : $this->sCurrFile; $sBreadCrumbs = <<<EOJ <div class="groups_breadcrumbs"> \t<a href="{$site['url']}">{$site['title']}</a> / \t<a href="{$site['url']}{$sGroupsUrl}">__Groups__</a> / \t<span class="active_link">{$aGroupInfo['Name_html']}</span> </div> EOJ; $sBreadCrumbs = str_replace("__Groups__", _t("_Groups"), $sBreadCrumbs); $sHeader = "{$site['title']} / " . _t("_Groups") . " / {$aGroupInfo['Name_html']}"; $sHeaderT = $aGroupInfo['Name_html']; //$_page_cont[$_ni]['groups_breadcrumbs'] = $sBreadCrumbs; $sGrpBrd = $sBreadCrumbs; // begin group info if ((int) $aGroupInfo['hidden_group']) { $typeHelp = 7; } else { if ((int) $aGroupInfo['open_join']) { $typeHelp = 5; } else { $typeHelp = 6; } } $typeHelpLink = "{$site['url']}{$this->sCurrFile}?action=help&i={$typeHelp}"; // labels $sGrpLCat = _t("_Category"); //$_page_cont[$_ni]['category_l'] = _t( "_Category" ); $sGrpLCreated = _t("_Created"); //$_page_cont[$_ni]['created_l'] = _t( "_Created" ); $sGrpLLocation = _t("_Location"); //$_page_cont[$_ni]['location_l'] = _t( "_Location" ); $sGrpLMemberCount = _t("_Members count"); //$_page_cont[$_ni]['members_count_l'] = _t( "_Members count" ); $sGrpLCreator = _t("_Group creator"); //$_page_cont[$_ni]['group_creator_l'] = _t( "_Group creator" ); $sGrpLAbout = _t("_About group"); //$_page_cont[$_ni]['group_about_l'] = _t( "_About group" ); $sGrpLType = _t("_Group type"); //$_page_cont[$_ni]['group_type_l'] = _t( "_Group type" ); $sGrpLTypeHelp = '<a href="' . $typeHelpLink . '" target="_blank" onclick="window.open(this.href,\'helpwin\',\'width=350,height=200\');return false;" >' . _t("_help") . '</a>'; //$_page_cont[$_ni]['group_type_help'] = '<a href="'.$typeHelpLink.'" target="_blank" onclick="window.open(this.href,\'helpwin\',\'width=350,height=200\');return false;" >'._t( "_help" ).'</a>'; //info if ($aGroupInfo['thumb'] and file_exists($this->sGrpGalPath . "{$iGroupID}_{$aGroupInfo['thumb']}_{$aGroupInfo['seed']}_.{$aGroupInfo['thumbExt']}")) { $groupImageUrl = "{$site['groups_gallery']}{$iGroupID}_{$aGroupInfo['thumb']}_{$aGroupInfo['seed']}_.{$aGroupInfo['thumbExt']}"; } else { $groupImageUrl = "{$site['groups_gallery']}no_pic.gif"; } $arrMem = getProfileInfo($aGroupInfo['creatorID']); $creatorNick = $arrMem['NickName']; //<!--<img src=\"$groupImageUrl\" />--> //$_page_cont[$_ni]['group_image'] = <<<EOF $sGrpVImage = <<<EOF <a href="{$site['url']}{$this->sCurrFile}?action=gallery&ID={$iGroupID}"> \t<img src="{$this->sSpacerIcon}" style="width:110px;height:110px; background-image: url({$groupImageUrl});" class="photo1" alt="" /> </a> EOF; $sGrpVGalLink = "<a href=\"{$site['url']}{$this->sCurrFile}?action=gallery&ID={$iGroupID}\">" . _t("_Group gallery") . "</a>"; //$_page_cont[$_ni]['group_gallery_link'] = "<a href=\"{$site['url']}{$this->sCurrFile}?action=gallery&ID={$iGroupID}\">" . _t( "_Group gallery" ) . "</a>"; $sGrpVCreatorThumb = get_member_thumbnail($aGroupInfo['creatorID'], 'none'); //$_page_cont[$_ni]['group_creator_thumb'] = get_member_thumbnail( $aGroupInfo['creatorID'], 'none' ); $sGrpVCreatorLink = "<a href=\"{$site['url']}{$creatorNick}\">" . htmlspecialchars_adv($creatorNick) . "</a>"; //$_page_cont[$_ni]['group_creator_link'] = "<a href=\"{$site['url']}{$creatorNick}\">".htmlspecialchars_adv($creatorNick)."</a>"; $sGrpVCat = htmlspecialchars_adv($aGroupInfo['categName']); //$_page_cont[$_ni]['category'] = htmlspecialchars_adv( $aGroupInfo['categName'] ); $sCategUrl = $this->getGroupsCategUrl($aGroupInfo['categID'], $aGroupInfo['categUri']); $sGrpVCatLink = "<a href=\"{$sCategUrl}\">{$aGroupInfo['categName']}</a>"; //$_page_cont[$_ni]['category_link'] = "<a href=\"$sCategUrl\">{$aGroupInfo['categName']}</a>"; $sGrpVType = _t(((int) $aGroupInfo['open_join'] and !(int) $aGroupInfo['hidden_group']) ? '_Public group' : '_Private group'); //$_page_cont[$_ni]['group_type'] = _t( ( ( (int)$aGroupInfo['open_join'] and !(int)$aGroupInfo['hidden_group'] ) ? '_Public group' : '_Private group' ) ); $sGrpVCreated = date($date_format_php, strtotime($aGroupInfo['created'])); //$_page_cont[$_ni]['created'] = date( $date_format_php, strtotime( $aGroupInfo['created'] ) ); $sGrpVCountry = _t($aPreValues['Country'][$aGroupInfo['Country']]['LKey']); //$_page_cont[$_ni]['country'] = _t( $aPreValues['Country'][ $aGroupInfo['Country'] ]['LKey'] ); $sGrpVMCity = htmlspecialchars_adv($aGroupInfo['City']); //$_page_cont[$_ni]['city'] = htmlspecialchars_adv( $aGroupInfo['City'] ); $sGrpVMCount = $aGroupInfo['membersCount']; //$_page_cont[$_ni]['members_count'] = $aGroupInfo['membersCount']; $sGrpVAbout = htmlspecialchars_adv($aGroupInfo['About']); //$_page_cont[$_ni]['group_about'] = htmlspecialchars_adv( $aGroupInfo['About'] ); $sGrpVDesc = $aGroupInfo['Desc']; //no htmlspecialchars //$_page_cont[$_ni]['group_description'] = $aGroupInfo['Desc']; //no htmlspecialchars if ($aGroupInfo['status'] != 'Active') { //$_page_cont[$_ni]['group_status'] = _t( '_Group status' ) . ': ' . $sGrpVStatus = _t('_Group status') . ': ' . '<span style="color:red;font-weight:bold;">' . _t('_' . $aGroupInfo['status']) . '</span>' . " (<a href=\"{$site['url']}{$this->sCurrFile}?action=help&i=8\" target=\"_blank\" onclick=\"window.open(this.href,'helpwin','width=350,height=200');return false;\">" . _t("_Explanation") . "</a>)"; } else { //$_page_cont[$_ni]['group_status'] = ''; $sGrpVStatus = ''; } //end group info $sGrpVActions = $this->PCGroupActions($aGroupInfo, $iGroupID, $iMemberID); //$_page_cont[$_ni]['group_actions'] = $this->PCGroupActions($aGroupInfo); $sGrpVMembers = $this->PCGroupMembers($aGroupInfo, $iGroupID, $iMemberID); //$_page_cont[$_ni]['group_members'] = $this->PCGroupMembers($aGroupInfo); $sGrpVForum = $this->PCGroupForum($aGroupInfo, $iGroupID, $iMemberID); //$_page_cont[$_ni]['group_forum'] = $this->PCGroupForum(); } else { $iNameIndex = 0; $sHeader = _t("_Group is suspended"); $sHeaderT = _t("_Group is suspended"); $sMainCode = _t("_Sorry, group is suspended"); } } } return array($iNameIndex, $sHeader, $sHeaderT, $sMainCode, $sGrpBrd, $sGrpLCat, $sGrpLCreated, $sGrpLLocation, $sGrpLMemberCount, $sGrpLCreator, $sGrpLAbout, $sGrpLType, $sGrpLTypeHelp, $sGrpVImage, $sGrpVGalLink, $sGrpVCreatorThumb, $sGrpVCreatorLink, $sGrpVCat, $sGrpVCatLink, $sGrpVType, $sGrpVCreated, $sGrpVCountry, $sGrpVCity, $sGrpVMCount, $sGrpVAbout, $sGrpVDesc, $sGrpVStatus, $sGrpVActions, $sGrpVMembers, $sGrpVForum); }
cache_file('js' . DIR_SEP . 'jquery.js', method_retrieve("script_jquery")); $writing = ''; $writing .= method_retrieve('style_default'); $writing .= NEWLINE; $writing .= '$output = <<< OUTPUT'; $writing .= NEWLINE; $writing .= NEWLINE; $writing .= method_retrieve('style_html'); $writing .= NEWLINE; $writing .= NEWLINE; $writing .= 'OUTPUT;'; $writing .= NEWLINE; $writing .= 'echo $output;'; $writing .= NEWLINE; $writing .= NEWLINE; cache_file('style' . DIR_SEP . 'style.css', catch_output($writing)); } include CMS_FILE_INCLUDE; // Page load time output (won't load on Style.css stuff) if (function_exists('br') && function_exists('isGroupMember')) { if (isGroupMember(1) && constant_test('SETTING_PHP_VARIABLES', 'show')) { echo '<div class="container-fluid">'; echo PtimerStop(); echo catch_output(method_retrieve('cms_verbose')); echo '</div>'; } } // ************************** Clean ************************** // Keep the tmp folder clean of error logs //if (file_exists(CMS_ERROR_PHP)) unlink(CMS_ERROR_PHP); //if (file_exists(ini_get('error_log'))) unlink(ini_get('error_log'));
* @var string $fileVault The location of files. */ $fileVault = dirname(__FILE__) . '/../groups/files/'; if (!file_exists($fileVault) || !is_writable($fileVault)) { echo 'Config error, please check $fileVault.'; exit; } /** * functions... */ require_once dirname(__FILE__) . '/libs/functions.php'; /** * tfk_upload_files */ require_once dirname(__FILE__) . '/libs/tfk_upload_files.class.php'; if (isGroupMember($memberID, $groupID)) { if ($_SERVER['REQUEST_METHOD'] == 'GET') { $_page['header'] = _t("Upload a file to group"); $_page['header_text'] = _t("Upload a file to group"); $_page_cont[$_ni]['page_main_code'] = _t('This form allows you to attach files to this group.'); $content = '<br /><br />'; $content .= _t('Add to folder') . ':'; $upload = tfk_upload_files::factory($fileVault, $groupID, $memberID); $buckets = $upload->getBuckets('group'); $content .= '<select name="bucket">'; $content .= '<option value="">…</option>'; for ($x = 0; $x < count($buckets); $x++) { $content .= '<option value="' . $buckets[$x]['id'] . '">'; $content .= $buckets[$x]['name']; $content .= '</option>'; }
/** * page code function */ function PageCompMainCode() { global $memberID; global $groupID; global $arrGroup; global $site; global $bcd; global $bucketID; $bucketCrumb = ''; if (!empty($bucketID)) { $bucketCrumb .= "<a href=\"{$site['url']}group_files.php?ID={$groupID}\">__Group files__</a>"; $bucketCrumb .= " {$bcd} Bucket "" . $bucketID . '"'; } else { $bucketCrumb .= '<span class="active_link">__Group files__</span>'; } $breadCrumbs = <<<EOJ \t\t<div class="groups_breadcrumbs"> \t\t\t<a href="{$site['url']}">{$site['title']}</a> {$bcd} \t\t\t<a href="{$site['url']}groups_home.php">__Groups__</a> {$bcd} \t\t\t<a href="{$site['url']}group.php?ID={$groupID}">{$arrGroup['Name_html']}</a> {$bcd} {$bucketCrumb} \t\t</div> EOJ; $breadCrumbs = str_replace("__Groups__", _t("_Groups"), $breadCrumbs); $breadCrumbs = str_replace("__Group gallery__", _t("_Group gallery"), $breadCrumbs); ob_start(); echo $breadCrumbs; $query = "\r\n SELECT tbl1.*, tbl2.NickName\r\n FROM tfk_files AS tbl1, `Profiles` AS tbl2\r\n WHERE \r\n tbl1.parent_type = 'group'\r\n AND tbl1.parent_id = {$groupID}\r\n AND tbl1.member_id = tbl2.ID\r\n\t\t"; if (!empty($bucketID)) { $query .= " AND tbl1.bucket_id = " . $bucketID; } else { $query .= " AND (tbl1.bucket_id IS NULL OR tbl1.bucket_id = 0)"; } $resPics = db_res($query); ?> <div class="group_gallery_wrapper"> <div class="clear_both"></div> <?php while ($arrPic = mysql_fetch_assoc($resPics)) { $_file = "{$arrPic['parent_id']}_{$arrPic['id']}_{$arrPic['seed']}.{$arrPic['extension']}"; $_type = ''; switch (strtolower($arrPic['extension'])) { case 'jpg': case 'gif': case 'png': case 'bmp': $_type = _t('_Image'); break; case 'pdf': $_type = 'PDF'; break; case 'txt': $_type = 'text'; break; case 'mp3': $_type = _t('_Audio'); break; case 'zip': case 'tar': case 'gz': case 'bz2': case 'sit': case 'rar': $_type = _t('Archive'); break; default: $_type = _t('_Unknown'); break; } ?> <div class="group_gallery_pic" style=""> <?php echo $_type; ?> : <a href="/groups/files/<?php echo $_file; ?> "><?php echo substr($arrPic['realname'], 0, 15); ?> …</a><br /> (<?php echo _t('_Uploaded by') . ' ' . htmlspecialchars_adv($arrPic['NickName']); ?> ) <?php if ($arrGroup['creatorID'] == $memberID or $arrPic['by'] == $memberID) { ?> <br /> <a href="<?php echo "{$site['url']}group_actions.php?ID={$groupID}&a=delFile&img={$arrPic['id']}"; ?> " class="group_set_thumb" onclick="return confirm('<?php echo _t('_Are you sure want to delete this image?'); ?> ');"><?php echo _t('_Delete file'); ?> </a> <?php } ?> </div> <?php } if (empty($bucketID)) { ?> <div class="clear_both"></div> <?php require_once dirname(__FILE__) . '/_dwbn/libs/tfk_upload_files.class.php'; $upload = tfk_upload_files::factory($fileVault, $groupID, $memberID); $buckets = $upload->getBuckets('group'); //var_dump($buckets); foreach ($buckets as $bucket) { $_browse = $site['url'] . 'group_files.php?ID=' . $groupID; $_browse .= '&bucket=' . $bucket['id']; ?> <div class="group_gallery_pic" style=""> <?php echo '<a href="' . $_browse . '">' . $bucket['name']; ?> </a> </div> <?php } } ?> <div class="clear_both"></div> </div> <?php if ((int) $arrGroup['members_post_images'] and isGroupMember($memberID, $groupID) or $arrGroup['creatorID'] == $memberID) { ?> <a href="<?php echo "{$site['url']}group_actions.php?a=uploadFile&ID={$groupID}"; ?> " class="actions"><?php echo _t('_Upload a file'); ?> </a> <?php } return ob_get_clean(); }
\t\t\t\t<join_date>{$join_date}</join_date> {$aRay} \t\t\t</user_info> EOF; break; /** * get user permissions */ /** * get user permissions */ case 'user_perm': $forum_id = (int) $_GET['forum_id']; $user_id = getID($user); $arrGroup = getGroupInfo($forum_id); $isGroupMember = isGroupMember($user_id, $forum_id) ? 1 : 0; $isGroupCreator = $arrGroup['creatorID'] == $user_id ? 1 : 0; $isAdmin = $who == 'admin' ? 1 : 0; $read_public = 1; $post_public = ($isGroupMember or $isAdmin) ? 1 : 0; $edit_public = ($isGroupCreator or $isAdmin) ? 1 : 0; $del_public = ($isGroupCreator or $isAdmin) ? 1 : 0; $read_private = ($isGroupMember or $isAdmin) ? 1 : 0; $post_private = ($isGroupMember or $isAdmin) ? 1 : 0; $edit_private = ($isGroupCreator or $isAdmin) ? 1 : 0; $del_private = ($isGroupCreator or $isAdmin) ? 1 : 0; $edit_own = ($isGroupMember or $isAdmin) ? 1 : 0; $del_own = ($isGroupMember or $isAdmin) ? 1 : 0; $search = 0; $sticky = ($isGroupMember or $isAdmin) ? 1 : 0; echo <<<EOF