OXIESEC PANEL
- Current Dir:
/
/
home
/
u432548786
/
domains
/
it-tas.com
/
public_html
/
admin
Server IP: 191.96.63.230
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
08/13/2025 03:36:42 PM
rwxr-xr-x
📄
aboutuscms.php
2.94 KB
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
add-ads.php
7.64 KB
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
add-brand.php
7.64 KB
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
add-delivery-employee.php
18.07 KB
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
add-employee.php
18.24 KB
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
add-product.php
28.28 KB
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
add-testimonial.php
4.3 KB
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
add-vendor.php
14.38 KB
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
ajax_get_subcat.php
1.35 KB
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
ajax_get_subsub_cat.php
1.35 KB
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
all_product_delete.php
271 bytes
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
ask-price-enquiry.php
3.29 KB
01/20/2024 07:32:19 AM
rw-rw-rw-
📁
assest
-
04/18/2025 03:26:50 AM
rwxr-xr-x
📄
assign-page.php
3.78 KB
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
balance-sheet.php
6.54 KB
01/20/2024 07:32:19 AM
rw-rw-rw-
📁
banner
-
08/13/2025 03:35:46 PM
rwxr-xr-x
📄
banner.php
7.62 KB
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
categories-link.php
5.58 KB
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
category.php
17.96 KB
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
checkout-ads.php
3.81 KB
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
checkout.php
23.81 KB
01/20/2024 07:32:19 AM
rw-rw-rw-
📁
ckeditor
-
01/20/2024 07:32:19 AM
rwxr-xr-x
📄
customer-details.php
11.87 KB
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
customer-products.php
8.85 KB
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
customer.php
4.3 KB
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
dashboard.php
3.55 KB
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
delete_ads.php
298 bytes
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
delete_banner.php
296 bytes
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
delete_brand.php
298 bytes
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
delete_categories_link.php
277 bytes
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
delete_category.php
1.86 KB
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
delete_customer.php
306 bytes
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
delete_enquiry.php
302 bytes
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
delete_manufacturer.php
273 bytes
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
delete_ordprd.php
563 bytes
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
delete_prd.php
306 bytes
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
delete_product.php
1.51 KB
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
delete_promo.php
304 bytes
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
delete_subcategory.php
2.08 KB
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
delete_subsubcategory.php
2.7 KB
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
delete_testimonial.php
306 bytes
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
delete_vendor.php
261 bytes
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
department.php
3.82 KB
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
designation.php
4.95 KB
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
edit-assign-page.php
3.83 KB
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
edit-product-details.php
36.37 KB
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
edit-sscategory.php
15.45 KB
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
edit-vendor.php
15.47 KB
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
edit_adstop.php
309 bytes
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
edit_banner.php
310 bytes
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
edit_brand.php
305 bytes
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
edit_categories_link.php
296 bytes
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
edit_category.php
312 bytes
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
edit_manufacturer.php
293 bytes
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
edit_subcat.php
517 bytes
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
edit_subsubcat.php
583 bytes
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
enquiry-now.php
2.85 KB
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
error_log
97.85 KB
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
footer_content.php
2.91 KB
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
get_prod_details.php
318 bytes
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
home-ads.php
3.82 KB
01/20/2024 07:32:19 AM
rw-rw-rw-
📁
img
-
01/20/2024 07:32:19 AM
rwxr-xr-x
📁
includes
-
01/20/2024 07:32:19 AM
rwxr-xr-x
📄
index.php
3.08 KB
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
invoice.php
17.56 KB
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
manufacturer.php
7.21 KB
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
privacy.php
3.03 KB
01/20/2024 07:32:19 AM
rw-rw-rw-
📁
product
-
01/20/2024 07:32:19 AM
rwxr-xr-x
📄
product-details.php
2.79 KB
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
product-order-details.php
5.61 KB
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
products.php
8.71 KB
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
promo-code.php
5.81 KB
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
return_policy.php
2.9 KB
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
shipping_policy.php
2.86 KB
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
status_update.php
355 bytes
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
sub-category.php
20.63 KB
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
sub-sub-category.php
23.65 KB
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
term_condition.php
2.9 KB
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
update_order.php
7.47 KB
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
vendor-products.php
8.69 KB
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
vendor.php
3.56 KB
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
view-product-details.php
23.13 KB
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
view-product-order-detail.php
10.71 KB
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
view-vendor-product-details.php
15.61 KB
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
view-vendor-profile.php
13.87 KB
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
view_pages.php
3.68 KB
01/20/2024 07:32:19 AM
rw-rw-rw-
📄
whatsapp-ads.php
3.82 KB
01/20/2024 07:32:19 AM
rw-rw-rw-
Editing: sub-category.php
Close
<?php include("includes/db_config.php"); if (isset($_POST['submit'])) { extract($_POST); $sql2="SELECT * from category where id='$category'"; $exe2=mysqli_query($conn,$sql2); $res2=mysqli_fetch_array($exe2); $category_page = strtolower(str_replace(" ", "-", $res2["cat_name"])); $sub_category_page = strtolower(str_replace(" ", "-", $sub_name)); if(!file_exists('../'.$category_page.'/'.$sub_category_page)){ if(mkdir('../'.$category_page.'/'.$sub_category_page, 0777, true)){ if(copy('../includes/css.php', '../'.$category_page.'/'.$sub_category_page.'/css.php') && copy('../includes/js.php', '../'.$category_page.'/'.$sub_category_page.'/js.php') && copy('../includes/header.php', '../'.$category_page.'/'.$sub_category_page.'/header.php') && copy('../includes/footer.php','../'.$category_page.'/'.$sub_category_page.'/footer.php') && copy('../includes/db_config.php', '../'.$category_page.'/'.$sub_category_page.'/db_config.php') && copy('../shop-item.php', '../'.$category_page.'/'.$sub_category_page.'/'.$sub_category_page.'.php') ){ $tmp_file = $_FILES['subcat_img']['tmp_name']; $ext = pathinfo($_FILES["subcat_img"]["name"], PATHINFO_EXTENSION); $rand = md5(uniqid().rand()); $subcat_img = $rand.".".$ext; move_uploaded_file($tmp_file,"product/subcat/".$subcat_img); $tmp_file = $_FILES['subcat_banner']['tmp_name']; $ext = pathinfo($_FILES["subcat_banner"]["name"], PATHINFO_EXTENSION); $rand = md5(uniqid().rand()); $subcat_bimg = $rand.".".$ext; move_uploaded_file($tmp_file,"product/subcat/".$subcat_bimg); $sql="INSERT into sub_category(category_id,sub_category_name,sub_categoryimg,subcat_banner) values ('$category','$sub_name','$subcat_img','$subcat_bimg')"; //echo $sql; exit(); $res=mysqli_query($conn,$sql) or die(mysqli_error()); if($res) { echo " <script> alert('sub Category created successfully...'); location.replace('sub-category.php'); </script> "; } } else{ echo " <script> alert('Something went wrong, Please try again...'); location.replace('sub-category.php'); </script> "; } } else{ echo " <script> alert('Something went wrong, Please try again...'); location.replace('sub-category.php'); </script> "; } } else{ echo " <script> alert('Sub Category name already exists, Please change the name and try again...'); location.replace('sub-category.php'); </script> "; } } /*if(isset($_POST['update'])) { //var_dump($_POST);exit(); extract($_POST); $id=$_POST["cat_id"]; $sql1 ="UPDATE sub_category SET category_id='$cat_name',sub_category_name='$subcat_name' WHERE id='$id'"; $res=mysqli_query($conn,$sql1) or die(mysqli_error()); if($res){ $sqlg = "SELECT * from sub_category where id = $id"; $resultg = mysqli_query($conn,$sqlg) or die(mysqli_error()); $resg = mysqli_fetch_object($resultg); if($_FILES["subcat_img"]["name"] != ""){ $oname=$_FILES["subcat_img"]["name"]; $pos = strrpos($oname, "."); $extension=substr($oname,$pos+1); $tn = $_FILES["subcat_img"]["tmp_name"]; $path = "product/subcat/".$resg->id.'12'.'.'.$extension; $upath = "product/subcat/".$resg->sub_categoryimg; unlink($upath); move_uploaded_file($tn,$path); $image = $resg->id.'12'.'.'.$extension; } else { $image = $resg->sub_categoryimg; } if($_FILES["subcat_bnimg"]["name"] != ""){ $oname=$_FILES["subcat_bnimg"]["name"]; $pos = strrpos($oname, "."); $extension=substr($oname,$pos+1); $tn = $_FILES["subcat_bnimg"]["tmp_name"]; $path = "product/subcat/".$resg->id.'89'.'.'.$extension; $upath = "product/subcat/".$resg->subcat_banner; unlink($upath); move_uploaded_file($tn,$path); $image_ban = $resg->id.'89'.'.'.$extension; } else { $image_ban = $resg->subcat_banner; } $sqlup = "UPDATE sub_category SET sub_categoryimg = '$image',subcat_banner='$image_ban' WHERE id = $resg->id"; $resultup = mysqli_query($conn,$sqlup) or die(mysqli_error()); } }*/ if(isset($_POST['update'])) { //var_dump($_FILES); extract($_POST); $id=$_POST["cat_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); //$category_page=$res_cat['cat_name']; $category_page = strtolower(str_replace(" ", "-", $res_cat['cat_name'])); $subcategory_old_page = strtolower(str_replace(" ", "-", $old_subcat_name)); $subcategory_new_page = strtolower(str_replace(" ", "-", $subcat_name)); //if(!file_exists('../'.$category_new_page)) { if(!file_exists('../'.$category_page.'/'.$subcategory_new_page)){ if(file_exists('../'.$category_page.'/'.$subcategory_old_page)){ if(rename("../$category_page/$subcategory_old_page", "../$category_page/$subcategory_new_page")){ if(rename("../$category_page/$subcategory_new_page/".strtolower(str_replace(" ", "-", $old_subcat_name)).".php", "../$category_page/$subcategory_new_page/".strtolower(str_replace(" ", "-", $subcat_name)).".php")){ $sql1 ="UPDATE sub_category SET category_id='$cat_name',sub_category_name='$subcat_name' WHERE id='$id'"; $res=mysqli_query($conn,$sql1) or die(mysqli_error()); if($res){ $sqlg = "SELECT * from sub_category where id = $id"; $resultg = mysqli_query($conn,$sqlg) or die(mysqli_error()); $resg = mysqli_fetch_object($resultg); if($_FILES["subcat_img"]["name"] != ""){ $oname=$_FILES["subcat_img"]["name"]; $pos = strrpos($oname, "."); $extension=substr($oname,$pos+1); $tn = $_FILES["subcat_img"]["tmp_name"]; $path = "product/subcat/".$resg->id.'12'.'.'.$extension; $upath = "product/subcat/".$resg->sub_categoryimg; unlink($upath); move_uploaded_file($tn,$path); $image = $resg->id.'12'.'.'.$extension; } else { $image = $resg->sub_categoryimg; } if($_FILES["subcat_bnimg"]["name"] != ""){ $oname=$_FILES["subcat_bnimg"]["name"]; $pos = strrpos($oname, "."); $extension=substr($oname,$pos+1); $tn = $_FILES["subcat_bnimg"]["tmp_name"]; $path = "product/subcat/".$resg->id.'89'.'.'.$extension; $upath = "product/subcat/".$resg->subcat_banner; unlink($upath); move_uploaded_file($tn,$path); $image_ban = $resg->id.'89'.'.'.$extension; } else { $image_ban = $resg->subcat_banner; } $sqlup = "UPDATE sub_category SET sub_categoryimg = '$image',subcat_banner='$image_ban' WHERE id = $resg->id"; $resultup = mysqli_query($conn,$sqlup) or die(mysqli_error()); if($resultup){ echo " <script> alert('Sub Category name Updated...'); location.replace('sub-category.php'); </script> "; } } } else{ echo " <script> alert('Something went wrong, Please try again...'); location.replace('sub-category.php'); </script> "; } } else{ echo " <script> alert('Something went wrong, Please try again...'); location.replace('sub-category.php'); </script> "; } } else{ if(mkdir('../'.$category_page.'/'.$subcategory_new_page, 0777, true)){ if(copy('../includes/css.php', '../'.$category_page.'/'.$subcategory_new_page.'/css.php') && copy('../includes/js.php', '../'.$category_page.'/'.$subcategory_new_page.'/js.php') && copy('../includes/header.php', '../'.$category_page.'/'.$subcategory_new_page.'/header.php') && copy('../includes/footer.php','../'.$category_page.'/'.$subcategory_new_page.'/footer.php') && copy('../includes/db_config.php', '../'.$category_page.'/'.$subcategory_new_page.'/db_config.php') && copy('../shop-item.php', '../'.$category_page.'/'.$subcategory_new_page.'/'.$subcategory_new_page.'.php') ){ $sql1 ="UPDATE sub_category SET category_id='$cat_name',sub_category_name='$subcat_name' WHERE id='$id'"; $res=mysqli_query($conn,$sql1) or die(mysqli_error()); if($res){ $sqlg = "SELECT * from sub_category where id = $id"; $resultg = mysqli_query($conn,$sqlg) or die(mysqli_error()); $resg = mysqli_fetch_object($resultg); if($_FILES["subcat_img"]["name"] != ""){ $oname=$_FILES["subcat_img"]["name"]; $pos = strrpos($oname, "."); $extension=substr($oname,$pos+1); $tn = $_FILES["subcat_img"]["tmp_name"]; $path = "product/subcat/".$resg->id.'12'.'.'.$extension; $upath = "product/subcat/".$resg->sub_categoryimg; unlink($upath); move_uploaded_file($tn,$path); $image = $resg->id.'12'.'.'.$extension; } else { $image = $resg->sub_categoryimg; } if($_FILES["subcat_bnimg"]["name"] != ""){ $oname=$_FILES["subcat_bnimg"]["name"]; $pos = strrpos($oname, "."); $extension=substr($oname,$pos+1); $tn = $_FILES["subcat_bnimg"]["tmp_name"]; $path = "product/subcat/".$resg->id.'89'.'.'.$extension; $upath = "product/subcat/".$resg->subcat_banner; unlink($upath); move_uploaded_file($tn,$path); $image_ban = $resg->id.'89'.'.'.$extension; } else { $image_ban = $resg->subcat_banner; } $sqlup = "UPDATE sub_category SET sub_categoryimg = '$image',subcat_banner='$image_ban' 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('category.php'); </script> "; } } else{ echo " <script> alert('Something went wrong, Please try again...'); location.replace('sub-category.php'); </script> "; } } } else{ $sqlg = "SELECT * from sub_category where id = $id"; $resultg = mysqli_query($conn,$sqlg) or die(mysqli_error()); $resg = mysqli_fetch_object($resultg); if($_FILES["subcat_img"]["name"] != ""){ $oname=$_FILES["subcat_img"]["name"]; $pos = strrpos($oname, "."); $extension=substr($oname,$pos+1); $tn = $_FILES["subcat_img"]["tmp_name"]; $path = "product/subcat/".$resg->id.'12'.'.'.$extension; $upath = "product/subcat/".$resg->sub_categoryimg; unlink($upath); move_uploaded_file($tn,$path); $image = $resg->id.'12'.'.'.$extension; } else { $image = $resg->sub_categoryimg; } if($_FILES["subcat_bnimg"]["name"] != ""){ $oname=$_FILES["subcat_bnimg"]["name"]; $pos = strrpos($oname, "."); $extension=substr($oname,$pos+1); $tn = $_FILES["subcat_bnimg"]["tmp_name"]; $path = "product/subcat/".$resg->id.'89'.'.'.$extension; $upath = "product/subcat/".$resg->subcat_banner; unlink($upath); move_uploaded_file($tn,$path); $image_ban = $resg->id.'89'.'.'.$extension; } else { $image_ban = $resg->subcat_banner; } $sqlup = "UPDATE sub_category SET sub_categoryimg = '$image',subcat_banner='$image_ban' WHERE id = $resg->id"; $resultup = mysqli_query($conn,$sqlup) or die(mysqli_error()); echo " <script> alert('Sub Category name already exists, Please change the name and try again...'); location.replace('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>TAS Vision</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-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-Category Image</th> <th>Sub-Category Banner</th> <th>Edit</th> <th>Delete</th> </tr> </thead> <tbody> <tr> <?php $sql="select sub_category.*,category.cat_name from sub_category join category on sub_category.category_id=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><img src="product/subcat/<?php echo $res['sub_categoryimg']; ?>" width="40px"></td> <td><img src="product/subcat/<?php echo $res['subcat_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_subcat_by_ID('<?php echo $res['id'] ?>','<?php echo $res['cat_name'] ?>', '<?php echo $res['sub_category_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-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" 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> <input type="text" name="sub_name" class="form-control" placeholder="Enter Sub-Category Name"> </div> </div> <div class="form-group"> <label>Sub Category Image :</label> <div class="input-group"> <div class="input-group-addon"> <i class="fa fa-suitcase"></i> </div> <input type="file" name="subcat_img" class="form-control" placeholder="Category"> </div> </div> <div class="form-group"> <label>Sub Category Banner :<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="subcat_banner" 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 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_name" 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 class="form-group"> <label>Sub Category </label> <input type="text" name="subcat_name" id="subcat_name" class="form-control" placeholder=" "> <input type="hidden" name="old_subcat_name" id="old_subcat_name" class="form-control" placeholder=" "> </div> <div class="form-group"> <label>Sub Category Image</label> <input type="file" name="subcat_img" class="form-control" placeholder=" Photo"> </div> <div class="form-group"> <label>Sub Category Banner:<span class="text-red">Size : 950px X 100px</span></label> <input type="file" name="subcat_bnimg" class="form-control" placeholder=" Photo"> </div> <input type="hidden" name="cat_id" id="cat_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 }) }) </script> </body> <script language="javascript"> $(document).ready(function(){ $(document).on('click', '.edit_data', function(){ var cat_id = $(this).attr("id"); $.ajax({ url:"edit_subcat.php", method:"POST", data:{cat_id:cat_id}, dataType:"json", success:function(data){ $('#cat_name').val(data.category_id); $('#subcat_name').val(data.sub_category_name); $('#old_subcat_name').val(data.sub_category_name); $('#cat_id').val(data.id); $('#insert').val("Update"); $('#add_data_Modal').modal('show'); } }); }); }); /*function delete_subcat_by_ID(id) { if (confirm('Do You Want to Deleting This \nContinue anyway?')) { window.location.href = 'delete_subcategory.php?id=' + id; } }*/ </script> <script type="text/javascript"> function delete_subcat_by_ID(id, name, sub_name) { if (confirm('Do You Want to Deleting This \nContinue anyway?')) { window.location.href = 'delete_subcategory.php?id=' + id + '&name=' + name + '&sub_name=' + sub_name; } } </script> </html>