Exemplo n.º 1
0
 $markDetailVO->dt_toDate = date('Y-m-d', strtotime($todate));
 if ($lotno != '') {
     $markDetailVO->vc_lotno = 'M_' . $lotno;
 }
 $markDetailVO->dt_completionDate = date('Y-m-d', strtotime($completionDate));
 $markDetailDO = new MarkDetailDO();
 if (isset($_GET['markId']) && $_GET['markId'] != '') {
     $markDetailVO->id = $_GET['markId'];
     $arCondition = array('id' => $_GET['markId']);
     $markDetailVO->m_id = $db->update('c_mark_detail', $markDetailVO, $arCondition);
     $markDetailVO->m_id = $markDetail->id;
     $_SESSION['mardDetail'] = serialize($markDetailVO);
     ob_end_clean();
     header("Location:" . BASE_URL . "index.php?page=markCompleteDetail&markId=" . $markDetail->id);
 } else {
     $alreadyAddedCount = $markDetailDO->getExistingEntry($markDetailVO);
     $alreadyAddedCount = 1;
     $manualLot = $markDetailDO->checkManualLotNumber($markDetailVO);
     echo $alreadyAddedCount . '<br>';
     echo $manualLot . '<br>';
     if ($manualLot > 0 || $manualLot > 0) {
         // Redirest to profile
         $dateRangeString = "&dt_fromDate=" . $markDetailVO->dt_fromDate . "&dt_toDate=" . $markDetailVO->dt_toDate . ($dateRangeString .= "&i_division_id=" . $markDetailVO->i_division_id . "&i_forest_id=" . $markDetailVO->i_forest_id . ($dateRangeString .= "&daterangeerror=error"));
         if ($manualLot > 0) {
             $errorMsg = 'Manual Lot Already Exists ';
         } else {
             $errorMsg = 'Records  Already Added ';
         }
         // header("Location:".BASE_URL."index.php?page=profile".$dateRangeString);
         //  return;
     } else {