0 && (int)$_REQUEST['time_hrs']>0) { $iBanTime = ((int)$_REQUEST['time_hrs']) * 3600; $sCheckBanSQL = "SELECT * FROM `AdminBanList` WHERE `ProfID`='{$val}' LIMIT 1"; db_res($sCheckBanSQL); if (mysql_affected_rows()==1) { $sBamSQL = "UPDATE `AdminBanList` SET `Time`='{$iBanTime}', `DateTime`=NOW() WHERE `ProfID`='{$val}'"; } else { $sBamSQL = "INSERT INTO `AdminBanList` SET `Time`='{$iBanTime}', `DateTime`=NOW(), `ProfID`='{$val}'"; } db_res($sBamSQL); } break; case 'UnBan': if ((int)$val>0) { $sCheckBanSQL = "DELETE FROM `AdminBanList` WHERE `ProfID`='{$val}' LIMIT 1"; db_res($sCheckBanSQL); } break; } } } // - GET variables -------------- $page = (int)$_GET['page']; $p_per_page = (int)$_GET['p_per_page']; $profiles = $_GET['profiles']; $sorttype = $_COOKIE['sorttype']; $sortor = $_GET['sortor'] ? $_GET['sortor'] : $_COOKIE['sortor']; $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 'Active': $prof_part = "AND `Status` = '$profiles'"; break; case 'Unconfirmed': case 'Approval': case 'Rejected': case 'Suspended': $prof_part = "AND `Status` <> 'Active'"; break; default: $prof_part = ""; } if ( strlen($sex) ) $sex_part = "AND Sex = '" . process_db_input($sex, 1) . "'"; 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 `Profiles`.`ID` = '$search' "; } if (isset($_GET['media']) && isset($_GET['status'])) { $sType = htmlspecialchars_adv($_GET['media']); $sStatus = htmlspecialchars_adv($_GET['status']); $sqlJoinPart = "LEFT JOIN `media` ON (`media`.`med_prof_id` = `Profiles`.`ID`)"; $sqlWhere = " AND `med_status` = '$sStatus' AND `med_type`='$sType'"; $sqlGroup = " GROUP BY `Profiles`.`ID`"; } $sqlCouple = "(`Couple`=0 OR `Couple`>`Profiles`.`ID`)"; $sqlWhere .= ' AND ' . $sqlCouple; // ------------------------------ $sQuery = "SELECT `Profiles`.`ID` as `ID`, `NickName`, `Email`, `Sex`, DATE_FORMAT(`DateLastLogin`, '$date_format' ) AS `DateLastLoginCur`, DATE_FORMAT(`DateReg`, '$date_format' ) AS `DateReg`, `Status` $sMemField FROM `Profiles` $aff_part_f $sqlJoinPart $sMemJoin WHERE 1 $email_part $aff_part_w $prof_part $sex_part $sqlWhere $sqlGroup"; $rData = db_res($sQuery); $p_num = mysql_num_rows($rData); $pages_num = ceil( $p_num / $p_per_page ); $real_first_p = (int)($page - 1) * $p_per_page; $page_first_p = $real_first_p + 1; /* checking for incoming value for sort order * if we open this page without sortor param * we use ID as default * after that we put old value to cookie * $sortoder - stands for value for ORDER BY query */ if ( $sortor == "" ) { $sortor = "DateLastLogin"; } setcookie( "sortor", $sortor ); /* here we make check for the first click on the value * in case we change our incoming value we set order type to ASCENDING * in other case we check for additional clicks and change the image * $sorttype - ASCENDING or DESCENDING */ if ( $_GET['sortor'] && ($_GET['sortor'] != $_COOKIE['sortor']) ) { $sorttype = "DESC"; } elseif ( $_GET['sortor'] ) { if ( $_COOKIE['sorttype'] == "ASC" ) { $sorttype = "DESC"; $sortor_image = ""; } else { $sorttype = "ASC"; $sortor_image = ""; } } setcookie( "sorttype", $sorttype ); /* the check for member status * in case we have the full member list without any statuses we set it to nothing * in other case we add another option to the query * $inc_profiles - variable returning the incoming parameter for profile status */ if ( $profiles != "" ) { $inc_profiles = "profiles=$profiles&"; } else { $inc_profiles = ""; } $n_arr = db_arr( 'SELECT COUNT(*) FROM `Profiles`' . " WHERE {$sqlCouple}" ); $status_arr[0] = "Active"; $status_arr[1] = "Approval"; $status_arr[2] = "Unconfirmed"; $status_arr[3] = "Rejected"; $status_arr[4] = "Suspended"; if (getParam("free_mode") != 'on') { $sMemField = ", `IDLevel`, IF(ISNULL(`MemLevels`.`Name`),'', `MemLevels`.`Name`) AS `MemName`"; $sMemJoin = "LEFT JOIN `ProfileMemLevels` ON `ProfileMemLevels`.`IDMember` = `Profiles`.`ID` LEFT JOIN `MemLevels` ON `ProfileMemLevels`.`IDLevel` = `MemLevels`.`ID` "; $sMemLevelShow = 'style="display:block;"'; $sGroup = "GROUP BY `Profiles`.`ID`"; } else $sMemLevelShow = 'style="display:none;"'; $sQuery = " SELECT `Profiles`.`ID` as `ID`, `NickName`, `Email`, `Sex`, DATE_FORMAT(`DateLastLogin`, '$date_format' ) AS `DateLastLoginCur`, DATE_FORMAT(`DateReg`, '$date_format' ) AS `DateReg`, `Status` $sMemField FROM `Profiles` $aff_part_f $sqlJoinPart $sMemJoin WHERE 1 $email_part $aff_part_w $prof_part $sex_part $sqlWhere $sqlGroup $sGroup ORDER BY $sortor $sorttype LIMIT $real_first_p, $p_per_page "; $result = db_res($sQuery); $_page['header'] = "Members' Profiles"; $_page['header_text'] = "Members profiles sorted by modification date"; $_page['js'] = 1; TopCodeAdmin(); ContentBlockHead("Total registered members"); ?> 'Active' AND {$sqlCouple}"; $iK++; $sCapt = 'Inactive'; } else continue; } $n_arr = db_arr( "SELECT COUNT(*) FROM `Profiles` WHERE $sAdd" ); if ( $n_arr[0] ) { ?> $sVal) { $sqlUnp = "SELECT * FROM `media` WHERE `med_status` = 'passive' AND `med_type`= '$sVal' GROUP BY `med_prof_id`"; $rUnp = db_res($sqlUnp); if ($rUnp && mysql_num_rows($rUnp)) { ?>
Total registered members:
With unconfirmed emails
     With unapproved
Add a new profile
No profiles available"; else { ?> '.$p_arr['Email'].'' : ''.$p_arr['Email'].''; $sBannedColor = (isLoggedBanned($p_arr['ID'])==true) ? '#F99' : '#fff'; ?> style="background-color: ;">
  ID NickName E-mail Registered Last Visited Photos Audio BGs style="display:none;">Membership
>
Check all Uncheck all
Ban time
(in hours)

''"; $sqlPas = "SELECT COUNT(*) as `Num` FROM `ProfilesSettings` WHERE `IDmember`='$ID' AND (`Status` IS NULL OR `Status`<>'Active') AND `BackgroundFilename`<>''"; $sHrefA = 'post_mod_profiles.php?iUser='.$ID.'&status=active'; $sHrefP = 'post_mod_profiles.php?iUser='.$ID; break; } $sActPart = db_value($sqlAct) > 0 ? '
'.db_value($sqlAct).'
' : ''; $sPasPart = strlen($sqlPas) && db_value($sqlPas) > 0 ? '
'.db_value($sqlPas).'
' : ''; return $sActPart.$sPasPart; } ?>