<?php
	
	$showFile = "validate/init_scrutiny_obs.html";
	$ajax = new etamineAjax();
	$db_win  = new etamineDB('t155', 'alam@273', '180.92.168.223', 'cvcdata');
	$db = new etamineDB();
	$ajax->showLoading();
	$ajax->setRequestType("POST");
	$ajax->process();
	
	/** Query to Display Previous Observations for the perticular projectid**/
	$ObsQuery="select tbl_cvc_init_scrutiny_obs.obs_proj_name,
			tbl_cvc_init_scrutiny_obs.obs_stakeholders,
			tbl_cvc_init_scrutiny_obs.obs_completed_fields,
			tbl_cvc_init_scrutiny_obs.obs_incomplete_fields,
			tbl_cvc_init_scrutiny_obs.obs_budget_exc_est_stg,
			tbl_cvc_init_scrutiny_obs.obs_budget_exc_award_stg,
			tbl_cvc_init_scrutiny_obs.obs_budget_exc_comp_stg,
			tbl_cvc_init_scrutiny_obs.obs_tender_proc_delay_prequal,
			tbl_cvc_init_scrutiny_obs.obs_tender_proc_delay_techstg,
			tbl_cvc_init_scrutiny_obs.obs_tender_proc_delay_commstg,
			tbl_cvc_init_scrutiny_obs.obs_tender_proc_finalization,
			tbl_cvc_init_scrutiny_obs.obs_tender_proc_nomination,
			tbl_cvc_init_scrutiny_obs.obs_tender_bid_partci_low,
			tbl_cvc_init_scrutiny_obs.obs_exec_stg_late_start,
			tbl_cvc_init_scrutiny_obs.obs_exec_stg_exc_cmplntime,
			tbl_cvc_init_scrutiny_obs.obs_exec_stg_extraitem_exc_cost,
			tbl_cvc_init_scrutiny_obs.obs_pay_phy_fin_prog_mismatch,
			tbl_cvc_init_scrutiny_obs.obs_pay_delay 
			from tbl_cvc_init_scrutiny_obs 
			where tbl_cvc_init_scrutiny_obs.init_scru_obs_id='$p_init_scru_obs_id'";
	$use_obsValues = $db_win->DbGetRecord($ObsQuery);
	
	$topValues[] = array(
	"USERNAME"=>$_SESSION['username'],
	"GROUPID"=>$_SESSION['GROUPID'],
	"ORGANIZATION"=>$dbvalues0rg,
	"ORGANIZATIONID"=>$_SESSION['ORGANIZATIONID'],
	);
	$middleValues[]= $use_obsValues;
	$middleValues[] = array(
		"AJAXCONTENT"=>$ajax->getJavaScript(false, true),
		"GROUPID"=>$_SESSION['GROUPID'],
		"FORMACTION"=>$p_action,
		"MODULE"=>$p_module,
		"SKINS"=>$GLOBALS['skins'],
	);
	
	//$etamineParser->assign("USE_OBSVALUES", $use_obsValues);
	$topContents = $etamineParser->Parse($topFile,$topValues);
	$etamineParser->assign($_SESSION['ACCESSINFO']['Front Validate']);
	$middleContents = $etamineParser->Parse(TEMPLATE . $showFile , $middleValues);
?>
