Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
Your IP : 18.117.101.250
<?php
class valuation
{
public $internal_code;
function __construct($aobj_context)
{
session_start();
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$this->aobj_context=$aobj_context;
include_once("/JSON.php");
$this->json = new Services_JSON();
$this->user_id = $_SESSION['user_id'];
$this->user_type = $_SESSION['user_type'];
$this->collcode = $_SESSION['collcode'];
$this->freeze_code = $aobj_context->mobj_data["freeze_code"];
$this->freeze_packet_no = $aobj_context->mobj_data["freeze_packet_no"];
$this->freeze_val_no = $aobj_context->mobj_data["freeze_val_no"];
$this->freeze_check_sum_no = $aobj_context->mobj_data["freeze_check_sum_no"];
}
function SaveFreezeMarks()
{
$lstr_param = stripslashes($this->aobj_context->mobj_data["freeze_packet_details"]);
$this->mobj_jsondata = $this->json->decode($lstr_param);
$this->larr_output_details = get_object_vars($this->mobj_jsondata);
for( $i = 0; $i < count($this->larr_output_details); $i++ )
{
$update_freeze="update tabhead set
FCHKNO='{$this->larr_output_details[$i]->f_check}',
FFREEZE='{$this->larr_output_details[$i]->f_frez}'
where FCOLLCODE='{$this->collcode}'
and FPACKET='{$this->larr_output_details[$i]->f_pack}'
and FQPCODE='{$this->larr_output_details[$i]->f_qp_code}'
and FVALNO='{$this->larr_output_details[$i]->f_val}'
";
// echo $update_freeze; die();
$lobj_update_freezes = $this->aobj_context->mobj_db->Execute($update_freeze);
}
if($lobj_update_freezes)
{
$rdata = "Freezed Successfully.";
print_r($this->aobj_context->mobj_output->ToJSONEnvelope($rdata,0,"success"));
}
else
{
$rdata = "There was a problem while inserting.Please Check it Once Again ";
print_r($this->aobj_context->mobj_output->ToJSONEnvelope($rdata,-1,"Failure"));
}
}
function DisplayFreezeMarksGrid()
{
$get_freeze_data="select FQPCODE,FPACKET,FVALNO,
ifnull(FCHKNO,0) as FCHKNO,FFREEZE
from tabhead
where FCOLLCODE='{$this->collcode}'
and
FQPCODE='{$this->freeze_code}'
";
$lobj_get_freeze_data = $this->aobj_context->mobj_db->GetAll($get_freeze_data);
$freeze_html="";
$freeze_html.="<table align='center' border='0' cellpadding='0' class='freeze_table' cellspacing='0' width='100%'>";
$freeze_html.="<th colspan='6' class='th_freeze_class'>Freeze Marks</th>";
$freeze_html.="<tr class='tr_bg_color'>";
$freeze_html.="<td>QpCode</td>";
$freeze_html.="<td>Packets</td>";
$freeze_html.="<td>Val No</td>";
$freeze_html.="<td>Check No</td>";
$freeze_html.="<td>Report</td>";
$freeze_html.="<td class='td_border'>Freeze Y/N</td></tr>";
$f=1;
foreach($lobj_get_freeze_data as $fk=>$fv)
{
$FQPCODE= $fv[FQPCODE];
$FPACKET= $fv[FPACKET];
$FVALNO= $fv[FVALNO];
$FCHKNO= $fv[FCHKNO];
$FCHKNO=empty($FCHKNO)?0:$FCHKNO;
$FFREEZE= $fv[FFREEZE];
$freeze_html.="<tr class='tr_height'>";
$freeze_html.="<td style='border-left:1px solid #a0140d;' id='td_qp_$f'>{$FQPCODE}</td>";
$freeze_html.="<td style=' cursor:pointer;' id='td_pack_$f'>{$FPACKET}</td>";
$freeze_html.="<td style=' cursor:pointer;' id='td_val_$f'>{$FVALNO}</td>";
$freeze_html.="<td style='cursor:pointer;' id='td_check_$f'><INPUT onkeypress='return AcceptNumbersOnly(event);' value='{$FCHKNO}' maxlength='4' onblur='checkValidCheckNo(this,{$FCHKNO});' TYPE='TEXT' id='input_check_no_{$f}'></td>";//<INPUT TYPE='HIDDEN' ID='hidden_check_no_{$f}' value='{$FCHKNO}' />
$freeze_html.="<td style='cursor:pointer;' id='td_report_$f'><a target='#' style='color:blue;cursor:pointer;' onclick=GenerateEvaluationReportFromFreezeScreen({$f}); >Report</a> </td>";
$freeze_html.="<td style='border-right:1px solid #a0140d; cursor:pointer;'><input type='checkbox' id='input_frez_$f'/></td>";
$freeze_html.="</tr>";
$f++;
}
$arr['html']=$freeze_html."</table>";
$arr['freeze_data']= $lobj_get_freeze_data;
echo $this->aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
}
}
function FreezePacketNoDetails($aobj_context)
{
$valu_obj=new valuation($aobj_context);
$valu_obj->FreezePacketNoDetails();
}
function FreezeValNoDetails($aobj_context)
{
$valu_obj=new valuation($aobj_context);
$valu_obj->FreezeValNoDetails();
}
function SaveFreezeMarks($aobj_context)
{
$valu_obj=new valuation($aobj_context);
$valu_obj->SaveFreezeMarks();
}
function DisplayFreezeMarksGrid($aobj_context)
{
$valu_obj=new valuation($aobj_context);
$valu_obj->DisplayFreezeMarksGrid();
}
?>
|