/*************************************************************************** * Dolphin Smart Community Builder * ----------------- * begin : Mon Mar 23 2006 * copyright : (C) 2006 BoonEx Group * website : http://www.boonex.com/ * This file is part of Dolphin - Smart Community Builder * * Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License. * http://creativecommons.org/licenses/by/3.0/ * * Dolphin is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the Creative Commons Attribution 3.0 License for more details. * You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin, * see license.txt file; if not, write to marketing@boonex.com ***************************************************************************/ require_once( 'inc/header.inc.php' ); require_once( BX_DIRECTORY_PATH_INC . 'design.inc.php' ); require_once( BX_DIRECTORY_PATH_INC . 'groups.inc.php' ); require_once( BX_DIRECTORY_PATH_INC . 'prof.inc.php' ); // --------------- page variables and login $_page['name_index'] = 78; $_page['css_name'] = 'groups.css'; if ( !( $logged['admin'] = member_auth( 1, false ) ) ) if ( !( $logged['member'] = member_auth( 0, false ) ) ) if ( !( $logged['aff'] = member_auth( 2, false )) ) $logged['moderator'] = member_auth( 3, false ); $_page['header'] = _t( "_Search Groups" ); $_page['header_text'] = _t( "_Search Groups" ); // --------------- page components $_ni = $_page['name_index']; $_page_cont[$_ni]['page_main_code'] = ''; //begin main code // get search params $keyword = $_REQUEST['keyword']; $searchby = $_REQUEST['searchby']; $categID = $_REQUEST['categID']; $Country = $_REQUEST['Country']; $City = $_REQUEST['City']; $sortby = $_REQUEST['sortby']; // [END] get search params // check search params unset( $keyword_db ); unset( $searchby_db ); unset( $categID_db ); unset( $Country_db ); unset( $City_db ); unset( $sortby_db ); if( isset($keyword) and strlen($keyword) ) { $keyword = trim( $keyword ); if( strlen( $keyword ) ) $keyword_db = strtoupper( process_db_input( $keyword ) ); $keyword = process_pass_data( $keyword ); } if( $searchby == 'name' or $searchby == 'keyword' ) $searchby_db = $searchby; else $searchby_db = $searchby = 'keyword'; $categID_db = $categID = (int)$categID; if( isset( $Country ) and isset( $prof['countries'][$Country] ) ) $Country_db = $Country; else $Country = ''; if( isset($City) and strlen($City) ) { $City = trim( $City ); if( strlen( $City ) ) $City_db = strtoupper( process_db_input( $City ) ); $City = process_pass_data( $City ); } if( $sortby == 'Name' or $sortby == 'membersCount' or $sortby == 'created' ) $sortby_db = $sortby; else $sortby_db = $sortby = 'membersCount'; // [END] check search params $_page_cont[$_ni]['groups_search_form'] = PageCompGroupsSearchForm( $keyword, $searchby, $categID, $Country, $City, $sortby ); if( $keyword_db or $categID_db or $Country_db or $City ) $_page_cont[$_ni]['groups_search_results'] = PageCompGroupsSearchResults( $keyword_db, $searchby_db, $categID_db, $Country_db, $City_db, $sortby_db ); else $_page_cont[$_ni]['groups_search_results'] = ''; // --------------- [END] page components PageCode(); // --------------- page components functions function PageCompGroupsSearchForm( $keyword, $searchby, $categID, $Country, $City, $sortby ) { ob_start(); ?> '; global $prof; ob_start(); $ch = 'checked="checked"'; ?>