/*************************************************************************** * 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 . 'db.inc.php' ); require_once( BX_DIRECTORY_PATH_INC . 'admin.inc.php' ); require_once( BX_DIRECTORY_PATH_INC . 'design.inc.php' ); require_once( BX_DIRECTORY_PATH_INC . 'profiles.inc.php' ); require_once( BX_DIRECTORY_PATH_INC . 'admin_design.inc.php' ); require_once( BX_DIRECTORY_PATH_INC . 'utils.inc.php' ); $logged['moderator'] = member_auth(3); $ADMIN = $logged['moderator']; if ( $_POST[prf_form_submit] && !$demo_mode) { $sel_str = ""; while( list( $key, $val ) = each( $_POST ) ) if ( (int)$key && $val ) $sel_str .= ",$key"; $sel_str = substr( $sel_str, 1 ); $sel_arr = explode( ",", $sel_str ); $owner = $PARTNER ? $_COOKIE[partnerID] : 0; while( list( $key, $val ) = each( $sel_arr ) ) { switch ( $_POST[prf_form_submit] ) { case "Delete": profile_delete( $val ); break; case "Confirm Email": activation_mail( $val, 0 ); break; case "Send Message": profile_send_message( $val, $_POST[Message] ); break; } } } // - GET variables -------------- $page = (int)$_GET[page]; $p_per_page = (int)$_GET[p_per_page]; $profiles = $_GET['profiles']; $sex = $_GET['sex']; $search = $_GET['search']; $showAffMembers = (int)$_GET[showAffMembers]; if ( !$page ) $page = 1; if ( !$p_per_page ) $p_per_page = 30; if ( $showAffMembers > 0 ) { $aff_part_w = " AND idAff = $showAffMembers AND idProfile = ID"; $aff_part_f = ",aff_members "; } switch( $profiles ) { case 'Unconfirmed': case 'Approval': case 'Active': case 'Rejected': case 'Suspended': $prof_part = "AND Status = '$profiles'"; break; default: $prof_part = ''; } if ( strlen($sex) ) $sex_part = "AND Sex = '" . process_db_input($sex, 1) . "'"; else $sex_part = ''; if (strlen($search)) { if ($_GET[s_mail]) $email_part = " AND `Email` LIKE '%$search%' "; elseif ($_GET[s_nickname]) $email_part = " AND `NickName` LIKE '%$search%' "; elseif ($_GET[s_id]) $email_part = " AND `ID` = '$search' "; } // ------------------------------ $sql = "SELECT COUNT(*) FROM Profiles $aff_part_f WHERE 1 $email_part $aff_part_w $prof_part $sex_part"; $p_num = db_arr( $sql ); $p_num = $p_num[0]; $pages_num = ceil( $p_num / $p_per_page ); $real_first_p = (int)($page - 1) * $p_per_page; $page_first_p = $real_first_p + 1; $result = db_res( " SELECT `Profiles`.*, DATE_FORMAT(`DateLastLogin`, '$date_format' ) AS `DateLastLogin` FROM `Profiles` $aff_part_f WHERE 1 $email_part $aff_part_w $prof_part $sex_part ORDER BY `DateLastEdit` DESC LIMIT $real_first_p, $p_per_page " ); $page_p_num = mysql_num_rows( $result ); $_page['header'] = "Members' Profiles"; $_page['header_text'] = "Members profiles sorted by modification date"; $_page['js'] = 1; TopCodeAdmin(); ContentBlockHead("Profiles"); ?>
Status of profile | |
Unconfirmed | |
Approval | |
Active | |
Rejected | |
Suspended |