コード例 #1
0
ファイル: ModifyCustomer.php プロジェクト: kisorbiswal/Creamy
    if (isset($_POST["productType"])) {
        $productType = $_POST["productType"];
        $productType = stripslashes($productType);
        $productType = $db->escape_string($productType);
    }
    // notes
    $notes = NULL;
    if (isset($_POST["notes"])) {
        $notes = $_POST["notes"];
        $notes = stripslashes($notes);
        $notes = $db->escape_string($notes);
    }
    // no enviar email
    $donotsendemail = 0;
    if (isset($_POST["donotsendemail"])) {
        $donotsendemail = 1;
    }
    // modify customer
    $result = $db->modifyCustomer($customerType, $customerid, $name, $email, $phone, $mobile, $id_number, $address, $city, $state, $zipcode, $country, $birthdate, $maritalstatus, $productType, $donotsendemail, $createdByUser, $gender, $notes, $website);
    // return result
    if ($result === true) {
        ob_clean();
        print CRM_DEFAULT_SUCCESS_RESPONSE;
    } else {
        ob_clean();
        $lh->translateText("unable_modify_customer");
    }
} else {
    ob_clean();
    $lh->translateText("some_fields_missing");
}