|
Server IP : 2a02:4780:11:1359:0:1d43:a566:2 / Your IP : 216.73.216.52 Web Server : LiteSpeed System : Linux in-mum-web1259.main-hosting.eu 4.18.0-553.37.1.lve.el8.x86_64 #1 SMP Mon Feb 10 22:45:17 UTC 2025 x86_64 User : u490972518 ( 490972518) PHP Version : 5.6.40 Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail MySQL : ON | cURL : ON | WGET : ON | Perl : OFF | Python : ON Directory (0755) : /home/u490972518/domains/bpscps.com/public_html/sale/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<?php
include('php-includes/connect.php');
include('php-includes/check-login.php');
$userid = $_SESSION['userid'];
//echo $userid;
//$capping =150000;
$flag=$_REQUEST['flag'];
$sel12="select * from product_add where product_id='$flag' order by id desc";
$res12=mysqli_query($conn,$sel12);
$row12=mysqli_fetch_array($res12,MYSQLI_BOTH);
?>
<title>Product Add</title>
<?PHP include("link/header.php")?>
<!--main content start-->
<style>label{color:black;}</style>
<script>
$(document).ready(function(){
$("#myform").submit(function(e){
e.preventDefault();
$("#btn").prop("disabled",true);
$.ajax({
url:"code/classcode.php?flag=124",
type:"POST",
data:new FormData(this),
contentType:false,
processData:false,
success:function(res){
alert(res);
window.location.href='book_add.php';
// $("#modal").load("code/classcode.php?flag=104");
},
error:function(){
alert("error");
}
});
});
});
$(document).ready(function(){
// $("#modal").load("code/classcode.php?flag=104");
});
function deleterow(id)
{
//alert(id);
var a=confirm("Are you Sure");
if(a==true)
{
$.ajax({
url:"code/classcode.php?flag=107",
type:"POST",
data:{rowid:id},
success:function(res){
alert(res);
window.location.href='book_add.php';
},
error:function(){
alert("error");
}
});
}
}
$(document).ready(function(){
$("#parrent").keyup(function(){
var dis2 =$(this).val();
$.ajax({
url:"code/classcode.php?flag=44",
type:"POST",
data: {dis1:dis2},
success:function(res){
//alert(res);
$("#parrent1").val(res);
},
error:function(){
alert("error");
}
});
});
});
$(document).ready(function(){
$("#side").change(function(){
var side =$(this).val();
var check=$('#parrent').val();
// alert(side);
// alert(check);
$.ajax({
url:"code/student_detailscode.php?flag=69",
type:"POST",
data: {side:side,check:check},
success:function(res){
alert(res);
//$("#rate").val(res);
},
error:function(){
alert("error");
}
});
});
});
//FEES UPDATE ///
function editrow(id)
{
//alert(id);
$("#editmodel").modal("show");
$("#editbody").load("code/classcode.php?flag=123&id="+id);
}
function updaterow(form)
{
$.ajax({
url:"code/classcode.php?flag=124",
type:"POST",
data:new FormData(form),
contentType:false, // for photo upload ke liye hai
processData:false, //for photo upload ke liye hai
cache:false,
success:function(res){
alert(res);
$("#editmodel").modal("hide");
},
error:function(){
alert("error");
}
});
return false;
}
</script>
<section id="main-content" style="background:url(images/body_bg.jpg) repeat;">
<section class="wrapper">
<div id="page-wrapper" >
<div class="container-fluid">
<div class="row">
<div class="col-lg-12">
<h2 style='font-weight:bold'> Product Add Show(Update Qty)</h2>
</div>
<!-- /.col-lg-12 -->
</div>
<!-- /.row -->
<div class="row" >
<div class="col-lg-8" >
</div><!--/.row-->
</div>
<!-- /.container-fluid -->
<div class="row">
<div class="col-lg-12">
<?php
?>
<link href="vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<link href="jq/jquery.dataTables.min.css" type="text/css" rel="stylesheet"/>
<link href="jq/buttons.dataTables.min.css" type="text/css" rel="stylesheet"/>
<script src="jq/jquery.dataTables.min.js"></script>
<script src="jq/dataTables.buttons.min.js"></script>
<script src="jq/buttons.flash.min.js"></script>
<script src="jq/jszip.min.js"></script>
<script src="jq/pdfmake.min.js"></script>
<script src="jq/vfs_fonts.js"></script>
<script src="jq/buttons.html5.min.js"></script>
<script src="jq/buttons.print.min.js"></script>
<?php
$sel="select * from product_add where status='' and product_id='$flag' order by id desc";
$res=mysqli_query($conn,$sel);
?>
<script>
$(document).ready(function(){
$('#example').DataTable({
dom: 'Bfrtip',
buttons: ['print','pdf']
});
});
</script>
<div class="table-responsive">
<table id="example" class="display nowrap" cellspacing="0" width="100%" border="1px">
<thead>
<tr>
<th>Sr No.</th><th>Supplier Name</th><th>Product Name</th><th>Class</th><th>Area</th><th>Price</th><th> Qty Add</th><th>Date Add</th><th>Date Purchage</th><th>Action</th>
</tr>
</thead>
<tbody>
<?php
$s=1;
$t_p=0;
$t_sale=0;
while($row=mysqli_fetch_array($res,MYSQLI_BOTH))
{
$supplier_id=$row['supplier_id'];
$sel1="select * from supplier where id='$supplier_id' order by id desc";
$res1=mysqli_query($conn,$sel1);
$row1=mysqli_fetch_array($res1,MYSQLI_BOTH);
$prduct_id=$row['id'];
?>
<tr>
<td><?php echo $s++;?></td><td><?php echo $row1['supplier_name'];?></td><td><?php echo $row['product_name'];?></td><td><?php echo $row['class'];?></td><td><?php echo $row['area'];?></td><td><?php echo $row['price'];?></td><td><?php echo $row['qty'];?></td><td><?php echo date("m-d-Y", strtotime( $row['date_ad']));?></td><td><?php echo date("m-d-Y", strtotime( $row['date']));?></td><td><a href="javascript:;" onclick="editrow(<?php echo $row['id'];?>)"><span class="glyphicon glyphicon-pencil"></span></a> <a href="javascript:;" onclick="deleterow(<?php echo $row['id'];?>)"><span class="glyphicon glyphicon-trash"></span></a></td>
<?php
}
?>
</tr>
<tfoot>
<tr>
<th>Sr No.</th><th>Supplier Name</th><th>Product Name</th><th>Class</th><th>Area</th><th> Qty Add</th><th>Date Add</th><th>Date Purchage</th><th>Action</th>
</tr>
</tfoot>
</tbody>
</table>
</div>
<?php
?>
</div>
<!-- /.col-lg-12 -->
</div>
</div>
<!-- /#page-wrapper -->
<br/>
<br/>
</div>
</section>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-form-validator/2.3.26/jquery.form-validator.min.js"></script>
<script>
$.validate({
modules : 'html5',
modules : 'file'
});
</script>
<!-- footer -->
<?php include('link/footer.php');
?>
<!-- / footer -->
</section>
<!--main content end-->
</section>
<script src="js/bootstrap.js"></script>
<script src="js/jquery.dcjqaccordion.2.7.js"></script>
<script src="js/scripts.js"></script>
<script src="js/jquery.slimscroll.js"></script>
<script src="js/jquery.nicescroll.js"></script>
<!--[if lte IE 8]><script language="javascript" type="text/javascript" src="js/flot-chart/excanvas.min.js"></script><![endif]-->
<script src="js/jquery.scrollTo.js"></script>
<!-- morris JavaScript -->
<!-- modal for result-->
<div class="modal fade" id="editmodel">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-heading">
<button class="close" data-dismiss="modal"> <span> × </span> </button>
<center><h2 class="modal-title" style="color:green;background-color:yellow">Update Product Add </h2> </center>
</div>
<div class="modal-body" id="editbody">
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div>
<!-- //calendar -->
</body>
</html>