add all files

This commit is contained in:
Rucus
2026-02-17 09:29:34 -06:00
parent b8c8d67c67
commit 782d203799
21925 changed files with 2433086 additions and 0 deletions

BIN
lasuca/loaddata/Thumbs.db Normal file

Binary file not shown.

View File

@@ -0,0 +1,35 @@
<?php
$serverName = "CBM2K12\SQLEXPRESS";
$uid = "cbmclient";
$pwd = "ascbm2k";
$connectionInfo = array( "UID"=>$uid, "PWD"=>$pwd,'ReturnDatesAsStrings'=> true, "CharacterSet" => 'utf-8', "Database"=>"SugarCaneScale" );
/* Connect using SQL Server Authentication. */
$conn = sqlsrv_connect( $serverName, $connectionInfo);
if( $conn === false )
{
echo "Unable to connect.</br>";
die( print_r( sqlsrv_errors(), true));
}
$sql = "SELECT DISTINCT CropDay FROM LoadData ORDER BY CropDay DESC";
$stmt = sqlsrv_query( $conn, $sql );
if( $stmt === false) {
die( print_r( sqlsrv_errors(), true) );
}
echo "<select name='cropday' id='cropday'>";
echo '<option selected disabled value="">Crop Day...</option>';
while( $row = sqlsrv_fetch_array( $stmt, SQLSRV_FETCH_ASSOC) ) {
echo "<option value='" . $row['CropDay'] . "' >" . $row['CropDay'] . "</option>";
}
echo "</select>";
//end
?>
<?
$db = null;
?>

View File

@@ -0,0 +1,22 @@
<?php
$dbName = "G:\CBM\SC\data\D_SCALE.mdb";
if (!file_exists($dbName)) {
die("Could not find database file.");
}
$db = new PDO("odbc:DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=$dbName; Uid=; Pwd=;");
//select data from db
$day = "SELECT DISTINCT `Crop Day` FROM `Load Data` ORDER BY `Crop Day` DESC";
$cd = $db->query($day);
//end
echo "<select name='cropday'>";
echo '<option selected disabled value="">Crop Day...</option>';
while ($row = $cd->fetch()) {
echo "<option value='" . $row['Crop Day'] . "' >" . $row['Crop Day'] . "</option>";
}
echo "</select>";

View File

@@ -0,0 +1,3 @@
<div class="footer">
<p>Copyright © 2015, Louisiana Sugarcane Cooperative, Inc</p>
</div>

View File

@@ -0,0 +1,34 @@
<?php
$serverName = "CBM2K12\SQLEXPRESS";
$uid = "cbmclient";
$pwd = "ascbm2k";
$connectionInfo = array( "UID"=>$uid, "PWD"=>$pwd,'ReturnDatesAsStrings'=> true, "CharacterSet" => 'utf-8', "Database"=>"SugarCaneScale" );
/* Connect using SQL Server Authentication. */
$conn = sqlsrv_connect( $serverName, $connectionInfo);
if( $conn === false )
{
echo "Unable to connect.</br>";
die( print_r( sqlsrv_errors(), true));
}
$sql = "SELECT DISTINCT AccountName FROM Tract";
$stmt = sqlsrv_query( $conn, $sql );
if( $stmt === false) {
die( print_r( sqlsrv_errors(), true) );
}
echo "<select name='grower' id='grower'>";
echo '<option selected disabled value="">Select Farmer...</option>';
while( $row = sqlsrv_fetch_array( $stmt, SQLSRV_FETCH_ASSOC) ) {
echo "<option value='" . $row['AccountName'] . "' >" . $row['AccountName'] . "</option>";
}
echo "</select>";
//end
?>
<?
$db = null;
?>

View File

@@ -0,0 +1,21 @@
<?php
$dbName = "G:\CBM\SC\data\D_SCALE.mdb";
if (!file_exists($dbName)) {
die("Could not find database file.");
}
$db = new PDO("odbc:DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=$dbName; Uid=; Pwd=;");
//select data from db
$grower = "SELECT DISTINCT farmer FROM INSCALE";
$cows = $db->query($grower);
//end
echo "<select name='term'>";
echo '<option selected disabled value="">Select Farmer...</option>';
while ($row = $cows->fetch()) {
echo "<option value='" . $row['farmer'] . "' >" . $row['farmer'] . "</option>";
}
echo "</select>";

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

163
lasuca/loaddata/index.php Normal file
View File

@@ -0,0 +1,163 @@
<!DOCTYPE html>
<html>
<head>
<title>Load Data</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="http://code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
</head>
<body>
<div class="center">
<div class="header">
</div>
<div class="row">
<div class="col-3 right">
<div class="aside">
<?php include("tonsin.php");?>
<?php include("tonsintot.php");?>
</div>
</div>
<div class="col-6">
<?php
if(isset($_GET['submit'])){
$serverName = "CBM2K12\SQLEXPRESS";
$uid = "cbmclient";
$pwd = "ascbm2k";
$connectionInfo = array( "UID"=>$uid, "PWD"=>$pwd,'ReturnDatesAsStrings'=> true, "CharacterSet" => 'utf-8', "Database"=>"SugarCaneScale" );
/* Connect using SQL Server Authentication. */
$conn = sqlsrv_connect( $serverName, $connectionInfo);
if( $conn === false )
{
echo "Unable to connect.</br>";
die( print_r( sqlsrv_errors(), true));
}
//select data from db
$sql = "SELECT LoadData.LoadId_Pk,
LoadData.CropDay,
LoadData.TractId_Fk,
LoadData.TareWt,
LoadData.GrossWt,
LoadData.Tons,
LoadData.FarmerId_Fk,
CONVERT(varchar, LoadData.DateOut, 100) [TIME],
LoadData.Parked,
Tract.AccountName
FROM LoadData RIGHT JOIN Tract ON LoadData.FarmerId_Fk = Tract.AccountId_Pk
WHERE CropDay LIKE ".$cropday." OR AccountName LIKE ".$grower."
GROUP BY LoadData.LoadId_Pk,
LoadData.CropDay,
LoadData.TractId_Fk,
LoadData.TareWt,
LoadData.GrossWt,
LoadData.Tons,
LoadData.FarmerId_Fk,
LoadData.DateOut,
LoadData.Parked,
Tract.AccountName
ORDER by LoadId_Pk DESC";
$stmt = sqlsrv_query( $conn, $sql );
if( $stmt === false) {
die( print_r( sqlsrv_errors(), true) );
}
$tonsin = 0;
$tonsin2 = 0;
}
?>
<table style="margin: 0px auto;">
<tr>
<th>
<form action="" method="GET">
<?php include("dayselect.php");?>
<?php include("growerselect.php");?>
<br>
<input id="option" type="checkbox" name="over" value="100000">
<label for="option"><span></span>OVERLOADS</label>
<input type="submit" name="submit" value="Search" />
</form>
</th>
</tr>
</table>
<table style="margin: 0px auto;" class="stat">
<tr>
<th>Live Scale Load Data</th>
</tr>
</table>
<table class="stat">
<thead>
<tr>
<th>Load</th>
<th>Day</th>
<th>Tract</th>
<th>Grower</th>
<th>Gross</th>
<th>Tare</th>
<th>Tons</th>
<th>Out Time</th>
</tr>
</thead>
<?php
while( $row = sqlsrv_fetch_array( $stmt, SQLSRV_FETCH_ASSOC) ) {
$tonsin += $row['Tons'];
echo "<tr>";
echo "<td>".$row ['LoadId_Pk']."</td>";
echo "<td><b>".$row ['CropDay']."</b></td>";
echo "<td>".$row ['TractId_Fk']."</td>";
echo "<td>".$row ['AccountName']."</td>";
echo "<td>".$row ['GrossWt']." </td>";
echo "<td>".$row ['TareWt']." </td>";
echo "<td>".$row ['Tons']." </td>";
echo "<td>".$row ['TIME']." </td>";
echo "</tr>";
}
//end
sqlsrv_free_stmt( $stmt);
sqlsrv_close( $conn);
?>
</table>
<table style="margin: 0px auto;">
<tr>
<th id="vtitle" id="padded">Total Tons:</th>
<th align="right" id="sum-count"><?php echo $tonsin; ?></th>
</tr>
</table>
</div>
<a href="#" class="back-to-top">Back to Top</a>
</div>
<?php include 'footer.php';?>
<script type="text/javascript">
// create the back to top button
$('body').prepend('<a href="#" class="back-to-top">Back to Top</a>');
var amountScrolled = 300;
$(window).scroll(function() {
if ($(window).scrollTop() > amountScrolled) {
$('a.back-to-top').fadeIn('slow');
} else {
$('a.back-to-top').fadeOut('slow');
}
});
$('a.back-to-top, a.simple-back-to-top').click(function() {
$('body').animate({
scrollTop: 0
}, 'fast');
return false;
});
</script>
</body>
</html>

View File

@@ -0,0 +1,135 @@
<!DOCTYPE html>
<html>
<head>
<title>Load Data</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="http://code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
</head>
<body>
<div class="center">
<div class="header">
</div>
<div class="row">
<div class="col-3 right">
<div class="aside">
<?php include("tonsin.php");?>
<?php include("tonsintot.php");?>
</div>
</div>
<?php
$dbName = "G:\CBM\SC\data\D_SCALE.mdb";
if (!file_exists($dbName)) {
die("Could not find database file.");
}
$db = new PDO("odbc:DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=$dbName; Uid=; Pwd=;");
//select data from db
$sql = "SELECT `Load Data`.`Load No`,
`Load Data`.`Crop Day`,
`Load Data`.`Tract No`,
`Load Data`.`Gross Wt`,
`Load Data`.`In Tare`,
`Load Data`.Tons,
`Load Data`.`In Time`,
`Load Data`.`Out Time`,
INSCALE.farmer,
INSCALE.REMTONs,
INSCALE.hauled
FROM `Load Data` RIGHT JOIN INSCALE ON `Load Data`.`Load No` = INSCALE.Load
WHERE `Crop Day` = ( SELECT Max(`Crop Day`)FROM `Load Data`)
ORDER BY `Crop Day`, `Load No` DESC";
$result = $db->query($sql);
$tonsin = 0;
$tonsin2 = 0;
?>
<div class="col-6">
<table style="margin: 0px auto;">
<tr>
<th>
<form action="search.php">
<?php include("dayselect.php");?>
<?php include("growerselect.php");?><br>
<input id="option" type="checkbox" name="over" value="100000">
<label for="option"><span></span>OVERLOAD</label>
<input type="submit" value="Search" />
</form>
</th>
</tr>
</table>
<table style="margin: 0px auto;" class="stat">
<tr>
<th>Live Scale Load Data</th>
</tr>
</table>
<table class="stat">
<thead>
<tr>
<th>Load</th>
<th>Day</th>
<th>Tract</th>
<th>Grower</th>
<th>Gross</th>
<th>Tare</th>
<th>Tons</th>
<th>Hauled</th>
<th>Remaining</th>
</tr>
</thead>
<?php
while ($row = $result->fetch())
{
echo "<tr>";
echo "<td>".$row [ 'Load No' ]."</td>";
echo "<td><b>".$row [ 'Crop Day' ]."</b></td>";
echo "<td>".$row [ 'Tract No' ]."</td>";
echo "<td>".$row [ 'farmer' ]."</td>";
echo "<td>".$row [ 'Gross Wt' ]." </td>";
echo "<td>".$row [ 'In Tare' ]." </td>";
echo "<td>".$row [ 'Tons' ]."</td>";
echo "<td>".$row [ 'hauled' ]." Tons</td>";
echo "<td>".$row [ 'REMTONs' ]." Tons</td>";
echo "</tr>";
}
//end
?>
</table>
</div>
<a href="#" class="back-to-top">Back to Top</a>
</div>
<?php include 'footer.php';?>
<script type="text/javascript">
// create the back to top button
$('body').prepend('<a href="#" class="back-to-top">Back to Top</a>');
var amountScrolled = 300;
$(window).scroll(function() {
if ($(window).scrollTop() > amountScrolled) {
$('a.back-to-top').fadeIn('slow');
} else {
$('a.back-to-top').fadeOut('slow');
}
});
$('a.back-to-top, a.simple-back-to-top').click(function() {
$('body').animate({
scrollTop: 0
}, 'fast');
return false;
});
</script>
</body>
</html>

9
lasuca/loaddata/menu.php Normal file
View File

@@ -0,0 +1,9 @@
<div class="col-3 menu">
<ul>
<li>Factory info</li>
<li>Production</li>
<li>Grower Login</li>
<li>Contact & Personnel</li>
</ul>
</div>

View File

@@ -0,0 +1,34 @@
<?php
$serverName = "LASUCA2K8\CBM";
$uid = "cbm";
$pwd = "ascbm2k";
$connectionInfo = array( "UID"=>$uid, "PWD"=>$pwd,'ReturnDatesAsStrings'=> true, "CharacterSet" => 'utf-8', "Database"=>"SugarCaneScale" );
/* Connect using SQL Server Authentication. */
$conn = sqlsrv_connect( $serverName, $connectionInfo);
if( $conn === false )
{
echo "Unable to connect.</br>";
die( print_r( sqlsrv_errors(), true));
}
$sql = "SELECT TOP 20 LoadId_Pk, CropDay, TractId_Fk, TareIN, GrossWt, Tons, FarmerId_Fk, DateOut, SplitPercent
FROM LoadData
WHERE FarmerId_Fk
LIKE 32002
ORDER by LoadId_Pk DESC";
$stmt = sqlsrv_query( $conn, $sql );
if( $stmt === false) {
die( print_r( sqlsrv_errors(), true) );
}
while( $row = sqlsrv_fetch_array( $stmt, SQLSRV_FETCH_ASSOC) ) {
echo $row['LoadId_Pk'].", ".$row['TareIN'].", ".$row['GrossWt'].", ".$row['Tons'].", ".$row['GrossWt'].", ".$row['FarmerId_Fk']."<br />";
}
/* Free statement and connection resources. */
sqlsrv_free_stmt( $stmt);
sqlsrv_close( $conn);
?>

158
lasuca/loaddata/report.php Normal file
View File

@@ -0,0 +1,158 @@
<!DOCTYPE html>
<html>
<head>
<title>Load Data</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="http://code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
</head>
<body>
<div class="center">
<div class="header">
</div>
<div class="row">
<div class="col-3 right">
<div class="aside">
<?php include("tonsin.php");?>
<?php include("tonsintot.php");?>
</div>
</div>
<div class="col-6">
<table style="margin: 0px auto;">
<tr>
<th>
<form method="POST" action="search.php">
<?php include("dayselect.php");?>
<?php include("growerselect.php");?><br>
<input id="option" type="checkbox" name="over" value="100000">
<label for="option"><span></span>OVERLOADS</label>
<input type="submit" value="Search" />
</form>
</th>
</tr>
</table>
<?php
$serverName = "CBM2K12\SQLEXPRESS";
$uid = "cbmclient";
$pwd = "ascbm2k";
$connectionInfo = array( "UID"=>$uid, "PWD"=>$pwd,'ReturnDatesAsStrings'=> true, "CharacterSet" => 'utf-8', "Database"=>"SugarCaneScale" );
/* Connect using SQL Server Authentication. */
$conn = sqlsrv_connect( $serverName, $connectionInfo);
if( $conn === false )
{
echo "Unable to connect.</br>";
die( print_r( sqlsrv_errors(), true));
}
//select data from db
$sql = "SELECT LoadData.LoadId_Pk,
LoadData.CropDay,
LoadData.TractId_Fk,
LoadData.TareWt,
LoadData.GrossWt,
LoadData.Tons,
LoadData.FarmerId_Fk,
CONVERT(varchar, LoadData.DateOut, 100) [TIME],
LoadData.Parked,
Tract.AccountName
FROM LoadData RIGHT JOIN Tract ON LoadData.FarmerId_Fk = Tract.AccountId_Pk
WHERE CropDay = 90
GROUP BY LoadData.LoadId_Pk,
LoadData.CropDay,
LoadData.TractId_Fk,
LoadData.TareWt,
LoadData.GrossWt,
LoadData.Tons,
LoadData.FarmerId_Fk,
LoadData.DateOut,
LoadData.Parked,
Tract.AccountName
ORDER by LoadId_Pk DESC";
$stmt = sqlsrv_query( $conn, $sql );
if( $stmt === false) {
die( print_r( sqlsrv_errors(), true) );
}
$tonsin = 0;
$tonsin2 = 0;
?>
<table style="margin: 0px auto;" class="stat">
<tr>
<th>Live Scale Load Data</th>
</tr>
</table>
<table class="stat">
<thead>
<tr>
<th>Load</th>
<th>Day</th>
<th>Tract</th>
<th>Grower</th>
<th>Gross</th>
<th>Tare</th>
<th>Tons</th>
<th>Out Time</th>
</tr>
</thead>
<?php
while( $row = sqlsrv_fetch_array( $stmt, SQLSRV_FETCH_ASSOC) ) {
$tonsin += $row['Tons'];
echo "<tr>";
echo "<td>".$row ['LoadId_Pk']."</td>";
echo "<td><b>".$row ['CropDay']."</b></td>";
echo "<td>".$row ['TractId_Fk']."</td>";
echo "<td>".$row ['AccountName']."</td>";
echo "<td>".$row ['GrossWt']." </td>";
echo "<td>".$row ['TareWt']." </td>";
echo "<td>".$row ['Tons']." </td>";
echo "<td>".$row ['TIME']." </td>";
echo "</tr>";
}
//end
sqlsrv_free_stmt( $stmt);
sqlsrv_close( $conn);
?>
</table>
<table style="margin: 0px auto;">
<tr>
<th id="vtitle" id="padded">Total Tons:</th>
<th align="right" id="sum-count"><?php echo $tonsin; ?></th>
</tr>
</table>
</div>
<a href="#" class="back-to-top">Back to Top</a>
</div>
<?php include 'footer.php';?>
<script type="text/javascript">
// create the back to top button
$('body').prepend('<a href="#" class="back-to-top">Back to Top</a>');
var amountScrolled = 300;
$(window).scroll(function() {
if ($(window).scrollTop() > amountScrolled) {
$('a.back-to-top').fadeIn('slow');
} else {
$('a.back-to-top').fadeOut('slow');
}
});
$('a.back-to-top, a.simple-back-to-top').click(function() {
$('body').animate({
scrollTop: 0
}, 'fast');
return false;
});
</script>
</body>
</html>

163
lasuca/loaddata/search.php Normal file
View File

@@ -0,0 +1,163 @@
<!DOCTYPE html>
<html>
<head>
<title>Load Data</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="http://code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
</head>
<body>
<div class="center">
<div class="header">
</div>
<div class="row">
<div class="col-3 right">
<div class="aside">
<?php include("tonsin.php");?>
<?php include("tonsintot.php");?>
</div>
</div>
<div class="col-6">
<table style="margin: 0px auto;">
<tr>
<th>
<form action="index.php">
<?php include("dayselect.php");?>
<?php include("growerselect.php");?><br>
<input id="option" type="checkbox" name="over" value="100000">
<label for="option"><span></span>OVERLOADS</label>
<input type="submit" value="Reset Search" />
</form>
</th>
</tr>
</table>
<?php
print_r($_POST);
$serverName = "CBM2K12\SQLEXPRESS";
$uid = "cbmclient";
$pwd = "ascbm2k";
$connectionInfo = array( "UID"=>$uid, "PWD"=>$pwd,'ReturnDatesAsStrings'=> true, "CharacterSet" => 'utf-8', "Database"=>"SugarCaneScale" );
/* Connect using SQL Server Authentication. */
$conn = sqlsrv_connect( $serverName, $connectionInfo);
if( $conn === false )
{
echo "Unable to connect.</br>";
die( print_r( sqlsrv_errors(), true));
}
//select data from db
$grower = $_POST['grower'];
$cropday = $_POST['cropday'];
$sql = "SELECT LoadData.LoadId_Pk,
LoadData.CropDay,
LoadData.TractId_Fk,
LoadData.TareWt,
LoadData.GrossWt,
LoadData.Tons,
LoadData.FarmerId_Fk,
CONVERT(varchar, LoadData.DateOut, 100) [TIME],
LoadData.Parked,
Tract.AccountName
FROM LoadData RIGHT JOIN Tract ON LoadData.FarmerId_Fk = Tract.AccountName
WHERE CropDay LIKE '%".$cropday."%' OR AccountName LIKE '%".$grower."%'
GROUP BY LoadData.LoadId_Pk,
LoadData.CropDay,
LoadData.TractId_Fk,
LoadData.TareWt,
LoadData.GrossWt,
LoadData.Tons,
LoadData.FarmerId_Fk,
LoadData.DateOut,
LoadData.Parked,
Tract.AccountName
ORDER by LoadId_Pk DESC";
$stmt = sqlsrv_query( $conn, $sql );
if( $stmt === false) {
die( print_r( sqlsrv_errors(), true) );
}
$tonsin = 0;
$tonsin2 = 0;
?>
<table style="margin: 0px auto;" class="stat">
<tr>
<th>Live Scale Load Data</th>
</tr>
</table>
<table class="stat">
<thead>
<tr>
<th>Load</th>
<th>Day</th>
<th>Tract</th>
<th>Grower</th>
<th>Gross</th>
<th>Tare</th>
<th>Tons</th>
<th>Out Time</th>
</tr>
</thead>
<?php
while( $row = sqlsrv_fetch_array( $stmt, SQLSRV_FETCH_ASSOC) ) {
$tonsin += $row['Tons'];
echo "<tr>";
echo "<td>".$row ['LoadId_Pk']."</td>";
echo "<td><b>".$row ['CropDay']."</b></td>";
echo "<td>".$row ['TractId_Fk']."</td>";
echo "<td>".$row ['AccountName']."</td>";
echo "<td>".$row ['GrossWt']." </td>";
echo "<td>".$row ['TareWt']." </td>";
echo "<td>".$row ['Tons']." </td>";
echo "<td>".$row ['TIME']." </td>";
echo "</tr>";
}
//end
sqlsrv_free_stmt( $stmt);
sqlsrv_close( $conn);
?>
</table>
</div>
<a href="#" class="back-to-top">Back to Top</a>
</div>
<?php include 'footer.php';?>
<script type="text/javascript">
// create the back to top button
$('body').prepend('<a href="#" class="back-to-top">Back to Top</a>');
var amountScrolled = 300;
$(window).scroll(function() {
if ($(window).scrollTop() > amountScrolled) {
$('a.back-to-top').fadeIn('slow');
} else {
$('a.back-to-top').fadeOut('slow');
}
});
$('a.back-to-top, a.simple-back-to-top').click(function() {
$('body').animate({
scrollTop: 0
}, 'fast');
return false;
});
</script>
</body>
</html>

232
lasuca/loaddata/style.css Normal file
View File

@@ -0,0 +1,232 @@
body{
max-width: 1080px;
margin: 0 auto !important;
float: none !important;
background-image: url("images/bg.gif");
background-color: #000;
}
* {
box-sizing: border-box;
}
.center {
background-color: #fff;
}
.row:after {
content: "";
clear: both;
display: block;
}
[class*="col-"] {
float: left;
padding: 15px;
}
html, html a {
font-family: Arial, "Lucida Sans", sans-serif;
-webkit-font-smoothing: antialiased !important;
text-shadow: 1px 1px 1px rgba(0,0,0,0.004);
}
.header {
background-image: url("images/fulllogo.png");
background-repeat: no-repeat;
background-position: center;
background-color: #474719;
height: 100px;
color: #ffffff;
padding: 15px;
}
h1 {
padding: 0px;
margin: 0px;
}
p{
padding: 0px;
margin: 0px;
}
.menu ul {
list-style-type: none;
margin: 0;
padding: 0;
}
.menu li {
padding: 8px;
margin-bottom: 7px;
background-color :#333300;
color: #ffffff;
box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
}
.menu li:hover {
background-color: #333333;
}
.aside {
background-color: #474719;
padding: 2px;
color: #ffffff;
text-align: center;
font-size: 14px;
box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
}
.footer {
background-color: #474719;
color: #ffffff;
text-align: center;
font-size: 12px;
padding: 15px;
}
/* For desktop: */
.col-1 {width: 8.33%;}
.col-2 {width: 16.66%;}
.col-3 {width: 20%;}
.col-4 {width: 33.33%;}
.col-5 {width: 41.66%;}
.col-6 {width: 80%;}
.col-7 {width: 58.33%;}
.col-8 {width: 66.66%;}
.col-9 {width: 75%;}
.col-10 {width: 83.33%;}
.col-11 {width: 91.66%;}
.col-12 {width: 100%;}
/*
Max width before this PARTICULAR table gets nasty
This query will take effect for any screen smaller than 760px
and also iPads specifically.
*/
@media
only screen and (max-width: 760px),
(min-device-width: 768px) and (max-device-width: 1024px) {
/* For mobile phones: */
[class*="col-"] {
width: 100%;
}
/* Force table to not be like tables anymore */
table, thead, tbody, th, td, tr {
display: block;
}
/* Hide table headers (but not display: none;, for accessibility) */
thead tr {
position: absolute;
top: -9999px;
left: -9999px;
}
tr { border: 1px solid #ccc; }
td {
/* Behave like a "row" */
border: none;
border-bottom: 1px solid #eee;
position: relative;
padding-left: 50%;
}
td:before {
/* Now like a table header */
position: absolute;
/* Top/left values mimic padding */
top: 6px;
left: 6px;
width: 45%;
padding-right: 10px;
white-space: nowrap;
}
/*
Label the data
*/
td:nth-of-type(1):before { content: "Load Number"; }
td:nth-of-type(2):before { content: "Crop DaY"; }
td:nth-of-type(3):before { content: "Tract No"; }
td:nth-of-type(4):before { content: "Grower"; }
td:nth-of-type(5):before { content: "Gross Wt"; }
td:nth-of-type(6):before { content: "Tare Wt"; }
td:nth-of-type(7):before { content: "Tons"; }
td:nth-of-type(8):before { content: "Tons Hauled"; }
td:nth-of-type(9):before { content: "Tons Remaining"; }
}
table {
border-collapse: collapse;
width: 100%;
}
table, th, td {
border: 1px solid black;
}
th {
background-color: grey;
color: white;
text-align: center;
vertical-align: center;
}
td {
text-align: center;
}
tr:nth-child(even) {
background: #6C6C47;
color: white;
}
tr:nth-child(odd) {
background: #FFF;
color: black;
}
input[type=checkbox]:not(old),
input[type=radio ]:not(old){aa
width : 2em;
margin : 0;
padding : 0;
font-size : 1em;
opacity : 0;
}
input[type=checkbox]:not(old) + label,
input[type=radio ]:not(old) + label{
display : inline-block;
margin-left : -2em;
line-height : 1.5em;
}
input[type=checkbox]:not(old) + label > span,
input[type=radio ]:not(old) + label > span{
display : inline-block;
width : 0.875em;
height : 0.875em;
margin : 0.05em 0.2em 0.35em 0.9em;
border : 0.0625em solid rgb(192,192,192);
border-radius : 0.25em;
background : rgb(224,224,224);
background-image : -moz-linear-gradient(rgb(240,240,240),rgb(224,224,224));
background-image : -ms-linear-gradient(rgb(240,240,240),rgb(224,224,224));
background-image : -o-linear-gradient(rgb(240,240,240),rgb(224,224,224));
background-image : -webkit-linear-gradient(rgb(240,240,240),rgb(224,224,224));
background-image : linear-gradient(rgb(240,240,240),rgb(224,224,224));
vertical-align : bottom;
}
input[type=checkbox]:not(old):checked + label > span:before{
content : '✓';
display : block;
width : 1em;
color : rgb(153,204,102);
font-size : 0.875em;
line-height : 1em;
text-align : center;
text-shadow : 0 0 0.0714em rgb(115,153,77);
font-weight : bold;
}
a.back-to-top {
display: none;
width: 35px;
height: 35px;
text-indent: -9999px;
position: fixed;
z-index: 999;
right: 20px;
bottom: 20px;
background: #27AE61 url("up-arrow.png") no-repeat center 43%;
-webkit-border-radius: 30px;
-moz-border-radius: 30px;
border-radius: 30px;
}
a:hover.back-to-top {
background-color: #000;
}

47
lasuca/loaddata/test.php Normal file
View File

@@ -0,0 +1,47 @@
<?php
//New Join Query
$sql = "SELECT `Load Data`.`Load No`,
`Load Data`.`Crop Day`,
`Load Data`.`Tract No`,
`Load Data`.`Gross Wt`,
`Load Data`.`In Tare`,
`Load Data`.Tons,
`Load Data`.`In Time`,
`Load Data`.`Out Time`,
INSCALE.Hauler
FROM `Load Data` RIGHT JOIN INSCALE ON `Load Data`.`Load No` = INSCALE.Load ORDER BY `Crop Day` DESC,`In Time` DESC";
{
echo "<tr>";
echo "<td>".$row [ 'load' ]."</td>";
echo "<td>".$row [ 'cropday' ]."</td>";
echo "<td>".$row [ 'tractno' ]."</td>";
echo "<td>".$row [ 'gross' ]." </td>";
echo "<td>".$row [ 'intare' ]." </td>";
echo "<td>".$row [ 'tons' ]." Tons</td>";
echo "<td>".$row [ 'intime' ]." </td>";
echo "<td>".$row [ 'outtime' ]." </td>";
echo "</tr>";
}
//Original Query
$sql = "SELECT * FROM `Load Data` ORDER BY `Crop Day` DESC,`In Time` DESC";
{
echo "<tr>";
echo "<td>".$row [ 'Load No' ]."</td>";
echo "<td>".$row [ 'Crop Day' ]."</td>";
echo "<td>".$row [ 'Tract No' ]."</td>";
echo "<td>".$row [ 'Gross Wt' ]." </td>";
echo "<td>".$row [ 'In Tare' ]." </td>";
echo "<td>".$row [ 'Tons' ]." Tons</td>";
echo "<td>".$row [ 'In Time' ]." </td>";
echo "<td>".$row [ 'Out Time' ]." </td>";
echo "</tr>";
}

View File

@@ -0,0 +1,36 @@
<?php
$serverName = "CBM2K12\SQLEXPRESS";
$uid = "cbmclient";
$pwd = "ascbm2k";
$connectionInfo = array( "UID"=>$uid, "PWD"=>$pwd,'ReturnDatesAsStrings'=> true, "CharacterSet" => 'utf-8', "Database"=>"SugarCaneScale" );
/* Connect using SQL Server Authentication. */
$conn = sqlsrv_connect( $serverName, $connectionInfo);
if( $conn === false )
{
echo "Unable to connect.</br>";
die( print_r( sqlsrv_errors(), true));
}
$sql = "SELECT Tons FROM LoadData WHERE CropDay = ( SELECT Max(CropDay) FROM LoadData)";
$stmt = sqlsrv_query( $conn, $sql );
if( $stmt === false) {
die( print_r( sqlsrv_errors(), true) );
}
$tonsin = 0;
while( $row = sqlsrv_fetch_array( $stmt, SQLSRV_FETCH_ASSOC) )
{
$tonsin += $row['Tons'];
}
//end
?>
<h2>Tons In Today</h2>
<p><?php echo $tonsin; ?></p>
<?
$db = null;
?>

View File

@@ -0,0 +1,36 @@
<?php
$serverName = "CBM2K12\SQLEXPRESS";
$uid = "cbmclient";
$pwd = "ascbm2k";
$connectionInfo = array( "UID"=>$uid, "PWD"=>$pwd,'ReturnDatesAsStrings'=> true, "CharacterSet" => 'utf-8', "Database"=>"SugarCaneScale" );
/* Connect using SQL Server Authentication. */
$conn = sqlsrv_connect( $serverName, $connectionInfo);
if( $conn === false )
{
echo "Unable to connect.</br>";
die( print_r( sqlsrv_errors(), true));
}
$sql = "SELECT Tons FROM LoadData WHERE CropDay = ( SELECT Max(CropDay)-1 FROM LoadData)";
$stmt = sqlsrv_query( $conn, $sql );
if( $stmt === false) {
die( print_r( sqlsrv_errors(), true) );
}
$tonsin = 0;
while( $row = sqlsrv_fetch_array( $stmt, SQLSRV_FETCH_ASSOC) )
{
$tonsin += $row['Tons'];
}
//end
?>
<h2>Tons In Today</h2>
<p><?php echo $tonsin; ?></p>
<?
$db = null;
?>

View File

@@ -0,0 +1,36 @@
<?php
$serverName = "CBM2K12\SQLEXPRESS";
$uid = "cbmclient";
$pwd = "ascbm2k";
$connectionInfo = array( "UID"=>$uid, "PWD"=>$pwd,'ReturnDatesAsStrings'=> true, "CharacterSet" => 'utf-8', "Database"=>"SugarCaneScale" );
/* Connect using SQL Server Authentication. */
$conn = sqlsrv_connect( $serverName, $connectionInfo);
if( $conn === false )
{
echo "Unable to connect.</br>";
die( print_r( sqlsrv_errors(), true));
}
$sql = "SELECT * FROM LoadData ORDER BY DateIn DESC";
$stmt = sqlsrv_query( $conn, $sql );
if( $stmt === false) {
die( print_r( sqlsrv_errors(), true) );
}
$tonsin = 0;
while( $row = sqlsrv_fetch_array( $stmt, SQLSRV_FETCH_ASSOC) )
{
$tonsin += $row['Tons'];
}
//end
?>
<h2>Tons In Total</h2>
<p><?php echo $tonsin; ?></p>
<?
$db = null;
?>

Binary file not shown.

After

Width:  |  Height:  |  Size: 299 B