<?php session_start(); require_once "connect.php"; if (!isset($_SESSION['username']) || !isset($_SESSION['password'])) { header("Location: login.php"); } include "inc/functions.php"; include "inc/pigdet.php"; $pig = new pigdet_functions(); $db = new phpork_functions(); echo json_encode($db->updateFeeds($_GET['fid'], $_GET['frid'], $_SESSION['user_id'])); // change '1' to $_SESSION['userid']
* PROTOTYPE PORK TRACEABILITY SYSTEM * Copyright © 2014 UPLB. --> <!DOCTYPE HTML> <html lang="en"> <?php session_start(); require_once "connect.php"; if (!isset($_SESSION['username']) || !isset($_SESSION['password'])) { header("Location: login.php"); } include "inc/functions.php"; include "inc/pigdet.php"; $pig = new pigdet_functions(); $db = new phpork_functions(); ?> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Pork Traceability System</title> <link rel="stylesheet" href="css/bootstrap.css"> <link rel="stylesheet" href="css/bootstrap.min.css"> <link rel="stylesheet" href="css/bootstrap-theme.css"> <link rel="stylesheet" href="css/bootstrap-theme.min.css"> <link rel="stylesheet" href="css/style2.css"> <script src="js/jquery.js"></script> </head> <body> <div class="page-header col-xs-12 col-sm-12 col-md-12 col-lg-12">
<!-- * PROTOTYPE PORK TRACEABILITY SYSTEM * Copyright © 2014 UPLB. --> <!DOCTYPE HTML> <html lang="en"> <?php session_start(); require_once "connect.php"; if (!isset($_SESSION['username']) || !isset($_SESSION['password'])) { header("Location: login.php"); } include "inc/functions.php"; $db = new phpork_functions(); ?> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Pork Traceability System</title> <link rel="stylesheet" href="css/bootstrap.css"> <link rel="stylesheet" href="css/bootstrap.min.css"> <link rel="stylesheet" href="css/bootstrap-theme.css"> <link rel="stylesheet" href="css/bootstrap-theme.min.css"> <link rel="stylesheet" href="css/style2.css"> </head> <body> <div class="container"> <div class="page-header"> <img class="img-responsive" src="css/images/letterhead.png">
<?php session_start(); require_once "connect.php"; if (!isset($_SESSION['username']) || !isset($_SESSION['password'])) { header("Location: login.php"); } include "inc/functions.php"; include "inc/pigdet.php"; $pig = new pigdet_functions(); $db = new phpork_functions(); echo json_encode($db->updateMeds($_GET['medid'], $_GET['mrid'], $_SESSION['user_id'])); // change '1' to $_SESSION['userid']
* PROTOTYPE PORK TRACEABILITY SYSTEM * Copyright © 2014 UPLB. --> <!DOCTYPE HTML> <html lang="en"> <?php session_start(); require_once "connect.php"; if (!isset($_SESSION['username']) || !isset($_SESSION['password'])) { header("Location: login.php"); } include "inc/functions.php"; include "inc/pigdet.php"; $pig = new pigdet_functions(); $db = new phpork_functions(); if (isset($_POST['ed_birth'])) { $newbirth = $_POST['ed_birth']; $newweight = $_POST['ed_weight']; $newuser = "******"; $prevbirth = $pig->getBirthDate($_GET['pig']); $prevweight = $pig->getWeight($_GET['pig']); $prevuser = $pig->getUserEdited($_GET['pig']); $db->updatePigDetails($_GET['pig'], $newbirth, $newweight, $newuser); $db->insertEditHistory($prevbirth, $prevweight, $prevuser, $_GET['pig']); } ?> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Pork Traceability System</title>
<?php /* PROTOTYPE PORK TRACEABILITY SYSTEM * Copyright © 2014 UPLB.*/ require_once 'dbinfo.inc'; $fxn = new phpork_functions(); if (isset($_POST['feed'])) { $feed = $_POST['feed']; $fxn->getFeedType($feed); $fxn->getFeedProdDate($feed); } if (isset($_POST['med'])) { $med = $_POST['med']; $fxn->getMedType($med); } class phpork_functions { private function connect() { $link = mysqli_connect(HOSTNAME, USERNAME, PASSWORD, DATABASE) or die('Could not connect: ' . mysqli_error()); mysqli_select_db($link, DATABASE) or die('Could not select database' . mysql_error()); return $link; } public function ddl_mainlocation() { $link = $this->connect(); $query = "SELECT loc_name,\n\t\t\t\t\tloc_id\n\t\t\t\tFROM location"; $result = mysqli_query($link, $query) or die(mysqli_error($link)); while ($row = mysqli_fetch_row($result)) { echo "<option value = {$row['1']} >{$row['0']}</option>"; }