getGroupsCategList(); $tr = 'odd'; foreach( $arrCategs as $arrCateg ) { ?>
"> ( groups) edit delete
Add new category:
Top
0 { $resPerPage = (int)$_GET['per_page']; if( !$resPerPage ) $resPerPage = 10; $pagesNum = ceil( $iGroupsNum / $resPerPage ); $page = (int)$_REQUEST['page']; if( $page < 1 ) $page = 1; if( $page > $pagesNum ) $page = $pagesNum; $sqlFrom = ( ( $page - 1 ) * $resPerPage ); $sQuery = " SELECT `Groups`.*, COUNT( `GroupsMembers`.`memberID` ) AS `membersCount`, `GroupsGallery`.`seed`, `GroupsGallery`.`ext` AS `thumbExt` FROM `Groups` LEFT JOIN `GroupsMembers` ON (`GroupsMembers`.`groupID` = `Groups`.`ID` AND `GroupsMembers`.`status`='Active') LEFT JOIN `GroupsGallery` ON (`Groups`.`thumb` = `GroupsGallery`.`ID`) WHERE `categID`=$cat GROUP BY `Groups`.`ID` DESC LIMIT $sqlFrom, $resPerPage "; $resGroups = db_res( $sQuery ); $numOnPage = mysql_num_rows( $resGroups ); $showingFrom = $sqlFrom + 1; $showingTo = $sqlFrom + $numOnPage; $showingResults = "Showing results: $showingFrom - $showingTo of $iGroupsNum"; if( $pagesNum > 1 ) { $pagesUrl = "{$_SERVER['PHP_SELF']}?view_cat=$cat&page={page}#view_cat"; //$pagination = genPagination( $pagesNum, $page, $pagesUrl ); $sRequest = $_SERVER['PHP_SELF'] . '?'; $aFields = array( 'action', 'view_cat' ); foreach( $aFields as $vField ) if( isset( $_GET[$vField] ) ) $sRequest .= "&{$vField}=" . htmlentities( process_pass_data( $_GET[$vField] ) ); $pagination = '
'._t("_Results per page").':
' . genPagination( $pagesNum, $page, $pagesUrl ); //genPagination( $pagesNum, $page, ( $sRequest . '&page={page}&per_page='.$resPerPage ) ); } else $pagination = ''; $sRowTmpl = file_get_contents( BX_DIRECTORY_PATH_ROOT . "{$admin_dir}/group_searchrow.html"); $date_format_php = getParam('php_date_format'); ?>
sGrpGalPath . "{$arrGroup['ID']}_{$arrGroup['thumb']}_{$arrGroup['seed']}_.{$arrGroup['thumbExt']}" ) ) $groupImageUrl = "{$site['groups_gallery']}{$arrGroup['ID']}_{$arrGroup['thumb']}_{$arrGroup['seed']}_.{$arrGroup['thumbExt']}"; else $groupImageUrl = "{$site['groups_gallery']}no_pic.gif"; if( (int)$arrGroup['hidden_group'] ) $typeHelp = 7; else if( (int)$arrGroup['open_join'] ) $typeHelp = 5; else $typeHelp = 6; $typeHelpLink = "{$site['url']}groups_help.php?i=$typeHelp"; if( $arrGroup['status'] == 'Active' ) { $statusAct = 'suspend_group'; $statusActTitle = 'Suspend'; } else { $statusAct = 'activate_group'; $statusActTitle = 'Activate'; } $aRowTmpl['group_type_help'] = 'Help'; $aRowTmpl['thumbnail'] = "
"; $aRowTmpl['group_name'] = "".htmlspecialchars_adv( $arrGroup['Name'] ).""; $aRowTmpl['group_about'] = htmlspecialchars_adv( $arrGroup['About'] ); $aRowTmpl['members_count'] = $arrGroup['membersCount']; $aRowTmpl['created'] = date( $date_format_php, strtotime( $arrGroup['created'] ) ); $aRowTmpl['group_type'] = ( ( (int)$arrGroup['open_join'] and !(int)$arrGroup['hidden_group'] ) ? 'Public group' : 'Private group' ); $aRowTmpl['country'] = _t( $aPreValues['Country'][ $arrGroup['Country'] ]['LKey'] ); $aRowTmpl['city'] = htmlspecialchars_adv( $arrGroup['City'] ); $aRowTmpl['status'] = $arrGroup['status']; $aRowTmpl['status_color'] = ( $arrGroup['status'] == 'Active' ? 'green' : 'red' ); $aRowTmpl['status_action'] = "$statusActTitle"; $sRow = $sRowTmpl; foreach( $aRowTmpl as $what => $to ) $sRow = str_replace( "__{$what}__", $to, $sRow ); echo $sRow; } ?>
Sorry, no groups found in this category
Top