connect_error) die("Connection failed: " . $conn->connect_error); if(isset($_POST["ac_type"]) && isset($_POST["ac_name"]) && $_POST["ac_name"]!="" && is_numeric($_POST["Mature_Value"]) ) { // echo ' '; $return_json['NotiFi'] = "";$return_json['NotiFi_m'] = "";$return_json['NotiFi_d'] = ""; $ca["ac_type"]=$_POST["ac_type"]; $ca["ac_name"]=$_POST["ac_name"]; $ca["ac_phone"]=$_POST["ac_phone"]; $ca["ac_mail"]=$_POST["ac_mail"]; $ca["ac_address"]=$_POST["ac_address"]; $ca["ac_no"]="GV".$_POST["ac_type"].date("Ymd")."L"; $AA_BAL=$_POST["Mature_Value"];$AA_BAL=$AA_BAL-($AA_BAL*2); $ca["ac_agent"] = $_POST["ac_agent"] ?? null; //GC_new_entry($ca); //echo $GLOBALS['host'], $GLOBALS['user'], $GLOBALS['pass'], $GLOBALS['db']; $t="Loan"; $stmt = $conn->prepare("INSERT INTO ".$GLOBALS['arif_ac']." (`AA_BAL`,`AA_G1_DETAILS`,`AA_G2_DETAILS`,`AA_INSTALLMENT`,`AA_ICARD_NO`,`AA_INTEREST`,`AA_DATE`,`AA_DATE_MATURE`,`AA_NO_OF_PAYMENT`,`AA_AMOUNT`,`AA_MATURE_VALUE`,`AA_TYPE`,`AA_ACTYPE`,`AA_NAME`, `AA_PHONE`, `AA_EMAIL`, `AA_ADDRESS`, `AA_ADMIN`, `AA_AGENT`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"); $stmt->bind_param("issssssssssssssssss" ,$AA_BAL,$_POST["AA_G1_DETAILS"],$_POST["AA_G2_DETAILS"],$_POST["CA_installment"],$_POST["AA_ICARD_NO"],$_POST["CA_interest"],$_POST["date_today"],$_POST["date_mature"],$_POST["CA_No_Of_Payment"],$_POST["CA_Amount"],$_POST["Mature_Value"], $t,$ca["ac_type"],$ca["ac_name"],$ca["ac_phone"],$ca["ac_mail"],$ca["ac_address"],$_SESSION["EMAIL"], $ca["ac_agent"]); if($stmt->execute()){ $lid=$conn->insert_id;$ca["ac_no"]=$ca["ac_no"].$lid; if($conn->query("UPDATE `".$GLOBALS['arif_ac']."` SET `AA_ACNO` = '".$ca["ac_no"]."' WHERE `AA_ID` =".$lid.";")) {$return_json['NotiFi'] = "OK";$return_json['NotiFi_m'] = "New Loan A/C Created !";$return_json['NotiFi_d'] = "A/C NO- ".$ca["ac_no"]."";} else{$return_json['NotiFi'] = "Error";$return_json['NotiFi_m'] = "Error Creating New Recurring A/C !";$return_json['NotiFi_d'] = "Failed in Secondary Execution";} } $stmt->close(); $conn->close(); echo $return_json['NotiFi'],$return_json['NotiFi_m'],$return_json['NotiFi_d']; } //else {$return_json['NotiFi'] = "Error";$return_json['NotiFi_m'] = "Error on input !";$return_json['NotiFi_d'] = "Check Input Details";} //echo json_encode($return_json); $getAgentListsQuery = "SELECT * FROM " . $GLOBALS['arif_users']; $result = $conn->query($getAgentListsQuery); $agentList = []; if ($result && $result->num_rows > 0) { while ($row = $result->fetch_assoc()) { $agentList[] = $row; } } else { echo "No agents found."; } ?>
A/C Type*
A/C Holder Name*
A/C Holder's ID No*
A/C Holder's Father*
Principle Amount*
interest*
Tenure no of Day*
installment Amount*
Total Amount*
Dedicate a Agent
Date*
Mature Date*

Guaranter


1st Guaranter details*

2nd Guaranter details*