Professional Documents
Culture Documents
action="">
<?php include('session.php'); ?> <?php
<?php include('header.php'); ?> $total=0;
<td>
</tr>
<div class="panel-body"> <?php echo
$row['consumed_qty'];?>
<table class="table table-bordered table-
hover" border="1" cellpadding="4" </td>
cellspacing="0" style="font-family: arial; font-
size: 12px; text-align:left;" > <td align="right"><strong><span
<thead> class="subt">
<th></th>
<th>Product <?php
Name</th>
<th>Product
Price</th>
$subtotal=$row['consumed_qty']*$row['supply
<th>Quantity</th> _total_amount'];
<th>SubTotal</th> echo
</thead> number_format($subtotal,2);
<tbody>
</DIV> $total+=$subtotal;
1
$subtotal=$row['qty']*$row['supply_total_amo
?> unt'];
2
mysqli_query($conn,"UPDATE
swine_raiser SET swine_qty = '0' where table_id
= '".$_SESSION['id']."'"); <!-- Trigger the modal with a button -->
<button type="button" class="btn btn-info btn-
$pro=mysqli_query($conn,"select * lg" data-toggle="modal" data-
from supply where supply_id='". target="#myModal">Proceed to
$row['supply_id']."'"); Payment</button>
$prorow=mysqli_fetch_array($pro);
</div>
} </div>
</center>
mysqli_query($conn,"delete from
consumed_item where table_id='".
$_SESSION['id']."'"); <div class="col-lg-12"
style="width: 50%; margin-left: 199px; margin-
} top: -677px; ">
} <div class="panel panel-default"; height:
400px;" style="background-color: pink;">
?> <div class="panel-heading"
</form> style="background-color: #337ab7;">
</div> <font size="5px"
</div> color="white"><b>Consumables</b></font>
</div> </div>
<div class="panel-body"
</div> style="background-color:pink">
</div> <a href="indexxx.php" class="btn btn-
<!-- End Modal --> danger" style="background-color: #337ab7;"><i
class="fa "></i> Medicine</a>
<body> <a href="index.php" class="btn btn-
<?php include('navbar.php'); ?> danger" style="background-color: #c2c1c1;"><i
<center> class="fa "></i> Feeds</a>
<div class="navbar-default sidebar"
role="navigation" style="max-height: 100%; <a href="historyy.php" class="btn
width: 34%; border: solid gray 1px; margin-left: btn-danger" style="float: right; background-
962px; margin-top: -676px;"> color: #337ab7;"><i class="fa " ></i>
<div class="sidebar-nav navbar- History</a>
collapse" > </div>
<table class="table table-bordered
table-hover" border="1" cellpadding="4"
<div style="height: 10px;"></div> cellspacing="0" style="font-family: arial; font-
size: 14px; text-align:left; width: 90%;
<div id="checkout_area" style="margin: background-color: #ffe6ea; margin-left: 40px;
10px;"></div> margin-top: -1%;">
<thead
<div style="height:20px;"></div> style="background-color:#337ab7;">
3
<th>Product <td align="right"><strong><span
Name</th> class="subt">
<th>Product
Price</th> <?php echo
$row['supply_quantity'];?>
<th>Quantity</th>
</span></strong></td>
<th>SubTotal</th>
</thead> <td align="center">
<tbody >
</DIV>
<form method="POST"
action=""> <div id="cart<?php echo
<?php $row['supply_id']; ?>">
$inc=4; <input
type="number" class = "hidden"
$query=mysqli_query($conn,"select * style="width:40px;" id="qty<?php echo
from `supply` where supply_quantity > 0 and $row['supply_id']; ?>" value=1>
supply_type = 'Feeds' "); <a
href=""><button type="button" class="btn btn-
primary btn-sm concart" value="<?php echo
while($row=mysqli_fetch_array($query)){ $row['supply_id']; ?>">
ADD
$inc = ($inc == 4) ? 1 :
$inc+1; </button></a>
if($inc == 1) echo "<div </div>
class='row'>";
</td>
?> </tr>
<?php
<tr> }
?>
4
</div> DASHBOARD PAGE
<!-- /#page-wrapper -->
<!DOCTYPE html>
</div> <html lang="en">
<!-- /#wrapper --> <?php ob_start(); include "connection.php";
<div class="container" style="width: 45%; float: include "expired.php";?>
left; margin-top: -676px; border: #4c84b3; <head>
margin-left: 233px;" > <?php include('header.php'); ?>
<div class="modal-footer">
<?php include('side_nav_bar.php'); ?>
<!-- Morris Charts CSS -->
<?php include('script.php'); ?> <link href="../vendor/morrisjs/morris.css"
<?php include('modal.php'); ?> rel="stylesheet">
<script src="custom.js"></script> </head>
<script> <style type="text/css">
body {
$(document).ready(function(){
showCheckout(); background-color: white;
font-size: 15px;
}); }
</script>
</style>
<script type="text/javascript"> <body>
$(document).ready(function(){
$('#income').change(function(){; <div class="navbar-header" style="margin-left:
var num = $('#income').val(); -500px;">
var nums = $('#tot').val();
<img src="img/logo.png" width="60px"
var TIncome = 0; height="60px" >
<font size="5px" color="#337ab7"> Swine
Raising Management System </font>
TIncome = (num - nums)/2; </div>
// alert(TIncome) <!-- /.navbar-header -->
$('#tin').val(TIncome); <ul class="nav navbar-top-links navbar-right"
style="margin-top: -56px">
<a href="../index.php">
}); Logout
}); </a></button>
</script> </div>
5
<div id="wrapper">
<!-- Navigation --> </div>
<nav class="navbar navbar-default navbar- <div>Swine Raiser</div>
static-top" role="navigation" style="margin- </div>
bottom: 0"> </div>
<?php include('top_nav_bar.php'); ?> </div>
<!-- /.navbar-top-links -->
<?php include('side_nav_bar.php'); ?> </div>
<!-- /.navbar-static-side --> </div>
</nav> <br>
<div class="col-lg-3 col-md-6"
<div id="page-wrapper"> style=" color: white; width: 260px; margin-left:
<div class="row"> -15px; margin-top: -4px;">
<?php if (isset($_SESSION['success'])) : ?> <div class="panel panel-white">
<div class="error success" > <div class="panel-heading"
<?php unset($_SESSION['success']); ?> style="background-color: #337ab7;">
</div> <div class="row">
<?php endif ?> <div class="col-xs-3">
<!-- <div class="col-lg-12"> <i class="fa fa-file fa-5x"></i>
<h2 class="page- </div>
header"><center><br><h6><strong>Date:</stro <div class="col-xs-9 text-right" style="
ng> <?php echo date("l M d, Y"); ? color: white;" >
></h6></small></center></h2> <div class="huge" >
</div> --> <?php
$q = </div>
mysqli_query($conn,"SELECT * from </div>
swine_raiser WHERE swine_qty > 0");
$num_rows =
mysqli_num_rows($q);
echo $num_rows; <div class="row" style="width: 815px;
?> height:190px; margin-left: 490px">
6
<div class="col-lg-12"> <table class="table table-bordered
<div class="panel panel-default" table-hover" style="background-color:#ffe6ea;
style="background-color:#ffe6ea; "> color: black; " border="1" cellpadding="3"
<div class="panel-heading" cellspacing="0" style="font-family: arial; font-
style="background-color: #337ab7; size: 3px; color: text-align:left;"
color:white;"> width="30px" id="invTable">
<i class="fa fa-bar-chart-o fa-fw"></i>
<font size="5"> <b> Monthly Report of Feeds <thead style="background-color: pink;
Consumption</b> </font> font-size: 20px;">
</div> <tr >
<!-- /.panel-heading --> <th>Product Name</th>
<div class="panel-body">
<div id="feeds"></div> <th>Quantity</th>
</div>
</div> <th>Status</th>
</div> </tr>
</div> </thead>
<tbody>
<div class="row" style="width: 800px; <?php
height:190px; margin-left: 500px">
<div class="col-lg-12"> $connect=mysqli_query($conn,"select *
from supply where supply_type != 'Swine' order
</div> by supply_quantity");
</div>
while
($row=mysqli_fetch_array($connect)) {
$qty =
$row['supply_quantity'];
$name =
</div> $row['supply_desc'];
7
else{ </div>
?> <div class="col-lg-12" style="width: 491px;
<td> <? margin-top: 4px; margin-left: 215px ">
php echo "Available"?></td> <div class="panel panel-default">
<?php <div class="panel-heading"
} style="background-color: #337ab7; width:
?> 800px;">
</tr> <font size="5px"
<?php color="white"><center><b>Swine Schedule for
} Vaccination</b></center></font>
}
?>
</div>
</tbody> <!-- /.panel-heading -->
</table>
<div class="panel-body"
</div> style="background-color: #337ab7; width:
800px;">
<table width="100%" class="table table-
bordered table-hover dataTables-example
<div class="row" style="width:1308px; recordsTable" id="recordsTable">
height:190px; " > <thead style="background-color: pink;
font-size: 20px;">
<div class="col-lg-12"> <tr>
<div class="panel panel-default" <th>Swine Raiser Name</th>
style="background-color:#ffe6ea; "> <th>Address</th>
<div class="panel-heading" <th>Date Release</th>
style="background-color: #337ab7; <th>Date Scheduled</th>
color:white;"> <th>Action</th>
<i class="fa fa-bar-chart-o fa-fw" ></i>
<font size="5"> <b>Monthly Sales
Report</b></font> </tr>
</div> </thead>
<tbody style="background-
<!-- /.panel-heading --> color:#ffe6ea;">
<div class="panel-body"> <?php
<div id="barChart"></div> include_once('Connection.php');
$today = date('Y-m-d');
$sql="SELECT * FROM `swine_raiser`, `schedule`
</div> where swine_raiser.table_id= schedule.table_id
and schedule_status = 'To Visit' group by
</div> schedule.table_id order by schedule_status";
</div> $result=mysqli_query($conn,$sql);
<div class="card-footer small text- if(mysqli_num_rows($result) > 0){
muted"></div> while($row=mysqli_fetch_assoc($result)){
</div>
?>
</div> <tr>
8
<td><?php echo header ('location: schedule.php');
$row['swine_raiser_name']; ?></td> }
<td><?php echo else{
$row['swine_raiser_address']; ?></td> $_SESSION['duplicate'] = 1;
<td><?php echo date("M d, Y", header ('location: edit_profile.php');
strtotime($row['swine_raiser_year'])); ?></td> }
<td><?php echo date("M d, Y", }
strtotime($row['schedule_date_time'])); ?> ?>
</td>
<td> </tbody>
</table>
</div>
<form method="POST" <!-- /.panel-body -->
action="scheduled.php">
<input type="hidden" </div>
name="schedule_id" value="<?php echo <!-- /.panel -->
$row['schedule_id'];?>">
<button name="done"
style="background-color: #609dd2;" class="btn
btn-success btn-sm"><i class="fa fa-edit">
Done</i></button>
</form>
</td>
</td>
</tr>
<?php } } ?>
9
<font size="5px" </div>
color="white"><center><b>Expired <!-- /.panel -->
Products</b></center></font>
</div>
<!-- /#wrapper -->
</div>
<!-- /.panel-heading --> <!-- jQuery -->
<script
<div class="panel-body" src="../vendor/jquery/jquery.min.js"></script>
style="background-color: #337ab7; width:
450px;"> <!-- Bootstrap Core JavaScript -->
<table width="100%" class="table <script
table-bordered table-hover dataTables-example src="../vendor/bootstrap/js/bootstrap.min.js">
recordsTable" id="recordsTable"> </script>
<thead style="background-color:
pink;"> <!-- Metis Menu Plugin JavaScript -->
<tr> <script
<th>Product Name</th> src="../vendor/metisMenu/metisMenu.min.js">
<th>Expiration Date</th> </script>
<?php } } ?>
</tbody>
</table>
</div>
<!-- /.panel-body -->
10