var amount_cost = document.getElementById('amount_paid').value; var sumtotal=0; sumtotal = parseFloat(bill_cost)-parseFloat(amount_cost); document.getElementById('total_remain_balance').innerHTML(sumtotal); } </script> <section class="row"> <div class="container"> <div class="form_section_content"> <?php /* * * On button action these of the following functions are called to stores the user information in the database * * */ $user_information = new UsersDetails(); $user_id = $user_information->current_user_id(); $plantiffreg = new Plantiff(); if (isset($_POST['plantiffinfor'])) { /* * * Variables of the plantiff information table only * * */ $plantiff_name = mysql_real_escape_string($_POST['plantiff_name']); $plantiff_date = mysql_real_escape_string($_POST['plantiff_date']); $plantiff_address = mysql_real_escape_string($_POST['plantiff_address']); $plantiff_workphone = mysql_real_escape_string($_POST['plantiff_workphone']); $plantiff_dob = mysql_real_escape_string($_POST['plantiff_dob']); $plantiff_homephone = mysql_real_escape_string($_POST['plantiff_homephone']); $plantiff_driverlicense = mysql_real_escape_string($_POST['plantiff_driverlicense']);
$currentPage = $_GET['currentPage']; $response['showShopProductDetailsResponse'] = $fetchPetDetails->showingProductDetails($currentPage); deliver_response($_GET['format'], $response, false); } else { if (strcasecmp($_GET['method'], 'showShopProductSwipeRefreshList') == 0) { $response['code'] = 1; $response['status'] = $api_response_code[$response['code']]['HTTP Response']; $fetchPetRefreshListDetails = new ShopProductDetails(); $date = $_GET['date']; $response['showShopProductDetailsResponse'] = $fetchPetRefreshListDetails->showingRefreshPetDetails($date); deliver_response($_GET['format'], $response, false); } else { if (strcasecmp($_GET['method'], 'showContactNo') == 0) { $response['code'] = 1; $response['status'] = $api_response_code[$response['code']]['HTTP Response']; $fetchContactDetails = new UsersDetails(); $email = $_GET['email']; $response['showContactDetailsResponse'] = $fetchContactDetails->FetchingContactDetails($email); deliver_response($_GET['format'], $response, false); } else { if (strcasecmp($_GET['method'], 'showUserOrders') == 0) { $response['code'] = 1; $response['status'] = $api_response_code[$response['code']]['HTTP Response']; $fetchOrderDetails = new OrderDetails(); $email = $_GET['email']; $currentPage = $_GET['currentPage']; $response['showOrderDetailsResponse'] = $fetchOrderDetails->FetchingOrderDetails($email, $currentPage); deliver_response($_GET['format'], $response, false); } else { if (strcasecmp($_GET['method'], 'showPetMateDetails') == 0) { $response['code'] = 1;
deliver_response($_GET['format'], $response); } elseif ($_POST['username'] != 'foo' && $_POST['password'] != 'bar') { $response['code'] = 4; $response['status'] = $api_response_code[$response['code']]['HTTP Response']; $response['data'] = $api_response_code[$response['code']]['Message']; // Return Response to browser deliver_response($_GET['format'], $response); } } // --- Step 3: Process Request // Switch based on incoming method if (isset($_POST['method'])) { if (strcasecmp($_POST['method'], 'userRegistration') == 0) { $response['code'] = 1; $response['status'] = $api_response_code[$response['code']]['HTTP Response']; $objuserDetails = new UsersDetails(); $name = stripslashes($_POST['name']); $city = stripslashes($_POST['city']); $mobileno = stripslashes($_POST['mobileno']); $email = stripslashes($_POST['email']); $password = stripslashes($_POST['confirmpassword']); $objuserDetails->mapIncomingUserDetailsParams($name, $city, $mobileno, $email, $password); $response['saveUsersDetailsResponse'] = $objuserDetails->SavingUsersDetails(); //deliver_response($format[1],$response,false); deliver_response($_POST['format'], $response, false); } else { if (strcasecmp($_POST['method'], 'login') == 0) { $response['code'] = 1; $response['status'] = $api_response_code[$response['code']]['HTTP Response']; $loginData = new UserLogin(); $username = stripslashes($_POST['email']);