ok
Direktori : /home2/selectio/www/wedding-info-new/ |
Current File : /home2/selectio/www/wedding-info-new/seller_profile.ph |
<?php include "header.php"; $u_id=$_SESSION['user']['id']; // $query = "select tbl_alliances_register.* ,(select COUNT(id) FROM tbl_rewards WHERE tbl_rewards.user_id=tbl_alliances_register.id and tbl_rewards.verification_status='1') as verify from tbl_alliances_register WHERE id = ". $u_id; $query = "select * from tbl_alliances_register WHERE id = ". $u_id; $prepared2 = $pdo->prepare($query); $prepared2->execute(); $result = $prepared2->fetchAll(PDO::FETCH_ASSOC); // Prepare the SQL statement with a placeholder $sql = "SELECT * FROM `tbl_wishlist` WHERE alliance_id = ".$u_id; $prepared_f = $pdo->prepare($sql); $prepared_f->execute(); $results = $prepared_f->fetchAll(PDO::FETCH_ASSOC); $followers = $prepared_f->rowCount(); // Now $results contains the fetched rows from the database $query1 = "select * from tbl_seller_product_img where user_id = ".$u_id; $prepared3 = $pdo->prepare($query1); $prepared3->execute(); $result2 = $prepared3->fetchAll(PDO::FETCH_ASSOC); $pic_row = $prepared3->rowCount(); $query_rwd = "select * from tbl_rewards where user_id = ".$u_id; $prepared_rwd = $pdo->prepare($query_rwd); $prepared_rwd->execute(); $result_rwd = $prepared_rwd->fetchAll(PDO::FETCH_ASSOC); $pic_row_rwd = $prepared_rwd->rowCount(); $query2 = "select * from tbl_avl where user_id = ".$u_id; $prepared3 = $pdo->prepare($query2); $prepared3->execute(); $available = $prepared3->fetchAll(PDO::FETCH_ASSOC); $query = "select * from seller_product_forms where seller_id = ". $_SESSION['user']['id']; $prepared = $pdo->prepare($query); $prepared->execute(); $forms = $prepared->fetchAll(PDO::FETCH_ASSOC); //$query4 = "SELECT tbl_product.*, tbl_product_seller.* FROM tbl_product LEFT JOIN tbl_product_seller ON tbl_product_seller.product_ids = tbl_product.id WHERE tbl_product.sub_category_avl = 'NO' AND tbl_product.id IN ( SELECT cat FROM tbl_seller UNION SELECT sub_cat FROM tbl_seller )"; // SELECT * FROM `tbl_product` LEFT JOIN tbl_product_seller ON tbl_product_seller.product_ids=tbl_product.id LEFT JOIN seller_product_forms ON seller_product_forms.seller_id=1 WHERE tbl_product.id=4 $user_deatils = $pdo->prepare("SELECT * FROM `tbl_seller` WHERE id=".$u_id); error_log("SELECT * FROM `tbl_seller` WHERE id=".$u_id); error_log($u_id); $user_deatils->execute(); $usersss = $user_deatils->fetchAll(PDO::FETCH_ASSOC); error_log($usersss[0]['sub_cat']); if($usersss[0]['sub_cat']==""){ $category_id_seller = $usersss[0]['cat']; error_log($usersss[0]['cat']); }else{ $category_id_seller = $usersss[0]['sub_cat']; error_log($usersss[0]['cat']); } error_log("Category ID: ".$category_id_seller); $query4 = "SELECT * FROM `tbl_product` LEFT JOIN tbl_product_seller ON tbl_product_seller.product_ids=tbl_product.id WHERE tbl_product.id=".$category_id_seller.""; $prepared4 = $pdo->prepare($query4); $prepared4->execute(); $form = $prepared4->fetchAll(PDO::FETCH_ASSOC); $query5 = "select seller_product_forms.pdt_status as pdt_status, seller_product_forms.id as p_id, seller_product_forms.seller_id as seller_id, seller_product_forms.field1 AS label1, seller_product_forms.field2 AS label2, seller_product_forms.field3 AS label3, seller_product_forms.field4 AS label4, seller_product_forms.field5 AS label5, seller_product_forms.field6 AS label6, seller_product_forms.field7 AS label7, seller_product_forms.field8 AS label8, seller_product_forms.field9 AS label9, seller_product_forms.field10 AS label10, seller_product_forms.field11 AS label11, seller_product_forms.field12 AS label12, seller_product_forms.field13 AS label13, seller_product_forms.field14 AS label14, seller_product_forms.field15 AS label15, seller_product_forms.select1 AS select1, seller_product_forms.product_thumpnail as thumpnail, tbl_product_seller.*, tbl_product.* FROM `tbl_product` LEFT JOIN `tbl_product_seller` ON `tbl_product_seller`.`product_ids` = `tbl_product`.`id` LEFT JOIN `seller_product_forms` ON `seller_product_forms`.`seller_id` = ".$_SESSION['user']['id']." WHERE `tbl_product`.`id` =".$category_id_seller.""; $prepared5 = $pdo->prepare($query5); $prepared5->execute(); $products = $prepared5->fetchAll(PDO::FETCH_ASSOC); ?> <style> .image-container { position: relative; } .image { width: 200px; /* Set the original width of the image */ height: auto; /* Maintain aspect ratio */ } .enlarged { width: 200px; height: auto; position: absolute; top: 31%; z-index: 9999; margin-left: 25%; } .category-slider-container { width: 100%; /* Set the desired width for your container */ overflow-x: scroll; /* Enable horizontal scrolling */ white-space: nowrap; /* Prevent items from wrapping to the next line */ } body{ font-family: sans-serif; margin: 0px; } </style> <!--people calling time start--> <div class="modal fade" id="available_time" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true"> <div class="modal-dialog modal-dialog-centered"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="staticBackdropLabel">Temproarily Disable</h5> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <form id="available_form" > <div class="table-responsive-sm"> <table class="table table-striped"> <tr> <th></th> <th><label for="startDateTimePicker" class="form-label">Start Time:</label></th> <th><label for="startDateTimePicker" class="form-label">End Time:</label></th> </tr> <tr> <td>Monday</td> <td> <input type="time" name="mon_start_time" id="mo" class="form-control" value="<?=$available[0]['monday_start'] ?>" > </td> <td> <input type="time" name="mon_end_time" value="<?=$available[0]['monday_end'] ?>" class="form-control" > </td> </tr> <tr> <td>Tuesday</td> <td> <input type="time" name="tue_start_time" id="mo" class="form-control"value="<?=$available[0]['tuesday_start'] ?>" > </td> <td> <input type="time" name="tue_end_time" class="form-control"value="<?=$available[0]['tuesday_end'] ?>" > </td> </tr> <tr> <td>Wednesday</td> <td> <input type="time" name="wed_start_time" id="mo" class="form-control"value="<?=$available[0]['wednesday_start'] ?>" > </td> <td> <input type="time" name="wed_end_time" class="form-control"value="<?=$available[0]['wednesday_end'] ?>" > </td> </tr> <tr> <td>Thursday</td> <td> <input type="time" name="thur_start_time" id="mo" class="form-control"value="<?=$available[0]['thursday_start'] ?>" > </td> <td> <input type="time" name="thur_end_time" class="form-control"value="<?=$available[0]['thursday_end'] ?>" > </td> </tr> <tr> <td>Friday</td> <td> <input type="time" name="fri_start_time" id="mo" class="form-control"value="<?=$available[0]['friday_start'] ?>" > </td> <td> <input type="time" name="fri_end_time" class="form-control"value="<?=$available[0]['friday_end'] ?>" > </td> </tr> <tr> <td>Saturday</td> <td> <input type="time" name="sat_start_time" id="mo" class="form-control"value="<?=$available[0]['saturday_start'] ?>" > </td> <td> <input type="time" name="sat_end_time" class="form-control"value="<?=$available[0]['friday_end'] ?>" > </td> </tr> <tr> <td>Sunday</td> <td> <input type="time" name="sun_start_time" id="mo" class="form-control"value="<?=$available[0]['sunday_start'] ?>" > </td> <td> <input type="time" name="sun_end_time" class="form-control"value="<?=$available[0]['sunday_end'] ?>" > </td> </tr> </table> </div> <div class="container mt-2 mb-2 text-center"> <input type="submit" class="btn btn-sm btn-success" value="Submit"> </div> </form> </div> </div> </div> <!--people calling time end--> <!----> <!-- user avtar section --> <!-- profile section start --> <section class="top-space pt-0" style="position:relative"> <div class="profile-detail" style="padding-bottom: 0px;padding-top: 6px; margin-left: -10px;position:relative"> <div class="media"> <img src="assets/images/user/1.png" class="img-fluid" style="width: 44px;height: 44px; margin-left: 10px; padding-left: 0px; margin-left: 5px;;border: 2px solid blue;" alt="" /> <div class="media-body"> <span style="color:green;text-align:right;position:absolute;right: 17px;top: 11px;">Online <?=$u_id?> </span> <h3 style="font-size: small;"><b><?=$result[0]['name']?></b> </h3> </div> </div> </div> <div class="profile-detail" style="padding-top: 0px;padding-bottom: 0px;padding-left: 11px;"> <p style=" line-height:20px;margin-bottom: 0px;"><b><small><?php echo $result[0]['lgl_address'].",<br>".$result[0]['name'].",".$result[0]['city'] .",".$result[0]['state']?></small></b></p> </div> <small><button style="position: absolute; top: 12px; right: 3px; top: 70px; font-size: 10px; padding: 0px;" class="btn btn-sm btn-danger" data-bs-toggle="modal" data-bs-target="#rewards">Rewards</button></small> </section> <!-- profile section end --> <!-- user avtar end --> <style> .follower_row{ padding: 50px; padding-top: 5px; padding-bottom: 5px; } .inner{ display: grid; place-items: center; /*height: 5vh;*/ } .custom-file-upload { border: 1px solid #ccc; display: inline-block; padding: 6px 12px; cursor: pointer; } .inner .btn.btn-sm { font-size: 14px; padding: 4px 14px; margin-bottom: 14px; } </style> <div class="row" style="padding-bottom: 20px; --bs-gutter-x: -2.5rem;" > <p><?=$result[0]['cat']?></p> <p><?=$result[0]['sub_cat']?></p> <div class="col-6 col-sm-6 inner" > <h3><b><?=$pic_row?></b></h3> <p>Photos</p> <!--<button class="btn btn-solid btn-sm" data-bs-toggle="modal" data-bs-target="#edit" ><small> Edit </small> </button>--> <a href="seller_register.php?edit=edit" class="btn btn-solid btn-sm">Profile Edit </a> <a href="#" class="btn btn-solid btn-sm">Invoice </a> </div> <div class="col-6 col-sm-6 inner" > <h3><b><?=$followers?></b></h3> <a href="followers.php"> <p>Followers</p> </a> <button class="btn btn-solid btn-sm" data-bs-toggle="modal" data-bs-target="#deactive" ><small> Disable Account </small> </button> <button class="btn btn-solid btn-sm" data-bs-toggle="modal" data-bs-target="#available_time" ><small> Available time </small> </button> </div> </div> <!--START--> <!--people calling time start--> <div class="modal fade" id="staticBackdrop" style="" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true"> <div class="modal-dialog modal-dialog-centered"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="staticBackdropLabel">Temproarily Disable</h5> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <form id="deactive_form" > <div class="container mt-2 mb-2"> <label for="startDateTimePicker" class="form-label">Start Date and Time:</label> <input type="datetime-local" name="start_time" id="startDateTimePicker" value="<?=$result[0]['start_time']?>" class="form-control" > </div> <div class="container mt-2 mb-2"> <label for="endDateTimePicker" class="form-label">End Date and Time:</label> <input type="datetime-local" name="end_time" id="endDateTimePicker" value="<?=$result[0]['end_time']?>" class="form-control" > </div> <div class="container mt-2 mb-2 text-center"> <input type="submit" class="btn btn-sm btn-success" value="Submit"> </div> </form> </div> </div> </div> <!--people calling time end--> <!--END--> <!--people deactivate start--> <div class="modal fade" id="rewards" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true" style=""> <div class="modal-dialog modal-dialog-centered"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="staticBackdropLabel">Rewards</h5> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div> <!--test--> <form id="rewards_form" method="post" enctype="multipart/form-data" > <div class="row" > <div class="col-12 col-sm-12 " > <div hidden style='padding:14px'> <label for="rewardss" class="custom-file-upload"> <input id="rewardss" name="rewards[]" type="file" /> <i class="fa fa-cloud-upload"></i> Choose Img</label><input id="submit_rewards" class="custom-file-upload" type="submit" value="upload" /> </div> <div style='padding:14px; margin:auto';> <div id="sortableImgThumbnailPreviewrewards"> </div> </div> </div> </div> </form> <!--<div class="row" >--> <!--<div class="col-4" >--> <!--<a id="rewards_img"><img style=" padding: 23px;--> <!--width: 120px;--> <!--border: 1px solid grey;--> <!--border-radius: 31px;--> <!--margin: 6px 9px;;" src="assets/images/products/add.png" alt="" class="img-fluid " /></a>--> <!--</div>--> <?php foreach ($result_rwd as $rwd) { ?> <div class="col-sm-4 col-4"> <div class="product-box ratio_square"> <h5 style=" padding-left: 95px;"><i onClick="showAlertrwd('<?=$rwd['id']?>')" class="iconly-Delete icli"></i></h5> <div class="img-part image-container"> <?php if($rwd['verification_status']==1){ ?> <img src="images/gif/verified.gif" style="width: 30px;border-radius: 50%; position: relative; bottom: 110px; left: 1px;" /> <?php } else{ ?> <img src="images/gif/pending.gif" style="width: 20px;border-radius: 50%; position: relative; bottom: 110px; left: 1px;" /> <?php } ?> <img src="<?=$rwd['photo']?>" alt="" class="img-fluid bg-img image" /> </div> </div> </div> <?php } ?> <div class="col-12" > <center><p class="text-danger" > <?=$result[0]['verify']?> out of 7 days completed. <?=(7-$result[0]['verify'])?> days left to unlock 1 month free plan </p></center> </div> </div> </div> </div> </div> </div> <!--people deactivate end--> <!--people deactivate start--> <div class="modal fade" id="deactive" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true" style=""> <div class="modal-dialog modal-dialog-centered"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="staticBackdropLabel">Deactivate</h5> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div> <center><a href="#" class="btn btn-solid btn-sm" data-bs-toggle="modal" data-bs-target="#delete" > <small>Permanently Deactivate </small></a> </center> <center><button class="btn btn-solid btn-sm" data-bs-toggle="modal" data-bs-target="#staticBackdrop" ><small> Temporarily Suspend </small> </button> </center> </div> </div> </div> </div> <!--people deactivate end--> <!--people cedit start--> <!--add modal starts--> <div class="modal fade" id="add_modal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true" style=""> <div class="modal-dialog modal-dialog-centered"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="staticBackdropLabel">Form</h5> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div> <!--tab end--> <section class="pt-0 tab-section"> <div class="tab-section"> <div class="tab-content px-15"> <div class="tab-pane fade show active" id="trending"> <div class="row gy-3 gx-3"> <div class="append_pic" ></div> <div class="row" > <?php foreach ($form as $input) {?> <form id="seller_form" > <div class="col-12 col-sm-12"> <input type="text" id="product_thumnail" name="product_thumnail" /> <div <?=($input['field1'] ==""?"hidden":"")?> class="container mt-2 mb-2"> <label for="field1" class="form-label"><?=$input['field1']?></label> <input type="field1_datatype" name="field1" id="field1" value="<?=$forms[0]['field1']?>" class="form-control" > </div> <div <?=($input['gender'] ==""?"hidden":"")?> class="container mt-2 mb-2"> <label for="gender" class="form-label"><?=$input['gender']?></label> <select id="select2" name ="select2" class="form-select valid font-size12" aria-invalid="false" required=""> <option <?= empty($input['gender_op1']) ? "hidden" : "" ?> value='<?=$input['gender_op1']?>'><?=$input['gender_op1']?></option> <option <?= empty($input['gender_op2']) ? "hidden" : "" ?> value='<?=$input['gender_op2']?>'><?=$input['gender_op2']?></option> </select> </div> <div <?=($input['female_products'] ==""?"hidden":"")?> class="container mt-2 mb-2 select5"> <label for="female_products" class="form-label"><?=$input['female_products']?></label> <select id="select5" name ="select5" class="form-select valid font-size12" aria-invalid="false" required=""> <option <?= empty($input['female_products1']) ? "hidden" : "" ?> value='<?=$input['female_products1']?>'><?=$input['female_products1']?></option> <option <?= empty($input['female_products2']) ? "hidden" : "" ?> value='<?=$input['female_products2']?>'><?=$input['female_products2']?></option> <option <?= empty($input['female_products3']) ? "hidden" : "" ?> value='<?=$input['female_products3']?>'><?=$input['female_products3']?></option> <option <?= empty($input['female_products4']) ? "hidden" : "" ?> value='<?=$input['female_products4']?>'><?=$input['female_products4']?></option> <option <?= empty($input['female_products5']) ? "hidden" : "" ?> value='<?=$input['female_products5']?>'><?=$input['female_products5']?></option> <option <?= empty($input['female_products6']) ? "hidden" : "" ?> value='<?=$input['female_products6']?>'><?=$input['female_products6']?></option> <option <?= empty($input['female_products7']) ? "hidden" : "" ?> value='<?=$input['female_products7']?>'><?=$input['female_products7']?></option> <option <?= empty($input['female_products8']) ? "hidden" : "" ?> value='<?=$input['female_products8']?>'><?=$input['female_products8']?></option> <option <?= empty($input['female_products9']) ? "hidden" : "" ?> value='<?=$input['female_products9']?>'><?=$input['female_products9']?></option> <option <?= empty($input['female_products10']) ? "hidden" : "" ?> value='<?=$input['female_products10']?>'><?=$input['female_products10']?></option> </select> </div> <div <?=($input['male_products'] ==""?"hidden":"")?> class="container mt-2 mb-2 select4"> <label for="male_products" class="form-label"><?=$input['male_products']?></label> <select id="select4" name ="select4" class="form-select valid font-size12" aria-invalid="false" required=""> <option <?= empty($input['male_products1']) ? "hidden" : "" ?> value='<?=$input['male_products1']?>'><?=$input['male_products1']?></option> <option <?= empty($input['male_products2']) ? "hidden" : "" ?> value='<?=$input['male_products2']?>'><?=$input['male_products2']?></option> <option <?= empty($input['male_products3']) ? "hidden" : "" ?> value='<?=$input['male_products3']?>'><?=$input['male_products3']?></option> <option <?= empty($input['male_products4']) ? "hidden" : "" ?> value='<?=$input['male_products4']?>'><?=$input['male_products4']?></option> <option <?= empty($input['male_products5']) ? "hidden" : "" ?> value='<?=$input['male_products5']?>'><?=$input['male_products5']?></option> <option <?= empty($input['male_products6']) ? "hidden" : "" ?> value='<?=$input['male_products6']?>'><?=$input['male_products6']?></option> <option <?= empty($input['male_products7']) ? "hidden" : "" ?> value='<?=$input['male_products7']?>'><?=$input['male_products7']?></option> <option <?= empty($input['male_products8']) ? "hidden" : "" ?> value='<?=$input['male_products8']?>'><?=$input['male_products8']?></option> <option <?= empty($input['male_products9']) ? "hidden" : "" ?> value='<?=$input['male_products9']?>'><?=$input['male_products9']?></option> <option <?= empty($input['male_products10']) ? "hidden" : "" ?> value='<?=$input['male_products10']?>'><?=$input['male_products10']?></option> </select> </div> <div <?=($input['field2'] ==""?"hidden":"")?> class="container mt-2 mb-2"> <label for="field2" class="form-label"><?=$input['field2']?></label> <input type="field2_datatype" name="field2" id="field2" value="<?=$forms[0]['field2']?>" class="form-control" > </div> <div <?=($input['field3'] ==""?"hidden":"")?> class="container mt-2 mb-2"> <label for="field3" class="form-label"><?=$input['field3']?></label> <input type="field3_datatype" name="field3" id="field3" value="<?=$forms[0]['field3']?>" class="form-control" > </div> <div <?=($input['field4'] ==""?"hidden":"")?> class="container mt-2 mb-2"> <label for="field4" class="form-label"><?=$input['field4']?></label> <input type="field4_datatype" name="field4" id="field4" value="<?=$forms[0]['field4']?>" class="form-control" > </div> <div <?=($input['field5'] ==""?"hidden":"")?> class="container mt-2 mb-2"> <label for="field5" class="form-label"><?=$input['field5']?></label> <input type="field5_datatype" name="field5" id="field5" value="<?=$forms[0]['field5']?>" class="form-control" > </div> <div <?=($input['field6'] ==""?"hidden":"")?> class="container mt-2 mb-2"> <label for="field6" class="form-label"><?=$input['field6']?></label> <input type="field6_datatype" name="field6" id="field6" value="<?=$forms[0]['field6']?>" class="form-control" > </div> <div <?=($input['field7'] ==""?"hidden":"")?> class="container mt-2 mb-2"> <label for="field7" class="form-label"><?=$input['field7']?></label> <input type="field7_datatype" name="field7" id="field7" value="<?=$forms[0]['field7']?>" class="form-control" > </div> <div <?=($input['field8'] ==""?"hidden":"")?> class="container mt-2 mb-2"> <label for="field8" class="form-label"><?=$input['field8']?></label> <input type="field8_datatype" name="field8" id="field8" value="<?=$forms[0]['field8']?>" class="form-control" > </div> <div <?=($input['field9'] ==""?"hidden":"")?> class="container mt-2 mb-2"> <label for="field9" class="form-label"><?=$input['field9']?></label> <input type="field9_datatype" name="field9" id="field9" value="<?=$forms[0]['field9']?>" class="form-control" > </div> <div <?=($input['field10'] ==""?"hidden":"")?> class="container mt-2 mb-2"> <label for="field10" class="form-label"><?=$input['field10']?></label> <input type="field10_datatype" name="field10" id="field10" value="<?=$forms[0]['field10']?>" class="form-control" > </div> <div <?=($input['field11'] ==""?"hidden":"")?> class="container mt-2 mb-2"> <label for="field11" class="form-label"><?=$input['field11']?></label> <input type="field11_datatype" name="field11" id="field11" value="<?=$forms[0]['field11']?>" class="form-control" > </div> <div <?=($input['field12'] ==""?"hidden":"")?> class="container mt-2 mb-2"> <label for="field12" class="form-label"><?=$input['field12']?></label> <input type="number" name="field12" id="field12" class="form-control" > </div> <div <?=($input['field13'] ==""?"hidden":"")?> class="container mt-2 mb-2"> <label for="field13" class="form-label"><?=$input['field13']?></label> <input type="number" name="field13" id="field13" class="form-control" > </div> <div <?=($input['field14'] ==""?"hidden":"")?> class="container mt-2 mb-2"> <label for="field14" class="form-label"><?=$input['field14']?></label> <input type="numer" name="field14" id="field14" class="form-control" > </div> <div <?=($input['field15'] ==""?"hidden":"")?> class="container mt-2 mb-2"> <label for="field15" class="form-label"><?=$input['field15']?></label> <input type="number" name="field15" id="field15" class="form-control" > </div> <div class="container mt-2 mb-2"> <label for="FisrtName" class="form-label "><?=$input['select1']?></label> <select name ="select1" class="form-select valid font-size12" aria-invalid="false" required=""> <option <?= empty($input['option1_1']) ? "hidden" : "" ?> value='<?=$input['option1_1']?>'><?=$input['option1_1']?></option> <option <?= empty($input['option1_2']) ? "hidden" : "" ?> value='<?=$input['option1_2']?>'><?=$input['option1_2']?></option> <option <?= empty($input['option1_3']) ? "hidden" : "" ?> value='<?=$input['option1_3']?>'><?=$input['option1_3']?></option> <option <?= empty($input['option1_4']) ? "hidden" : "" ?> value='<?=$input['option1_4']?>'><?=$input['option1_4']?></option> <option <?= empty($input['option1_5']) ? "hidden" : "" ?> value='<?=$input['option1_5']?>'><?=$input['option1_5']?></option> <option <?= empty($input['option1_6']) ? "hidden" : "" ?> value='<?=$input['option1_6']?>'><?=$input['option1_6']?></option> <option <?= empty($input['option1_7']) ? "hidden" : "" ?> value='<?=$input['option1_7']?>'><?=$input['option1_7']?></option> <option <?= empty($input['option1_8']) ? "hidden" : "" ?> value='<?=$input['option1_8']?>'><?=$input['option1_8']?></option> <option <?= empty($input['option1_9']) ? "hidden" : "" ?> value='<?=$input['option1_9']?>'><?=$input['option1_9']?></option> </select> </div> <div <?=($input['select1'] ==""?"hidden":"")?> class="container mt-2 mb-2"> <!--<input type="field15_datatype" name="field15" id="field15" value="<?=$forms[0]['field15']?>" class="form-control" >--> </div> <div class="container mt-2 mb-2"> <center> <label id="selectbutton" for="r_threee"> Public <!--<input type="radio" onclick="radioselect('1')" class="radio_animated" id="r_threee" name="pdt_status" value="1" required="" >--> <input type="radio" selected class="radio_animated" id="r_threee" name="pdt_status" value="1" required="" checked > </label> <label for="r_three"> Private <!--<input type="radio" onclick="radioselect('2')" class="radio_animated" id="r_three" name="pdt_status" value="2" required="" >--> <!--<input type="radio" onclick="Private()" class="radio_animated" id="r_three" name="pdt_status" value="2" required="" >--> <input type="radio" onclick="privateRadioClicked()" class="radio_animated" id="r_three" name="pdt_status" value="2" required> </label> </center> </div> <br> <script> // $(document).ready(function(){ // radioselect('1'); // }) // function radioselect(id){ // $('#selectbutton').empty(); // var inputbox = ' Public <input type="radio" onclick="radioselect('1')" class="radio_animated" id="r_threee" name="pdt_status" value="1" required="" selected >'; // alert(id); // if( id==1){ // $('#selectbutton').append(inputbox); // }else{ // } // } </script> <center><input type="submit" class="btn btn-sm btn-danger " /> </center> <br> </div> </form> <?php } ?> </div> </div> </div> </div> </div> <!--people cedit end--> <!-- tab section start --> <!--delete account start--> <div class="modal fade" id="delete" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true"> <div class="modal-dialog modal-dialog-centered"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="staticBackdropLabel">Delete Account</h5> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <form id="delete_form" > <div class="container mt-2 mb-2"> <label for="feedback" class="form-label">Feedback:</label> <textarea name ="feedback" id="feedback" class="form-control" ></textarea> </div> <div class="container mt-2 mb-2"> <label for="reason" class="form-label">Reason for delete</label> <textarea name ="reason" id="reason" class="form-control" ></textarea> </div> <input type="hidden" id="ids" value="<?= $_SESSION['user']['id'] ?>"> <div class="container mt-2 mb-2 text-center"> <input type="submit" class="btn btn-sm btn-success" value="Submit"> </div> </form> </div> </div> </div> <!--delete account end--> <!-- tab section start --> <!-- Button trigger modal --> <button hidden type="button" id="imgmodel" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#exampleModal"> </button> <!-- Modal --> <div class="modal fade" id="exampleModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true"> <div class="modal-dialog modal-dialog-centered"> <div class="modal-content" style = " border:none;background: none;"> <div class="modal-header" style=" border: none;"> </div> <div class="modal-body"> <img id="final" width="100%" src="" /> </div> </div> </div> </div> <!--modal start--> <!-- remove item canvas start --> <!-- remove item canvas end --> <!--modal end--> </div> </div> </div> </div> </section> <button hidden id="seller_form_details" data-bs-toggle="modal" data-bs-target="#add_modal" > click</button> <!--test--> <form id="photos_form" method="post" enctype="multipart/form-data" > <div class="row" hidden > <div class="col-12 col-sm-12 " > <div style='padding:14px'> <label for="files" class="custom-file-upload"> <input id="files" name="files[]" type="file" multiple/> <i class="fa fa-cloud-upload"></i> Choose Img</label><input id="submit" class="custom-file-upload" type="submit" value="upload" /> </div> <div style='padding:14px; margin:auto';> <div id="sortableImgThumbnailPreview"> </div> </div> </div> </div> </form> <div class="row"> <div class="col-sm-4 col-4"> <div class="product-box ratio_square"> <a id="upd_img"><img style="padding: 38px;" src="assets/images/products/add.png" alt="" class="img-fluid " /></a> </div> </div> <?php foreach ($products as $product) { ?> <div <? $product['label1'] == "null" ? "hidden":"" ?> class="col-sm-4 col-4"> <div class="product-box ratio_square"> <div class="img-part image-container"> <div> <div style="float:left"><?=($product['pdt_status'] ==1 ? "Public":" Private")?></div> <div style="float:right" ><i onClick="showAlertrwd('<?=['id']?>')" class="iconly-Delete icli"></i></div> </div> <?php if(['verification_status']==1){ ?> <img src="images/gif/verified.gif" style="width: 30px;border-radius: 50%; position: relative; bottom: 110px; left: 1px;" /> <?php } else{ ?> <img src="images/gif/pending.gif" style="width: 20px;border-radius: 50%; position: relative; bottom: 110px; left: 1px;" /> <?php } ?> <a href="seller_product_edit.php?p_id=<?= $product['p_id'] ?>&cat_id=<?= $category_id_seller ?>"> <img src="<?=$product['thumpnail']?>" alt="" class="img-fluid bg-img image" /></a> <p><?=$product['label1']?> </p> </div> </div> </div> <?php } ?> </div> </div> </div> </div> </div> <!--add modal Ends--> <!-- panel space start --> <section class="panel-space"></section> <!-- panel space end --> <!-- bottom panel start --> <div class="cart-bottom row m-0"> <div> <div class="left-content col-5"> <a href="#" class="title-color">CANCEL </a> </div> <a href="delivery.html" class="btn btn-solid col-7 text-uppercase">Save Details </a> </div> </div> <!--all images modal starts--> <div class="modal fade" id="all_images" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="staticBackdropLabel">Modal title</h5> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body"> <div class="row" > <?php foreach ($result2 as $pic) { ?> <div class="col-sm-4 col-4"> <div class="product-box ratio_square"> <h5 style=" padding-left: 95px;"><i onClick="showAlert('<?=$pic['id']?>')" class="iconly-Delete icli"></i></h5> <div onClick="modalImg('<?=$pic['image']?>')" class="img-part image-container"> <img src="<?=$pic['image']?>" alt="" class="img-fluid bg-img image" /> </div> </div> </div> <?php } ?> </div> </div> <div class="modal-footer"> <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button> <button type="button" class="btn btn-primary">Understood</button> </div> </div> </div> </div> <!--all images modal Ends--> <script> $(document).ready(function(){ scroll() $('#deactive_form').submit(function(event) { event.preventDefault(); // Prevent the form from submitting normally var startDateTime = $('#startDateTimePicker').val(); var endDateTime = $('#endDateTimePicker').val(); alert(endDateTime +startDateTime); $.ajax({ type: "POST", url: "api/deactive_seller.php", data: { startDateTime: startDateTime, endDateTime: endDateTime, deactive_user: 2 }, dataType: "json", success: function(response) { if (response.success) { alert(response.message); // Show success message } else { alert("Error: " + response.message); // Show error message } }, error: function(xhr, status, error) { console.error("AJAX Error: " + xhr.responseText); // Log AJAX error for debugging } }); }); $('#delete_form').submit(function(event) { event.preventDefault(); // Prevent the form from submitting normally var feedback = $('#feedback').val(); var ids = $('#ids').val(); var reason = $('#reason').val(); alert(feedback +reason); $.ajax({ type: "POST", url: "api/delete.php", data: { reason: reason, feedback: feedback, ids:ids }, dataType: "json", success: function(response) { if (response.success) { alert(response.message); // Show success message window.location.href = "seller_profile.php"; } else { alert("Error: " + response.message); // Show error message modal fade show id="edit"" ?edit=< ?php echo $edit; ?> } }, error: function(xhr, status, error) { console.error("AJAX Error: " + xhr.responseText); // Log AJAX error for debugging } }); }); $("#exampleModal").click(); }); $("#upd_img").click(function () { // Trigger a click event on the file input element $("#files").click(); }); $("#rewards_img").click(function () { // Trigger a click event on the file input element $("#rewardss").click(); }); $("#files").change(function () { var fileCount = $('#files')[0].files.length; var selectedFile = this.files[0]; if (selectedFile) { $("#submit").click(); } }); $("#rewardss").change(function () { var fileCount = $('#rewardss')[0].files.length; var selectedFile = this.files[0]; if (selectedFile) { $("#submit_rewards").click(); } }); $('#photos_form').on('submit',function(e){ e.preventDefault(); alert("photos start......"); var fileCount = $('#files')[0].files.length; var formData = new FormData(this); formData.append('type', 'product_photos_form'); formData.append('count', fileCount); console.log(formData); $.ajax({ url: 'api/seller.php', type: 'post', dataType: 'json', data: formData, cache: false, contentType: false, processData: false, success: function(response) { console.log(response); if (response['status'] == 200) { alert(response['message']); scroll() $('#seller_form_details').click(); // scroll() } else { alert(response['message']); } } }); }) $('#rewards_form').on('submit',function(e){ e.preventDefault(); var fileCount = $('#rewardss')[0].files.length; alert(fileCount) var formData = new FormData(this); formData.append('type', 'rewards_form'); formData.append('count', fileCount); console.log(formData); $.ajax({ url: 'api/profile_add.php', type: 'post', dataType: 'json', data: formData, cache: false, contentType: false, processData: false, success: function(response) { console.log(response); if (response['status'] == 200) { alert(response['message']); $(this).trigger("reset"); window.location.href = 'profile-setting.php'; } else { alert(response['message']); } } }); }) function showAlert(id) { var confirmation = confirm("Do you want to delete item with ID: " + id + "?"); if (confirmation) { $.ajax({ url: 'api/profile_add.php', type: 'post', dataType: 'json', data: {type:"img-delete", id: id }, // Pass the ID to the server-side script success: function(response) { console.log(response); if (response['status'] == 200) { alert(response['message']); $(this).trigger("reset"); window.location.href = 'profile-setting.php'; } else { alert(response['message']); } } }); } else { alert("Deletion cancelled for item "); } } function showAlertrwd(id) { var confirmation = confirm("Do you want to delete item with ID: " + id + "?"); if (confirmation) { $.ajax({ url: 'api/profile_add.php', type: 'post', dataType: 'json', data: {type:"rwd-delete", id: id }, // Pass the ID to the server-side script success: function(response) { console.log(response); if (response['status'] == 200) { alert(response['message']); $(this).trigger("reset"); window.location.href = 'profile-setting.php'; } else { alert(response['message']); } } }); } else { alert("Deletion cancelled for item "); } } </script> <script> function modalImg(id) { $("#final").attr("src", id); $('#imgmodel').click(); } </script> <script> $(document).ready(function() { $('#available_form').submit(function(event) { event.preventDefault(); // Prevent form submission // Collect form data var formData = new FormData(this); console.log(formData); // Send AJAX request using modern syntax $.ajax({ type: 'POST', url: 'api/available_time.php', // PHP file to handle form data data: formData, processData: false, // Prevent jQuery from processing the data (important for FormData) contentType: false, // Set content type to false, jQuery will tell the server its form data success: function(response) { // Parse JSON response try { var jsonResponse = JSON.parse(response); if (jsonResponse.status === 200) { console.log(jsonResponse); // Call wishlist function with appropriate arguments // wishlist(id, jsonResponse.element); } else { console.warn(jsonResponse.message); } } catch (error) { console.error("Error parsing JSON response: " + error); } }, error: function(xhr, status, error) { console.error("AJAX request failed: " + status + ", " + error); } }); }); }); </script> <script> // $(document).ready(function() { // $('#edit_form').submit(function(event) { // event.preventDefault(); // Prevent form submission // // Send AJAX request // $.ajax({ // type: 'POST', // url: 'api/edit_profile.php', // data: new FormData(this), // processData: false, // contentType: false, // success: function(response) { // try { // var jsonResponse = JSON.parse(response); // if (jsonResponse.status === 200) { // console.log(jsonResponse); // // Call wishlist function with appropriate arguments // // wishlist(id, jsonResponse.element); // } else { // console.warn(jsonResponse.message); // } // } catch (error) { // console.error("Error parsing JSON response: " + error); // } // }, // error: function(xhr, status, error) { // console.error("AJAX request failed: " + status + ", " + error); // } // }); // }); // }); $(document).ready(function() { $('#edit_form').submit(function(e) { e.preventDefault(); alert('hello'); var formData = new FormData(this); formData.append('type', 'upload'); console.log(formData); $.ajax({ url: 'api/profile_edit.php', type: 'post', dataType: 'json', data: formData, cache: false, contentType: false, processData: false, success: function(response) { console.log(response); if (response['status'] == 200) { alert(response['message']); } else { alert(response['message']); } } }); }); }); </script> <script> $(document).ready(function() { $('#seller_form').submit(function(e) { e.preventDefault(); var formData = new FormData(this); formData.append('type', 'seller'); console.log(formData); $.ajax({ url: 'api/seller.php', type: 'post', dataType: 'json', data: formData, cache: false, contentType: false, processData: false, success: function(response) { console.log(response); if (response['status'] == 200) { alert(response['message']); } else { alert(response['message']); } } }); }); }); </script> <script> $(document).ready(function () { $('#r_three').change(function () { privateRadioClicked(); }); function privateRadioClicked() { alert('Your product is currently set to private and is hidden from view by others.'); } }); </script> <script> $(document).ready(function(){ $.ajax({ url: 'list/sub_cat_dropdown.php', type: 'post', data:{types:'datas'}, success: function (response) { $('#sub_cat').empty(); // Clear existing content before appending the new response $('#sub_cat').append(response); } }); }) function pic_change(id,pic){ $('#product_profile').attr('src',pic); $('#product_thumnail').val(pic) alert(pic+'pcicture') } </script> <script> function scroll(){ $.ajax({ url: "list/scroll.php", method: "GET", success: function(response){ // Append the response to the contentContainer $(".append_pic").html(response); }, error: function(xhr, status, error){ console.error("Error loading content: " + error); } }); } </script> <script> $(document).ready(function() { var gend1 = "<?=$form[0]['gender_op1']?>"; var gend2 = "<?=$form[0]['gender_op2']?>"; $('#select4, #select5, .select4, .select5').hide().prop('disabled', true); function updateVisibility() { var select2Value = $('#select2').val(); if (select2Value === gend1) { $('#select4').val(null) $('#select5').hide().prop('disabled', true); $('.select4').show(); $('.select5').hide(); } else if (select2Value === gend2) { $('#select5').val(null) $('#select4').hide().prop('disabled', true); $('.select4').hide(); $('.select5').show(); } } // Initial call to set visibility based on the default value of #select2 updateVisibility(); $('#select2').change(function() { updateVisibility(); }); }); </script> <script> // field12 price // field 13 discount // field 14 quantity // field 15 final price $(document).ready(function () { $(' #field12, #field13, #field14').on('input', function () { calculateFinalPrice(); }); function calculateFinalPrice() { var productPrice = parseFloat($('#field12').val()) || 0; var discount = parseFloat($('#field13').val()) || 0; var quantity = parseInt($('#field14').val()) || 0; var discountedPrice = field12 - (field12 * (field13 / 100)); var finalPrice = discountedPrice * field15; console.log(finalPrice); $('#field15').val(finalPrice.toFixed(2)); } }); </script> <?php include "footer2.php" ?>