D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
shubmkcj
/
designpitara.com
/
admin
/
services
/
Filename :
update-last-level-extra-sub-services.php
back
Copy
<?php include("../include/config.php"); include("../include/sessionhandle.php"); include("../include/header.php"); $ser_id = $_GET['id']; $sqlAssign4 = "SELECT * FROM `services_last_level_extra` WHERE `services_last_level_extra`.`id`='$ser_id'"; $resultAssign4 = mysqli_query($conn, $sqlAssign4); if (mysqli_num_rows($resultAssign4) > 0) { while($rows4 = mysqli_fetch_assoc($resultAssign4)) { $id = $rows4['id']; $ext_service_main_id = $rows4['service_main_id']; $ext_service_cat_id = $rows4['service_cat_id']; $ext_last_level_service_id = $rows4['last_level_service_id']; $ext_s_name = $rows4['name']; $ext_s_detail = $rows4['detail']; $ext_s_image = $rows4['image']; $ext_s_url = $rows4['url']; $ext_s_keyword = $rows4['keyword']; $ext_smeta_title = $rows4['meta_title']; $ext_s_description = $rows4['description']; $s_status = $rows['status']; }} $sqlAssign1 = "SELECT * FROM `services_last_level` WHERE `services_last_level`.`id`='$ext_last_level_service_id'"; $resultAssign1 = mysqli_query($conn, $sqlAssign1); if (mysqli_num_rows($resultAssign1) > 0) { while($rows = mysqli_fetch_assoc($resultAssign1)) { $last_lvl_id = $rows['id']; $last_lvl_s_name = $rows['name']; }} $sqlAssign3 = "SELECT * FROM `services_category` WHERE `services_category`.`id`='$ext_service_cat_id'"; $resultAssign3 = mysqli_query($conn, $sqlAssign3); if (mysqli_num_rows($resultAssign3) > 0) { while($row3 = mysqli_fetch_assoc($resultAssign3)) { $sub_services_nameid = $row3['id']; $sub_services_name = $row3['name']; } } $sqlAssign2 = "SELECT * FROM `services` WHERE `services`.`id`='$ext_service_main_id'"; // echo $sqlAssign2; $resultAssign2 = mysqli_query($conn, $sqlAssign2); if (mysqli_num_rows($resultAssign2) > 0) { while($row2 = mysqli_fetch_assoc($resultAssign2)) { $main_services_nameId = $row2['id']; $main_services_name = $row2['name']; } } ?> <style> #my_services ul li:nth-child(7) { background-color: #eb6a4e; } #my_services ul li:nth-child(7) a { color: #fff; } #my_services ul li:nth-child(7) a:hover { background-color: #eb6a4e; } </style> <script> window.onload = function() { document.getElementById('my_services').classList.add("active"); document.getElementById('my_services1').classList.add("in"); }; </script> <div class="small-header"> <div class="hpanel"> <div class="panel-body"> <div id="hbreadcrumb" class="pull-right"> <ol class="hbreadcrumb breadcrumb"> <li><a href="<?php echo $admin_baseurl . 'dashboard.php';?>">Dashboard</a></li> <li class="active"> <span>Services Category</span> </li> </ol> </div> <h2 class="font-light m-b-xs"> Add Extra Sub Services For last level </h2> </div> </div> </div> <div class="content"> <div class="hpanel"> <div class="hpanel"> <div class="panel-heading hbuilt"> <div class="panel-tools"> <a class="showhide"><i class="fa fa-chevron-up"></i></a> <a class="fullscreen"><i class="fa fa-expand"></i></a> </div> Add New Extra Sub Services For last level </div> <div class="panel-body"> <form method="post" action="execute-extra-services.php" class="form-horizontal" enctype="multipart/form-data"> <div class="row"> <div class="form-group"> <div class="col-md-4"> <label>Select Main Services </label> <select id="main_service_id" name="main_service_id" class="form-control" required> <option selected value="<?php echo $main_services_nameId?>"> <?php echo $main_services_name;?></option> <option value="" disabled>-- Select main service --</option> <?php $sql1m = "SELECT * FROM `services` ORDER BY `services`.`id` ASC"; $result1m = mysqli_query($conn, $sql1m); if (mysqli_num_rows($result1m) > 0) { while($row1m = mysqli_fetch_assoc($result1m)) { $det_det_id = $row1m['id']; $g_name = $row1m['name']; ?> <option value="<?php echo $det_det_id?>"> <?php echo $g_name;?></option> <?php } } ?> </select> </div> <div class="col-md-4"> <label> Service Category </label> <select name="sub_services_id" id="sub_services_id" class="form-control" required> <option selected value="<?php echo $sub_services_nameid?>"> <?php echo $sub_services_name;?></option> <option value="" disabled>-- Select category--</option> </select> </div> <div class="col-md-4"> <label>Last Level Services </label> <select name="last_level_services_id" id="last_level_services_id" class="form-control" required> <option selected value="<?php echo $last_lvl_id?>"> <?php echo $last_lvl_s_name;?></option> <option value="" disabled>-- Select Last Level Service category--</option> </select> </div> </div> <div class="form-group col-md-12"> <label>Extra Sub Services For last level Name</label> <input name="services_name" class="form-control" placeholder="eg. Extra Sub Services name..." value="<?php echo $ext_s_name;?>" required> </div> <div class="form-group col-md-12"> <label>Custom url</label> <input name="custom_url" class="form-control" placeholder="eg. service custom url..." value="<?php echo $ext_s_url;?>"> </div> <div class="form-group col-md-12"> <label>Services Detail</label> <textarea class="textarea form-control" id="service_details" name="service_details" placeholder="Enter text ..." rows="5" ><?php echo $ext_s_detail;?></textarea> </div> <div class="form-group col-md-7"> <label>Main Images</label> <input type="file" id="file" class="form-control" name="image_a" multiple="multiple" accept="image/*" > </div> <div class="col-md-5"> <img src="<?php echo $admin_baseurl . 'services/upload/'. $ext_s_image;?>" style="width:100px;"> </div> <div class="form-group col-md-12"> <label>Meta Title</label> <input name="meta_title" class="form-control" placeholder="eg.Meta title... " value="<?php echo $ext_smeta_title;?>"> </div> <div class="form-group col-md-12"> <label>Meta Keywords</label> <input name="keyword" class="form-control" placeholder="eg.Meta Keyword... " value="<?php echo $ext_s_keyword;?>"> </div> <div class="form-group col-md-12"> <label>Meta Description</label> <input name="description" class="form-control" placeholder="eg.Meta Description .." value="<?php echo $ext_s_description;?>"> </div> <div class="form-group col-md-12 text-right"> <input type="hidden" name="lastlevedExtralId" value="<?php echo $ser_id;?>"> <input type="hidden" name="lastlevelExtraOldImage" value="<?php echo $ext_s_image;?>"> <button type="submit" name="update-extra-services" class="btn btn-primary">Submit</button> </div> </div> </form> </div> </div> </div> </div> <script> $(function() { CKEDITOR.replace('service_details', { height: 350, filebrowserUploadUrl: "<?php echo $admin_baseurl . 'services/ckupload.php'; ?>", filebrowserUploadMethod: 'form' }); }); </script> <script type="text/javascript"> $(document).ready(function() { $('#main_service_id').click(function() { var main_service_id = $(this).val(); if (main_service_id) { $.ajax({ type: 'POST', url: 'getLastsubServcies.php', data: 'main_service_id=' + main_service_id, success: function(data) { $('#sub_services_id').html(data); $('#last_level_services_id').html('<option value="">Select Last Level Service</option>'); } }); } else { $('#sub_services_id').html('<option value="">Select Main Service </option>'); $('#last_level_services_id').html('<option value="">Select Service Category</option>'); } }); $("#sub_services_id").on("change", function() { var sub_service_id = $(this).val(); if (sub_service_id) { $.ajax({ url: "getLastsubServcies.php", type: "POST", cache: false, data: { sub_service_id: sub_service_id }, success: function(data) { $("#last_level_services_id").html(data); } }); } else { $('#last_level_services_id').html('<option value="">Select Service Category</option>'); } }); }); </script> <br> <div class="content"> <div class="hpanel"> <div class="panel-heading hbuilt"> <div class="panel-tools"> <a class="showhide"><i class="fa fa-chevron-up"></i></a> <a class="fullscreen"><i class="fa fa-expand"></i></a> </div> View All Extra Sub Services For last level </div> <div class="panel-body"> <div class="table-responsive"> <table id="all_services_details" class="table table-striped table-bordered table-hover"> <thead> <tr> <th>#</th> <th>Service Name</th> <th>Image</th> <th>Service Details</th> <th>Action</th> </tr> </thead> <tbody> <?php $srno = 0; $sqlAssign1 = "SELECT * FROM `services_last_level_extra` ORDER BY `services_last_level_extra`.`id` DESC"; $resultAssign1 = mysqli_query($conn, $sqlAssign1); if (mysqli_num_rows($resultAssign1) > 0) { while($rows = mysqli_fetch_assoc($resultAssign1)) { $id = $rows['id']; $service_main_id = $rows['service_main_id']; $service_cat_id = $rows['service_cat_id']; $last_level_service_id = $rows['last_level_service_id']; $s_name = $rows['name']; $s_detail = $rows['detail']; $s_image = $rows['image']; $s_url = $rows['url']; $s_status = $rows['status']; $sqlAssign2 = "SELECT * FROM `services_last_level` WHERE `services_last_level`.`id`='$last_level_service_id'"; // echo $sqlAssign2; $resultAssign2 = mysqli_query($conn, $sqlAssign2); if (mysqli_num_rows($resultAssign2) > 0) { while($row2 = mysqli_fetch_assoc($resultAssign2)) { $last_level_services_Id = $row2['id']; $last_level_services_name = $row2['name']; } } $sqlAssign3 = "SELECT * FROM `services_category` WHERE `services_category`.`id`='$service_cat_id'"; $resultAssign3 = mysqli_query($conn, $sqlAssign3); if (mysqli_num_rows($resultAssign3) > 0) { while($row3 = mysqli_fetch_assoc($resultAssign3)) { $service_categ_name = $row3['name']; } } $sqlAssign5 = "SELECT * FROM `services` WHERE `services`.`id`='$service_main_id'"; $resultAssign5 = mysqli_query($conn, $sqlAssign5); if (mysqli_num_rows($resultAssign5) > 0) { while($row5 = mysqli_fetch_assoc($resultAssign5)) { $main_service_name = $row5['name']; } } ?> <tr> <th scope="row"><?php echo $srno += 1;?></th> <td> <p> <?php echo $s_name;?></p> <br> <p>Main Service : <b><?php echo $main_service_name;?></b></p> <p>Sub Service : <b><?php echo $service_categ_name;?></b></p> <p>last Service : <b><?php echo $last_level_services_name;?></b></p> </td> <td><?php if(!empty($s_image)){?> <img src="<?php echo $admin_baseurl . 'services/upload/' .$s_image;?>" style="width:100px;"> <?php }?> </td> <td> <?php if(!empty($s_detail)){?> <a type="button" course-details='<?php echo $s_detail;?>' data-toggle="modal" data-target="#srkproperty_details" class="btn theme-btn show_property_details" style="cursor: pointer;">More Detail</a> <?php } ?> </td> <td> <div class="action_btns"> <form method="post" action="update-last-level-extra-sub-services.php?id=<?php echo $id;?>"> <button type="submit" class="actionbtn"><i class="fa fa-pencil-square-o text-success" aria-hidden="true"></i></button> </form> <form method="post" action="execute-extra-services.php?id=<?php echo $id;?>"> <button type="submit" name="delete_services_extra" class="actionbtn" onclick="return confirm('Do you want to delete this data?')"><i class="fa fa-trash text-danger" aria-hidden="true"></i></button> </form> <?php if($s_status == 'active'){?> <form method="post" action="execute-extra-services.php?id=<?php echo $id;?>"> <button type="submit" name="status_deactive_services_extra" class="actionbtn"><i class="fa fa-toggle-on text-success" aria-hidden="true"></i></button> </form> <?php }else{?> <form method="post" action="execute-extra-services.php?id=<?php echo $id;?>"> <button type="submit" name="status_active_services_extra" class="actionbtn"><i class="fa fa-toggle-off text-danger" aria-hidden="true"></i></button> </form> <?php }?> <br> <br> <a type="button" mainServId='<?php echo $last_level_services_Id;?>' last_servicelevelId='<?php echo $id;?>' last_servicelevelName='<?php echo $s_name;?>' data-toggle="modal" data-target="#services_images" class="btn btn-info last_servicelevel_image" style="cursor: pointer;">Add More Image</a> </div> </td> </tr> <?php }}?> </tbody> </table> </div> </div> </div> </div> <br> <?php include('../include/footer.php'); ?> <div class="modal fade" id="services_images" tabindex="-1" role="dialog" aria-hidden="true"> <div class="modal-dialog modal-md"> <div class="modal-content"> <div class="color-line"></div> <div class="modal-header" style=" padding: 12px 30px;"> <button type="button" class="close" data-dismiss="modal">×</button> <h4 class="modal-title">Add <b><span class="dksservice_levelName"></span></b> Services Images</h4> </div> <div class="modal-body"> <form method="post" action="execute.php" class="form-horizontal" enctype="multipart/form-data"> <span class="course-detailsa"></span> <div class="form-group col-md-12"> <input type="file" id="file" class="form-control" name="image_a" multiple="multiple" accept="image/*" required > </div> <div class="form-group col-md-12 text-right"> <input type="hidden" name="uperlaverlSrviceId" id="uperlaverlSrviceId" value=""> <input type="hidden" name="lastLevel_serviceId" id="lastLevel_serviceId" value=""> <button type="submit" name="AddNewImagesOfLastLevel" class="btn btn-primary">Submit</button> <button type="button" class="btn btn-danger" data-dismiss="modal">Close</button> </div> </form> </div> <div class="modal-footer"> <!--<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>--> </div> </div> </div> </div>