Beispiel #1
0
 function GetSoil($arg)
 {
     if (!is_numeric($arg)) {
         return FALSE;
     }
     $db = new Db();
     $SoilID = $db->quote($arg);
     $results = $db->select("SELECT * from Soils where SoilID = {$SoilID} limit 1");
     foreach ($results as $result) {
         $soil = new soil();
         $soil->hydrate($result);
     }
     return $soil;
 }
Beispiel #2
0
    require_once 'models/Location.Class.php';
}
if (!isset($_SESSION)) {
    // print ("Starting Session SaveFLower<br><br>");
    session_start();
}
if (isset($_SESSION)) {
    if (isset($_SESSION['current_user'])) {
        $user = $_SESSION['current_user'];
    }
}
// to see what is defined and included use this:
// debug_print_backtrace();
$php_errormsg = null;
$Plant = new Plant();
$Soil = new soil();
$Location = new Location();
$Weather = new weather();
if (isset($_GET['uid'])) {
    $Plant->setPlantUser($_GET['uid']);
} else {
    $php_errormsg = "Missing UserID. ";
}
if (isset($_GET['PlantName'])) {
    $Plant->setPlantName($_GET['PlantName']);
} else {
    $php_errormsg = $php_errormsg . "Missing Plant Name.<br> ";
}
if (isset($_GET['OnSite'])) {
    $Plant->setPlantEnteredOnSite($_GET['OnSite']);
} else {
Beispiel #3
0
        $Plant = $_SESSION['current_plant'];
    } else {
        $Plant = new Plant();
    }
    if (isset($_SESSION['current_location'])) {
        $Location = $_SESSION['current_location'];
    } else {
        $Location = new Location();
    }
    if (isset($_SESSION['current_weather'])) {
        $Weather = $_SESSION['current_weather'];
    } else {
        $Weather = new weather();
    }
}
$Soil = new soil();
$SoilList = $Soil->GetAllSoils();
$SoilMenu = new selectMenu();
$SoilMenu->setOptions($SoilList);
include_once 'include/header.php';
if (isset($php_errormsg)) {
    ?>
    <h1> Please correct the following errors: <?php 
    $php_errormsg;
    ?>
</h1>
<?php 
}
?>

<div class="row">