if ($iDateTo >= $iDateFrom) {
        while ($iDateFrom < $iDateTo) {
            $iDateFrom += 48640000 * rand(1, 6);
            // add 24 hours
            array_push($aryRange, date('m/d/Y', $iDateFrom));
        }
    }
    return $aryRange;
}
$user_key = isset($_POST['user_key']) ? $_POST['user_key'] : null;
$noOfUsers = isset($_POST['noOfUsers']) ? $_POST['noOfUsers'] : null;
$gender = isset($_POST['gender']) ? $_POST['gender'] : null;
$tempage = createDateRangeArray('1980-10-01', '1985-10-05');
$userIdList = array();
if (!isNull($user_key)) {
    $mymodel = new GwpmProfileModel();
    for ($cnt = 0; $cnt < $noOfUsers; $cnt++) {
        $user_name = $user_key . $cnt;
        $user_email = $user_name . '@127.0.0.1';
        $random_password = '******';
        $user_id = username_exists($user_name);
        if (!$user_id and email_exists($user_email) == false) {
            $user_id = wp_create_user($user_name, $random_password, $user_email);
            echo __("User created: " . $user_id . '<br />');
            array_push($userIdList, $user_id);
        } else {
            echo __('User already exists.  Password inherited.' . '<br />');
        }
        $_POST['userId'] = $user_id;
        $_POST['first_name'] = $user_name . "fn";
        $_POST['last_name'] = $user_name . "ln";
<?php

/*
 * Created on Apr 14, 2012
 *
 * To change the template for this generated file go to
 * Window - Preferences - PHPeclipse - PHP - Code Templates
 */
?>

<div class="wrap">
<?php 
screen_icon('options-general');
echo "<h2>" . __('Matrimonial Profile', 'genie_wp_matrimony') . "</h2>";
try {
    $profileModel = new GwpmProfileModel();
    $userObj = wp_get_current_user();
    $modelObj = $profileModel->getUserObj($userObj->ID);
    $templateObj = new GwpmTemplate(null, null, null);
    if (isset($_POST['update-button']) && $_POST['update-button'] == 'Update') {
        $_keys = getDynamicFieldKeys();
        $profileObj = new GwpmProfileVO($_POST, $_keys);
        $profileObj->gwpm_profile_photo = $_FILES["gwpm_profile_photo"];
        $validateObj = $profileObj->validate();
        if (sizeof($validateObj) == 0) {
            $profileModel->updateUser($profileObj);
            $success_message = 'Profile updated successfully!!';
        } else {
            $warn_message = 'Please correct the below fields';
        }
        $counter = 0;