コード例 #1
0
        $error['name'] = true;
    }
    if (strlen(trim($contact)) < 3) {
        $error['contact'] = true;
    }
    //if(!$insurance) $error['insurance'] = true;
    if (!$error) {
        $insurance_tz->UpdateInsuranceCompany($_POST);
        header("location: ./insurance_company_tz.php");
    }
    $this_insurance = $_POST;
    while (list($x, $v) = each($_POST)) {
        if (strstr($x, "cancel_")) {
            $cancel_id = substr(strrchr($x, "_"), 1);
            if ($v == "yes") {
                $insurance_tz->CancelContractForPID($cancel_id);
            } else {
                $insurance_tz->EnableContractForPID($cancel_id);
            }
        } elseif (strstr($x, "paid_")) {
            $paid_id = substr(strrchr($x, "_"), 1);
            if ($v == "yes") {
                $insurance_tz->EnablePaymentForContract($cancel_id);
            } else {
                $insurance_tz->CancelPaymentForContract($cancel_id);
            }
        }
    }
    $updated = $LDLastUpdated . ' ' . strftime('%c') . '<br>';
}
require "gui/gui_insurance_company_tz_contracts.php";