Exemplo n.º 1
0
function createHuntDetailsFromRow($dbRow)
{
    $rowHuntDetails = new hunt_details_info();
    $rowHuntDetails->setId($dbRow['id']);
    $rowHuntDetails->setHuntId($dbRow['hunt_id']);
    $rowHuntDetails->setStatus($dbRow['status']);
    $rowHuntDetails->setHunterId($dbRow['hunter_id']);
    $rowHuntDetails->setHunterCount($dbRow['hunter_count']);
    $rowHuntDetails->setHuntDate($dbRow['hunt_date']);
    $rowHuntDetails->setHuntHours($dbRow['hunt_hours']);
    $rowHuntDetails->setCarCount($dbRow['car_count']);
    $rowHuntDetails->setBlindId($dbRow['blind_id']);
    $rowHuntDetails->setAreaId($dbRow['area_id']);
    $rowHuntDetails->setCreated($dbRow['created']);
    $rowHuntDetails->setMultiBlind($dbRow['is_multi_blind']);
    $rowHuntDetails->setJumpShoot($dbRow['is_jump_shoot']);
    $rowHuntDetails->setBagChecked($dbRow['is_bag_checked']);
    return $rowHuntDetails;
}
Exemplo n.º 2
0
     //
     //			$huntId = saveNewHunt($newHunt);
     $createdDateString = getNow();
     $huntId = $_POST['hunt_id'];
     $mysqlDateString = formatMySQLDateString($dateString);
     $newHuntDetails = new hunt_details_info();
     $newHuntDetails->setHuntId($huntId);
     $newHuntDetails->setStatus("EDIT");
     $newHuntDetails->setHunterId($hunter->getId());
     $newHuntDetails->setHunterCount($hunterCount);
     $newHuntDetails->setHuntDate($mysqlDateString);
     $newHuntDetails->setHuntHours($hours);
     $newHuntDetails->setCarCount($carCount);
     $newHuntDetails->setBlindId($blindNumber);
     $newHuntDetails->setAreaId($areaNumber);
     $newHuntDetails->setMultiBlind($isMultiBlind);
     $newHuntDetails->setJumpShoot($isJumpShoot);
     $newHuntDetails->setBagChecked($isBagChecked);
     $newHuntDetails->setCreated($createdDateString);
     $huntDetailsId = saveNewHuntDetails($newHuntDetails);
     $harvestCountList = collectHarvestCountList($createdDateString);
     saveNewHarvestCountList($huntId, $huntDetailsId, $harvestCountList);
     logTheUpdatingOfAHunt($newHuntDetails);
     sendUpdateHuntNotification($newHuntDetails);
     header("Location: /HuntingHarvest.php");
 } catch (Exception $e) {
     // Unsuccessful login
     if ($e->getMessage() == 'no user found') {
         addError('login', 'We could not find you in our system');
         header('Location: /index.php');
     } else {