Exemplo n.º 1
0
function createHuntFromRow($dbRow)
{
    $rowHunt = new hunt_info();
    $rowHunt->setId($dbRow['id']);
    $rowHunt->setHunterId($dbRow['hunter_id']);
    $rowHunt->setCreated($dbRow['created']);
    return $rowHunt;
}
Exemplo n.º 2
0
 $hunterCount = $_POST['hunter_count'];
 $carCount = $_POST['car_count'];
 $hours = $_POST['hours'];
 $blindNumberString = $_POST['blind'];
 $areaNumberString = $_POST['area'];
 $isMultiBlind = $_POST['multi_blind'];
 $isJumpShoot = $_POST['jump_shoot'];
 $isBagChecked = $_POST['bag_checked'];
 $blindNumber = $blindNumberString + 0;
 $areaNumber = $areaNumberString + 0;
 $currentUser = getCurrentUser();
 $hunter = getHunter($currentUser);
 //var_dump_j("dateString", $dateString);
 $mysqlDateString = formatMySQLDateString($dateString);
 //var_dump_j("mysqlDateString", $mysqlDateString);
 $newHunt = new hunt_info();
 $newHunt->setHunterId($hunter->getId());
 $createdDateString = getNow();
 $newHunt->setCreated($createdDateString);
 $huntId = saveNewHunt($newHunt);
 $newHuntDetails = new hunt_details_info();
 $newHuntDetails->setHuntId($huntId);
 $newHuntDetails->setStatus("NEW");
 $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);