halohalo
bnmbnmbnhjkhjkhjkhjktyutyutyuytutyutyutyhgjgjghjgjghjguytutyry
/
home
/
aramiyarkai
/
public_html
/
admin
/
Upload FileeE
HOME
<?php error_reporting (0); include "dbc.php"; page_protect(); ?> <?php include'header.php';?> <div class="main-bar"> <h3><i class="fa fa-archive"></i> Products</h3> </div> <!-- /.main-bar --> </header> <!-- /.head --> </div> <!-- /#top --> <?php include'admin_admin.php';?> <!-- /#left --> <div id="content"> <div class="outer"> <div class="inner bg-light lter"> <style> .form-control.col-lg-6 { width: 50% !important; } </style> <div class="row"> <div class="col-lg-12"> <div class="box"> <header> <h5>View Products</h5> <div class="toolbar"></div> </header> <div class="row"> <div class="col-lg-12"> <div class="box"> <div id="collapse4" class="body"> <div class="col-md-12"> </div> <?php //include 'searchform.php'; ?> <div class="col-md-12"> </div> <?php include 'msg_display.php'; ?> <form class="form-horizontal" method="post" action="excelUpload.php" enctype="multipart/form-data" > <div class="row"> <div class="col-lg-6"> <div class="col-lg-10"> <div class=""> <input type="file" name="file" class="form-control" required> <input type="hidden" name="id" value="<?php echo $id;?>" readonly> </div></div> <div class="col-lg-2" > <div class=""> <button class="btn btn-danger" type="submit" name="Submit">Upload</button> </div> </div> </div> <div class="col-lg-6"></div></div> <p>Download Demo File from here : <a href="xl_upload/uploads/product_tbl3.csv"><strong>Demo.csv</strong></a></p> </form> <form action="view_product.php" method="get" enctype="multipart/form-data"> <div class="col-md-12"> <div class="col-lg-12" align="center"> <input type="submit" class="btn btn-danger" name="Delete" id="Delete" value="Delete All"> <input type="submit" class="btn btn-danger" name="Approve" id="Approve" value="Approve All"> <input type="submit" class="btn btn-danger" name="Unapprove" id="Unapprove" value="Unapprove All"> </div> <div class="col-md-12"> </div> <div class="col-lg-12"> <div class="col-lg-6"> <div class="col-lg-10"> <select name="stock_avail" id="stock_avail" required class="form-control"> <option value="2-3 Days">2-3 Days</option> <option value="In Stock">In Stock</option> <option value="Out Of Stock">Out Of Stock</option> <option value="Pre-Order">Pre-Order</option> </select> </div> <div class="col-lg-2"> <input type="submit" class="btn btn-danger" name="change" id="change" value="Update"> </div> </div> <div class="col-lg-6"> <div class="col-lg-10"> <select name="type" id="type" class="form-control"> <option value="">Select Lable</option> <option value="New">New</option> <option value="Offer">Offer</option> <option value="Deal">Deal</option> <option value="Discount">Discount</option> </select> </div> <div class="col-lg-2"> <input type="submit" class="btn btn-danger" name="change" id="change" value="Change Type"> </div> </div> </div> </div> <div class="col-md-12"> </div> <table id="datatable-responsive" class="table table-bordered table-condensed table-hover table-striped"> <thead> <tr> <th>Select</th> <th>Category</th> <th>Product</th> <th>Size</th> <th>Price</th> <th>Quantity</th> <th>Status</th> <!--<th>Label</th>--> <th>Actions</th> </tr> </thead> <tbody> <?php //include 'pagination.php'; $sno = 1; $sql = "select * from product_tbl order by `product_id` desc"; $result = mysqli_query($link,$sql); while($rw_employee = mysqli_fetch_object($result)){ $brand_id = $rw_employee->brand; $sel_brand = mysqli_query($link,"select * from brand_tbl where brand_id='$brand_id'"); $rw_brand = mysqli_fetch_object($sel_brand); $brand = $rw_brand->brand_name; $product_id = $rw_employee->product_id; $group_proid = $rw_employee->group_proid; ?> <tr> <td><input name="u[]" type="checkbox" value="<?php echo $rw_employee->product_id; ?>" id="u[]"></td> <td> <?php echo $rw_employee->cat_name;?> - <?php echo $rw_employee->cat_name_en;?><br> <?php echo $rw_employee->subcat_name;?> - <?php echo $rw_employee->subcat_name_en;?><br> <?php echo $rw_employee->childcat_name;?> - <?php echo $rw_employee->childcat_name_en;?><br> </td> <td class="center"> <?php //echo $rw_employee->barcode;?> <?php echo $rw_employee->product_id;?><br> <?php //echo $rw_employee->group_proid;?> <?php echo $rw_employee->product_name;?> - <?php echo $rw_employee->product_name_en;?> </td> <td class="center"><?php echo $rw_employee->size;?><?php echo $rw_employee->unit;?></td> <td class="center"> <?php /*<span style="text-decoration:line-through;"><?php echo $rw_employee->mrp_price;?></span><br>*/?> <span><?php echo $rw_employee->selling_price;?></span><br> <span>CP: <?php echo $rw_employee->cost_price;?></span> </td> <td class="center">Stock: <?php echo $rw_employee->quantity;?> <?php /*<br>Min: <?php echo $rw_employee->minq;?> <br>Max: <?php echo $rw_employee->maxq;?>*/ ?> <br><?php echo $rw_employee->stock_avail;?> </td> <td class="center"><?php echo $rw_employee->status;?></td> <?php /*<td class="center"><?php echo $rw_employee->type;?></td>*/ ?> <td> <?php /*<a class="btn btn-success" title="Upload" href="multiple_images.php?product_id=<?php echo $rw_employee->product_id;?>&group_proid=<?php echo $rw_employee->group_proid;?>"><i class="fa fa-upload"></i> </a>*/ ?> <a class="btn btn-info" title="edit" href="add_product.php?pid=<?php echo $rw_employee->product_id;?>&gpid=<?php echo $rw_employee->group_proid;?>&action=Update"> <i class="fa fa-edit"></i> </a> <a class="btn btn-danger" title="delete" href="view_product.php?delete=d&id=<?php echo $rw_employee->id;?>&product_id=<?php echo $rw_employee->product_id;?>" onclick="return confirm('Are you sure want to delete?')"> <i class="fa fa-trash"></i> </a> </td> </tr> <?php $sno++; } ?> </tbody> </table> <?php //echo $pagination; ?> </form> </div> </div><!--/span--> </div><!--/row--> <?php $id=$_GET['id']; if($_GET['delete'] == 'd') { $id=$_GET['id']; $product_id = $_GET['product_id']; mysqli_query($link,"delete from product_tbl where id='$id'"); echo "<script>window.location.href='view_product.php'</script>"; } if($_GET['Delete'] == 'Delete All') { foreach ($_GET['u'] as $uid) { mysqli_query($link,"delete from product_tbl where product_id='$uid'"); } echo "<script>window.location.href='view_product.php'</script>"; } if($_GET['Approve'] == 'Approve All') { foreach ($_GET['u'] as $uid) { $update_status = mysqli_query($link,"update product_tbl set status='Active' where product_id='$uid'"); } echo "<script>window.location.href='view_product.php'</script>"; } if($_GET['Unapprove'] == 'Unapprove All') { foreach ($_GET['u'] as $uid) { $update_status = mysqli_query($link,"update product_tbl set status='Disabled' where product_id='$uid'"); } echo "<script>window.location.href='view_product.php'</script>"; } if($_GET['change'] == 'Change Type') { $type = $_GET['type']; foreach ($_GET['u'] as $uid) { $update_status = mysqli_query($link,"update product_tbl set type='$type' where product_id='$uid'"); } echo "<script>window.location.href='view_product.php'</script>"; } if($_GET['change'] == 'Update') { $stock_avail = $_GET['stock_avail']; foreach ($_GET['u'] as $uid) { $update_status = mysqli_query($link,"update product_tbl set stock_avail='$stock_avail' where product_id='$uid'"); } echo "<script>window.location.href='view_product.php'</script>"; } ?> </div><!--/.fluid-container--> <!-- end: Content --> </div><!--/#content.span10--> </div><!--/fluid-row--> <div class="modal hide fade" id="myModal"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">×</button> <h3>Settings</h3> </div> <div class="modal-body"> <p>Here settings can be configured...</p> </div> <div class="modal-footer"> <a href="#" class="btn" data-dismiss="modal">Close</a> <a href="#" class="btn btn-primary">Save changes</a> </div> </div> </div><!-- /.col-lg-12 --> <!-- /.row --> <!-- /.row --> </div><!-- /.inner --> </div><!-- /.outer --> </div><!-- /#content --> <div id="right" class="bg-light lter"> <div class="alert alert-danger"> <button type="button" class="close" data-dismiss="alert">×</button> <strong>Warning!</strong> Best check yo self, you're not looking too good. </div> <!-- .well well-small --> <div class="well well-small dark"> <ul class="list-unstyled"> <li>Visitor <span class="inlinesparkline pull-right">1,4,4,7,5,9,10</span> </li> <li>Online Visitor <span class="dynamicsparkline pull-right">Loading..</span> </li> <li>Popularity <span class="dynamicbar pull-right">Loading..</span> </li> <li>New Users <span class="inlinebar pull-right">1,3,4,5,3,5</span> </li> </ul> </div><!-- /.well well-small --> <!-- .well well-small --> <div class="well well-small dark"> <button class="btn btn-block">Default</button> <button class="btn btn-primary btn-block">Primary</button> <button class="btn btn-info btn-block">Info</button> <button class="btn btn-success btn-block">Success</button> <button class="btn btn-danger btn-block">Danger</button> <button class="btn btn-warning btn-block">Warning</button> <button class="btn btn-inverse btn-block">Inverse</button> <button class="btn btn-metis-1 btn-block">btn-metis-1</button> <button class="btn btn-metis-2 btn-block">btn-metis-2</button> <button class="btn btn-metis-3 btn-block">btn-metis-3</button> <button class="btn btn-metis-4 btn-block">btn-metis-4</button> <button class="btn btn-metis-5 btn-block">btn-metis-5</button> <button class="btn btn-metis-6 btn-block">btn-metis-6</button> </div><!-- /.well well-small --> <!-- .well well-small --> <div class="well well-small dark"> <span>Default</span> <span class="pull-right"><small>20%</small> </span> <div class="progress xs"> <div class="progress-bar progress-bar-info" style="width: 20%"></div> </div> <span>Success</span> <span class="pull-right"><small>40%</small> </span> <div class="progress xs"> <div class="progress-bar progress-bar-success" style="width: 40%"></div> </div> <span>warning</span> <span class="pull-right"><small>60%</small> </span> <div class="progress xs"> <div class="progress-bar progress-bar-warning" style="width: 60%"></div> </div> <span>Danger</span> <span class="pull-right"><small>80%</small> </span> <div class="progress xs"> <div class="progress-bar progress-bar-danger" style="width: 80%"></div> </div> </div> </div><!-- /#right --> </div><!-- /#wrap --> <?php include'footer.php';?>