if ($bpartner_id == "") {
    $bpartner_id = 0;
}
if ($races_id == "") {
    $races_id = 0;
}
if ($religion_id == "") {
    $religion_id = 0;
}
if ($region_id == "") {
    $region_id = 0;
}
$bpartnerctrl = $ctrl->getSelectBPartner($bpartner_id, 'Y');
$racesctrl = $ctrl->getSelectRaces($races_id, 'Y');
$religionctrl = $ctrl->getSelectReligion($religion_id, 'Y');
$regionctrl = $ctrl->getSelectRegion($region_id, 'Y');
//$bpartnerfrom
//$accounts_id=$_POST['accounts_id'];
//$period_id=$_POST['periodfrom_id'];
//	$acc->fetchAccounts($accounts_id);
//	$balanceamt=$acc->accBalanceBFAmount($period_id,$accounts_id);
if (isset($_POST['action'])) {
    $removestring = array("(", ")", "-", " ", "\n", "", "\t", "\r");
    $subscriber_number = "";
    foreach ($_POST['chk'] as $hp) {
        $hp = str_replace($removestring, "", $hp);
        if (strlen($hp) == 10 && substr($hp, 0, 1) == "0") {
            $hp = "6" . $hp;
        } elseif (strlen($hp) == 9 && substr($hp, 0, 1) == "1") {
            $hp = "60" . $hp;
        } elseif (strlen($hp) != 11) {