Example #1
0
<?php

$markDetailId = $_REQUEST['markId'];
$treetype_id = $_REQUEST['treeId'];
$progressId = $_REQUEST['progressId'];
$timberDO = new TimberDO();
$timberlist = $timberDO->getTimberList();
$arrAllcontractors = $common->getAllcontractors();
$treeId = $_GET['treeId'];
$timberPreviousValue = array();
$timberPreviousVolume = array();
$timberCurrentValue = array();
$timberCurrentVolume = array();
$treeFillingArray = getArrayFromSession('treeFillingArray');
$pre_vol = $treeFillingArray[$treeId]->previousVolume;
$cur_vol = $treeFillingArray[$treeId]->currentVolume;
$markDetail = new MarkDetailDO();
$i_year = date('Y');
$i_month_id = date('m');
$i_contractor_id = $_GET['c_id'];
$markDetail = new MarkDetailDO();
$volumeTableDetail = $markDetail->getTimberVolummeDetail();
if (isset($_POST['cancel'])) {
    ob_end_clean();
    header("Location:" . BASE_URL . "index.php?page=conversionHome&markId=" . $markDetailId);
}
if (isset($_POST['update'])) {
    extract($_POST);
    $timberDetailArray = array();
    $count = 0;
    /**
Example #2
0
if (!isset($_GET['f'])) {
    removeFromSession('treeFillingArray');
    removeFromSession('treeConversionArray');
}
/*echo '<pre>';
 print_r($_SESSION);
 echo '</pre>';
*/
$treeFillingArray = getArrayFromSession('treeFillingArray');
/* start code update by priyanka 9/2/2011*/
if (!isset($treeFillingArray)) {
    $treeDetail = new TreeDO();
    $treeFillingArray = $treeDetail->getfillingDetail($markDetailId);
    $_SESSION['treeFillingArray'] = serialize($treeFillingArray);
}
$treeConversionArray = getArrayFromSession('treeConversionArray');
if (empty($treeConversionArray)) {
    foreach ($treeFillingArray as $treeFilling) {
        if ($treeFilling->treetype_id > 0) {
            $timberDetail = new TimberDO();
            $timberDetailArray = $timberDetail->getTimberDetail($treeFilling->treetype_id, $markDetailId);
            $treeConversionArray[$treeFilling->treetype_id] = $timberDetailArray;
        }
        $_SESSION['treeConversionArray'] = serialize($treeConversionArray);
    }
}
/*echo '<pre>';
		print_r(serialize($treeFillingArray));
		echo '</pre>';*/
/* end code update by priyanka 9/2/2011*/
$errorMsg = '';
Example #3
0
            $markTressDetails = (array) unserialize($_SESSION['markTressDetails']);
        }
        $markDetailDO = new MarkDetailDO();
        foreach ($markTressDetails as $tree => $v) {
            foreach ($v as $ttype => $detail) {
                /*
                		echo '<pre>';
                	   print_R($detail);
                	   echo '</pre>';*/
                if (isset($detail)) {
                    foreach ($detail as $key) {
                        $treeCategoryRelation = new TreeCategoryVO();
                        $treeCategoryRelation->i_category_id = $key->categoryId;
                        $treeCategoryRelation->i_mark_detail_id = $mardDetail->id;
                        $treeCategoryRelation->i_tree_id = $treetype_id;
                        $treeCategoryRelation->i_tree_type_id = $ttype;
                        $treeCategoryRelation->i_value = $key->categoryValue;
                        $markDetailDO->insertTreeCategoryDetail($treeCategoryRelation);
                    }
                }
            }
        }
        ob_end_clean();
        header("Location:" . BASE_URL . "index.php?page=sc2");
    }
    $markTressDetails = getArrayFromSession('markTressDetails');
    include 'html/screen3HTML.php';
} else {
    echo "There are no Tree Type entered for this department.";
}
include 'footer.php';