$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) {
         $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;
         case 'Activate':
             db_res("UPDATE `Profiles` SET `Status` = 'Active' WHERE `ID` = '" . (int) $val . "'");
             createUserDataFile((int) $val);
             reparseObjTags('profile', (int) $val);
             break;
         case 'Approval':
             db_res("UPDATE `Profiles` SET `Status` = 'Approval' WHERE `ID` = '" . (int) $val . "'");
             createUserDataFile((int) $val);
             reparseObjTags('profile', (int) $val);
             break;
         case 'Ban':
             if ((int) $val > 0 && (int) $_REQUEST['time_hrs'] > 0) {
                 $iBanTime = (int) $_REQUEST['time_hrs'] * 3600;
                 $sCheckBanSQL = "SELECT * FROM `AdminBanList` WHERE `ProfID`='{$val}' LIMIT 1";
    $NEW_TO_ADD = TRUE;
}
// admin actions such as delete profile or give membership
if (!$demo_mode && $ADMIN && $_GET['ID']) {
    if ($_GET['what_do'] == "Yes") {
        $add = 1;
    } elseif ($_GET['what_do'] == "No") {
        $add = 0;
    }
    switch ($_GET['prf_form_submit']) {
        case "Confirm":
            activation_mail($_GET[ID], 0);
            $status_admin_ex = _t_err("_ADM_PROFILE_CONFIRM_EM");
            break;
        case "Send":
            profile_send_message($_GET[ID], $_GET[Message]);
            $status_admin_ex = _t_err("_ADM_PROFILE_SEND_MSG");
            break;
    }
}
//---------------------------------- SAVE CHANGES
// adding profile - in admin mode
// updating profile
// check for changes - and change profile status
// check for modification
// check email for modification
// change cookie - if password was changed
// featured profiles for admin only
// sending latter to user - about changed his status
// update field - last modification
$change_error_text = "";