ok
Direktori : /home2/selectio/public_html/wedding-info-new/ |
Current File : /home2/selectio/public_html/wedding-info-new/appointment.php |
<?php include "header.php"; $product_id=$_REQUEST['id']; $seller_id = $_REQUEST['seller']; $query = "SELECT * FROM seller_product_forms a LEFT JOIN tbl_seller b on b.id = a.seller_id LEFT JOIN tbl_avl c on c.user_id = a.seller_id WHERE a.id=".$product_id; $prepared = $pdo->prepare($query); $prepared->execute(); $details = $prepared->fetchAll(PDO::FETCH_ASSOC); $query = "SELECT * FROM tbl_appointment WHERE product_id =".$product_id; $prepared = $pdo->prepare($query); $prepared->execute(); $p_id = $prepared->fetchAll(PDO::FETCH_ASSOC); ?> <div id="content"> <!-- login section start --> <section class="form-section px-15 section-b-space"> <div class="row" style="margin-top: 50px;"> <div class="col-12 col-sm-12"> <center><h1>Profile Info</h1></center> </div> </div> <input name="ids" type="hidden" value="<?=$ids?>" /> <div id="profile_info"> <center><h3><b>Appointment Panel</b></h3></center><br> <div class="row"> <div class="table-responsive-sm"> <?php $current_date = date("Y-m-d"); $current_time = date("H:i:s"); $day = date("l", strtotime($current_date)); ?> <div class="row"> <div class="col=12" > <table class="table "> <tr><td><b>Seller Name </b> <td> <?=$details[0]['company_name']?> </td> </tr> <tr><td><b>Address </b> <td> <?=$details[0]['c_address']?> </td> </tr> <tr><td><b> </b> <td> <?=$details[0]['c_city']?> </td> </tr> <tr><td><b> </b> <td> <?=$details[0]['c_state']?> </td> </tr> </table> </div> </div> <table class="table "> <tr> <th>Days</th> <th>Start Time</th> <th>End Time</th> </tr> <tr <?=($day == "Monday" ? "style='background: rgba(0, 0, 0, 0.05);'" : "");?> > <td>Monday</td> <td><?=date("g:i A", strtotime($details[0]['monday_start']))?></td> <td><?=date("g:i A", strtotime($details[0]['monday_end']))?></td> </tr> <tr <?=($day == "Tuesday" ? "style='background: rgba(0, 0, 0, 0.05);'" : "");?> > <td>Tuesday</td> <td><?=date("g:i A", strtotime($details[0]['tuesday_start']))?></td> <td><?=date("g:i A", strtotime($details[0]['tuesday_end']))?></td> </tr> <tr <?=($day == "Wednesday" ? "style='background: rgba(0, 0, 0, 0.05);'" : "");?> > <td>Wednesday</td> <td><?=date("g:i A", strtotime($details[0]['wednesday_start']))?></td> <td><?=date("g:i A", strtotime($details[0]['wednesday_end']))?></td> </tr> <tr <?=($day == "Thursday" ? "style='background: rgba(0, 0, 0, 0.05);'" : "");?> > <td>Thursday</td> <td><?=date("g:i A", strtotime($details[0]['thursday_start']))?></td> <td><?=date("g:i A", strtotime($details[0]['thursday_end']))?></td> </tr> <tr <?=($day == "Friday" ? "style='background: rgba(0, 0, 0, 0.05);'" : "");?> > <td>Friday</td> <td><?=date("g:i A", strtotime($details[0]['friday_start']))?></td> <td><?=date("g:i A", strtotime($details[0]['friday_end']))?></td> </tr> <tr <?=($day == "Saturday" ? "style='background: rgba(0, 0, 0, 0.05);'" : "");?> > <td>Saturday</td> <td><?=date("g:i A", strtotime($details[0]['saturday_start']))?></td> <td><?=date("g:i A", strtotime($details[0]['saturday_end']))?></td> </tr> <tr <?=($day == "Sunday" ? "style='background: rgba(0, 0, 0, 0.05);'" : "");?> > <td>Sunday</td> <td><?=date("g:i A", strtotime($details[0]['sunday_start']))?></td> <td><?=date("g:i A", strtotime($details[0]['sunday_end']))?></td> </tr> </table> </div> </div> <form id="app_form"> <div class="form-floating mb-4"> <input type="datetime-local" class="form-control" name="appointment_time" id="appointment_time" placeholder="Appointment Time" value="<?= $result[0]['email_id'] ?>" /> <label for="appointment_time">Appointment Date & Time</label> <input name="buyer_id" type="text" value ="<?=$_SESSION['buyer']['id']?>" /> <input name="product_id" type="text" value ="<?=$product_id?>" /> <input name="seller_id" type="text" value ="<?=$seller_id?>" /> </div> <div class="form-floating mb-4"> <input type="text" class="form-control" name="remrks" id="remarks" placeholder="remarks" value="" /> <label for="appointment_time">Remarks</label> </div> <button class="btn btn-solid w-100" >Book your slot</button> </form> </section> <!-- login section end --> <!-- panel space start --> <section class="panel-space"></section> <!-- panel space end --> </div> </section> <!-- login section start --> </div> <script> $('#app_form').submit(function(e) { e.preventDefault(); alert('form submit start.....'); var formData = new FormData(this); formData.append('type', 'app_form'); console.log(formData); $.ajax({ url: 'api/buyer.php', type: 'post', dataType: 'json', data: formData, cache: false, contentType: false, processData: false, success: function(response) { console.log(response); scroll(); images(); if (response['status'] == 200) { alert(response['message']); } else { alert(response['message']); } } }); }); </script> <?php include "footer2.php"; ?>