Пример #1
0
$races_id = $_GET['races_id'];
$religion_id = $_GET['religion_id'];
$region_id = $_GET['region_id'];
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;
    $accountsctrlfrom = $ctrl->getSelectAccounts(0, 'Y', "", "accounts_codefrom");
    $accountsctrlto = $ctrl->getSelectAccounts(0, 'Y', "", "accounts_codeto");
    $periodctrl = $ctrl->getSelectPeriod(0, 'Y');
    $showDateFrom = $dp->show("datefrom");
    $showDateTo = $dp->show("dateto");
    $datefrom = getMonth(date("Ymd", time()), 0);
    $dateto = getMonth(date("Ymd", time()), 1);
    if ($_POST['type_acc'] > 0) {
        $type_acc = $_POST['type_acc'];
        $acc_id = $_POST['acc_id'];
        $display = "";
        $wherestr = getWhereStr($acc_id);
        if ($acc_id == 0 || $wherestr == "") {
            $display = "none";
        }
        $bpartnerctrl = $ctrl->getSelectBPartner(0, 'Y', "", "bpartner_id", $wherestr);
        echo <<<EOF

<script type="text/javascript">
self.parent.document.getElementById("idBPartner{$type_acc}").style.display = "{$display}";
self.parent.document.getElementById("idBPartner{$type_acc}").innerHTML = "{$bpartnerctrl}";
\t
</script>

EOF;
    }
    //marhan add here --> ajax
    echo "<iframe src='viewtrialbalance.php' name='nameValidate' id='idValidate' style='display:none' ></iframe>";
    echo "<div id='simit'><form name='frmValidate' target='nameValidate' method='POST'></form></div>";
    ////////////////////
    echo <<<EOF