Uname : Linux V-ShopU01 4.18.0-348.20.1.el8_5.x86_64 #1 SMP Thu Mar 10 20:59:28 UTC 2022 x86_64
Server : Apache/2.4.37 (rocky) OpenSSL/1.1.1k
Whoami : apache
Safe Mode : OFF
DOCUMENT ROOT : /var/www/html/site_shopudietDisable Function :
Path : /var/www/html/site_shopudiet/admin/
Server IP : 65.20.74.164
Client IP : 18.220.191.247
Current File : /var/www/html/site_shopudiet/admin/product_updateform.php |
<!--
=========================================================
* * Black Dashboard - v1.0.1
=========================================================
* Product Page: https://www.creative-tim.com/product/black-dashboard
* Copyright 2019 Creative Tim (https://www.creative-tim.com)
* Coded by Creative Tim
=========================================================
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-->
<?php
include 'dbconnect.php';
session_start();
if(!isset($_SESSION["sess_user"])){
header("Location: shop.php");
}
else
{
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="apple-touch-icon" sizes="76x76" href="../assets/img/apple-icon.png">
<link rel="icon" type="image/png" href="../assets/img/favicon.png">
<title>
Black Dashboard by Creative Tim
</title>
<link rel="icon" type="image/png" href="../images/favicon.png"/>
<!-- Fonts and icons -->
<link href="https://fonts.googleapis.com/css?family=Poppins:200,300,400,600,700,800" rel="stylesheet" />
<link href="https://use.fontawesome.com/releases/v5.0.6/css/all.css" rel="stylesheet">
<!-- Nucleo Icons -->
<link href="./css/nucleo-icons.css" rel="stylesheet" />
<!-- CSS Files -->
<link href="./css/black-dashboard.css?v=1.0.0" rel="stylesheet" />
<!-- CSS Just for demo purpose, don't include it in your project -->
<link href="./demo/demo.css" rel="stylesheet" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script type="text/javascript" src="scripts/jquery.form.js"></script>
<script type="text/javascript" src="scripts/upload_image.js"></script>
</head>
<body class="">
<div class="wrapper">
<?php include('sidebar.php');?>
<div class="main-panel">
<!-- Navbar -->
<nav class="navbar navbar-expand-lg navbar-absolute navbar-transparent">
<div class="container-fluid">
<div class="navbar-wrapper">
<div class="navbar-toggle d-inline">
<button type="button" class="navbar-toggler">
<span class="navbar-toggler-bar bar1"></span>
<span class="navbar-toggler-bar bar2"></span>
<span class="navbar-toggler-bar bar3"></span>
</button>
</div>
<a class="navbar-brand" href="javascript:void(0)">Products</a>
</div>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navigation" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-bar navbar-kebab"></span>
<span class="navbar-toggler-bar navbar-kebab"></span>
<span class="navbar-toggler-bar navbar-kebab"></span>
</button>
<div class="collapse navbar-collapse" id="navigation">
<ul class="navbar-nav ml-auto">
<li class="search-bar input-group">
<button class="btn btn-link" id="search-button" data-toggle="modal" data-target="#searchModal"><i class="tim-icons icon-zoom-split" ></i>
<span class="d-lg-none d-md-block">Search</span>
</button>
</li>
<li class="dropdown nav-item">
<a href="javascript:void(0)" class="dropdown-toggle nav-link" data-toggle="dropdown">
<div class="notification d-none d-lg-block d-xl-block"></div>
<i class="tim-icons icon-sound-wave"></i>
<p class="d-lg-none">
Notifications
</p>
</a>
<ul class="dropdown-menu dropdown-menu-right dropdown-navbar">
<li class="nav-link"><a href="#" class="nav-item dropdown-item">Mike John responded to your email</a></li>
<li class="nav-link"><a href="javascript:void(0)" class="nav-item dropdown-item">You have 5 more tasks</a></li>
<li class="nav-link"><a href="javascript:void(0)" class="nav-item dropdown-item">Your friend Michael is in town</a></li>
<li class="nav-link"><a href="javascript:void(0)" class="nav-item dropdown-item">Another notification</a></li>
<li class="nav-link"><a href="javascript:void(0)" class="nav-item dropdown-item">Another one</a></li>
</ul>
</li>
<li class="dropdown nav-item">
<a href="#" class="dropdown-toggle nav-link" data-toggle="dropdown">
<div class="photo">
<img src="./img/anime3.png" alt="Profile Photo">
</div>
<b class="caret d-none d-lg-block d-xl-block"></b>
<p class="d-lg-none">
Log out
</p>
</a>
<ul class="dropdown-menu dropdown-navbar">
<li class="nav-link"><a href="javascript:void(0)" class="nav-item dropdown-item">Profile</a></li>
<li class="nav-link"><a href="javascript:void(0)" class="nav-item dropdown-item">Settings</a></li>
<li class="dropdown-divider"></li>
<li class="nav-link"><a href="logout.php" class="nav-item dropdown-item">Log out</a></li>
</ul>
</li>
<li class="separator d-lg-none"></li>
</ul>
</div>
</div>
</nav>
<div class="modal modal-search fade" id="searchModal" tabindex="-1" role="dialog" aria-labelledby="searchModal" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<input type="text" class="form-control" id="inlineFormInputGroup" placeholder="SEARCH">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<i class="tim-icons icon-simple-remove"></i>
</button>
</div>
</div>
</div>
</div>
<!-- End Navbar -->
<div class="container-fluid">
<div class="col-md-12" align="center">
<div class="content">
<div class="row" style="width: 65%;">
<div class="card" style="margin-top: 100px;">
<div class="card-body">
<?php
include 'dbconnect.php';
$home_id = $_GET['id'];
$squery = "select * from product where id=$home_id";
$result = mysqli_query($conn,$squery);
while( $row = mysqli_fetch_array($result))
{
?><form action="product_update.php?id=<?php echo $row['id']; ?>" method="post" enctype="multipart/form-data">
<h3 class="title" style="text-align: center; "> Products</h3>
<div class="row">
<div class="col-md-6 ">
<div class="form-group">
<label>Super Category</label>
<select name="super_category" class="form-control" id="super">
<option value = "">Choose Super Category</option>
<?php
include 'dbconnect.php';
$query1 = "select * from super_category";
$res1 = mysqli_query($conn,$query1);
while( $res = mysqli_fetch_array($res1))
{?>
<option value="<?php echo $res['id']; ?>"<?if(isset($row['super_category']) && $row['super_category'] == $res['id']) echo 'selected';?>><?php echo $res['name']; ?></option>
<?php }
?>
</select>
<input type="hidden" name="super" >
</div>
</div>
<div class="col-md-6 ">
<div class="form-group">
<label>Product Category</label>
<select name="category_name" class="form-control" id="category" onchange="category_fetch()">
<option><?php echo $row['category_name'];?></option>
<?php
include 'dbconnect.php';
$squery = "select * from category";
$result = mysqli_query($conn,$squery);
while( $row1 = mysqli_fetch_array($result))
{
?>
<option data-categoryid='<?php echo $row1['id'];?>' value='<?php echo $row1['category_name'];?>'><?php echo $row1['category_name'];?></option>
<?php
}
?>
</select>
<input type="hidden" name="category_id" id="category_id" value="<?php echo $row['category_id'];?>">
</div>
</div>
<div class="col-md-6 ">
<div class="form-group">
<label>Sub Category</label>
<select name="subcategory[]" class="form-control" id="sub" multiple>
<?php $cat = $row['category_name'];
$squery = "select sub_category from category where category_name='$cat'";
$result = mysqli_query($conn,$squery);
$sq = mysqli_fetch_array($result);
$dn = $row['sub_category'];
$datan= explode(',',$dn);
$d = $sq['sub_category'];
$data= explode(',',$d);
$sts='';
for($i=0; $i < count($data);$i++)
{
if(count($dn) == count($d) OR count($d) > 0) {
for($j=0;$j < count($datan);$j++)
{
if($data[$i] == $datan[$j]) {
$sts='selected';?>
<option value="<?php echo $datan[$j];?>" <?php echo $sts; ?>><?php echo $datan[$j];?></option>
<?php } } ?>
<?php }
if(count($dn) != count($d)) { ?>
<option value="<?php echo $data[$i];?>"><?php echo $data[$i];?></option>
<?php }
} ?>
</select>
</div>
</div>
<div class="col-md-6 ">
<div class="form-group">
<label>Choose Hashtags</label>
<select name="hashtag[]" class="form-control" multiple>
<?php
$hash = explode(',',$row['hashtag']);
$s1 = "select * from hashtag";
$res2 = mysqli_query($conn,$s1);
$sts='';
while( $r2 = mysqli_fetch_array($res2))
{
for($i=0; $i < count($hash);$i++) {
if($r2['id'] == $hash[$i])
{
$sts = 'selected';
} }?>
<option value="<?php echo $r2['id'];?>" <?php echo $sts; ?>><?php echo $r2['hashtag'];?></option>
<?php $sts=''; } ?>
</select>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label>Product Code</label>
<input type="text" class="form-control" name="product_code" value="<?php echo $row['prdct_code'];?>">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label>Product Name</label>
<input type="text" class="form-control" name="product_name" value="<?php echo $row['product_name'];?>">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label>Stock</label>
<input type="number" class="form-control" name="stock" value="<?php echo $row['stock'];?>" placeholder="Stock">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label>Product type</label>
<select name="orgnon" class="form-control">
<option value="">Choose </option>
<?php if($row['org_status'] == 'org') { ?><option value="org"selected>Organic </option><?php } else { ?><option value="org">Organic </option><?php } ?>
<?php if($row['org_status'] == 'non') { ?><option value="non"selected>Non-organic </option><?php } else { ?><option value="non">Non-organic </option><?php } ?>
</select>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label>Purchase Amount</label>
<input type='text' id="am" name='purchase_amount' class="form-control"value="<?php echo $row['purchase_amount'];?>" placeholder="Purchase Value" required>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label>Purchase GST(%)</label>
<input type='text' id = "gs" onfocusout="gst_calc()" name='purchase_gst'value="<?php echo $row['purchase_gst'];?>" class="form-control" placeholder="Purchase GST" required>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label>Total Purchase Value(+GST)</label>
<input type='text' id="tot" name='purchase_total' class="form-control"value="<?php echo $row['purchase_total'];?>" placeholder="Purchase Total" >
</div>
</div>
<div class="col-md-6 ">
<div class="form-group">
<label>Price</label>
<input type="text" class="form-control" name="price" value="<?php echo $row['price'];?>">
</div>
</div>
<div class="col-md-6 ">
<div class="form-group">
<label>Discount Percentage</label>
<input type="text" class="form-control" name="discount" value="<?php echo $row['discount'];?>">
</div>
</div>
<div class="col-md-6 ">
<div class="form-group">
<label>Discount Price</label>
<input type="text" class="form-control" name="dis_price" value="<?php echo $row['mrp'];?>">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label>weight</label>
<input type="text" class="form-control" name="weight" value="<?php echo $row['weight'];?>">
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label>CGST (%)</label>
<input type='text' name='cgst' class="form-control" placeholder="CGST" value="<?php echo $row['cgst'];?>" >
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label>SGST (%)</label>
<input type='text' name='sgst' class="form-control" placeholder="SGST" value="<?php echo $row['sgst'];?>" >
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label>Brand name</label>
<!--<input type='text' name='manuf' class="form-control" value="<?php echo $row['manuf_name'];?>" >-->
<select name='manuf' class="form-control">
<option value="">Select Brand</option>
<?php
$sql = mysqli_query($conn,"SELECT * FROM brand");
while($row1 = mysqli_fetch_array($sql)) {
?>
<option value = "<?php echo $row1['brand_name'];?>"<?php if($row['manuf_name'] == $row1['brand_name']) echo 'selected';?>><?php echo $row1['brand_name'];?>
</option>
<?php } ?>
</select>
</div>
</div>
</div>
<div class = "row">
<div class="col-md-6">
<div class="form-group">
<label>Purchase Value</label>
<input type='text' name='purchase_value' class="form-control" placeholder="Purchase Value"value="<?php echo $row['purchase_value'];?>" >
</div>
</div>
</div>
<div class="row">
<div class="col-md-4 pr-md-1">
<div class="form-group">
<label>Image1</label>
<img src="img/<?php echo $row['file1']; ?>" class="img-responsive">
<input type='file' name='file1' id="upload_image" class="form-control" >
<?php if($row['file1'] != NULL) {?>
<a onclick = "delete_image('file1','<?php echo $row['file1']; ?>','<?php echo $row['id']; ?>')"><button class = "btn btn-danger" type = "button"><i class = "fa fa-trash" style = "color:white;"></i></button></a>
<?php } ?>
</div>
</div>
<div class="col-md-4 px-md-1">
<div class="form-group">
<label>Image2</label>
<img src="img/<?php echo $row['file2']; ?>" class="img-responsive">
<input type='file' name='file2' id="upload_image" class="form-control" >
<?php if($row['file2'] != NULL) {?>
<a onclick = "delete_image('file2','<?php echo $row['file2']; ?>','<?php echo $row['id']; ?>')"><button class = "btn btn-danger" type = "button"><i class = "fa fa-trash" style = "color:white;"></i></button></a>
<?php } ?>
</div>
</div>
<div class="col-md-4 pl-md-1">
<div class="form-group">
<label>Image3</label>
<img src="img/<?php echo $row['file3']; ?>" class="img-responsive">
<input type='file' name='file3' id="upload_image" class="form-control" >
<?php if($row['file3'] != NULL) {?>
<a onclick = "delete_image('file3','<?php echo $row['file3']; ?>','<?php echo $row['id']; ?>')"><button class = "btn btn-danger" type = "button"><i class = "fa fa-trash" style = "color:white;"></i></button></a>
<?php } ?>
</div>
</div>
<div class="col-md-4 pl-md-1">
<div class="form-group">
<label>Image4</label>
<img src="img/<?php echo $row['file4']; ?>" class="img-responsive">
<input type='file' name='file4' id="upload_image" class="form-control" >
<!-- <?php if($row['file4'] != NULL) {?>
<a onclick = "delete_image('file4','<?php echo $row['file4']; ?>','<?php echo $row['id']; ?>')"><button class = "btn btn-danger" type = "button"><i class = "fa fa-trash" style = "color:white;"></i></button></a>
<?php } ?>-->
</div>
</div>
<div class="col-md-4 pl-md-1">
<div class="form-group">
<label>Image5</label>
<img src="img/<?php echo $row['file5']; ?>" class="img-responsive">
<input type='file' name='file5' id="upload_image" class="form-control" >
<!-- <?php if($row['file5'] != NULL) {?>
<a onclick = "delete_image('file5','<?php echo $row['file5']; ?>','<?php echo $row['id']; ?>')"><button class = "btn btn-danger" type = "button"><i class = "fa fa-trash" style = "color:white;"></i></button></a>
<?php } ?>-->
</div>
</div>
</div>
<!-- <div>
<label>Certification Documents</label>
<div class="row">
<div class="col-md-4 pr-md-1">
<div class="form-group">
<label>Document</label>
<img src="img/<?php echo $row['doc1']; ?>" class="img-responsive" style="height: 100px;width: 100px;">
<input type='hidden' name='doc1' id="upload_image" class="form-control" >
</div>
</div>
<div class="col-md-4 px-md-1">
<div class="form-group">
<label>Document</label>
<img src="img/<?php echo $row['doc2']; ?>" class="img-responsive" style="height: 100px;width: 100px;">
<input type='hidden' name='doc2' id="upload_image" class="form-control" >
</div>
</div>
<div class="col-md-4 pl-md-1">
<div class="form-group">
<label>Document</label>
<img src="img/<?php echo $row['doc3']; ?>" class="img-responsive" style="height: 100px;width: 100px;">
<input type='hidden' name='doc3' id="upload_image" class="form-control" >
</div>
</div>
</div>
<div class="row">
<div class="col-md-6 pr-md-1">
<div class="form-group">
<label>Document</label>
<img src="img/<?php echo $row['doc4']; ?>" class="img-responsive" style="height: 100px;width: 100px;">
<input type='hidden' name='doc4' id="upload_image" class="form-control" >
</div>
</div>
<div class="col-md-6 px-md-1">
<div class="form-group">
<label>Document</label>
<img src="img/<?php echo $row['doc5']; ?>" class="img-responsive" style="height: 100px;width: 100px;">
<input type='hidden' name='doc5' id="upload_image" class="form-control" >
</div>
</div>
</div>
</div> -->
<div class="row">
<div class="col-md-8">
<div class="form-group">
<label>Description</label>
<textarea rows="4" cols="80" name="description" class="form-control" placeholder="Here can be your description" value="<?php echo $row['description'];?>"><?php echo $row['description'];?></textarea>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="form-group">
<label>Expected Delivery Time</label>
<input type="text" name="delivery_time" class="form-control" placeholder="Expected Delivery Time" value="<?php echo $row['delivery_time'];?>">
</div>
</div>
</div>
<div class="row">
<div class="col-md-3"></div>
<!--<div class="col-md-6">
<input type="checkbox" id="chk" name="new_arrival" value="1" <?php if($row['new_arrival'] == '1') echo 'checked';?>>
<label for="check"> New Arrival</label><br>
</div>-->
</div>
<div class="card-footer">
<input type="submit" class="btn btn-fill btn-primary" name="submit" value="Update">
</div>
</form>
<?php
} ?>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- <footer class="footer">
<div class="container-fluid">
<div class="copyright">
©
<script>
document.write(new Date().getFullYear())
</script> Developped with <i class="tim-icons icon-heart-2"></i> by
<a href="http://ephphathasoftech.com/" target="_blank">Ephphatha Softech</a>
</div>
</div>
</footer> -->
</div>
</div>
<div class="fixed-plugin">
<div class="dropdown show-dropdown">
<a href="#" data-toggle="dropdown">
<i class="fa fa-cog fa-2x"> </i>
</a>
<ul class="dropdown-menu">
<li class="header-title"> Sidebar Background</li>
<li class="adjustments-line">
<a href="javascript:void(0)" class="switch-trigger background-color">
<div class="badge-colors text-center">
<span class="badge filter badge-primary active" data-color="primary"></span>
<span class="badge filter badge-info" data-color="blue"></span>
<span class="badge filter badge-success" data-color="green"></span>
</div>
<div class="clearfix"></div>
</a>
</li>
<li class="adjustments-line text-center color-change">
<span class="color-label">LIGHT MODE</span>
<span class="badge light-badge mr-2"></span>
<span class="badge dark-badge ml-2"></span>
<span class="color-label">DARK MODE</span>
</li>
<li class="button-container">
<a href="https://www.creative-tim.com/product/black-dashboard" target="_blank" class="btn btn-primary btn-block btn-round">Download Now</a>
<a href="https://demos.creative-tim.com/black-dashboard/docs/1.0/getting-started/introduction.html" target="_blank" class="btn btn-default btn-block btn-round">
Documentation
</a>
</li>
<li class="header-title">Thank you for 95 shares!</li>
<li class="button-container text-center">
<button id="twitter" class="btn btn-round btn-info"><i class="fab fa-twitter"></i> · 45</button>
<button id="facebook" class="btn btn-round btn-info"><i class="fab fa-facebook-f"></i> · 50</button>
<br>
<br>
<a class="github-button" href="https://github.com/creativetimofficial/black-dashboard" data-icon="octicon-star" data-size="large" data-show-count="true" aria-label="Star ntkme/github-buttons on GitHub">Star</a>
</li>
</ul>
</div>
</div>
<!-- Core JS Files -->
<script src="./js/core/jquery.min.js"></script>
<script src="./js/core/popper.min.js"></script>
<script src="./js/core/bootstrap.min.js"></script>
<script src="./js/plugins/perfect-scrollbar.jquery.min.js"></script>
<!-- Google Maps Plugin -->
<!-- Place this tag in your head or just before your close body tag. -->
<script src="https://maps.googleapis.com/maps/api/js?key=YOUR_KEY_HERE"></script>
<!-- Chart JS -->
<script src="./js/plugins/chartjs.min.js"></script>
<!-- Notifications Plugin -->
<script src="./js/plugins/bootstrap-notify.js"></script>
<!-- Control Center for Black Dashboard: parallax effects, scripts for the example pages etc -->
<script src="./js/black-dashboard.min.js?v=1.0.0"></script><!-- Black Dashboard DEMO methods, don't include it in your project! -->
<script src="./demo/demo.js"></script>
<script>
$(document).ready(function() {
$().ready(function() {
$sidebar = $('.sidebar');
$navbar = $('.navbar');
$main_panel = $('.main-panel');
$full_page = $('.full-page');
$sidebar_responsive = $('body > .navbar-collapse');
sidebar_mini_active = true;
white_color = false;
window_width = $(window).width();
fixed_plugin_open = $('.sidebar .sidebar-wrapper .nav li.active a p').html();
$('.fixed-plugin a').click(function(event) {
if ($(this).hasClass('switch-trigger')) {
if (event.stopPropagation) {
event.stopPropagation();
} else if (window.event) {
window.event.cancelBubble = true;
}
}
});
$('.fixed-plugin .background-color span').click(function() {
$(this).siblings().removeClass('active');
$(this).addClass('active');
var new_color = $(this).data('color');
if ($sidebar.length != 0) {
$sidebar.attr('data', new_color);
}
if ($main_panel.length != 0) {
$main_panel.attr('data', new_color);
}
if ($full_page.length != 0) {
$full_page.attr('filter-color', new_color);
}
if ($sidebar_responsive.length != 0) {
$sidebar_responsive.attr('data', new_color);
}
});
$('.switch-sidebar-mini input').on("switchChange.bootstrapSwitch", function() {
var $btn = $(this);
if (sidebar_mini_active == true) {
$('body').removeClass('sidebar-mini');
sidebar_mini_active = false;
blackDashboard.showSidebarMessage('Sidebar mini deactivated...');
} else {
$('body').addClass('sidebar-mini');
sidebar_mini_active = true;
blackDashboard.showSidebarMessage('Sidebar mini activated...');
}
// we simulate the window Resize so the charts will get updated in realtime.
var simulateWindowResize = setInterval(function() {
window.dispatchEvent(new Event('resize'));
}, 180);
// we stop the simulation of Window Resize after the animations are completed
setTimeout(function() {
clearInterval(simulateWindowResize);
}, 1000);
});
$('.switch-change-color input').on("switchChange.bootstrapSwitch", function() {
var $btn = $(this);
if (white_color == true) {
$('body').addClass('change-background');
setTimeout(function() {
$('body').removeClass('change-background');
$('body').removeClass('white-content');
}, 900);
white_color = false;
} else {
$('body').addClass('change-background');
setTimeout(function() {
$('body').removeClass('change-background');
$('body').addClass('white-content');
}, 900);
white_color = true;
}
});
$('.light-badge').click(function() {
$('body').addClass('white-content');
});
$('.dark-badge').click(function() {
$('body').removeClass('white-content');
});
});
});
</script>
<script>
$(document).ready(function() {
// Javascript method's body can be found in assets/js/demos.js
demo.initGoogleMaps();
});
</script>
<script src="https://cdn.trackjs.com/agent/v3/latest/t.js"></script>
<script>
window.TrackJS &&
TrackJS.install({
token: "ee6fab19c5a04ac1a32a645abde4613a",
application: "black-dashboard-free"
});
/*image upload*/
$(document).ready(function(){
$('#upload_image').on('submit', function(event){
event.preventDefault();
$.ajax({
url:"addproduct.php",
method:"POST",
data:new FormData(this),
contentType:false,
cache:false,
processData:false,
success:function(data){
}
})
});
});
/*menu*/
var dropdown = document.getElementsByClassName("dropdown-btn");
var i;
for (i = 0; i < dropdown.length; i++) {
dropdown[i].addEventListener("click", function() {
this.classList.toggle("active");
var dropdownContent = this.nextElementSibling;
if (dropdownContent.style.display === "block") {
dropdownContent.style.display = "none";
} else {
dropdownContent.style.display = "block";
}
});
}
function category_fetch()
{
$('#category_id').val($('#category option:selected').attr('data-categoryid'));
var cat = $("#category").val();
$.ajax({
url:'subcat_select.php',
method:'POST',
dataType:'html',
data:{cat:cat},
success:function(data) {
$("#sub").empty();
$("#sub").append(data);
console.log(data);
}
});
}
$('option').mousedown(function(e) {
e.preventDefault();
$(this).prop('selected', !$(this).prop('selected'));
return false;
});
function gst_calc() {
var am = $("#am").val();
var gs = $("#gs").val();
var tax =am*gs/100;
var value=parseInt(am)+parseInt(tax);
$("#tot").val(value);
}
function delete_image(file,name,id)
{
$.ajax({
url:'delete_image.php',
method:'POST',
dataType:'html',
data:{file:file,name:name,id:id},
success:function(data) {
window.location.reload();
}
});
}
</script>
</body>
<style type="text/css">
.sidenav a, .dropdown-btn {
padding: 6px 8px 6px 16px;
text-decoration: none;
display: block;
border: none;
background: none;
width: 100%;
text-align: left;
cursor: pointer;
outline: none;
color: #fff;
}
/* Main content */
.main {
margin-left: 200px; /* Same as the width of the sidenav */
padding: 0px 10px;
}
/* Add an active class to the active dropdown button */
/* Dropdown container (hidden by default). Optional: add a lighter background color and some left padding to change the design of the dropdown content */
.dropdown-container {
display: none;
padding-left: 8px;
}
.dropdown-container a{
text-align: right;
padding-right: 70px;
line-height: 30px;}
.sidenav a:hover {
color: #32325d;
}
a:focus {
/* outline: 1px dotted; */
outline: none;
background-color: #0000001c;
}
.sidenav li{
padding: 10px;
outline: 1px solid #0000001c;
/* background-color: #0000001c;
*/
}
</style>
</html>
<?php
}
?>