Black Eagle Team Minishell
Path:
D:
/
inetpub
/
vhosts
/
supauldairy.com
/
httpdocs
/
MAIN
/
[
Home
]
File: noticemaster.php
<?php session_start(); if($_SESSION['username']==true) { $id = $_SESSION['username']; } else{ header('location:../adminlogin.php'); } ?> <!DOCTYPE html> <?php require "config/config.php"; ?> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content=""> <meta name="author" content="Dashboard"> <meta name="keyword" content="Dashboard, Bootstrap, Admin, Template, Theme, Responsive, Fluid, Retina"> <title>Notice Master</title> <!-- Favicons --> <link href="img/favicon.png" rel="icon"> <link href="img/apple-touch-icon.png" rel="apple-touch-icon"> <!-- Bootstrap core CSS --> <link href="lib/bootstrap/css/bootstrap.min.css" rel="stylesheet"> <!--external css--> <link href="lib/font-awesome/css/font-awesome.css" rel="stylesheet" /> <link rel="stylesheet" type="text/css" href="css/zabuto_calendar.css"> <link rel="stylesheet" type="text/css" href="lib/gritter/css/jquery.gritter.css" /> <!-- Custom styles for this template --> <link href="css/style.css" rel="stylesheet"> <link href="css/style-responsive.css" rel="stylesheet"> <script src="lib/chart-master/Chart.js"></script> </head> <body> <!-- Navigation --> <?php include 'admin/header.php';?> <section id="main-content"> <section class="wrapper"> <div id="page-wrapper"> <div class="container-fluid"> <div class="row"> <div class="col-lg-12"> <h2 class="page-header">Notice Master</h2> </div> <!-- /.col-lg-12 --> </div> <div class="row"> <div class="col-lg-12"> <div class="panel panel-default"> <div class="panel-heading"> Notice </div> <!-- /.panel-heading --> <div class="panel-body"> <!-- Tab panes --> <div class="tab-content"> <div class="row"> <div class="col-lg-12"> <div class="table-responsive scrol"> <table class="table table-striped table-bordered table-hover" id="ratetable"> <thead> <tr> <th>Sl No.</th> <th>Notice Name</th> <th>Notice Document</th> <th>Publish Date</th> <th>Last Date</th> <th>Description</th> <th></th> </tr> </thead> <tbody> <?php $query = "SELECT * FROM notice"; $data = mysqli_query($con,$query); ?> <?php $n = 1; if ($data) { foreach ($data as $row) { ?> <tr> <td hidden><?php echo $row['slno']; ?></td> <td><a onclick="getrate(this);" ><?php echo $n++;?></a></td> <td><?php echo $row['noticename']; ?></td> <td><a href="NOTICE/<?php echo $row['noticedoc']; ?>" target="_blank"><?php echo $row['noticedoc']; ?></a></td> <td><?php echo $row['date_publish']; ?></td> <td><?php echo $row['last_date']; ?></td> <td><?php echo $row['description']; ?></td> <td><a onclick="return confirm('Are you sure want to delete this?')" type="button" class="btn btn-danger btn-xs" href="deletenotice.php?id=<?php echo $row['slno']; ?>">DELETE</a></td> </tr> <?php } } ?> </tbody> </table> </div> <br> <div class="col-lg-offset-2 col-lg-10"> <button class="btn btn-primary" type="button" name="srh" value="addrate" >ADD NEW</button> </div> <!-- /.table-responsive --> </div> <!-- /.row (nested) --> </div> <div class="row desc" id="addrate"> <div class="col-lg-12"> <section class="panel"> <div class="panel-body"> <form class="cmxform form-horizontal" action="addnotice.php" method="POST" enctype="multipart/form-data"> <div class="form-group"> <label class="col-sm-2 control-label">Notice Name</label> <div class="col-sm-5"> <input type="text" class="form-control" name="notice_name" id="notice_name"> </div> <label class="col-sm-2 control-label">Publish Date</label> <div class="col-sm-3"> <input type="text" class="form-control" name="publish_date" id="publish_date"> </div> </div> <div class="form-group"> <label class="col-sm-2 control-label">Notice Document</label> <div class="col-sm-5"> <input type="file" class="form-control" name="notice_doc" id="notice_doc"> </div> <label class="col-sm-2 control-label">Last Date</label> <div class="col-sm-3"> <input type="text" class="form-control" name="last_date" id="last_date"> </div> </div> <div class="form-group"> <label class="col-sm-2 control-label">Description</label> <div class="col-sm-5"> <input type="text" class="form-control" name="description" id="description"> </div> </div> <div class="form-group"> <div class="col-lg-offset-2 col-lg-10"> <button class="btn btn-primary" type="submit" name="submit" id="submit">Save</button> <button class="btn btn-default" type="button" name='closee' >Close</button> </div> </div> </form> </div> </section> </div> <!-- /.row (nested) --> </div> </div> </div> <!-- /.panel-body --> </div> <!-- /.panel --> </div> </div> </div> </div> </section> <!-- /wrapper --> </section> <?php include 'admin/footer.php';?> <!-- /#wrapper --> <!-- jQuery --> <script src="lib/jquery/jquery.min.js"></script> <script src="lib/bootstrap/js/bootstrap.min.js"></script> <script class="include" type="text/javascript" src="lib/jquery.dcjqaccordion.2.7.js"></script> <script src="lib/jquery.scrollTo.min.js"></script> <script src="lib/jquery.nicescroll.js" type="text/javascript"></script> <script src="lib/jquery.sparkline.js"></script> <!--common script for all pages--> <script src="lib/common-scripts.js"></script> <script type="text/javascript" src="lib/gritter/js/jquery.gritter.js"></script> <script type="text/javascript" src="lib/gritter-conf.js"></script> <!--script for this page--> <script src="lib/sparkline-chart.js"></script> <script src="lib/zabuto_calendar.js"></script> <script type="text/javascript"> </script> <script type="text/javascript"> $(document).ready(function(){ $("div.desc").hide(); $("div.descc").hide(); $("div.desccc").hide(); $("div.descccc").hide(); $("button[name$='srh']").click(function(){ var test = $(this).val(); // $("div.desc").hide(); $("#" + test).show(); }); }); $(document).ready(function(){ $("button[name$='close']").click(function(){ $("div.desc").hide(); }); }); $(document).ready(function(){ $("button[name$='closee']").click(function(){ $("div.desc").hide(); }); }); $(document).ready(function(){ $("button[name$='closeee']").click(function(){ $("div.desccc").hide(); }); }); $(document).ready(function(){ $("button[name$='closeeee']").click(function(){ $("div.descccc").hide(); }); }); $(function(){ $("#basic_rate, #gst, #tcs").on("keydown keyup click", quantity); function quantity() { // var sum = ( Number($("#rate").val()) * Number($("#quantity").val()) ); var basic_value = Number($("#basic_rate").val()); var gst_value = (( basic_value * Number($("#gst").val()) )/100); var tcs_value = (( ( basic_value + gst_value ) * Number($("#tcs").val()) )/100); var final_value = (basic_value + gst_value + tcs_value); $('#rate').val(final_value.toFixed(2)); } }); $(function(){ $("#basic_rate_e, #gst_e, #tcs_e").on("keydown keyup click", quantitys); function quantitys() { // var sum = ( Number($("#rate").val()) * Number($("#quantity").val()) ); var basic_value_e = Number($("#basic_rate_e").val()); var gst_value_e = (( basic_value_e * Number($("#gst_e").val()) )/100); var tcs_value_e = (( ( basic_value_e + gst_value_e ) * Number($("#tcs_e").val()) )/100); var final_value_e = (basic_value_e + gst_value_e + tcs_value_e); $('#rate_e').val(final_value_e.toFixed(2)); } }); document.getElementById('rcode').onchange = (function(){ var rcode = $('#rcode').val(); if(rcode != '' ) { $.ajax({ url: "fetchbyrategroup.php", type: "POST", data:{ rcode:rcode }, success: function(data) { $('#ratetable').html(data); } }); } else{ } $('#rate_code').val($('#rcode').val()); }); function getrent(e) { $("div.desccc").show(); $.ajax({ type: "POST", url : 'getrent.php', dataType: "JSON", data :{ slno: String($(e).parent().parent().find('td:nth-child(1)').text(),10) }, success: function(data) { console.log(data); $("#r_code_slno").val(data[0].slno); $("#r_code_e").val(data[0].rate_code); $("#g_name_e").val(data[0].group_name); }, error: function() { } }); } function getrate(e) { $("div.descccc").show(); $.ajax({ type: "POST", url : 'getrate.php', dataType: "JSON", data :{ slno: String($(e).parent().parent().find('td:nth-child(1)').text(),10) }, success: function(data) { console.log(data); $("#rate_code_slno").val(data[0].slno); $("#rate_code_e").val(data[0].rate_code); $("#p_code_e").val(data[0].pcode); $("#basic_rate_e").val(data[0].basic_rate.toFixed(2)); $("#gst_e").val(data[0].gst.toFixed(2)); $("#tcs_e").val(data[0].tcs.toFixed(2)); $("#rate_e").val(data[0].rate.toFixed(2)); }, error: function() { } }); // product_total = parseInt($(e).parent().parent().find('td:nth-child(6)').text(),10); // total -= product_total; // $('#total').val(total.toFixed(2)); // $(e).parent().parent().remove(); } </script> <script> document.addEventListener("mousedown", function(e){ if(e.which === 3){ alert("Right Click not allowed"); } }); </script> <style type="text/css"> .scrol{ overflow: scroll; height: 280px; } </style> </body> </html>
©
2020 Black Eagle Team